<!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=" ">
<title>Old Release Notes | 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="Old Release Notes">{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.42.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><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>
                

            

            
            
            

            

                
                <li><a href="pmd_languages_plsql.html">PLSQL</a></li>
                

            

            
            
            

            

                
                <li><a href="pmd_languages_visualforce.html">Visualforce</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_rule_guidelines.html">Rule Guidelines</a></li>
                        
                        
                        
                        
                        
                        <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 class="active"><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_infrastructure.html">Infrastructure</a></li>
                        
                        
                        
                        
                        
                        <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">Old Release Notes</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/release_notes_old.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
        

    

  <p>Previous versions of PMD can be downloaded here: https://github.com/pmd/pmd/releases</p>

<h2 id="27-november-2021---6410">27-November-2021 - 6.41.0</h2>

<p>The PMD team is pleased to announce PMD 6.41.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#github-action-for-pmd">GitHub Action for PMD</a></li>
      <li><a href="#last-release-in-2021">Last release in 2021</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#command-line-interface">Command Line Interface</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy">New and noteworthy</h3>

<h4 id="github-action-for-pmd">GitHub Action for PMD</h4>

<p>PMD now has its own official GitHub Action: <a href="https://github.com/marketplace/actions/pmd">GitHub Action for PMD</a>.
It can execute PMD with your own ruleset against your project. It creates a <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html">SARIF</a>
report which is uploaded as a build artifact. Furthermore the build can be failed based on the number of violations.</p>

<p>Feedback and pull requests are welcome at <a href="https://github.com/pmd/pmd-github-action">https://github.com/pmd/pmd-github-action</a>.</p>

<h4 id="last-release-in-2021">Last release in 2021</h4>

<p>This minor release will be the last one in 2021. The next release is scheduled to be end of January 2022.</p>

<h3 id="fixed-issues">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2954">#2954</a>: Create GitHub Action for PMD</li>
      <li><a href="https://github.com/pmd/pmd/issues/3424">#3424</a>: [core] Migrate CLI to using GNU-style long options</li>
      <li><a href="https://github.com/pmd/pmd/issues/3425">#3425</a>: [core] Add a <code class="language-plaintext highlighter-rouge">--version</code> CLI option</li>
      <li><a href="https://github.com/pmd/pmd/issues/3593">#3593</a>: [core] Ant task fails with Java17</li>
      <li><a href="https://github.com/pmd/pmd/issues/3635">#3635</a>: [ci] Update sample projects for regression tester</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3595">#3595</a>: [java] PrimitiveWrapperInstantiation: no violation on ‘new Boolean(val)’</li>
      <li><a href="https://github.com/pmd/pmd/issues/3613">#3613</a>: [java] ArrayIsStoredDirectly doesn’t consider nested classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/3614">#3614</a>: [java] JUnitTestsShouldIncludeAssert doesn’t consider nested classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/3618">#3618</a>: [java] UnusedFormalParameter doesn’t consider anonymous classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/3630">#3630</a>: [java] MethodReturnsInternalArray doesn’t consider anonymous classes</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3620">#3620</a>: [java] SingularField doesn’t consider anonymous classes defined in non-private fields</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3624">#3624</a>: [java] TestClassWithoutTestCases reports wrong classes in a file</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3491">#3491</a>: [java] UselessStringValueOf: False positive when <code class="language-plaintext highlighter-rouge">valueOf(char [], int, int)</code> is used</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes">API Changes</h3>

<h4 id="command-line-interface">Command Line Interface</h4>

<p>The command line options for PMD and CPD now use GNU-syle long options format. E.g. instead of <code class="language-plaintext highlighter-rouge">-rulesets</code> the
preferred usage is now <code class="language-plaintext highlighter-rouge">--rulesets</code>. Alternatively one can still use the short option <code class="language-plaintext highlighter-rouge">-R</code>.
Some options also have been renamed to a more consistent casing pattern at the same time
(<code class="language-plaintext highlighter-rouge">--fail-on-violation</code> instead of <code class="language-plaintext highlighter-rouge">-failOnViolation</code>).
The old single-dash options are still supported but are deprecated and will be removed with PMD 7.
This change makes the command line interface more consistent within PMD and also less surprising
compared to other cli tools.</p>

<p>The changes in detail for PMD:</p>

<table>
  <thead>
    <tr>
      <th>old option</th>
      <th>new option</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-rulesets</code></td>
      <td><code class="language-plaintext highlighter-rouge">--rulesets</code> (or <code class="language-plaintext highlighter-rouge">-R</code>)</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-uri</code></td>
      <td><code class="language-plaintext highlighter-rouge">--uri</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-dir</code></td>
      <td><code class="language-plaintext highlighter-rouge">--dir</code> (or <code class="language-plaintext highlighter-rouge">-d</code>)</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-filelist</code></td>
      <td><code class="language-plaintext highlighter-rouge">--file-list</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-ignorelist</code></td>
      <td><code class="language-plaintext highlighter-rouge">--ignore-list</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-format</code></td>
      <td><code class="language-plaintext highlighter-rouge">--format</code> (or <code class="language-plaintext highlighter-rouge">-f</code>)</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-debug</code></td>
      <td><code class="language-plaintext highlighter-rouge">--debug</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-verbose</code></td>
      <td><code class="language-plaintext highlighter-rouge">--verbose</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-help</code></td>
      <td><code class="language-plaintext highlighter-rouge">--help</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-encoding</code></td>
      <td><code class="language-plaintext highlighter-rouge">--encoding</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-threads</code></td>
      <td><code class="language-plaintext highlighter-rouge">--threads</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-benchmark</code></td>
      <td><code class="language-plaintext highlighter-rouge">--benchmark</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-stress</code></td>
      <td><code class="language-plaintext highlighter-rouge">--stress</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-shortnames</code></td>
      <td><code class="language-plaintext highlighter-rouge">--short-names</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-showsuppressed</code></td>
      <td><code class="language-plaintext highlighter-rouge">--show-suppressed</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-suppressmarker</code></td>
      <td><code class="language-plaintext highlighter-rouge">--suppress-marker</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-minimumpriority</code></td>
      <td><code class="language-plaintext highlighter-rouge">--minimum-priority</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-property</code></td>
      <td><code class="language-plaintext highlighter-rouge">--property</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-reportfile</code></td>
      <td><code class="language-plaintext highlighter-rouge">--report-file</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-force-language</code></td>
      <td><code class="language-plaintext highlighter-rouge">--force-language</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-auxclasspath</code></td>
      <td><code class="language-plaintext highlighter-rouge">--aux-classpath</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-failOnViolation</code></td>
      <td><code class="language-plaintext highlighter-rouge">--fail-on-violation</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">--failOnViolation</code></td>
      <td><code class="language-plaintext highlighter-rouge">--fail-on-violation</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-norulesetcompatibility</code></td>
      <td><code class="language-plaintext highlighter-rouge">--no-ruleset-compatibility</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-cache</code></td>
      <td><code class="language-plaintext highlighter-rouge">--cache</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-no-cache</code></td>
      <td><code class="language-plaintext highlighter-rouge">--no-cache</code></td>
    </tr>
  </tbody>
</table>

<p>The changes in detail for CPD:</p>

<table>
  <thead>
    <tr>
      <th>old option</th>
      <th>new option</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">--failOnViolation</code></td>
      <td><code class="language-plaintext highlighter-rouge">--fail-on-violation</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">-failOnViolation</code></td>
      <td><code class="language-plaintext highlighter-rouge">--fail-on-violation</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">--filelist</code></td>
      <td><code class="language-plaintext highlighter-rouge">--file-list</code></td>
    </tr>
  </tbody>
</table>

<h3 id="external-contributions">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3600">#3600</a>: [core] Implement GNU-style long options and ‘–version’ - <a href="https://github.com/duanyang25">Yang</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3612">#3612</a>: [java] Created fix for UselessStringValueOf false positive - <a href="https://github.com/johnra2">John Armgardt</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3648">#3648</a>: [doc] Rename Code Inspector to Codiga - <a href="https://github.com/juli1">Julien Delange</a></li>
</ul>

<h3 id="stats">Stats</h3>
<ul>
  <li>80 commits</li>
  <li>23 closed tickets &amp; PRs</li>
  <li>Days since last release: 28</li>
</ul>

<h2 id="30-october-2021---6400">30-October-2021 - 6.40.0</h2>

<p>The PMD team is pleased to announce PMD 6.40.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-1">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#updated-apex-support">Updated Apex Support</a></li>
      <li><a href="#new-rules">New rules</a></li>
      <li><a href="#modified-rules">Modified rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#experimental-apis">Experimental APIs</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-1">New and noteworthy</h3>

<h4 id="updated-apex-support">Updated Apex Support</h4>

<ul>
  <li>The Apex language support has been bumped to version 54.0 (Spring ‘22).</li>
</ul>

<h4 id="new-rules">New rules</h4>

<ul>
  <li>The new Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_performance.html#eagerlyloadeddescribesobjectresult"><code class="language-plaintext highlighter-rouge">EagerlyLoadedDescribeSObjectResult</code></a> finds
<code class="language-plaintext highlighter-rouge">DescribeSObjectResult</code>s which could have been loaded eagerly via <code class="language-plaintext highlighter-rouge">SObjectType.getDescribe()</code>.</li>
</ul>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/apex/performance.xml/EagerlyLoadedDescribeSObjectResult"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>

<h4 id="modified-rules">Modified rules</h4>

<ul>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_bestpractices.html#apexunittestclassshouldhaveasserts"><code class="language-plaintext highlighter-rouge">ApexUnitTestClassShouldHaveAsserts</code></a> has a new property
<code class="language-plaintext highlighter-rouge">additionalAssertMethodPattern</code>. When specified the pattern is evaluated against each invoked
method name to determine whether it represents a test assertion in addition to the standard names.</p>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_documentation.html#apexdoc"><code class="language-plaintext highlighter-rouge">ApexDoc</code></a> has a new property <code class="language-plaintext highlighter-rouge">reportMissingDescription</code>.
If set to <code class="language-plaintext highlighter-rouge">false</code> (default is <code class="language-plaintext highlighter-rouge">true</code> if unspecified) doesn’t report an issue if the <code class="language-plaintext highlighter-rouge">@description</code>
tag is missing. This is consistent with the ApexDoc dialect supported by derivatives such as
<a href="https://gitlab.com/StevenWCox/sfapexdoc">SfApexDoc</a> and also with analogous documentation tools for
other languages, e.g., JavaDoc, ESDoc/JSDoc, etc.</p>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_security.html#apexcrudviolation"><code class="language-plaintext highlighter-rouge">ApexCRUDViolation</code></a> has a couple of new properties:
These allow specification of regular-expression-based patterns for additional methods that should
be considered valid for pre-CRUD authorization beyond those offered by the system Apex checks and
ESAPI, e.g., <a href="https://github.com/SCWells72/sirono-common#authorization-utilities"><code class="language-plaintext highlighter-rouge">sirono-common</code>’s <code class="language-plaintext highlighter-rouge">AuthorizationUtil</code> class</a>.
Two new properties have been added per-CRUD operation, one to specify the naming pattern for a method
that authorizes that operation and another to specify the argument passed to that method that contains
the <code class="language-plaintext highlighter-rouge">SObjectType</code> instance of the type being authorized. Here is an example of these new properties:</p>

    <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/apex/security.xml/ApexCRUDViolation"</span> <span class="na">message=</span><span class="s">"..."</span><span class="nt">&gt;</span>
  <span class="nt">&lt;priority&gt;</span>3<span class="nt">&lt;/priority&gt;</span>
  <span class="nt">&lt;properties&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"createAuthMethodPattern"</span> <span class="na">value=</span><span class="s">"AuthorizationUtil\.(is|assert)(Createable|Upsertable)"</span><span class="nt">/&gt;</span>
    <span class="c">&lt;!--
     There's one of these properties for each operation, and the default value is 0 so this is technically
     superfluous, but it's included it here for example purposes.
     --&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"createAuthMethodTypeParamIndex"</span> <span class="na">value=</span><span class="s">"0"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"readAuthMethodPattern"</span> <span class="na">value=</span><span class="s">"AuthorizationUtil\.(is|assert)Accessible"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"updateAuthMethodPattern"</span> <span class="na">value=</span><span class="s">"AuthorizationUtil\.(is|assert)(Updateable|Upsertable)"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"deleteAuthMethodPattern"</span> <span class="na">value=</span><span class="s">"AuthorizationUtil\.(is|assert)Deletable"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"undeleteAuthMethodPattern"</span> <span class="na">value=</span><span class="s">"AuthorizationUtil\.(is|assert)Undeletable"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"mergeAuthMethodPattern"</span> <span class="na">value=</span><span class="s">"AuthorizationUtil\.(is|assert)Mergeable"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/properties&gt;</span>
<span class="nt">&lt;/rule&gt;</span>
</code></pre></div>    </div>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_errorprone.html#emptystatementblock"><code class="language-plaintext highlighter-rouge">EmptyStatementBlock</code></a> has two new properties:</p>

    <p>Setting <code class="language-plaintext highlighter-rouge">reportEmptyPrivateNoArgConstructor</code> to <code class="language-plaintext highlighter-rouge">false</code> ignores empty private no-arg constructors
that are commonly used in singleton pattern implementations and utility classes in support of
prescribed best practices.</p>

    <p>Setting <code class="language-plaintext highlighter-rouge">reportEmptyVirtualMethod</code> to <code class="language-plaintext highlighter-rouge">false</code> ignores empty virtual methods that are commonly used in
abstract base classes as default no-op implementations when derived classes typically only override a
subset of virtual methods.</p>

    <p>By default, both properties are <code class="language-plaintext highlighter-rouge">true</code> to not change the default behaviour of this rule.</p>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_errorprone.html#emptycatchblock"><code class="language-plaintext highlighter-rouge">EmptyCatchBlock</code></a> has two new properties modeled after the analgous Java rule:</p>

    <p>The <code class="language-plaintext highlighter-rouge">allowCommentedBlocks</code> property, when set to <code class="language-plaintext highlighter-rouge">true</code> (defaults to <code class="language-plaintext highlighter-rouge">false</code>), ignores empty blocks containing comments, e.g.:</p>

    <div class="language-apex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">try</span> <span class="p">{</span>
    <span class="nf">doSomethingThatThrowsAnExpectedException</span><span class="p">();</span>
    <span class="n">System</span><span class="o">.</span><span class="nf">assert</span><span class="p">(</span><span class="kc">false</span><span class="p">,</span> <span class="s1">'</span><span class="s2">Expected to catch an exception.'</span><span class="p">);</span>
<span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="n">Exception</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
    <span class="c1">// Expected</span>
<span class="p">}</span>
</code></pre></div>    </div>

    <p>The <code class="language-plaintext highlighter-rouge">allowExceptionNameRegex</code> property is a regular expression for exception variable names for which empty catch blocks should be ignored by this rule. For example, using the default property value of <code class="language-plaintext highlighter-rouge">^(ignored|expected)$</code>, the following empty catch blocks will not be reported:</p>

    <div class="language-apex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">try</span> <span class="p">{</span>
    <span class="nf">doSomethingThatThrowsAnExpectedException</span><span class="p">();</span>
    <span class="n">System</span><span class="o">.</span><span class="nf">assert</span><span class="p">(</span><span class="kc">false</span><span class="p">,</span> <span class="s1">'</span><span class="s2">Expected to catch an exception.'</span><span class="p">);</span>
<span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="n">IllegalStateException</span> <span class="n">ignored</span><span class="p">)</span> <span class="p">{</span>
<span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="n">NumberFormatException</span> <span class="n">expected</span><span class="p">)</span> <span class="p">{</span>
<span class="p">}</span>
</code></pre></div>    </div>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_codestyle.html#onedeclarationperline"><code class="language-plaintext highlighter-rouge">OneDeclarationPerLine</code></a> has a new property <code class="language-plaintext highlighter-rouge">reportInForLoopInitializer</code>:
If set to <code class="language-plaintext highlighter-rouge">false</code> (default is <code class="language-plaintext highlighter-rouge">true</code> if unspecified) doesn’t report an issue for multiple declarations in
a <code class="language-plaintext highlighter-rouge">for</code> loop’s initializer section. This is support the common idiom of one declaration for the loop variable
and another for the loop bounds condition, e.g.,</p>

    <div class="language-apex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">for</span> <span class="p">(</span><span class="n">Integer</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">numIterations</span> <span class="o">=</span> <span class="nf">computeNumIterations</span><span class="p">();</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">numIterations</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
<span class="p">}</span>
</code></pre></div>    </div>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_java_codestyle.html#classnamingconventions"><code class="language-plaintext highlighter-rouge">ClassNamingConventions</code></a> uses a different default value of the
property <code class="language-plaintext highlighter-rouge">utilityClassPattern</code>: This rule was detecting utility classes by default since PMD 6.3.0
and enforcing the naming convention that utility classes has to be suffixed with Util or Helper or Constants.
However this turned out to be not so useful as a default configuration, as there is no standard
naming convention for utility classes.</p>

    <p>With PMD 6.40.0, the default value of this property has been changed to <code class="language-plaintext highlighter-rouge">[A-Z][a-zA-Z0-9]*</code>
(Pascal case), effectively disabling the special handling of utility classes. This is the same default
pattern used for concrete classes.</p>

    <p>This means, that the feature to enforce a naming convention for utility classes is now a opt-in
feature and can be enabled on demand.</p>

    <p>To use the old behaviour, the property needs to be configured as follows:</p>

    <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/codestyle.xml/ClassNamingConventions"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;properties&gt;</span>
        <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"utilityClassPattern"</span> <span class="na">value=</span><span class="s">"[A-Z][a-zA-Z0-9]+(Utils?|Helper|Constants)"</span> <span class="nt">/&gt;</span>
    <span class="nt">&lt;/properties&gt;</span>
<span class="nt">&lt;/rule&gt;</span>
</code></pre></div>    </div>
  </li>
</ul>

<h3 id="fixed-issues-1">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1089">#1089</a>: [apex] ApexUnitTestClassShouldHaveAsserts: Test asserts in other methods not detected</li>
      <li><a href="https://github.com/pmd/pmd/issues/1090">#1090</a>: [apex] ApexCRUDViolation: checks not detected if done in another method</li>
      <li><a href="https://github.com/pmd/pmd/issues/3532">#3532</a>: [apex] Promote usage of consistent getDescribe() info</li>
      <li><a href="https://github.com/pmd/pmd/issues/3566">#3566</a>: [apex] ApexDoc rule should not require “@description”</li>
      <li><a href="https://github.com/pmd/pmd/issues/3568">#3568</a>: [apex] EmptyStatementBlock: should provide options to ignore empty private constructors and empty virtual methods</li>
      <li><a href="https://github.com/pmd/pmd/issues/3569">#3569</a>: [apex] EmptyCatchBlock: should provide an option to ignore empty catch blocks in test methods</li>
      <li><a href="https://github.com/pmd/pmd/issues/3570">#3570</a>: [apex] OneDeclarationPerLine: should provide an option to ignore multiple declarations in a for loop initializer</li>
      <li><a href="https://github.com/pmd/pmd/issues/3576">#3576</a>: [apex] ApexCRUDViolation should provide an option to specify additional patterns for methods that encapsulate authorization checks</li>
      <li><a href="https://github.com/pmd/pmd/issues/3579">#3579</a>: [apex] ApexCRUDViolation: false negative with undelete</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3542">#3542</a>: [java] MissingOverride: False negative for enum method</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1595">#1595</a>: [java] Discuss default for utility classes in ClassNamingConventions</li>
      <li><a href="https://github.com/pmd/pmd/issues/3563">#3563</a>: [java] The ClassNamingConventionsRule false-positive’s on the class name “Constants”</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3560">#3560</a>: [java] InvalidLogMessageFormat: False positive with message and exception in a block inside a lambda</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2364">#2364</a>: [java] AddEmptyString false positive in annotation value</li>
    </ul>
  </li>
  <li>java-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3368">#3368</a>: [java] HardcodedCryptoKey false negative with variable assignments</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-1">API Changes</h3>

<h4 id="experimental-apis">Experimental APIs</h4>

<ul>
  <li>The interface <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.41.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ASTCommentContainer.html#"><code>ASTCommentContainer</code></a> has been added to the Apex AST.
It provides a way to check whether a node contains at least one comment. Currently this is only implemented for
<a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.41.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ASTCatchBlockStatement.html#"><code>ASTCatchBlockStatement</code></a> and used by the rule
<a href="https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_errorprone.html#emptycatchblock"><code class="language-plaintext highlighter-rouge">EmptyCatchBlock</code></a>.
This information is also available via XPath attribute <code class="language-plaintext highlighter-rouge">@ContainsComment</code>.</li>
</ul>

<h3 id="external-contributions-1">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3538">#3538</a>: [apex] New rule EagerlyLoadedDescribeSObjectResult - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3549">#3549</a>: [java] Ignore AddEmptyString rule in annotations - <a href="https://github.com/smyachenkov">Stanislav Myachenkov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3561">#3561</a>: [java] InvalidLogMessageFormat: False positive with message and exception in a block inside a lambda - <a href="https://github.com/essobedo">Nicolas Filotto</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3565">#3565</a>: [doc] Fix resource leak due to Files.walk - <a href="https://github.com/lujiefsi">lujiefsi</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3571">#3571</a>: [apex] Fix for #1089 - Added new configuration property additionalAssertMethodPattern to ApexUnitTestClassShouldHaveAssertsRule - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3572">#3572</a>: [apex] Fix for #3566 - Added new configuration property reportMissingDescription to ApexDocRule - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3573">#3573</a>: [apex] Fix for #3568 - Added new configuration properties reportEmptyPrivateNoArgConstructor and reportEmptyVirtualMethod to EmptyStatementBlock - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3574">#3574</a>: [apex] Fix for #3569 - Added new configuration properties allowCommentedBlocks and allowExceptionNameRegex to EmptyCatchBlock - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3575">#3575</a>: [apex] Fix for #3570 - Added new configuration property reportInForLoopInitializer to OneDeclarationPerLine - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3577">#3577</a>: [apex] Fix for #3576 - Added new configuration properties *AuthMethodPattern and *AuthMethodTypeParamIndex to ApexCRUDViolation rule - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3578">#3578</a>: [apex] ApexCRUDViolation: Documentation changes for #3576 - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3580">#3580</a>: [doc] Release notes updates for the changes in issue #3569 - <a href="https://github.com/SCWells72">Scott Wells</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3581">#3581</a>: [apex] #3569 - Requested changes for code review feedback - <a href="https://github.com/SCWells72">Scott Wells</a></li>
</ul>

<h3 id="stats-1">Stats</h3>
<ul>
  <li>72 commits</li>
  <li>37 closed tickets &amp; PRs</li>
  <li>Days since last release: 34</li>
</ul>

<h2 id="25-september-2021---6390">25-September-2021 - 6.39.0</h2>

<p>The PMD team is pleased to announce PMD 6.39.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-2">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#all-contributors">All Contributors</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-2">New and noteworthy</h3>

<h4 id="all-contributors">All Contributors</h4>

<p>PMD follows the <a href="https://allcontributors.org/">All Contributors</a> specification.
Contributions of any kind welcome!</p>

<p>See <a href="https://pmd.github.io/latest/pmd_projectdocs_credits.html">credits</a> for our complete contributors list.</p>

<h3 id="fixed-issues-2">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/3499">#3499</a>: [core] Fix XPath rulechain with combined node tests</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/3493">#3493</a>: [java] AvoidAccessibilityAlteration: add tests and fix rule</li>
    </ul>
  </li>
  <li>javascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/3516">#3516</a>: [javascript] NPE while creating rule violation when specifying explicit line numbers</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3487">#3487</a>: [plsql] Parsing exception OPEN ref_cursor_name FOR statement</li>
      <li><a href="https://github.com/pmd/pmd/issues/3515">#3515</a>: [plsql] Parsing exception SELECT…INTO on Associative Arrays Types</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-2">API Changes</h3>

<p>No changes.</p>

<h3 id="external-contributions-2">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3516">#3516</a>: [javascript] NPE while creating rule violation when specifying explicit line numbers - <a href="https://github.com/kevingnet">Kevin Guerra</a></li>
</ul>

<h3 id="stats-2">Stats</h3>
<ul>
  <li>37 commits</li>
  <li>10 closed tickets &amp; PRs</li>
  <li>Days since last release: 27</li>
</ul>

<h2 id="28-august-2021---6380">28-August-2021 - 6.38.0</h2>

<p>The PMD team is pleased to announce PMD 6.38.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-3">Table Of Contents</h3>

<ul>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="fixed-issues-3">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3462">#3462</a>: [apex] SOQL performed in a for-each loop doesn’t trigger ApexCRUDViolationRule</li>
      <li><a href="https://github.com/pmd/pmd/issues/3484">#3484</a>: [apex] ApexCRUDViolationRule maintains state across files</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3446">#3446</a>: [core] Allow XPath rules to access the current file name</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3403">#3403</a>: [java] MethodNamingConventions junit5TestPattern does not detect parameterized tests</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-3">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3445">#3445</a>: [java] Fix #3403 about MethodNamingConventions and JUnit5 parameterized tests - <a href="https://github.com/CyrilSicard">Cyril Sicard</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3470">#3470</a>: [apex] Fix ApexCRUDViolationRule - add super call - <a href="https://github.com/jfeingold35">Josh Feingold</a></li>
</ul>

<h3 id="stats-3">Stats</h3>
<ul>
  <li>32 commits</li>
  <li>8 closed tickets &amp; PRs</li>
  <li>Days since last release: 27</li>
</ul>

<h2 id="31-july-2021---6370">31-July-2021 - 6.37.0</h2>

<p>The PMD team is pleased to announce PMD 6.37.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-4">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-17-support">Java 17 Support</a></li>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#new-rules">New rules</a></li>
      <li><a href="#renamed-rules">Renamed rules</a></li>
      <li><a href="#deprecated-rules">Deprecated rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#pmd-cli">PMD CLI</a></li>
      <li><a href="#experimental-apis">Experimental APIs</a></li>
      <li><a href="#internal-api">Internal API</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-3">New and noteworthy</h3>

<h4 id="java-17-support">Java 17 Support</h4>

<p>This release of PMD brings support for Java 17. PMD supports <a href="https://openjdk.java.net/jeps/409">JEP 409: Sealed Classes</a>
which has been promoted to be a standard language feature of Java 17.</p>

<p>PMD also supports <a href="https://openjdk.java.net/jeps/406">JEP 406: Pattern Matching for switch (Preview)</a> as a preview
language feature. In order to analyze a project with PMD that uses these language features, you’ll need to enable
it via the environment variable <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS</code> and select the new language version <code class="language-plaintext highlighter-rouge">17-preview</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 17-preview ...
</code></pre></div></div>

<p>Note: Support for Java 15 preview language features have been removed. The version “15-preview” is no longer available.</p>

<h4 id="updated-pmd-designer">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.37.0">PMD Designer Changelog</a>.</p>

<h4 id="new-rules-1">New rules</h4>

<p>This release ships with 3 new Java rules.</p>

<ul>
  <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a> reports usages of primitive wrapper
constructors. They are deprecated since Java 9 and should not be used.</li>
</ul>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/bestpractices.xml/PrimitiveWrapperInstantiation"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>

<p>The rule is part of the quickstart.xml ruleset.</p>

<ul>
  <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a> suggests rewriting
some test assertions to be more readable.</li>
</ul>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/bestpractices.xml/SimplifiableTestAssertion"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>

<p>The rule is part of the quickstart.xml ruleset.</p>

<ul>
  <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_errorprone.html#returnemptycollectionratherthannull"><code class="language-plaintext highlighter-rouge">ReturnEmptyCollectionRatherThanNull</code></a> suggests returning empty collections / arrays
instead of null.</li>
</ul>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>

<p>The rule is part of the quickstart.xml ruleset.</p>

<h4 id="renamed-rules">Renamed rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_errorprone.html#missingbreakinswitch"><code class="language-plaintext highlighter-rouge">MissingBreakInSwitch</code></a> has been renamed to
<a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_errorprone.html#implicitswitchfallthrough"><code class="language-plaintext highlighter-rouge">ImplicitSwitchFallThrough</code></a> (category error prone) to better reflect the rule’s
purpose: The rule finds implicit fall-through cases in switch statements, which are most
likely unexpected. The old rule name described only one way how to avoid a fall-through,
namely using <code class="language-plaintext highlighter-rouge">break</code> but <code class="language-plaintext highlighter-rouge">continue</code>, <code class="language-plaintext highlighter-rouge">throw</code> and <code class="language-plaintext highlighter-rouge">return</code> avoid a fall-through
as well. This enables us to improve this rule in the future.</li>
</ul>

<h4 id="deprecated-rules">Deprecated rules</h4>

<ul>
  <li>The following Java rules are deprecated and removed from the quickstart ruleset,
as the new rule <a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a> merges
their functionality:
    <ul>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#useassertequalsinsteadofasserttrue"><code class="language-plaintext highlighter-rouge">UseAssertEqualsInsteadOfAssertTrue</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#useassertnullinsteadofasserttrue"><code class="language-plaintext highlighter-rouge">UseAssertNullInsteadOfAssertTrue</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#useassertsameinsteadofasserttrue"><code class="language-plaintext highlighter-rouge">UseAssertSameInsteadOfAssertTrue</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#useasserttrueinsteadofassertequals"><code class="language-plaintext highlighter-rouge">UseAssertTrueInsteadOfAssertEquals</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_design.html#simplifybooleanassertion"><code class="language-plaintext highlighter-rouge">SimplifyBooleanAssertion</code></a></li>
    </ul>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_errorprone.html#returnemptyarrayratherthannull"><code class="language-plaintext highlighter-rouge">ReturnEmptyArrayRatherThanNull</code></a> is deprecated and removed from
the quickstart ruleset, as the new rule <a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_errorprone.html#returnemptycollectionratherthannull"><code class="language-plaintext highlighter-rouge">ReturnEmptyCollectionRatherThanNull</code></a>
supersedes it.</p>
  </li>
  <li>The following Java rules are deprecated and removed from the quickstart ruleset,
as the new rule <a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a> merges
their functionality:
    <ul>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_performance.html#booleaninstantiation"><code class="language-plaintext highlighter-rouge">BooleanInstantiation</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_performance.html#byteinstantiation"><code class="language-plaintext highlighter-rouge">ByteInstantiation</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_performance.html#integerinstantiation"><code class="language-plaintext highlighter-rouge">IntegerInstantiation</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_performance.html#longinstantiation"><code class="language-plaintext highlighter-rouge">LongInstantiation</code></a></li>
      <li><a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_performance.html#shortinstantiation"><code class="language-plaintext highlighter-rouge">ShortInstantiation</code></a></li>
    </ul>
  </li>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.37.0/pmd_rules_java_performance.html#unnecessarywrapperobjectcreation"><code class="language-plaintext highlighter-rouge">UnnecessaryWrapperObjectCreation</code></a> is deprecated
with no planned replacement before PMD 7. In it’s current state, the rule is not useful
as it finds only contrived cases of creating a primitive wrapper and unboxing it explicitly
in the same expression. In PMD 7 this and more cases will be covered by a
new rule <code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code>.</li>
</ul>

<h3 id="fixed-issues-4">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3201">#3201</a>: [apex] ApexCRUDViolation doesn’t report Database class DMLs, inline no-arg object instantiations and inline list initialization</li>
      <li><a href="https://github.com/pmd/pmd/issues/3329">#3329</a>: [apex] ApexCRUDViolation doesn’t report SOQL for loops</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1603">#1603</a>: [core] Language version comparison</li>
      <li><a href="https://github.com/pmd/pmd/issues/2133">#2133</a>: [xml] Allow to check Salesforce XML Metadata using XPath rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/3377">#3377</a>: [core] NPE when specifying report file in current directory in PMD CLI</li>
      <li><a href="https://github.com/pmd/pmd/issues/3387">#3387</a>: [core] CPD should avoid unnecessary copies when running with –skip-lexical-errors</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2908">#2908</a>: [java] Merge Junit assertion simplification rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/3235">#3235</a>: [java] UseTryWithResources false positive when closeable is provided as a method argument or class field</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3361">#3361</a>: [java] Rename rule MissingBreakInSwitch to ImplicitSwitchFallThrough</li>
      <li><a href="https://github.com/pmd/pmd/pull/3382">#3382</a>: [java] New rule ReturnEmptyCollectionRatherThanNull</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3420">#3420</a>: [java] NPE in <code class="language-plaintext highlighter-rouge">InefficientStringBuffering</code> with Records</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-3">API Changes</h3>

<h4 id="pmd-cli">PMD CLI</h4>

<ul>
  <li>
    <p>PMD has a new CLI option <code class="language-plaintext highlighter-rouge">-force-language</code>. With that a language can be forced to be used for all input files,
irrespective of filenames. When using this option, the automatic language selection by extension is disabled
and all files are tried to be parsed with the given language. Parsing errors are ignored and unparsable files
are skipped.</p>

    <p>This option allows to use the xml language for files, that don’t use xml as extension.
See also the examples on <a href="pmd_userdocs_cli_reference.html#analyze-other-xml-formats">PMD CLI reference</a>.</p>
  </li>
</ul>

<h4 id="experimental-apis-1">Experimental APIs</h4>

<ul>
  <li>The AST types and APIs around Sealed Classes are not experimental anymore:
    <ul>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.37.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#isSealed()"><code>ASTClassOrInterfaceDeclaration#isSealed</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.37.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#isNonSealed()"><code>ASTClassOrInterfaceDeclaration#isNonSealed</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.37.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getPermittedSubclasses()"><code>ASTClassOrInterfaceDeclaration#getPermittedSubclasses</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.37.0/net/sourceforge/pmd/lang/java/ast/ASTPermitsList.html#"><code>ASTPermitsList</code></a></li>
    </ul>
  </li>
</ul>

<h4 id="internal-api">Internal API</h4>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li>The inner class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.37.0/net/sourceforge/pmd/cpd/TokenEntry.State.html#"><code>net.sourceforge.pmd.cpd.TokenEntry.State</code></a> is considered to be internal API.
It will probably be moved away with PMD 7.</li>
</ul>

<h3 id="external-contributions-4">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3367">#3367</a>: [apex] Check SOQL CRUD on for loops - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3373">#3373</a>: [apex] Add ApexCRUDViolation support for database class, inline no-arg object construction DML and inline list initialization DML - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3385">#3385</a>: [core] CPD: Optimize –skip-lexical-errors option - <a href="https://github.com/woongsikchoi">Woongsik Choi</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3388">#3388</a>: [doc] Add Code Inspector in the list of tools - <a href="https://github.com/juli1">Julien Delange</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3417">#3417</a>: [core] Support forcing a specific language from the command-line - <a href="https://github.com/aidan-harding">Aidan Harding</a></li>
</ul>

<h3 id="stats-4">Stats</h3>
<ul>
  <li>82 commits</li>
  <li>29 closed tickets &amp; PRs</li>
  <li>Days since last release: 35</li>
</ul>

<h2 id="26-june-2021---6360">26-June-2021 - 6.36.0</h2>

<p>The PMD team is pleased to announce PMD 6.36.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-5">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#improved-incremental-analysis">Improved Incremental Analysis</a></li>
      <li><a href="#new-rules">New rules</a></li>
      <li><a href="#renamed-rules">Renamed rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-4">New and noteworthy</h3>

<h4 id="improved-incremental-analysis">Improved Incremental Analysis</h4>

<p><a href="https://pmd.github.io/pmd-6.36.0/pmd_userdocs_incremental_analysis.html">Incremental Analysis</a> has long helped
our users obtain faster analysis results, however, its implementation tended to be too cautious in detecting
changes to the runtime and type resolution classpaths, producing more cache invalidations than necessary.
We have now improved the heuristics to remove several bogus invalidations, and slightly sped up the cache
usage along the way.</p>

<p>PMD will now ignore:</p>

<ul>
  <li>Non class files in classpath and jar / zip files being referenced.</li>
  <li>Changes to the order of file entries within a jar / zip</li>
  <li>Changes to file metadata within jar / zip (ie: creation and modification time,
significant in multi-module / composite build projects where lateral artifacts are frequently recreated)</li>
</ul>

<h4 id="new-rules-2">New rules</h4>

<ul>
  <li>The new Apex rule <a href="https://pmd.github.io/pmd-6.36.0/pmd_rules_apex_performance.html#avoiddebugstatements"><code class="language-plaintext highlighter-rouge">AvoidDebugStatements</code></a> finds usages of <code class="language-plaintext highlighter-rouge">System.debug</code> calls.
Debug statements contribute to longer transactions and consume Apex CPU time even when debug logs are not
being captured.
You can try out this rule like so:</li>
</ul>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/apex/performance.xml/AvoidDebugStatements"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>

<ul>
  <li>The new Apex rule <a href="https://pmd.github.io/pmd-6.36.0/pmd_rules_apex_errorprone.html#inaccessibleauraenabledgetter"><code class="language-plaintext highlighter-rouge">InaccessibleAuraEnabledGetter</code></a> checks that an <code class="language-plaintext highlighter-rouge">AuraEnabled</code>
getter is public or global. This is necessary if it is referenced in Lightning components.
You can try out this rule like so:</li>
</ul>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/apex/errorprone.xml/InaccessibleAuraEnabledGetter"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>

<h4 id="renamed-rules-1">Renamed rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.36.0/pmd_rules_java_errorprone.html#badcomparison"><code class="language-plaintext highlighter-rouge">BadComparison</code></a> has been renamed to
<a href="https://pmd.github.io/pmd-6.36.0/pmd_rules_java_errorprone.html#comparisonwithnan"><code class="language-plaintext highlighter-rouge">ComparisonWithNaN</code></a> to better reflect what the rule actually detects.
It now considers usages of <code class="language-plaintext highlighter-rouge">Double.NaN</code> or <code class="language-plaintext highlighter-rouge">Float.NaN</code> in more cases and fixes false negatives.</li>
</ul>

<h3 id="fixed-issues-5">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3307">#3307</a>: [apex] Avoid debug statements since it impact performance</li>
      <li><a href="https://github.com/pmd/pmd/issues/3321">#3321</a>: [apex] New rule to detect inaccessible AuraEnabled getters (summer ‘21 security update)</li>
      <li><a href="https://github.com/pmd/pmd/issues/3332">#3332</a>: [apex] CognitiveComplexity - incorrect increment for “else if”</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2637">#2637</a>: [cpd] Error Loading stylesheet cpdhtml.xslt</li>
      <li><a href="https://github.com/pmd/pmd/pull/3323">#3323</a>: [core] Adds fullDescription and tags in SARIF report</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/957">#957</a>: [java] GuardLogStatement: False positive with compile-time constant arguments</li>
      <li><a href="https://github.com/pmd/pmd/pull/3076">#3076</a>: [java] UnusedAssignment reports unused variable when used in increment expr</li>
      <li><a href="https://github.com/pmd/pmd/issues/3114">#3114</a>: [java] UnusedAssignment false positive when reporting unused variables</li>
      <li><a href="https://github.com/pmd/pmd/issues/3315">#3315</a>: [java] LiteralsFirstInComparisons false positive with two constants</li>
      <li><a href="https://github.com/pmd/pmd/issues/3341">#3341</a>: [java] JUnitTestsShouldIncludeAssert should support Junit 5</li>
      <li><a href="https://github.com/pmd/pmd/issues/3340">#3340</a>: [java] NullPointerException applying rule GuardLogStatement</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/3317">#3317</a>: [java] Update UnnecessaryImport to recognize usage of imported types in javadoc’s <code class="language-plaintext highlighter-rouge">@exception</code> tag</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2895">#2895</a>: [java] Improve BadComparison and rename to ComparisonWithNaN</li>
      <li><a href="https://github.com/pmd/pmd/issues/3284">#3284</a>: [java] InvalidLogMessageFormat may examine the value of a different but identically named String variable</li>
      <li><a href="https://github.com/pmd/pmd/issues/3304">#3304</a>: [java] NPE in MoreThanOneLoggerRule on a java 16 record</li>
      <li><a href="https://github.com/pmd/pmd/issues/3305">#3305</a>: [java] ConstructorCallsOverridableMethodRule IndexOutOfBoundsException on a java16 record</li>
      <li><a href="https://github.com/pmd/pmd/pull/3343">#3343</a>: [java] CloneMethodMustImplementCloneable: FN with local classes</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3331">#3331</a>: [java] UseArraysAsList false negative with for-each loop</li>
      <li><a href="https://github.com/pmd/pmd/pull/3344">#3344</a>: [java] InefficientEmptyStringCheck FN with trim.length on method call</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-4">API Changes</h3>

<p>No changes.</p>

<h3 id="external-contributions-5">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3276">#3276</a>: [apex] Update ApexCRUDViolation and OperationWithLimitsInLoop docs - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3306">#3306</a>: [java] More than one logger rule test null pointer exception - <a href="https://github.com/ajeans">Arnaud Jeansen</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3317">#3317</a>: [java] Update UnnecessaryImport to recognize usage of imported types in javadoc’s <code class="language-plaintext highlighter-rouge">@exception</code> tag - <a href="https://github.com/pzygielo">Piotrek Żygieło</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3319">#3319</a>: [apex] New AvoidDebugStatements rule to mitigate performance impact - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3320">#3320</a>: [java] Fix incorrect increment for “else if” branch in Cognitive Complexity docs - <a href="https://github.com/borovikovd">Denis Borovikov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3322">#3322</a>: [apex] added rule to detect inaccessible AuraEnabled getters - <a href="https://github.com/pozil">Philippe Ozil</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3323">#3323</a>: [core] Adds fullDescription and tags in SARIF report - <a href="https://github.com/Clint-Chester">Clint Chester</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3339">#3339</a>: [java] JUnitTestsShouldIncludeAssert Tweak assertion definition to avoid false positive with modern JUnit5 - <a href="https://github.com/ajeans">Arnaud Jeansen</a></li>
</ul>

<h3 id="stats-5">Stats</h3>
<ul>
  <li>81 commits</li>
  <li>36 closed tickets &amp; PRs</li>
  <li>Days since last release: 28</li>
</ul>

<h2 id="29-may-2021---6350">29-May-2021 - 6.35.0</h2>

<p>The PMD team is pleased to announce PMD 6.35.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-6">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#javascript-module-now-requires-at-least-java-8">Javascript module now requires at least Java 8</a></li>
      <li><a href="#new-rules">New rules</a></li>
      <li><a href="#modified-rules">Modified rules</a></li>
      <li><a href="#deprecated-rules">Deprecated rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-api">Deprecated API</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-5">New and noteworthy</h3>

<h4 id="javascript-module-now-requires-at-least-java-8">Javascript module now requires at least Java 8</h4>

<p>The latest version of <a href="https://github.com/mozilla/rhino">Rhino</a>, the implementation of JavaScript we use
for parsing JavaScript code, requires at least Java 8. Therefore we decided to upgrade the pmd-javascript
module to Java 8 as well. This means that from now on, a Java 8 or later runtime is required in order
to analyze JavaScript code. Note that PMD core still only requires Java 7.</p>

<h4 id="new-rules-3">New rules</h4>

<p>This release ships with 3 new Java rules.</p>

<ul>
  <li><a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_bestpractices.html#junit5testshouldbepackageprivate"><code class="language-plaintext highlighter-rouge">JUnit5TestShouldBePackagePrivate</code></a>
enforces the convention that JUnit 5 tests should have minimal visibility.
You can try out this rule like so:
    <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/bestpractices.xml/JUnit5TestShouldBePackagePrivate"</span> <span class="nt">/&gt;</span>
</code></pre></div>    </div>
  </li>
  <li><a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_design.html#cognitivecomplexity"><code class="language-plaintext highlighter-rouge">CognitiveComplexity</code></a> uses the cognitive complexity
metric to find overly complex code. This metric improves on the similar cyclomatic complexity 
in several ways, for instance, it incentivizes using clearly readable shorthands and idioms.
See the rule documentation for more details. You can try out this rule like so:
    <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/design.xml/CognitiveComplexity"</span> <span class="nt">/&gt;</span>
</code></pre></div>    </div>
  </li>
  <li><a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_design.html#mutablestaticstate"><code class="language-plaintext highlighter-rouge">MutableStaticState</code></a> finds non-private static fields
that are not final. These fields break encapsulation since these fields can be modified from anywhere
within the program. You can try out this rule like so:
    <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/java/design.xml/MutableStaticState"</span> <span class="nt">/&gt;</span>
</code></pre></div>    </div>
  </li>
</ul>

<h4 id="modified-rules-1">Modified rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_errorprone.html#compareobjectswithequals"><code class="language-plaintext highlighter-rouge">CompareObjectsWithEquals</code></a> has now a new property
<code class="language-plaintext highlighter-rouge">typesThatCompareByReference</code>. With that property, you can configure types, that should be whitelisted
for comparison by reference. By default, <code class="language-plaintext highlighter-rouge">java.lang.Enum</code> and <code class="language-plaintext highlighter-rouge">java.lang.Class</code> are allowed, but
you could add custom types here.
Additionally comparisons against constants are allowed now. This makes the rule less noisy when two constants
are compared. Constants are identified by looking for an all-caps identifier.</li>
</ul>

<h4 id="deprecated-rules-1">Deprecated rules</h4>

<ul>
  <li>
    <p>The java rule <a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_codestyle.html#defaultpackage"><code class="language-plaintext highlighter-rouge">DefaultPackage</code></a> has been deprecated in favor of
<a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier"><code class="language-plaintext highlighter-rouge">CommentDefaultAccessModifier</code></a>.</p>

    <p>The rule “DefaultPackage” assumes that any usage of package-access is accidental,
and by doing so, prohibits using a really fundamental and useful feature of the language.</p>

    <p>To satisfy the rule, you have to make the member public even if it doesn’t need to, or make it protected,
which muddies your intent even more if you don’t intend the class to be extended, and may be at odds with
other rules like <a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_codestyle.html#avoidprotectedfieldinfinalclass"><code class="language-plaintext highlighter-rouge">AvoidProtectedFieldInFinalClass</code></a>.</p>

    <p>The rule <a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier"><code class="language-plaintext highlighter-rouge">CommentDefaultAccessModifier</code></a> should be used instead.
It flags the same thing, but has an escape hatch.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.35.0/pmd_rules_java_errorprone.html#clonethrowsclonenotsupportedexception"><code class="language-plaintext highlighter-rouge">CloneThrowsCloneNotSupportedException</code></a> has been deprecated without
replacement.</p>

    <p>The rule has no real value as <code class="language-plaintext highlighter-rouge">CloneNotSupportedException</code> is a
checked exception and therefore you need to deal with it while implementing the <code class="language-plaintext highlighter-rouge">clone()</code> method. You either
need to declare the exception or catch it. If you catch it, then subclasses can’t throw it themselves explicitly.
However, <code class="language-plaintext highlighter-rouge">Object.clone()</code> will still throw this exception if the <code class="language-plaintext highlighter-rouge">Cloneable</code> interface is not implemented.</p>

    <p>Note, this rule has also been removed from the Quickstart Ruleset (<code class="language-plaintext highlighter-rouge">rulesets/java/quickstart.xml</code>).</p>
  </li>
</ul>

<h3 id="fixed-issues-6">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3183">#3183</a>: [apex] ApexUnitTestMethodShouldHaveIsTestAnnotation false positive with helper method</li>
      <li><a href="https://github.com/pmd/pmd/pull/3243">#3243</a>: [apex] Correct findBoundary when traversing AST</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2639">#2639</a>: [core] PMD CLI output file is not created if directory or directories in path don’t exist</li>
      <li><a href="https://github.com/pmd/pmd/issues/3196">#3196</a>: [core] Deprecate ThreadSafeReportListener</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3230">#3230</a>: [doc] Remove “Edit me” button for language index pages</li>
    </ul>
  </li>
  <li>dist
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2466">#2466</a>: [dist] Distribution archive doesn’t include all batch scripts</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/3269">#3269</a>: [java] Fix NPE in MethodTypeResolution</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1175">#1175</a>: [java] UnusedPrivateMethod FP with Junit 5 @MethodSource</li>
      <li><a href="https://github.com/pmd/pmd/issues/2219">#2219</a>: [java] Document Reasons to Avoid Reassigning Parameters</li>
      <li><a href="https://github.com/pmd/pmd/issues/2737">#2737</a>: [java] Fix misleading rule message on rule SwitchStmtsShouldHaveDefault with non-exhaustive enum switch</li>
      <li><a href="https://github.com/pmd/pmd/issues/3236">#3236</a>: [java] LiteralsFirstInComparisons should consider constant fields (cont’d)</li>
      <li><a href="https://github.com/pmd/pmd/issues/3239">#3239</a>: [java] PMD could enforce non-public methods for Junit5 / Jupiter test methods</li>
      <li><a href="https://github.com/pmd/pmd/issues/3254">#3254</a>: [java] AvoidReassigningParameters reports violations on wrong line numbers</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2655">#2655</a>: [java] UnnecessaryImport false positive for on-demand imports</li>
      <li><a href="https://github.com/pmd/pmd/issues/3206">#3206</a>: [java] Deprecate rule DefaultPackage</li>
      <li><a href="https://github.com/pmd/pmd/pull/3262">#3262</a>: [java] FieldDeclarationsShouldBeAtStartOfClass: false negative with anon classes</li>
      <li><a href="https://github.com/pmd/pmd/pull/3265">#3265</a>: [java] MethodArgumentCouldBeFinal: false negatives with interfaces and inner classes</li>
      <li><a href="https://github.com/pmd/pmd/pull/3266">#3266</a>: [java] LocalVariableCouldBeFinal: false negatives with interfaces, anon classes</li>
      <li><a href="https://github.com/pmd/pmd/pull/3274">#3274</a>: [java] OnlyOneReturn: false negative with anonymous class</li>
      <li><a href="https://github.com/pmd/pmd/pull/3275">#3275</a>: [java] UnnecessaryLocalBeforeReturn: false negatives with lambda and anon class</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2780">#2780</a>: [java] DataClass example from documentation results in false-negative</li>
      <li><a href="https://github.com/pmd/pmd/issues/2987">#2987</a>: [java] New Rule: Public and protected static fields must be final</li>
      <li><a href="https://github.com/pmd/pmd/issues/2329">#2329</a>: [java] Cognitive complexity rule for Java</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3110">#3110</a>: [java] Enhance CompareObjectsWithEquals with list of exceptions</li>
      <li><a href="https://github.com/pmd/pmd/issues/3112">#3112</a>: [java] Deprecate rule CloneThrowsCloneNotSupportedException</li>
      <li><a href="https://github.com/pmd/pmd/issues/3205">#3205</a>: [java] Make CompareObjectWithEquals allow comparing against constants</li>
      <li><a href="https://github.com/pmd/pmd/issues/3248">#3248</a>: [java] Documentation is wrong for SingletonClassReturningNewInstance rule</li>
      <li><a href="https://github.com/pmd/pmd/pull/3249">#3249</a>: [java] AvoidFieldNameMatchingTypeName: False negative with interfaces</li>
      <li><a href="https://github.com/pmd/pmd/pull/3268">#3268</a>: [java] ConstructorCallsOverridableMethod: IndexOutOfBoundsException with annotations</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1438">#1438</a>: [java] InsufficientStringBufferDeclaration false positive for initial calculated StringBuilder size</li>
    </ul>
  </li>
  <li>javascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/699">#699</a>: [javascript] Update Rhino library to 1.7.13</li>
      <li><a href="https://github.com/pmd/pmd/issues/2081">#2081</a>: [javascript] Failing with OutOfMemoryError parsing a Javascript file</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-5">API Changes</h3>

<h4 id="deprecated-api">Deprecated API</h4>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/PMD.html#doPMD(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#doPMD</code></a> is deprecated.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/PMD.html#runPMD(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#runPMD</code></a> instead.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/PMD.html#run(java.lang.String[])"><code>PMD#run</code></a> is deprecated.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/PMD.html#runPMD(java.lang.String...)"><code>PMD#runPMD</code></a> instead.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/ThreadSafeReportListener.html#"><code>ThreadSafeReportListener</code></a> and the methods to use them in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/Report.html#"><code>Report</code></a>
(<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/Report.html#addListener(net.sourceforge.pmd.ThreadSafeReportListener)"><code>addListener</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/Report.html#getListeners()"><code>getListeners</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.35.0/net/sourceforge/pmd/Report.html#addListeners(java.util.List)"><code>addListeners</code></a>)
are deprecated. This functionality will be replaced by another TBD mechanism in PMD 7.</li>
</ul>

<h3 id="external-contributions-6">External Contributions</h3>
<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3272">#3272</a>: [apex] correction for ApexUnitTestMethodShouldHaveIsTestAnnotation false positives - <a href="https://github.com/YodaDaCoda">William Brockhus</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3246">#3246</a>: [java] New Rule: MutableStaticState - <a href="https://github.com/vszholobov">Vsevolod Zholobov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3247">#3247</a>: [java] New rule: JUnit5TestShouldBePackagePrivate - <a href="https://github.com/ajeans">Arnaud Jeansen</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3293">#3293</a>: [java] Cognitive Complexity Metric - <a href="https://github.com/borovikovd">Denis Borovikov</a></li>
  <li><a href="https://github.com/pmd/pmd.github.io/pull/12">pmd.github.io#12</a>: Update quickstart.html - <a href="https://github.com/devigo">Igor Lyadov</a></li>
</ul>

<h3 id="stats-6">Stats</h3>
<ul>
  <li>143 commits</li>
  <li>53 closed tickets &amp; PRs</li>
  <li>Days since last release: 34</li>
</ul>

<h2 id="24-april-2021---6340">24-April-2021 - 6.34.0</h2>

<p>The PMD team is pleased to announce PMD 6.34.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-7">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#new-rules">New rules</a></li>
      <li><a href="#modified-rules">Modified rules</a></li>
      <li><a href="#deprecated-rules">Deprecated rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-6">New and noteworthy</h3>

<h4 id="new-rules-4">New rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_bestpractices.html#usestandardcharsets"><code class="language-plaintext highlighter-rouge">UseStandardCharsets</code></a> finds usages of <code class="language-plaintext highlighter-rouge">Charset.forName</code>,
where <code class="language-plaintext highlighter-rouge">StandardCharsets</code> can be used instead.</p>

    <p>This rule is also part of the Quickstart Ruleset (<code class="language-plaintext highlighter-rouge">rulesets/java/quickstart.xml</code>) for Java.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a> replaces the rules
<a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_bestpractices.html#unusedimports"><code class="language-plaintext highlighter-rouge">UnusedImports</code></a>, <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#duplicateimports"><code class="language-plaintext highlighter-rouge">DuplicateImports</code></a>,
<a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_errorprone.html#importfromsamepackage"><code class="language-plaintext highlighter-rouge">ImportFromSamePackage</code></a>, and <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#dontimportjavalang"><code class="language-plaintext highlighter-rouge">DontImportJavaLang</code></a>.</p>

    <p>This rule is also part of the Quickstart Ruleset (<code class="language-plaintext highlighter-rouge">rulesets/java/quickstart.xml</code>) for Java.</p>
  </li>
</ul>

<h4 id="modified-rules-2">Modified rules</h4>

<ul>
  <li>The Apex rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_apex_security.html#apexcrudviolation"><code class="language-plaintext highlighter-rouge">ApexCRUDViolation</code></a> does not ignore getters anymore and also flags
SOQL/SOSL/DML operations without access permission checks in getters. This will produce false positives now for
VF getter methods, but we can’t reliably detect, whether a getter is a VF getter or not. In such cases,
the violation should be <a href="pmd_userdocs_suppressing_warnings.html">suppressed</a>.</li>
</ul>

<h4 id="deprecated-rules-2">Deprecated rules</h4>

<ul>
  <li>java-bestpractices
    <ul>
      <li><a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_bestpractices.html#unusedimports"><code class="language-plaintext highlighter-rouge">UnusedImports</code></a>: use the rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a> instead</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#duplicateimports"><code class="language-plaintext highlighter-rouge">DuplicateImports</code></a>: use the rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a> instead</li>
      <li><a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#dontimportjavalang"><code class="language-plaintext highlighter-rouge">DontImportJavaLang</code></a>: use the rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a> instead</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_errorprone.html#importfromsamepackage"><code class="language-plaintext highlighter-rouge">ImportFromSamePackage</code></a>: use the rule <a href="https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a> instead</li>
    </ul>
  </li>
</ul>

<h3 id="fixed-issues-7">Fixed Issues</h3>

<ul>
  <li>apex-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/3198">#3198</a>: [apex] OperationWithLimitsInLoopRule: Support more limit consuming static method invocations</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3202">#3202</a>: [apex] ApexCRUDViolationRule fails to report CRUD violation on COUNT() queries</li>
      <li><a href="https://github.com/pmd/pmd/issues/3210">#3210</a>: [apex] ApexCRUDViolationRule false-negative on non-VF getter</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3190">#3190</a>: [java] Use StandardCharsets instead of Charset.forName</li>
      <li><a href="https://github.com/pmd/pmd/issues/3224">#3224</a>: [java] UnusedAssignment crashes with nested records</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3128">#3128</a>: [java] New rule UnnecessaryImport, deprecate DuplicateImports, ImportFromSamePackage, UnusedImports</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2757">#2757</a>: [java] CloseResource: support Lombok’s @Cleanup annotation</li>
      <li><a href="https://github.com/pmd/pmd/issues/3169">#3169</a>: [java] CheckSkipResult: NPE when using pattern bindings</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-6">API Changes</h3>

<p>No changes.</p>

<h3 id="external-contributions-7">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3193">#3193</a>: [java] New rule: UseStandardCharsets - <a href="https://github.com/aaime">Andrea Aime</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3198">#3198</a>: [apex] OperationWithLimitsInLoopRule: Support more limit consuming static method invocations - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3211">#3211</a>: [apex] ApexCRUDViolationRule: Do not assume method is VF getter to avoid CRUD checks - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3234">#3234</a>: [apex] ApexCRUDViolation: COUNT is indeed CRUD checkable since it exposes data (false-negative) - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
</ul>

<h3 id="stats-7">Stats</h3>
<ul>
  <li>74 commits</li>
  <li>18 closed tickets &amp; PRs</li>
  <li>Days since last release: 27</li>
</ul>

<h2 id="27-march-2021---6330">27-March-2021 - 6.33.0</h2>

<p>The PMD team is pleased to announce PMD 6.33.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-8">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#plsql-parsing-exclusions">PLSQL parsing exclusions</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-7">New and noteworthy</h3>

<h4 id="plsql-parsing-exclusions">PLSQL parsing exclusions</h4>

<p>The PMD PLSQL parser might not parse every valid PL/SQL code without problems.
In order to still use PMD on such files, you can now mark certain lines for exclusion from
the parser. More information can be found in the <a href="pmd_languages_plsql.html">language specific documentation for PLSQL</a>.</p>

<h3 id="fixed-issues-8">Fixed Issues</h3>

<ul>
  <li>apex-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3142">#3142</a>: [apex] ExcessiveClassLength multiple warning on the same class</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3117">#3117</a>: [java] Infinite loop when parsing invalid code nested in lambdas</li>
      <li><a href="https://github.com/pmd/pmd/issues/3145">#3145</a>: [java] Parse exception when using “record” as variable name</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3118">#3118</a>: [java] UnusedPrivateMethod false positive when passing in lombok.val as argument</li>
      <li><a href="https://github.com/pmd/pmd/issues/3144">#3144</a>: [java] GuardLogStatement can have more detailed example</li>
      <li><a href="https://github.com/pmd/pmd/pull/3155">#3155</a>: [java] GuardLogStatement: False negative with unguarded method call</li>
      <li><a href="https://github.com/pmd/pmd/issues/3160">#3160</a>: [java] MethodReturnsInternalArray does not consider static final fields and fields initialized with empty array</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2977">#2977</a>: [java] CloseResource: false positive with reassignment detection</li>
      <li><a href="https://github.com/pmd/pmd/issues/3146">#3146</a>: [java] InvalidLogMessageFormat detection failing when String.format used</li>
      <li><a href="https://github.com/pmd/pmd/issues/3148">#3148</a>: [java] CloseResource false positive with Objects.nonNull</li>
      <li><a href="https://github.com/pmd/pmd/issues/3165">#3165</a>: [java] InvalidLogMessageFormat detection failing when String.format used in a variable</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2427">#2427</a>: [java] ConsecutiveLiteralAppend false-positive with builder inside lambda</li>
      <li><a href="https://github.com/pmd/pmd/issues/3152">#3152</a>: [java] ConsecutiveLiteralAppends and InsufficientStringBufferDeclaration: FP with switch expressions</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/195">#195</a>: [plsql] Ampersand ‘&amp;’ causes PMD processing error in sql file - Lexical error in file</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-8">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3161">#3161</a>: [plsql] Add support for lexical parameters in SQL*Plus scripts, allow excluding lines which the parser does not understand - <a href="https://github.com/hvbtup">Henning von Bargen</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3167">#3167</a>: [java] Minor typo in quickstart ruleset - <a href="https://github.com/AustinTice">Austin Tice</a></li>
</ul>

<h3 id="stats-8">Stats</h3>
<ul>
  <li>49 commits</li>
  <li>27 closed tickets &amp; PRs</li>
  <li>Days since last release: 28</li>
</ul>

<h2 id="27-february-2021---6320">27-February-2021 - 6.32.0</h2>

<p>The PMD team is pleased to announce PMD 6.32.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-9">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-16-support">Java 16 Support</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#experimental-apis">Experimental APIs</a></li>
      <li><a href="#internal-api">Internal API</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-8">New and noteworthy</h3>

<h4 id="java-16-support">Java 16 Support</h4>

<p>This release of PMD brings support for Java 16. PMD supports <a href="https://openjdk.java.net/jeps/394">JEP 394: Pattern Matching for instanceof</a> and <a href="https://openjdk.java.net/jeps/395">JEP 395: Records</a>. Both have been promoted
to be a standard language feature of Java 16.</p>

<p>PMD also supports <a href="https://openjdk.java.net/jeps/397">JEP 397: Sealed Classes (Second Preview)</a> as a preview
language feature. In order to analyze a project with PMD that uses these language features, you’ll need to enable
it via the environment variable <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS</code> and select the new language version <code class="language-plaintext highlighter-rouge">16-preview</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 16-preview ...
</code></pre></div></div>

<p>Note: Support for Java 14 preview language features have been removed. The version “14-preview” is no longer available.</p>

<h4 id="modified-rules-3">Modified Rules</h4>

<ul>
  <li>The Apex rule <a href="https://pmd.github.io/pmd-6.32.0/pmd_rules_apex_documentation.html#apexdoc"><code class="language-plaintext highlighter-rouge">ApexDoc</code></a> has two new properties: <code class="language-plaintext highlighter-rouge">reportPrivate</code> and
<code class="language-plaintext highlighter-rouge">reportProtected</code>. Previously the rule only considered public and global classes, methods, and
properties. With these properties, you can verify the existence of ApexDoc comments for private
and protected methods as well. By default, these properties are disabled to preserve backwards
compatible behavior.</li>
</ul>

<h3 id="fixed-issues-9">Fixed Issues</h3>

<ul>
  <li>apex-documentation
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3075">#3075</a>: [apex] ApexDoc should support private access modifier</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3101">#3101</a>: [java] NullPointerException when running PMD under JRE 11</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3132">#3132</a>: [java] UnusedImports with static imports on subclasses</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2716">#2716</a>: [java] CompareObjectsWithEqualsRule: False positive with Enums</li>
      <li><a href="https://github.com/pmd/pmd/issues/3089">#3089</a>: [java] CloseResource rule throws exception on spaces in property types</li>
      <li><a href="https://github.com/pmd/pmd/issues/3133">#3133</a>: [java] InvalidLogMessageFormat FP with StringFormattedMessage and ParameterizedMessage</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3106">#3106</a>: [plsql] ParseException while parsing EXECUTE IMMEDIATE ‘drop database link ‘ || linkname;</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-7">API Changes</h3>

<h4 id="experimental-apis-2">Experimental APIs</h4>

<ul>
  <li>The experimental class <code class="language-plaintext highlighter-rouge">ASTTypeTestPattern</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#"><code>ASTTypePattern</code></a>
in order to align the naming to the JLS.</li>
  <li>The experimental class <code class="language-plaintext highlighter-rouge">ASTRecordConstructorDeclaration</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTCompactConstructorDeclaration.html#"><code>ASTCompactConstructorDeclaration</code></a>
in order to align the naming to the JLS.</li>
  <li>The AST types and APIs around Pattern Matching and Records are not experimental anymore:
    <ul>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#isPatternBinding()"><code>ASTVariableDeclaratorId#isPatternBinding</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#"><code>ASTPattern</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#"><code>ASTTypePattern</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordDeclaration.html#"><code>ASTRecordDeclaration</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordComponentList.html#"><code>ASTRecordComponentList</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordComponent.html#"><code>ASTRecordComponent</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordBody.html#"><code>ASTRecordBody</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTCompactConstructorDeclaration.html#"><code>ASTCompactConstructorDeclaration</code></a></li>
    </ul>
  </li>
</ul>

<h4 id="internal-api-1">Internal API</h4>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li>The protected or public member of the Java rule <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/rule/bestpractices/AvoidUsingHardCodedIPRule.html#"><code>AvoidUsingHardCodedIPRule</code></a>
are deprecated and considered to be internal API. They will be removed with PMD 7.</li>
</ul>

<h3 id="external-contributions-9">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/3098">#3098</a>: [apex] ApexDoc optionally report private and protected - <a href="https://github.com/jonathanwiesel">Jonathan Wiesel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3107">#3107</a>: [plsql] Fix ParseException for EXECUTE IMMEDIATE str1||str2; - <a href="https://github.com/hvbtup">hvbtup</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3125">#3125</a>: [doc] Fix sample code indentation in documentation - <a href="https://github.com/arturdryomov">Artur Dryomov</a></li>
</ul>

<h3 id="stats-9">Stats</h3>
<ul>
  <li>43 commits</li>
  <li>21 closed tickets &amp; PRs</li>
  <li>Days since last release: 27</li>
</ul>

<h2 id="30-january-2021---6310">30-January-2021 - 6.31.0</h2>

<p>The PMD team is pleased to announce PMD 6.31.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-10">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#sarif-format">SARIF Format</a></li>
      <li><a href="#cpd">CPD</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-api">Deprecated API</a></li>
      <li><a href="#experimental-apis">Experimental APIs</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-9">New and noteworthy</h3>

<h4 id="sarif-format">SARIF Format</h4>

<p>PMD now supports the <a href="https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=sarif">Static Analysis Results Interchange Format (SARIF)</a>
as an additional report format. Just use the <a href="pmd_userdocs_cli_reference.html#format">command line parameter</a> <code class="language-plaintext highlighter-rouge">-format sarif</code> to select it.
SARIF is an OASIS standard format for static analysis tools.
PMD creates SARIF JSON files in <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html">SARIF version 2.1.0</a>.
An example report can be found in the documentation in <a href="pmd_userdocs_report_formats.html#sarif">Report formats for PMD</a>.</p>

<h4 id="cpd">CPD</h4>

<ul>
  <li>The C++ module now supports the new option <a href="https://pmd.github.io/latest/pmd_userdocs_cpd.html#-ignore-literal-sequences"><code class="language-plaintext highlighter-rouge">--ignore-literal-sequences</code></a>,
which can be used to avoid detection of some uninteresting clones. This options has been
introduced with PMD 6.30.0 for C# and is now available for C++ as well. See <a href="https://github.com/pmd/pmd/pull/2963">#2963</a>.</li>
</ul>

<h4 id="new-rules-5">New Rules</h4>

<ul>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.31.0/pmd_rules_apex_errorprone.html#overridebothequalsandhashcode"><code class="language-plaintext highlighter-rouge">OverrideBothEqualsAndHashcode</code></a> brings the well known Java rule
to Apex. In Apex the same principle applies: <code class="language-plaintext highlighter-rouge">equals</code> and <code class="language-plaintext highlighter-rouge">hashCode</code> should always be overridden
together to ensure collection classes such as Maps and Sets work as expected.</p>
  </li>
  <li>
    <p>The new Visualforce rule <a href="https://pmd.github.io/pmd-6.31.0/pmd_rules_vf_security.html#vfhtmlstyletagxss"><code class="language-plaintext highlighter-rouge">VfHtmlStyleTagXss</code></a> checks for potential XSS problems
when using <code class="language-plaintext highlighter-rouge">&lt;style&gt;</code> tags on Visualforce pages.</p>
  </li>
</ul>

<h4 id="deprecated-rules-3">Deprecated rules</h4>

<ul>
  <li>java-performance
    <ul>
      <li><a href="https://pmd.github.io/pmd-6.31.0/pmd_rules_java_performance.html#avoidusingshorttype"><code class="language-plaintext highlighter-rouge">AvoidUsingShortType</code></a>: arithmetic on shorts is not significantly
slower than on ints, whereas using shorts may provide significant memory savings in arrays.</li>
      <li><a href="https://pmd.github.io/pmd-6.31.0/pmd_rules_java_performance.html#simplifystartswith"><code class="language-plaintext highlighter-rouge">SimplifyStartsWith</code></a>: the suggested code transformation has an
insignificant performance impact, and decreases readability.</li>
    </ul>
  </li>
</ul>

<h3 id="fixed-issues-10">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2953">#2953</a>: [core] Support SARIF JSON Format</li>
      <li><a href="https://github.com/pmd/pmd/issues/2970">#2970</a>: [core] PMD 6.30.0 release is not reproducible</li>
      <li><a href="https://github.com/pmd/pmd/pull/2994">#2994</a>: [core] Fix code climate severity strings</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/575">#575</a>: [java] LiteralsFirstInComparisons should consider constant fields</li>
      <li><a href="https://github.com/pmd/pmd/issues/2454">#2454</a>: [java] UnusedPrivateMethod violation for disabled class in 6.23.0</li>
      <li><a href="https://github.com/pmd/pmd/issues/2833">#2833</a>: [java] NPE in UseCollectionIsEmptyRule with enums</li>
      <li><a href="https://github.com/pmd/pmd/issues/2876">#2876</a>: [java] UnusedPrivateField cannot override ignored annotations property</li>
      <li><a href="https://github.com/pmd/pmd/issues/2957">#2957</a>: [java] Ignore unused declarations that have special name</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2960">#2960</a>: [java] Thread issue in MethodNamingConventionsRule</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3006">#3006</a>: [java] NPE in SingularFieldRule with concise resource syntax</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2976">#2976</a>: [java] CompareObjectsWithEquals: FP with array.length</li>
      <li><a href="https://github.com/pmd/pmd/issues/2977">#2977</a>: [java] 6.30.0 introduces new false positive in CloseResource rule?</li>
      <li><a href="https://github.com/pmd/pmd/issues/2979">#2979</a>: [java] UseEqualsToCompareStrings: FP with “var” variables</li>
      <li><a href="https://github.com/pmd/pmd/issues/3004">#3004</a>: [java] UseEqualsToCompareStrings false positive with PMD 6.30.0</li>
      <li><a href="https://github.com/pmd/pmd/issues/3062">#3062</a>: [java] CloseResource FP with reassigned stream</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2296">#2296</a>: [java] Deprecate rule AvoidUsingShortType</li>
      <li><a href="https://github.com/pmd/pmd/issues/2740">#2740</a>: [java] Deprecate rule SimplifyStartsWith</li>
      <li><a href="https://github.com/pmd/pmd/issues/3088">#3088</a>: [java] AvoidInstantiatingObjectsInLoops - false positive with Collections</li>
    </ul>
  </li>
  <li>vf-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/3081">#3081</a>: [vf] VfUnescapeEl: Inherently un-XSS-able built-in functions trigger false positives</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-8">API Changes</h3>

<h4 id="deprecated-api-1">Deprecated API</h4>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.31.0/net/sourceforge/pmd/lang/xml/rule/AbstractDomXmlRule.html#"><code>AbstractDomXmlRule</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.31.0/net/sourceforge/pmd/lang/wsdl/rule/AbstractWsdlRule.html#"><code>AbstractWsdlRule</code></a></li>
  <li>A few methods of <a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.31.0/net/sourceforge/pmd/lang/xml/rule/AbstractXmlRule.html#"><code>AbstractXmlRule</code></a></li>
</ul>

<h4 id="experimental-apis-3">Experimental APIs</h4>

<ul>
  <li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.31.0/net/sourceforge/pmd/lang/ast/GenericToken.html#getKind()"><code>GenericToken#getKind</code></a> has been added as experimental. This
unifies the token interface for both JavaCC and Antlr. The already existing method
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.31.0/net/sourceforge/pmd/cpd/token/AntlrToken.html#getKind()"><code>AntlrToken#getKind</code></a> is therefore experimental as well. The
returned constant depends on the actual language and might change whenever the grammar
of the language is changed.</li>
</ul>

<h3 id="external-contributions-10">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2666">#2666</a>: [swift] Manage swift5 string literals - <a href="https://github.com/kenji21">kenji21</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2959">#2959</a>: [apex] New Rule: override equals and hashcode rule - <a href="https://github.com/recdevs">recdevs</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2963">#2963</a>: [cpp] Add option to ignore sequences of literals - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2964">#2964</a>: [cs] Update C# grammar for additional C# 7 and C# 8 features - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2965">#2965</a>: [cs] Improvements for ignore sequences of literals functionality - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2968">#2968</a>: [java] NPE in UseCollectionIsEmptyRule with enums - <a href="https://github.com/foxmason">foxmason</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2983">#2983</a>: [java] LiteralsFirstInComparisons should consider constant fields - <a href="https://github.com/ozangulle">Ozan Gulle</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2994">#2994</a>: [core] Fix code climate severity strings - <a href="https://github.com/vmaurin">Vincent Maurin</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3005">#3005</a>: [vf] [New Rule] Handle XSS violations that can occur within Html Style tags - <a href="https://github.com/rmohan20">rmohan20</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3073">#3073</a>: [core] Include SARIF renderer - <a href="https://github.com/mmoyaferrer">Manuel Moya Ferrer</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/3084">#3084</a>: [vf] VfUnescapeEl false-positive with builtin functions - <a href="https://github.com/jfeingold35">Josh Feingold</a></li>
</ul>

<h3 id="stats-10">Stats</h3>
<ul>
  <li>116 commits</li>
  <li>40 closed tickets &amp; PRs</li>
  <li>Days since last release: 49</li>
</ul>

<h2 id="12-december-2020---6300">12-December-2020 - 6.30.0</h2>

<p>The PMD team is pleased to announce PMD 6.30.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-11">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
      * <a href="#cpd">CPD</a>
      * <a href="#type-information-for-visualforce">Type information for VisualForce</a></li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-api">Deprecated API</a>
        <ul>
          <li><a href="#around-ruleset-parsing">Around RuleSet parsing</a></li>
          <li><a href="#around-the-`pmd`-class">Around the <code class="language-plaintext highlighter-rouge">PMD</code> class</a></li>
          <li><a href="#miscellaneous">Miscellaneous</a></li>
        </ul>
      </li>
      <li><a href="#internal-api">Internal API</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-10">New and noteworthy</h3>

<h5 id="cpd-1">CPD</h5>

<ul>
  <li>
    <p>The C# module now supports the new option <a href="https://pmd.github.io/latest/pmd_userdocs_cpd.html#-ignore-literal-sequences"><code class="language-plaintext highlighter-rouge">--ignore-literal-sequences</code></a>, which can be used to avoid detection of some uninteresting clones. Support for other languages may be added in the future. See <a href="https://github.com/pmd/pmd/pull/2945">#2945</a></p>
  </li>
  <li>
    <p>The Scala module now supports <a href="https://pmd.github.io/latest/pmd_userdocs_cpd.html#suppression">suppression</a> through <code class="language-plaintext highlighter-rouge">CPD-ON</code>/<code class="language-plaintext highlighter-rouge">CPD-OFF</code> comment pairs. See <a href="https://github.com/pmd/pmd/pull/2929">#2929</a></p>
  </li>
</ul>

<h5 id="type-information-for-visualforce">Type information for VisualForce</h5>

<p>The Visualforce AST now can resolve the data type of Visualforce expressions that reference Apex Controller properties and Custom Object fields. This feature improves the precision of existing rules, like <a href="https://pmd.github.io/pmd-6.30.0/pmd_rules_vf_security.html#vfunescapeel"><code class="language-plaintext highlighter-rouge">VfUnescapeEl</code></a>.</p>

<p>This can be configured using two environment variables:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">PMD_VF_APEXDIRECTORIES</code>: Comma separated list of directories for Apex classes. Absolute or relative to the Visualforce directory. Default is <code class="language-plaintext highlighter-rouge">../classes</code>. Specifying an empty string will disable data type resolution for Apex Controller properties.</li>
  <li><code class="language-plaintext highlighter-rouge">PMD_VF_OBJECTSDIRECTORIES</code>: Comma separated list of directories for Custom Objects. Absolute or relative to the Visualforce directory. Default is <code class="language-plaintext highlighter-rouge">../objects</code>. Specifying an empty string will disable data type resolution for Custom Object fields.</li>
</ul>

<p>This feature is experimental, in particular, expect changes to the way the configuration is specified. We’ll probably extend the CLI instead of relying on environment variables in a future version.</p>

<p>Thanks to Jeff Bartolotta and Roopa Mohan for contributing this!</p>

<h3 id="fixed-issues-11">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1939">#1939</a>: [core] XPath expressions return handling</li>
      <li><a href="https://github.com/pmd/pmd/issues/1961">#1961</a>: [core] Text renderer should include name of violated rule</li>
      <li><a href="https://github.com/pmd/pmd/pull/2874">#2874</a>: [core] Fix XMLRenderer with UTF-16</li>
    </ul>
  </li>
  <li>cs
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2938">#2938</a>: [cs] CPD: ignoring using directives could not be disabled</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2911">#2911</a>: [java] <code class="language-plaintext highlighter-rouge">ClassTypeResolver#searchNodeNameForClass</code> leaks memory</li>
      <li><a href="https://github.com/pmd/pmd/pull/2934">#2934</a>: [java] CompareObjectsWithEquals / UseEqualsToCompareStrings - False negatives with fields</li>
      <li><a href="https://github.com/pmd/pmd/pull/2940">#2940</a>: [java] Catch additional TypeNotPresentExceptions / LinkageErrors</li>
    </ul>
  </li>
  <li>scala
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2480">#2480</a>: [scala] Support CPD suppressions</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-9">API Changes</h3>

<h4 id="deprecated-api-2">Deprecated API</h4>

<h5 id="around-ruleset-parsing">Around RuleSet parsing</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> have been deprecated in favor of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetLoader.html#"><code>RuleSetLoader</code></a>. This is easier to configure, and more maintainable than the multiple overloads of <code class="language-plaintext highlighter-rouge">RulesetsFactoryUtils</code>.</li>
  <li>Some static creation methods have been added to <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSet.html#"><code>RuleSet</code></a> for simple cases, eg <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSet.html#forSingleRule(net.sourceforge.pmd.Rule)"><code>forSingleRule</code></a>. These replace some counterparts in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a></li>
  <li>Since <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a> is also deprecated, many APIs that require a RuleSets instance now are deprecated, and have a counterpart that expects a <code class="language-plaintext highlighter-rouge">List&lt;RuleSet&gt;</code>.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetReferenceId.html#"><code>RuleSetReferenceId</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetReference.html#"><code>RuleSetReference</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetFactoryCompatibility.html#"><code>RuleSetFactoryCompatibility</code></a> are deprecated. They are most likely not relevant outside of the implementation of pmd-core.</li>
</ul>

<h5 id="around-the-pmd-class">Around the <code class="language-plaintext highlighter-rouge">PMD</code> class</h5>

<p>Many classes around PMD’s entry point (<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a>) have been deprecated as internal, including:</p>
<ul>
  <li>The contents of the packages <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/cli/package-summary.html#"><code>net.sourceforge.pmd.cli</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/processor/package-summary.html#"><code>net.sourceforge.pmd.processor</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/SourceCodeProcessor.html#"><code>SourceCodeProcessor</code></a></li>
  <li>The constructors of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> (the class will be made a utility class)</li>
</ul>

<h5 id="miscellaneous">Miscellaneous</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTPackageDeclaration.html#getPackageNameImage()"><code>ASTPackageDeclaration#getPackageNameImage</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTTypeParameter.html#getParameterName()"><code>ASTTypeParameter#getParameterName</code></a>
and the corresponding XPath attributes. In both cases they’re replaced with a new method <code class="language-plaintext highlighter-rouge">getName</code>,
the attribute is <code class="language-plaintext highlighter-rouge">@Name</code>.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceBody.html#isAnonymousInnerClass()"><code>ASTClassOrInterfaceBody#isAnonymousInnerClass</code></a>,
and <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceBody.html#isEnumChild()"><code>ASTClassOrInterfaceBody#isEnumChild</code></a>,
refs <a href="https://github.com/pmd/pmd/issues/905">#905</a></li>
</ul>

<h4 id="internal-api-2">Internal API</h4>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.html#"><code>net.sourceforge.pmd.lang.ecmascript.Ecmascript3Handler</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.html#"><code>net.sourceforge.pmd.lang.ecmascript.Ecmascript3Parser</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.html#parserOptions"><code>EcmascriptParser#parserOptions</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.html#getSuppressMap()"><code>EcmascriptParser#getSuppressMap</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/lang/rule/ParametricRuleViolation.html#"><code>net.sourceforge.pmd.lang.rule.ParametricRuleViolation</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/lang/ParserOptions.html#suppressMarker"><code>ParserOptions#suppressMarker</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-modelica/6.30.0/net/sourceforge/pmd/lang/modelica/rule/ModelicaRuleViolationFactory.html#"><code>net.sourceforge.pmd.lang.modelica.rule.ModelicaRuleViolationFactory</code></a></li>
</ul>

<h3 id="external-contributions-11">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2864">#2864</a>: [vf] Provide expression type information to Visualforce rules to avoid false positives - <a href="https://github.com/jbartolotta-sfdc">Jeff Bartolotta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2914">#2914</a>: [core] Include rule name in text renderer - <a href="https://github.com/GuntherSchrijvers">Gunther Schrijvers</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2925">#2925</a>: Cleanup: Correct annotation array initializer indents from checkstyle #8083 - <a href="https://github.com/Abhishek-kumar09">Abhishek Kumar</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2929">#2929</a>: [scala] Add support for CPD-ON and CPD-OFF special comments - <a href="https://github.com/andyrobinson">Andy Robinson</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2936">#2936</a>: [java] (doc) Fix typo: “an accessor” not “a” - <a href="https://github.com/igormoreno">Igor Moreno</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2938">#2938</a>: [cs] CPD: fix issue where ignoring using directives could not be disabled - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2945">#2945</a>: [cs] Add option to ignore sequences of literals - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2962">#2962</a>: [cpp] Add support for C++ 14 binary literals - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
</ul>

<h3 id="stats-11">Stats</h3>
<ul>
  <li>190 commits</li>
  <li>25 closed tickets &amp; PRs</li>
  <li>Days since last release: 49</li>
</ul>

<h2 id="24-october-2020---6290">24-October-2020 - 6.29.0</h2>

<p>The PMD team is pleased to announce PMD 6.29.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-12">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#updated-apex-support">Updated Apex Support</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#renamed-rules">Renamed Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-11">New and noteworthy</h3>

<h4 id="updated-apex-support-1">Updated Apex Support</h4>

<ul>
  <li>The Apex language support has been bumped to version 50 (Winter ‘21). All new language features are now properly
parsed and processed. Especially the <a href="https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_apex_SafeNavigationOperator.htm">Safe Navigation Operator</a> is now supported.
See also <a href="https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_apex.htm">Salesforce Winter ‘21 Release Notes</a></li>
</ul>

<h4 id="new-rules-6">New Rules</h4>

<ul>
  <li>The new Apex rule <a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_apex_performance.html#operationwithlimitsinloop"><code class="language-plaintext highlighter-rouge">OperationWithLimitsInLoop</code></a> (<code class="language-plaintext highlighter-rouge">apex-performance</code>)
finds operations in loops that may hit governor limits such as DML operations, SOQL
queries and more. The rule replaces the three rules “AvoidDmlStatementsInLoops”, “AvoidSoqlInLoops”,
and “AvoidSoslInLoops”.</li>
</ul>

<h4 id="renamed-rules-2">Renamed Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_java_errorprone.html#donotcallsystemexit"><code class="language-plaintext highlighter-rouge">DoNotCallSystemExit</code></a> has been renamed to
<a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_java_errorprone.html#donotterminatevm"><code class="language-plaintext highlighter-rouge">DoNotTerminateVM</code></a>, since it checks for all the following calls:
<code class="language-plaintext highlighter-rouge">System.exit(int)</code>, <code class="language-plaintext highlighter-rouge">Runtime.exit(int)</code>, <code class="language-plaintext highlighter-rouge">Runtime.halt(int)</code>. All these calls terminate
the Java VM, which is bad, if the VM runs an application server which many independent applications.</li>
</ul>

<h4 id="deprecated-rules-4">Deprecated Rules</h4>

<ul>
  <li>The Apex rules <a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_apex_performance.html#avoiddmlstatementsinloops"><code class="language-plaintext highlighter-rouge">AvoidDmlStatementsInLoops</code></a>,
<a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_apex_performance.html#avoidsoqlinloops"><code class="language-plaintext highlighter-rouge">AvoidSoqlInLoops</code></a> and <a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_apex_performance.html#avoidsoslinloops"><code class="language-plaintext highlighter-rouge">AvoidSoslInLoops</code></a>
(<code class="language-plaintext highlighter-rouge">apex-performance</code>) are deprecated in favour of the new rule
<a href="https://pmd.github.io/pmd-6.29.0/pmd_rules_apex_performance.html#operationwithlimitsinloop"><code class="language-plaintext highlighter-rouge">OperationWithLimitsInLoop</code></a>. The deprecated rules will be removed
with PMD 7.0.0.</li>
</ul>

<h3 id="fixed-issues-12">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2839">#2839</a>: [apex] Apex classes with safe navigation operator from Winter 21 (50.0) are skipped</li>
    </ul>
  </li>
  <li>apex-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1713">#1713</a>: [apex] Mark Database DML statements in For Loop</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2831">#2831</a>: [core] Fix XMLRenderer newlines when running under IBM Java</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2157">#2157</a>: [java] Improve DoNotCallSystemExit: permit call in main(), flag System.halt</li>
      <li><a href="https://github.com/pmd/pmd/issues/2764">#2764</a>: [java] CloseResourceRule does not recognize multiple assignment done to resource</li>
    </ul>
  </li>
  <li>miscellaneous
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2823">#2823</a>: [doc] Renamed/Moved rules are missing in documentation</li>
    </ul>
  </li>
  <li>vf (Salesforce VisualForce)
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2765">#2765</a>: [vf] Attributes with dot cause a VfParseException</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-12">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2803">#2803</a>: [java] Improve DoNotCallSystemExit (Fixes #2157) - <a href="https://github.com/mvitaly">Vitaly Polonetsky</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2809">#2809</a>: [java] Move test config from file to test class - <a href="https://github.com/stefanbirkner">Stefan Birkner</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2810">#2810</a>: [core] Move method “renderTempFile” to XMLRendererTest - <a href="https://github.com/stefanbirkner">Stefan Birkner</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2811">#2811</a>: [java] CloseResource - Fix #2764: False-negative when re-assigning variable - <a href="https://github.com/andipabst">Andi Pabst</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2813">#2813</a>: [core] Use JUnit’s TemporaryFolder rule - <a href="https://github.com/stefanbirkner">Stefan Birkner</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2816">#2816</a>: [apex] Detect ‘Database’ method invocations inside loops - <a href="https://github.com/jbartolotta-sfdc">Jeff Bartolotta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2829">#2829</a>: [doc] Small correction in pmd_report_formats.md - <a href="https://github.com/gustavopcassol">Gustavo Krieger</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2834">#2834</a>: [vf] Allow attributes with dot in Visualforce - <a href="https://github.com/rmohan20">rmohan20</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2842">#2842</a>: [core] Bump antlr4 from 4.7 to 4.7.2 - <a href="https://github.com/alecharp">Adrien Lecharpentier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2865">#2865</a>: [java] (doc) Update ExcessiveImports example code for clarity - <a href="https://github.com/gustavopcassol">Gustavo Krieger</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2866">#2866</a>: [java] (doc) Fix example for CouplingBetweenObjects - <a href="https://github.com/gustavopcassol">Gustavo Krieger</a></li>
</ul>

<h3 id="stats-12">Stats</h3>
<ul>
  <li>50 commits</li>
  <li>23 closed tickets &amp; PRs</li>
  <li>Days since last release: 27</li>
</ul>

<h2 id="26-september-2020---6280">26-September-2020 - 6.28.0</h2>

<p>The PMD team is pleased to announce PMD 6.28.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-13">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#cpd's-anytokenizer-has-been-improved">CPD’s AnyTokenizer has been improved</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-api">Deprecated API</a>
        <ul>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-12">New and noteworthy</h3>

<h4 id="cpds-anytokenizer-has-been-improved">CPD’s AnyTokenizer has been improved</h4>

<p>The AnyTokenizer is used for languages, that don’t have an own lexer/grammar based tokenizer.
AnyTokenizer now handles string literals and end-of-line comments. Fortran, Perl and Ruby have
been updated to use AnyTokenizer instead of their old custom tokenizer based on AbstractTokenizer.
See <a href="https://github.com/pmd/pmd/pull/2758">#2758</a> for details.</p>

<p>AbstractTokenizer and the custom tokenizers of Fortran, Perl and Ruby are deprecated now.</p>

<h3 id="fixed-issues-13">Fixed Issues</h3>

<ul>
  <li>cpd
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2758">#2758</a>: [cpd] Improve AnyTokenizer</li>
      <li><a href="https://github.com/pmd/pmd/issues/2760">#2760</a>: [cpd] AnyTokenizer doesn’t count columns correctly</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2774">#2774</a>: [apex] ApexSharingViolations does not correlate sharing settings with class that contains data access</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2738">#2738</a>: [java] Custom rule with @ExhaustiveEnumSwitch throws NPE</li>
      <li><a href="https://github.com/pmd/pmd/issues/2755">#2755</a>: [java] [6.27.0] Exception applying rule CloseResource on file … java.lang.NullPointerException</li>
      <li><a href="https://github.com/pmd/pmd/issues/2756">#2756</a>: [java] TypeTestUtil fails with NPE for anonymous class</li>
      <li><a href="https://github.com/pmd/pmd/issues/2767">#2767</a>: [java] IndexOutOfBoundsException when parsing an initializer BlockStatement</li>
      <li><a href="https://github.com/pmd/pmd/issues/2783">#2783</a>: [java] Error while parsing with lambda of custom interface</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2759">#2759</a>: [java] False positive in UnusedAssignment</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2708">#2708</a>: [java] False positive FinalFieldCouldBeStatic when using lombok Builder.Default</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-10">API Changes</h3>

<h4 id="deprecated-api-3">Deprecated API</h4>

<h5 id="for-removal">For removal</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/RuleViolationComparator.html#"><code>net.sourceforge.pmd.RuleViolationComparator</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/RuleViolation.html#DEFAULT_COMPARATOR"><code>RuleViolation#DEFAULT_COMPARATOR</code></a> instead.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/cpd/AbstractTokenizer.html#"><code>net.sourceforge.pmd.cpd.AbstractTokenizer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/cpd/AnyTokenizer.html#"><code>net.sourceforge.pmd.cpd.AnyTokenizer</code></a> instead.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-fortran/6.28.0/net/sourceforge/pmd/cpd/FortranTokenizer.html#"><code>net.sourceforge.pmd.cpd.FortranTokenizer</code></a>. Was replaced by an <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/cpd/AnyTokenizer.html#"><code>AnyTokenizer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-fortran/6.28.0/net/sourceforge/pmd/cpd/FortranLanguage.html#getTokenizer()"><code>FortranLanguage#getTokenizer</code></a> anyway.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-perl/6.28.0/net/sourceforge/pmd/cpd/PerlTokenizer.html#"><code>net.sourceforge.pmd.cpd.PerlTokenizer</code></a>. Was replaced by an <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/cpd/AnyTokenizer.html#"><code>AnyTokenizer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-perl/6.28.0/net/sourceforge/pmd/cpd/PerlLanguage.html#getTokenizer()"><code>PerlLanguage#getTokenizer</code></a> anyway.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-ruby/6.28.0/net/sourceforge/pmd/cpd/RubyTokenizer.html#"><code>net.sourceforge.pmd.cpd.RubyTokenizer</code></a>. Was replaced by an <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/cpd/AnyTokenizer.html#"><code>AnyTokenizer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-ruby/6.28.0/net/sourceforge/pmd/cpd/RubyLanguage.html#getTokenizer()"><code>RubyLanguage#getTokenizer</code></a> anyway.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/lang/rule/RuleReference.html#getOverriddenLanguage()"><code>RuleReference#getOverriddenLanguage</code></a> and
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.28.0/net/sourceforge/pmd/lang/rule/RuleReference.html#setLanguage(net.sourceforge.pmd.lang.Language)"><code>RuleReference#setLanguage</code></a></li>
  <li>Antlr4 generated lexers:
    <ul>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-cs/6.28.0/net/sourceforge/pmd/lang/cs/antlr4/CSharpLexer.html#"><code>net.sourceforge.pmd.lang.cs.antlr4.CSharpLexer</code></a> will be moved to package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.cs.ast</code> with PMD 7.</li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-dart/6.28.0/net/sourceforge/pmd/lang/dart/antlr4/Dart2Lexer.html#"><code>net.sourceforge.pmd.lang.dart.antlr4.Dart2Lexer</code></a> will be renamed to <code class="language-plaintext highlighter-rouge">DartLexer</code> and moved to package 
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.dart.ast</code> with PMD 7. All other classes in the old package will be removed.</li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-go/6.28.0/net/sourceforge/pmd/lang/go/antlr4/GolangLexer.html#"><code>net.sourceforge.pmd.lang.go.antlr4.GolangLexer</code></a> will be moved to package
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.go.ast</code> with PMD 7. All other classes in the old package will be removed.</li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-kotlin/6.28.0/net/sourceforge/pmd/lang/kotlin/antlr4/Kotlin.html#"><code>net.sourceforge.pmd.lang.kotlin.antlr4.Kotlin</code></a> will be renamed to <code class="language-plaintext highlighter-rouge">KotlinLexer</code> and moved to package 
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.kotlin.ast</code> with PMD 7.</li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-lua/6.28.0/net/sourceforge/pmd/lang/lua/antlr4/LuaLexer.html#"><code>net.sourceforge.pmd.lang.lua.antlr4.LuaLexer</code></a> will be moved to package
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.lua.ast</code> with PMD 7. All other classes in the old package will be removed.</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-13">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2735">#2735</a>: [ci] Add github actions for a fast view of pr succeed/not - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2747">#2747</a>: [java] Don’t trigger FinalFieldCouldBeStatic when field is annotated with lombok @Builder.Default - <a href="https://github.com/ollieabbey">Ollie Abbey</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2773">#2773</a>: [java] issue-2738: Adding null check to avoid npe when switch case is default - <a href="https://github.com/nimit-patel">Nimit Patel</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2789">#2789</a>: Add badge for reproducible build - <a href="https://github.com/bhamail">Dan Rollo</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2791">#2791</a>: [apex] Analyze inner classes for sharing violations - <a href="https://github.com/jbartolotta-sfdc">Jeff Bartolotta</a></li>
</ul>

<h3 id="stats-13">Stats</h3>
<ul>
  <li>58 commits</li>
  <li>24 closed tickets &amp; PRs</li>
  <li>Days since last release: 25</li>
</ul>

<h2 id="31-august-2020---6270">31-August-2020 - 6.27.0</h2>

<p>The PMD team is pleased to announce PMD 6.27.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-14">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-15-support">Java 15 Support</a></li>
      <li><a href="#changes-in-how-tab-characters-are-handled">Changes in how tab characters are handled</a></li>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-api">Deprecated API</a>
        <ul>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-13">New and noteworthy</h3>

<h4 id="java-15-support">Java 15 Support</h4>

<p>This release of PMD brings support for Java 15. PMD can parse <a href="https://openjdk.java.net/jeps/378">Text Blocks</a>
which have been promoted to be a standard language feature of Java.</p>

<p>PMD also supports <a href="https://openjdk.java.net/jeps/375">Pattern Matching for instanceof</a>,
<a href="https://openjdk.java.net/jeps/384">Records</a>, and <a href="https://openjdk.java.net/jeps/360">Sealed Classes</a>.</p>

<p>Note: The Pattern Matching for instanceof, Records, and Sealed Classes are all preview language features of OpenJDK 15
and are not enabled by default. In order to
analyze a project with PMD that uses these language features, you’ll need to enable it via the environment
variable <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS</code> and select the new language version <code class="language-plaintext highlighter-rouge">15-preview</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 15-preview ...
</code></pre></div></div>

<p>Note: Support for Java 13 preview language features have been removed. The version “13-preview” is no longer available.</p>

<h4 id="changes-in-how-tab-characters-are-handled">Changes in how tab characters are handled</h4>

<p>In the past, tab characters in source files has been handled differently in different languages by PMD.
For instance in Java, tab characters had a width of 8 columns, while C# used only 1 column. Visualforce instead
used 4 columns.</p>

<p>This has been unified now so that tab characters are consistently now always 1 column wide.</p>

<p>This however might be a <strong>incompatible</strong> change, if you’re using the properties “BeginColumn” or “EndColumn”
additionally to “BeginLine” and “EndLine” of a Token/AST node in order to highlight
where a rule violation occurred in the source file. If you have logic there that deals with tab characters,
you most likely can remove this logic now, since tab characters are now just “normal” characters
in terms of string processing.</p>

<p>See also <a href="https://github.com/pmd/pmd/pull/2656">[all] Ensure PMD/CPD uses tab width of 1 for tabs consistently #2656</a>.</p>

<h4 id="updated-pmd-designer-1">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.27.0">PMD Designer Changelog</a>.</p>

<h4 id="new-rules-7">New Rules</h4>

<ul>
  <li>The new Java rule <a href="https://pmd.github.io/pmd-6.27.0/pmd_rules_java_bestpractices.html#avoidreassigningcatchvariables"><code class="language-plaintext highlighter-rouge">AvoidReassigningCatchVariables</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) finds
cases where the variable of the caught exception is reassigned. This practice is surprising and prevents
further evolution of the code like multi-catch.</li>
</ul>

<h4 id="modified-rules-4">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.27.0/pmd_rules_java_errorprone.html#closeresource"><code class="language-plaintext highlighter-rouge">CloseResource</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) has a new property
<code class="language-plaintext highlighter-rouge">closeNotInFinally</code>. With this property set to <code class="language-plaintext highlighter-rouge">true</code> the rule will also find calls to close a
resource, which are not in a finally-block of a try-statement. If a resource is not closed within a
finally block, it might not be closed at all in case of exceptions.</p>

    <p>As this new detection would yield many new violations, it is disabled by default. It might be
enabled in a later version of PMD.</p>
  </li>
</ul>

<h4 id="deprecated-rules-5">Deprecated Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.27.0/pmd_rules_java_errorprone.html#dataflowanomalyanalysis"><code class="language-plaintext highlighter-rouge">DataflowAnomalyAnalysis</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>)
is deprecated in favour of <a href="https://pmd.github.io/pmd-6.27.0/pmd_rules_java_bestpractices.html#unusedassignment"><code class="language-plaintext highlighter-rouge">UnusedAssignment</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>),
which was introduced in PMD 6.26.0.</li>
</ul>

<h3 id="fixed-issues-14">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/724">#724</a>: [core] Avoid parsing rulesets multiple times</li>
      <li><a href="https://github.com/pmd/pmd/issues/1962">#1962</a>: [core] Simplify Report API</li>
      <li><a href="https://github.com/pmd/pmd/issues/2653">#2653</a>: [lang-test] Upgrade kotlintest to Kotest</li>
      <li><a href="https://github.com/pmd/pmd/pull/2656">#2656</a>: [all] Ensure PMD/CPD uses tab width of 1 for tabs consistently</li>
      <li><a href="https://github.com/pmd/pmd/pull/2690">#2690</a>: [core] Fix java7 compatibility</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2646">#2646</a>: [java] Support JDK 15</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2471">#2471</a>: [java] New Rule: AvoidReassigningCatchVariables</li>
      <li><a href="https://github.com/pmd/pmd/issues/2663">#2663</a>: [java] NoClassDefFoundError on upgrade from 6.25.0 to 6.26.0</li>
      <li><a href="https://github.com/pmd/pmd/issues/2668">#2668</a>: [java] UnusedAssignment false positives</li>
      <li><a href="https://github.com/pmd/pmd/issues/2673">#2673</a>: [java] UnusedPrivateField and SingularField false positive with lombok annotation EqualsAndHashCode</li>
      <li><a href="https://github.com/pmd/pmd/issues/2684">#2684</a>: [java] UnusedAssignment FP in try/catch</li>
      <li><a href="https://github.com/pmd/pmd/issues/2686">#2686</a>: [java] UnusedAssignment must not flag abstract method parameters in interfaces and abstract classes</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2108">#2108</a>: [java] [doc] ImmutableField rule: Description should clarify shallow immutability</li>
      <li><a href="https://github.com/pmd/pmd/issues/2461">#2461</a>: [java] ExcessiveParameterListRule must ignore a private constructor</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2264">#2264</a>: [java] SuspiciousEqualsMethodName: Improve description about error-prone overloading of equals()</li>
      <li><a href="https://github.com/pmd/pmd/issues/2410">#2410</a>: [java] ProperCloneImplementation not valid for final class</li>
      <li><a href="https://github.com/pmd/pmd/issues/2431">#2431</a>: [java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message</li>
      <li><a href="https://github.com/pmd/pmd/issues/2439">#2439</a>: [java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t)</li>
      <li><a href="https://github.com/pmd/pmd/issues/2470">#2470</a>: [java] CloseResource false positive when resource included in return value</li>
      <li><a href="https://github.com/pmd/pmd/issues/2531">#2531</a>: [java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase())</li>
      <li><a href="https://github.com/pmd/pmd/issues/2647">#2647</a>: [java] Deprecate rule DataFlowAnomalyAnalysis</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1868">#1868</a>: [java] false-positive for SimplifyStartsWith if string is empty</li>
      <li><a href="https://github.com/pmd/pmd/issues/2441">#2441</a>: [java] RedundantFieldInitializer can not detect a special case for char initialize: <code class="language-plaintext highlighter-rouge">char foo = '\0';</code></li>
      <li><a href="https://github.com/pmd/pmd/issues/2530">#2530</a>: [java] StringToString can not detect the case: getStringMethod().toString()</li>
    </ul>
  </li>
  <li>dart
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2750">#2750</a>: [dart] [cpd] Cpd Dart escaped dollar</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-11">API Changes</h3>

<ul>
  <li>XML rule definition in rulesets: In PMD 7, the <code class="language-plaintext highlighter-rouge">language</code> attribute will be required on all <code class="language-plaintext highlighter-rouge">rule</code>
elements that declare a new rule. Some base rule classes set the language implicitly in their
constructor, and so this is not required in all cases for the rule to work. But this
behavior will be discontinued in PMD 7, so missing <code class="language-plaintext highlighter-rouge">language</code> attributes are now
reported as a forward compatibility warning.</li>
</ul>

<h4 id="deprecated-api-4">Deprecated API</h4>

<h5 id="for-removal-1">For removal</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/Rule.html#getParserOptions()"><code>Rule#getParserOptions</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/lang/Parser.html#getParserOptions()"><code>Parser#getParserOptions</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/lang/AbstractParser.html#"><code>AbstractParser</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/RuleContext.html#removeAttribute(java.lang.String)"><code>RuleContext#removeAttribute</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/RuleContext.html#getAttribute(java.lang.String)"><code>RuleContext#getAttribute</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/RuleContext.html#setAttribute(java.lang.String,java.lang.Object)"><code>RuleContext#setAttribute</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.27.0/net/sourceforge/pmd/lang/apex/ApexParserOptions.html#"><code>ApexParserOptions</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.27.0/net/sourceforge/pmd/lang/java/ast/ASTThrowStatement.html#getFirstClassOrInterfaceTypeImage()"><code>ASTThrowStatement#getFirstClassOrInterfaceTypeImage</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.27.0/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptions.html#"><code>EcmascriptParserOptions</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.27.0/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptXPathRule.html#"><code>EcmascriptXPathRule</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.27.0/net/sourceforge/pmd/lang/xml/XmlParserOptions.html#"><code>XmlParserOptions</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.27.0/net/sourceforge/pmd/lang/xml/rule/XmlXPathRule.html#"><code>XmlXPathRule</code></a></li>
  <li>
    <p>Properties of <a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.27.0/net/sourceforge/pmd/lang/xml/rule/AbstractXmlRule.html#"><code>AbstractXmlRule</code></a></p>
  </li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/Report.ReadableDuration.html#"><code>net.sourceforge.pmd.Report.ReadableDuration</code></a></li>
  <li>
    <p>Many methods of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/Report.html#"><code>net.sourceforge.pmd.Report</code></a>. They are replaced by accessors
  that produce a List. For example, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/Report.html#iterator()"><code>iterator()</code></a> 
  (and implementing Iterable) and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/Report.html#isEmpty()"><code>isEmpty()</code></a> are both
  replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/Report.html#getViolations()"><code>getViolations()</code></a>.</p>
  </li>
  <li>The dataflow codebase is deprecated for removal in PMD 7. This
includes all code in the following packages, and their subpackages:
    <ul>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.27.0/net/sourceforge/pmd/lang/plsql/dfa/package-summary.html#"><code>net.sourceforge.pmd.lang.plsql.dfa</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.27.0/net/sourceforge/pmd/lang/java/dfa/package-summary.html#"><code>net.sourceforge.pmd.lang.java.dfa</code></a></li>
      <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.27.0/net/sourceforge/pmd/lang/dfa/package-summary.html#"><code>net.sourceforge.pmd.lang.dfa</code></a></li>
      <li>and the class <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.27.0/net/sourceforge/pmd/lang/plsql/PLSQLDataFlowHandler.html#"><code>PLSQLDataFlowHandler</code></a></li>
    </ul>
  </li>
  <li>
    <p><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.27.0/net/sourceforge/pmd/lang/vf/VfSimpleCharStream.html#"><code>VfSimpleCharStream</code></a></p>
  </li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.27.0/net/sourceforge/pmd/lang/jsp/ast/ASTJspDeclarations.html#"><code>ASTJspDeclarations</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.27.0/net/sourceforge/pmd/lang/jsp/ast/ASTJspDocument.html#"><code>ASTJspDocument</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/6.27.0/net/sourceforge/pmd/lang/scala/ast/ScalaParserVisitorAdapter.html#zero()"><code>ScalaParserVisitorAdapter#zero</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/6.27.0/net/sourceforge/pmd/lang/scala/ast/ScalaParserVisitorAdapter.html#combine(Object,Object)"><code>ScalaParserVisitorAdapter#combine</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.27.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitorReducedAdapter.html#"><code>ApexParserVisitorReducedAdapter</code></a></li>
  <li>
    <p><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.27.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorReducedAdapter.html#"><code>JavaParserVisitorReducedAdapter</code></a></p>
  </li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.27.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a> is deprecated in
 favor of <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.27.0/net/sourceforge/pmd/lang/java/types/TypeTestUtil.html#"><code>TypeTestUtil</code></a>, which has the
same functionality, but a slightly changed API.</li>
  <li>Many of the classes in <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.27.0/net/sourceforge/pmd/lang/java/symboltable/package-summary.html#"><code>net.sourceforge.pmd.lang.java.symboltable</code></a>
are deprecated as internal API.</li>
</ul>

<h3 id="external-contributions-14">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2656">#2656</a>: [all] Ensure PMD/CPD uses tab width of 1 for tabs consistently - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2659">#2659</a>: [java] StringToString can not detect the case: getStringMethod().toString() - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2662">#2662</a>: [java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase()) - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2671">#2671</a>: [java] CloseResource false positive when resource included in return value - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2674">#2674</a>: [java] add lombok.EqualsAndHashCode in AbstractLombokAwareRule - <a href="https://github.com/berkam">berkam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2677">#2677</a>: [java] RedundantFieldInitializer can not detect a special case for char initialize: <code class="language-plaintext highlighter-rouge">char foo = '\0';</code> - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2678">#2678</a>: [java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2679">#2679</a>: [java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2682">#2682</a>: [java] New Rule: AvoidReassigningCatchVariables - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2697">#2697</a>: [java] ExcessiveParameterListRule must ignore a private constructor - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2699">#2699</a>: [java] ProperCloneImplementation not valid for final class - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2700">#2700</a>: [java] Fix OnlyOneReturn code example - <a href="https://github.com/jlelse">Jan-Lukas Else</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2722">#2722</a>: [doc] [java] ImmutableField: extend description, fixes #2108 - <a href="https://github.com/mateusz-stefanski">Mateusz Stefanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2723">#2723</a>: [doc] [java] SimplifyStartsWith: update description and example, fixes #1868 - <a href="https://github.com/mateusz-stefanski">Mateusz Stefanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2724">#2724</a>: [doc] [java] SuspiciousEqualsMethodName: update description, fixes #2264 - <a href="https://github.com/mateusz-stefanski">Mateusz Stefanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2725">#2725</a>: Cleanup: change valueOf to parse when we need primitive return value. - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2726">#2726</a>: Cleanup: replace StringBuffer with StringBuilder - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2727">#2727</a>: Cleanup: replace indexOf() &lt; 0 with contains - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2728">#2728</a>: Cleanup: javadoc issues - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2729">#2729</a>: Cleanup: use print instead of printf if no format exists - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2730">#2730</a>: Cleanup: StringBuilder issues - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2731">#2731</a>: Cleanup: avoid compiling Patterns repeatedly - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2732">#2732</a>: Cleanup: use StandardCharsets instead of Charset.forName - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2733">#2733</a>: Cleanup: Collection::addAll issues  - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2734">#2734</a>: Cleanup: use try with resources - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2744">#2744</a>: Cleanup: fix typos - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2745">#2745</a>: [core] Fix a NPE in buildUsageText - <a href="https://github.com/XenoAmess">XenoAmess</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2749">#2749</a>: [dart] [cpd] Improvements for Dart interpolated strings - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2750">#2750</a>: [dart] [cpd] Cpd Dart escaped dollar - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
</ul>

<h3 id="stats-14">Stats</h3>
<ul>
  <li>189 commits</li>
  <li>68 closed tickets &amp; PRs</li>
  <li>Days since last release: 37</li>
</ul>

<h2 id="25-july-2020---6260">25-July-2020 - 6.26.0</h2>

<p>The PMD team is pleased to announce PMD 6.26.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-15">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-api">Deprecated API</a>
        <ul>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-14">New and noteworthy</h3>

<h4 id="new-rules-8">New Rules</h4>

<ul>
  <li>The new Java rule <a href="https://pmd.github.io/pmd-6.26.0/pmd_rules_java_bestpractices.html#unusedassignment"><code class="language-plaintext highlighter-rouge">UnusedAssignment</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) finds assignments
to variables, that are never used and are useless. The new rule is supposed to entirely replace
<a href="https://pmd.github.io/pmd-6.26.0/pmd_rules_java_errorprone.html#dataflowanomalyanalysis"><code class="language-plaintext highlighter-rouge">DataflowAnomalyAnalysis</code></a>.</li>
</ul>

<h4 id="modified-rules-5">Modified rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.26.0/pmd_rules_java_bestpractices.html#arrayisstoreddirectly"><code class="language-plaintext highlighter-rouge">ArrayIsStoredDirectly</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) now ignores
by default private methods and constructors. You can restore the old behavior by setting the new property
<code class="language-plaintext highlighter-rouge">allowPrivate</code> to “false”.</li>
</ul>

<h3 id="fixed-issues-15">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2610">#2610</a>: [apex] Support top-level enums in rules</li>
    </ul>
  </li>
  <li>apex-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2626">#2626</a>: [apex] UnusedLocalVariable - false positive on case insensitivity allowed in Apex</li>
    </ul>
  </li>
  <li>apex-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2598">#2598</a>: [apex] AvoidSoqlInLoops false positive for SOQL with in For-Loop</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2620">#2620</a>: [visualforce] False positive on VfUnescapeEl with new Message Channel feature</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/710">#710</a>: [core] Review used dependencies</li>
      <li><a href="https://github.com/pmd/pmd/issues/2594">#2594</a>: [core] Update exec-maven-plugin and align it in all project</li>
      <li><a href="https://github.com/pmd/pmd/issues/2615">#2615</a>: [core] PMD/CPD produces invalid XML (insufficient escaping/wrong encoding)</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2543">#2543</a>: [java] UseCollectionIsEmpty can not detect the case this.foo.size()</li>
      <li><a href="https://github.com/pmd/pmd/issues/2569">#2569</a>: [java] LiteralsFirstInComparisons: False negative for methods returning Strings</li>
      <li><a href="https://github.com/pmd/pmd/issues/2622">#2622</a>: [java] ArrayIsStoredDirectly false positive with private constructor/methods</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2546">#2546</a>: [java] DuplicateImports reported for the same import… and import static…</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2174">#2174</a>: [java] LawOfDemeter: False positive with ‘this’ pointer</li>
      <li><a href="https://github.com/pmd/pmd/issues/2181">#2181</a>: [java] LawOfDemeter: False positive with indexed array access</li>
      <li><a href="https://github.com/pmd/pmd/issues/2189">#2189</a>: [java] LawOfDemeter: False positive when casting to derived class</li>
      <li><a href="https://github.com/pmd/pmd/issues/2580">#2580</a>: [java] AvoidThrowingNullPointerException marks all NullPointerException objects as wrong, whether or not thrown</li>
      <li><a href="https://github.com/pmd/pmd/issues/2625">#2625</a>: [java] NPathComplexity can’t handle switch expressions</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2578">#2578</a>: [java] AvoidCallingFinalize detects some false positives</li>
      <li><a href="https://github.com/pmd/pmd/issues/2634">#2634</a>: [java] NullPointerException in rule ProperCloneImplementation</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1736">#1736</a>: [java] UseStringBufferForStringAppends: False positive if only one concatenation</li>
      <li><a href="https://github.com/pmd/pmd/issues/2207">#2207</a>: [java] AvoidInstantiatingObjectsInLoops: False positive - should not flag objects when assigned to lists/arrays</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-12">API Changes</h3>

<h4 id="deprecated-api-5">Deprecated API</h4>

<h5 id="for-removal-2">For removal</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.26.0/net/sourceforge/pmd/lang/rule/RuleChainVisitor.html#"><code>RuleChainVisitor</code></a> and all implementations in language modules</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.26.0/net/sourceforge/pmd/lang/rule/AbstractRuleChainVisitor.html#"><code>AbstractRuleChainVisitor</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.26.0/net/sourceforge/pmd/lang/Language.html#getRuleChainVisitorClass()"><code>Language#getRuleChainVisitorClass</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.26.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#&lt;init&gt;(java.lang.String,java.lang.String,java.lang.String,java.lang.Class,java.lang.String...)"><code>BaseLanguageModule#&lt;init&gt;</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.26.0/net/sourceforge/pmd/lang/rule/ImportWrapper.html#"><code>ImportWrapper</code></a></li>
</ul>

<h3 id="external-contributions-15">External Contributions</h3>
<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2558">#2558</a>: [java] Fix issue #1736 and issue #2207 - <a href="https://github.com/YYoungC">Young Chan</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2560">#2560</a>: [java] Fix false positives of LawOfDemeter: this and cast expressions - <a href="https://github.com/xioayuge">xioayuge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2590">#2590</a>: Update libraries snyk is referring to as <code class="language-plaintext highlighter-rouge">unsafe</code> - <a href="https://github.com/KroArtem">Artem Krosheninnikov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2597">#2597</a>: [dependencies] Fix issue #2594, update exec-maven-plugin everywhere - <a href="https://github.com/KroArtem">Artem Krosheninnikov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2621">#2621</a>: [visualforce] add new safe resource for VfUnescapeEl - <a href="https://github.com/pchittum">Peter Chittum</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2640">#2640</a>: [java] NullPointerException in rule ProperCloneImplementation - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2641">#2641</a>: [java] AvoidThrowingNullPointerException marks all NullPointerException… - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2643">#2643</a>: [java] AvoidCallingFinalize detects some false positives (2578) - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2651">#2651</a>: [java] False negative: LiteralsFirstInComparisons for methods… (2569) - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2652">#2652</a>: [java] UseCollectionIsEmpty can not detect the case this.foo.size() - <a href="https://github.com/Drofff">Mykhailo Palahuta</a></li>
</ul>

<h3 id="stats-15">Stats</h3>
<ul>
  <li>156 commits</li>
  <li>43 closed tickets &amp; PRs</li>
  <li>Days since last release: 28</li>
</ul>

<h2 id="27-june-2020---6250">27-June-2020 - 6.25.0</h2>

<p>The PMD team is pleased to announce PMD 6.25.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-16">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#scala-cross-compilation">Scala cross compilation</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#internal-api">Internal API</a></li>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-15">New and noteworthy</h3>

<h4 id="scala-cross-compilation">Scala cross compilation</h4>

<p>Up until now the PMD Scala module has been compiled against scala 2.13 only by default.
However, this makes it impossible to use pmd as a library in scala projects,
that use scala 2.12, e.g. in sbt plugins. Therefore PMD now provides cross compiled pmd-scala
modules for both versions: <strong>scala 2.12</strong> and <strong>scala 2.13</strong>.</p>

<p>The new modules have new maven artifactIds. The old artifactId <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd:pmd-scala:6.25.0</code>
is still available, but is deprecated from now on. It has been demoted to be just a delegation to the new
<code class="language-plaintext highlighter-rouge">pmd-scala_2.13</code> module and will be removed eventually.</p>

<p>The coordinates for the new modules are:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;dependency&gt;
    &lt;groupId&gt;net.sourceforge.pmd&lt;/groupId&gt;
    &lt;artifactId&gt;pmd-scala_2.12&lt;/artifactId&gt;
    &lt;version&gt;6.25.0&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
    &lt;groupId&gt;net.sourceforge.pmd&lt;/groupId&gt;
    &lt;artifactId&gt;pmd-scala_2.13&lt;/artifactId&gt;
    &lt;version&gt;6.25.0&lt;/version&gt;
&lt;/dependency&gt;
</code></pre></div></div>

<p>The command line version of PMD continues to use <strong>scala 2.13</strong>.</p>

<h4 id="new-rules-9">New Rules</h4>

<ul>
  <li>
    <p>The new Java Rule <a href="https://pmd.github.io/pmd-6.25.0/pmd_rules_java_codestyle.html#unnecessarycast"><code class="language-plaintext highlighter-rouge">UnnecessaryCast</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
finds casts that are unnecessary while accessing collection elements.</p>
  </li>
  <li>
    <p>The new Java Rule <a href="https://pmd.github.io/pmd-6.25.0/pmd_rules_java_performance.html#avoidcalendardatecreation"><code class="language-plaintext highlighter-rouge">AvoidCalendarDateCreation</code></a> (<code class="language-plaintext highlighter-rouge">java-performance</code>)
finds usages of <code class="language-plaintext highlighter-rouge">java.util.Calendar</code> whose purpose is just to get the current date. This
can be done in a more lightweight way.</p>
  </li>
  <li>
    <p>The new Java Rule <a href="https://pmd.github.io/pmd-6.25.0/pmd_rules_java_performance.html#useiostreamswithapachecommonsfileitem"><code class="language-plaintext highlighter-rouge">UseIOStreamsWithApacheCommonsFileItem</code></a> (<code class="language-plaintext highlighter-rouge">java-performance</code>)
finds usage of <code class="language-plaintext highlighter-rouge">FileItem.get()</code> and <code class="language-plaintext highlighter-rouge">FileItem.getString()</code>. These two methods are problematic since
they load the whole uploaded file into memory.</p>
  </li>
</ul>

<h4 id="modified-rules-6">Modified rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.25.0/pmd_rules_java_codestyle.html#usediamondoperator"><code class="language-plaintext highlighter-rouge">UseDiamondOperator</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) now by default
finds unnecessary usages of type parameters, which are nested, involve wildcards and are used
within a ternary operator. These usages are usually only unnecessary with Java8 and later, when
the type inference in Java has been improved.</p>

    <p>In order to avoid false positives when checking Java7 only code, the rule has the new property
<code class="language-plaintext highlighter-rouge">java7Compatibility</code>, which is disabled by default. Settings this to “true” retains
the old rule behaviour.</p>
  </li>
</ul>

<h3 id="fixed-issues-16">Fixed Issues</h3>

<ul>
  <li>apex-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2554">#2554</a>: [apex] Exception applying rule UnusedLocalVariable on trigger</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/971">#971</a>: [apex][plsql][java] Deprecate overly specific base rule classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/2451">#2451</a>: [core] Deprecate support for List attributes with XPath 2.0</li>
      <li><a href="https://github.com/pmd/pmd/pull/2599">#2599</a>: [core] Fix XPath 2.0 Rule Chain Analyzer with Unions</li>
      <li><a href="https://github.com/pmd/pmd/issues/2483">#2483</a>: [lang-test] Support cpd tests based on text comparison.
For details see
<a href="pmd_devdocs_major_adding_new_cpd_language.html#testing-your-implementation">Testing your implementation</a>
in the developer documentation.</li>
    </ul>
  </li>
  <li>c#
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2551">#2551</a>: [c#] CPD suppression with comments doesn’t work</li>
    </ul>
  </li>
  <li>cpp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1757">#1757</a>: [cpp] Support unicode characters</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2549">#2549</a>: [java] Auxclasspath in PMD CLI does not support relative file path</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2545">#2545</a>: [java] UseDiamondOperator false negatives</li>
      <li><a href="https://github.com/pmd/pmd/pull/2573">#2573</a>: [java] DefaultPackage: Allow package default JUnit 5 Test methods</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2563">#2563</a>: [java] UselessOverridingMethod false negative with already public methods</li>
      <li><a href="https://github.com/pmd/pmd/issues/2570">#2570</a>: [java] NPathComplexity should mention the expected NPath complexity</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2544">#2544</a>: [java] UseProperClassLoader can not detect the case with method call on intermediate variable</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2591">#2591</a>: [java] InefficientStringBuffering/AppendCharacterWithChar: Fix false negatives with concats in appends</li>
      <li><a href="https://github.com/pmd/pmd/pull/2600">#2600</a>: [java] UseStringBufferForStringAppends: fix false negative with fields</li>
    </ul>
  </li>
  <li>scala
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2547">#2547</a>: [scala] Add cross compilation for scala 2.12 and 2.13</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-13">API Changes</h3>

<ul>
  <li>
    <p>The maven module <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd:pmd-scala</code> is deprecated. Use <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd:pmd-scala_2.13</code>
or <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd:pmd-scala_2.12</code> instead.</p>
  </li>
  <li>
    <p>Rule implementation classes are internal API and should not be used by clients directly.
The rules should only be referenced via their entry in the corresponding category ruleset
(e.g. <code class="language-plaintext highlighter-rouge">&lt;rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod" /&gt;</code>).</p>

    <p>While we definitely won’t move or rename the rule classes in PMD 6.x, we might consider changes
in PMD 7.0.0 and onwards.</p>
  </li>
</ul>

<h4 id="deprecated-apis">Deprecated APIs</h4>

<h5 id="internal-api-3">Internal API</h5>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/AbstractIgnoredAnnotationRule.html#"><code>AbstractIgnoredAnnotationRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/AbstractInefficientZeroCheck.html#"><code>AbstractInefficientZeroCheck</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/AbstractJUnitRule.html#"><code>AbstractJUnitRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaMetricsRule.html#"><code>AbstractJavaMetricsRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/AbstractLombokAwareRule.html#"><code>AbstractLombokAwareRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/AbstractPoorMethodCall.html#"><code>AbstractPoorMethodCall</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractSunSecureRule.html#"><code>AbstractSunSecureRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/design/AbstractNcssCountRule.html#"><code>AbstractNcssCountRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/documentation/AbstractCommentRule.html#"><code>AbstractCommentRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/performance/AbstractOptimizationRule.html#"><code>AbstractOptimizationRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/regex/RegexHelper.html#"><code>RegexHelper</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.25.0/net/sourceforge/pmd/lang/apex/rule/AbstractApexUnitTestRule.html#"><code>AbstractApexUnitTestRule</code></a> (Apex)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.25.0/net/sourceforge/pmd/lang/apex/rule/design/AbstractNcssCountRule.html#"><code>AbstractNcssCountRule</code></a> (Apex)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.25.0/net/sourceforge/pmd/lang/plsql/rule/design/AbstractNcssCountRule.html#"><code>AbstractNcssCountRule</code></a> (PLSQL)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.25.0/net/sourceforge/pmd/lang/apex/ApexParser.html#"><code>ApexParser</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.25.0/net/sourceforge/pmd/lang/apex/ApexHandler.html#"><code>ApexHandler</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.25.0/net/sourceforge/pmd/RuleChain.html#"><code>RuleChain</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.25.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.25.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRuleSets(java.lang.String,net.sourceforge.pmd.RuleSetFactory)"><code>RulesetsFactoryUtils#getRuleSets</code></a></li>
</ul>

<h5 id="for-removal-3">For removal</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.25.0/net/sourceforge/pmd/cpd/TokenEntry.html#TokenEntry(java.lang.String,java.lang.String,int)"><code>TokenEntry#TokenEntry</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-test/6.25.0/net/sourceforge/pmd/testframework/AbstractTokenizerTest.html#"><code>AbstractTokenizerTest</code></a>. Use CpdTextComparisonTest in module pmd-lang-test instead.
For details see
<a href="pmd_devdocs_major_adding_new_cpd_language.html#testing-your-implementation">Testing your implementation</a>
in the developer documentation.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.25.0/net/sourceforge/pmd/lang/apex/ast/ASTAnnotation.html#suppresses(net.sourceforge.pmd.Rule)"><code>ASTAnnotation#suppresses</code></a> (Apex)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.25.0/net/sourceforge/pmd/lang/apex/rule/ApexXPathRule.html#"><code>ApexXPathRule</code></a> (Apex)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/SymbolTableTestRule.html#"><code>SymbolTableTestRule</code></a> (Java)</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.25.0/net/sourceforge/pmd/lang/java/rule/performance/InefficientStringBufferingRule.html#isInStringBufferOperation(net.sourceforge.pmd.lang.ast.Node,int,java.lang.String)"><code>InefficientStringBufferingRule#isInStringBufferOperation</code></a></li>
</ul>

<h3 id="external-contributions-16">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1932">#1932</a>: [java] Added 4 performance rules originating from PMD-jPinpoint-rules - <a href="https://github.com/jborgers">Jeroen Borgers</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2349">#2349</a>: [java] Optimize UnusedPrivateMethodRule - <a href="https://github.com/shilko2013">shilko2013</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2547">#2547</a>: [scala] Add cross compilation for scala 2.12 and 2.13 - <a href="https://github.com/jtjeferreira">João Ferreira</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2567">#2567</a>: [c#] Fix CPD suppression with comments doesn’t work - <a href="https://github.com/LixonLookose">Lixon Lookose</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2573">#2573</a>: [java] DefaultPackage: Allow package default JUnit 5 Test methods - <a href="https://github.com/candrews">Craig Andrews</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2593">#2593</a>: [java] NPathComplexity should mention the expected NPath complexity - <a href="https://github.com/KroArtem">Artem Krosheninnikov</a></li>
</ul>

<h3 id="stats-16">Stats</h3>
<ul>
  <li>135 commits</li>
  <li>31 closed tickets &amp; PRs</li>
  <li>Days since last release: 33</li>
</ul>

<h2 id="24-may-2020---6240">24-May-2020 - 6.24.0</h2>

<p>The PMD team is pleased to announce PMD 6.24.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-17">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#cpd-now-supports-xml-as-well">CPD now supports XML as well</a></li>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a></li>
      <li><a href="#experimental-apis">Experimental APIs</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-16">New and noteworthy</h3>

<h4 id="cpd-now-supports-xml-as-well">CPD now supports XML as well</h4>

<p>Thanks to <a href="https://github.com/xnYi9wRezm">Fernando Cosso</a> CPD can now find duplicates in XML files as well.
This is useful to find duplicated sections in XML files.</p>

<h4 id="updated-pmd-designer-2">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.24.0">PMD Designer Changelog</a>.</p>

<h4 id="new-rules-10">New Rules</h4>

<ul>
  <li>
    <p>The new Java Rule <a href="https://pmd.github.io/pmd-6.24.0/pmd_rules_java_bestpractices.html#literalsfirstincomparisons"><code class="language-plaintext highlighter-rouge">LiteralsFirstInComparisons</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>)
find String literals, that are used in comparisons and are not positioned first. Using the String literal
as the receiver of e.g. <code class="language-plaintext highlighter-rouge">equals</code> helps to avoid NullPointerExceptions.</p>

    <p>This rule is replacing the two old rules <a href="https://pmd.github.io/pmd-6.24.0/pmd_rules_java_bestpractices.html#positionliteralsfirstincomparisons"><code class="language-plaintext highlighter-rouge">PositionLiteralsFirstInComparisons</code></a>
and <a href="https://pmd.github.io/pmd-6.24.0/pmd_rules_java_bestpractices.html#positionliteralsfirstincaseinsensitivecomparisons"><code class="language-plaintext highlighter-rouge">PositionLiteralsFirstInCaseInsensitiveComparisons</code></a> and extends the check
for the methods <code class="language-plaintext highlighter-rouge">compareTo</code>, <code class="language-plaintext highlighter-rouge">compareToIgnoreCase</code> and <code class="language-plaintext highlighter-rouge">contentEquals</code> in addition to <code class="language-plaintext highlighter-rouge">equals</code> and
<code class="language-plaintext highlighter-rouge">equalsIgnoreCase</code>.</p>

    <p>Note: This rule also replaces the two mentioned rules in Java’s quickstart ruleset.</p>
  </li>
</ul>

<h4 id="deprecated-rules-6">Deprecated Rules</h4>

<ul>
  <li>The two Java rules <a href="https://pmd.github.io/pmd-6.24.0/pmd_rules_java_bestpractices.html#positionliteralsfirstincomparisons"><code class="language-plaintext highlighter-rouge">PositionLiteralsFirstInComparisons</code></a>
and <a href="https://pmd.github.io/pmd-6.24.0/pmd_rules_java_bestpractices.html#positionliteralsfirstincaseinsensitivecomparisons"><code class="language-plaintext highlighter-rouge">PositionLiteralsFirstInCaseInsensitiveComparisons</code></a> have been deprecated
in favor of the new rule <a href="https://pmd.github.io/pmd-6.24.0/pmd_rules_java_bestpractices.html#literalsfirstincomparisons"><code class="language-plaintext highlighter-rouge">LiteralsFirstInComparisons</code></a>.</li>
</ul>

<h3 id="fixed-issues-17">Fixed Issues</h3>

<ul>
  <li>apex-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2468">#2468</a>: [apex] Unused Local Variable fails on blocks</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2444">#2444</a>: [core] Support reproducible builds</li>
      <li><a href="https://github.com/pmd/pmd/issues/2484">#2484</a>: [core] Update maven-enforcer-plugin to require Java 118</li>
    </ul>
  </li>
  <li>c#
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2495">#2495</a>: [c#] Support for interpolated verbatim strings</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2472">#2472</a>: [java] JavaCharStream throws an Error on invalid escape</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2145">#2145</a>: [java] Deprecate rules PositionLiteralsFirstIn(CaseInsensitive)Comparisons in favor of LiteralsFirstInComparisons</li>
      <li><a href="https://github.com/pmd/pmd/issues/2288">#2288</a>: [java] JUnitTestsShouldIncludeAssert: Add support for Hamcrest MatcherAssert.assertThat</li>
      <li><a href="https://github.com/pmd/pmd/issues/2437">#2437</a>: [java] AvoidPrintStackTrace can’t detect the case e.getCause().printStackTrace()</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/2476">#2476</a>: [java] MethodNamingConventions - Add support for JUnit 5 method naming</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2477">#2477</a>: [java] JUnitSpelling false-positive for JUnit5/4 tests</li>
    </ul>
  </li>
  <li>swift
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2473">#2473</a>: [swift] Swift 5 (up to 5.2) support for CPD</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-14">API Changes</h3>

<h4 id="deprecated-apis-1">Deprecated APIs</h4>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#addVersion(String,LanguageVersionHandler,boolean)"><code>BaseLanguageModule#addVersion(String, LanguageVersionHandler, boolean)</code></a></li>
  <li>Some members of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0/net/sourceforge/pmd/lang/ast/TokenMgrError.html#"><code>TokenMgrError</code></a>, in particular, a new constructor is available
that should be preferred to the old ones</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0/net/sourceforge/pmd/lang/antlr/AntlrTokenManager.ANTLRSyntaxError.html#"><code>AntlrTokenManager.ANTLRSyntaxError</code></a></li>
</ul>

<h4 id="experimental-apis-4">Experimental APIs</h4>

<p><strong>Note:</strong> Experimental APIs are identified with the annotation <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0/net/sourceforge/pmd/annotation/Experimental.html#"><code>Experimental</code></a>,
see its javadoc for details</p>

<ul>
  <li>The experimental methods in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#"><code>BaseLanguageModule</code></a> have been replaced by a
definitive API.</li>
</ul>

<h3 id="external-contributions-17">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2446">#2446</a>: [core] Update maven-compiler-plugin to 3.8.1 - <a href="https://github.com/KroArtem">Artem Krosheninnikov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2448">#2448</a>: [java] Operator Wrap check - <a href="https://github.com/harsh-kukreja">Harsh Kukreja</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2449">#2449</a>: [plsql] Additional info in SqlStatement, FormalParameter and FetchStatement - <a href="https://github.com/zgrzyt93">Grzegorz Sudolski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2452">#2452</a>: [doc] Fix “Making Rulesets” doc sample code indentation - <a href="https://github.com/arturdryomov">Artur Dryomov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2457">#2457</a>: [xml] Adding XML to CPD supported languages - <a href="https://github.com/xnYi9wRezm">Fernando Cosso</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2465">#2465</a>: [dependencies] Upgrade hamcrest, mockito and JUnit - <a href="https://github.com/KroArtem">Artem Krosheninnikov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2469">#2469</a>: [apex] fix false positive unused variable if only a method is called - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2475">#2475</a>: [swift] Swift 4.2-5.2 support - <a href="https://github.com/kenji21">kenji21</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2476">#2476</a>: [java] MethodNamingConventions - Add support for JUnit 5 method naming - <a href="https://github.com/birdflier">Bruno Ritz</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2478">#2478</a>: [java] New rule: LiteralsFirstInComparisons - <a href="https://github.com/John-Teng">John-Teng</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2479">#2479</a>: [java] False positive with Hamcrest’s assertThat - <a href="https://github.com/andreoss">andreoss</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2481">#2481</a>: [java] Fix JUnitSpellingRule false positive - <a href="https://github.com/KroArtem">Artem Krosheninnikov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2493">#2493</a>: [java] Deprecate redundant String Comparison rules - <a href="https://github.com/John-Teng">John-Teng</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2495">#2495</a>: [c#] Support for interpolated verbatim strings - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
</ul>

<h3 id="stats-17">Stats</h3>
<ul>
  <li>114 commits</li>
  <li>29 closed tickets &amp; PRs</li>
  <li>Days since last release: 30</li>
</ul>

<h2 id="24-april-2020---6230">24-April-2020 - 6.23.0</h2>

<p>The PMD team is pleased to announce PMD 6.23.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-18">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#pmd-adopts-contributor-code-of-conduct">PMD adopts Contributor Code of Conduct</a></li>
      <li><a href="#performance-improvements-for-xpath-2.0-rules">Performance improvements for XPath 2.0 rules</a></li>
      <li><a href="#javascript-improvements-for-es6">Javascript improvements for ES6</a></li>
      <li><a href="#new-json-renderer">New JSON renderer</a></li>
      <li><a href="#new-rules">New Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#internal-api">Internal API</a></li>
          <li><a href="#in-asts">In ASTs</a></li>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
  <li><a href="#stats">Stats</a></li>
</ul>

<h3 id="new-and-noteworthy-17">New and noteworthy</h3>

<h4 id="pmd-adopts-contributor-code-of-conduct">PMD adopts Contributor Code of Conduct</h4>

<p>To facilitate healthy and constructive community behavior PMD adopts
<a href="https://www.contributor-covenant.org/">Contributor Convenant</a> as its code of
conduct.</p>

<p>Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.</p>

<p>You can find the code of conduct in the file <a href="https://github.com/pmd/pmd/blob/master/code_of_conduct.md">code_of_conduct.md</a>
in our repository.</p>

<h4 id="performance-improvements-for-xpath-20-rules">Performance improvements for XPath 2.0 rules</h4>

<p>XPath rules written with XPath 2.0 now support conversion to a rulechain rule, which
improves their performance. The rulechain is a mechanism that allows several rules
to be executed in a single tree traversal. Conversion to the rulechain is possible if
your XPath expression looks like <code class="language-plaintext highlighter-rouge">//someNode/... | //someOtherNode/...  | ...</code>, that
is, a union of one or more path expressions that start with <code class="language-plaintext highlighter-rouge">//</code>. Instead of traversing
the whole tree once per path expression (and per rule), a single traversal executes all
rules in your ruleset as needed.</p>

<p>This conversion is performed automatically and cannot be disabled. <em>The conversion should
not change the result of your rules</em>, if it does, please report a bug at https://github.com/pmd/pmd/issues</p>

<p>Note that XPath 1.0 support, the default XPath version, is deprecated since PMD 6.22.0.
<strong>We highly recommend that you upgrade your rules to XPath 2.0</strong>. Please refer to the <a href="https://pmd.github.io/latest/pmd_userdocs_extending_writing_xpath_rules.html#migrating-from-10-to-20">migration guide</a>.</p>

<h4 id="javascript-improvements-for-es6">Javascript improvements for ES6</h4>

<p>PMD uses the <a href="https://github.com/mozilla/rhino">Rhino</a> library to parse Javascript.
The default version has been set to <code class="language-plaintext highlighter-rouge">ES6</code>, so that some ECMAScript 2015 features are
supported. E.g. <code class="language-plaintext highlighter-rouge">let</code> statements and <code class="language-plaintext highlighter-rouge">for-of</code> loops are now parsed. However Rhino does
not support all features.</p>

<h4 id="new-json-renderer">New JSON renderer</h4>

<p>PMD now supports a JSON renderer (use it with <code class="language-plaintext highlighter-rouge">-f json</code> on the CLI).
See <a href="https://pmd.github.io/latest/pmd_userdocs_report_formats.html#json">the documentation and example</a></p>

<h4 id="new-rules-11">New Rules</h4>

<ul>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.23.0/pmd_rules_apex_codestyle.html#fielddeclarationsshouldbeatstart"><code class="language-plaintext highlighter-rouge">FieldDeclarationsShouldBeAtStart</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>)
helps to ensure that field declarations are always at the beginning of a class.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.23.0/pmd_rules_apex_bestpractices.html#unusedlocalvariable"><code class="language-plaintext highlighter-rouge">UnusedLocalVariable</code></a> (<code class="language-plaintext highlighter-rouge">apex-bestpractices</code>) detects unused
local variables.</p>
  </li>
</ul>

<h3 id="fixed-issues-18">Fixed Issues</h3>

<ul>
  <li>apex-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2358">#2358</a>: [apex] Invalid Apex in Cognitive Complexity tests</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2210">#2210</a>: [apex] ApexCRUDViolation: Support WITH SECURITY_ENFORCED</li>
      <li><a href="https://github.com/pmd/pmd/issues/2399">#2399</a>: [apex] ApexCRUDViolation: false positive with security enforced with line break</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1286">#1286</a>: [core] Export Supporting JSON Format</li>
      <li><a href="https://github.com/pmd/pmd/issues/2019">#2019</a>: [core] Insufficient deprecation warnings for XPath attributes</li>
      <li><a href="https://github.com/pmd/pmd/issues/2357">#2357</a>: Add code of conduct: Contributor Covenant</li>
      <li><a href="https://github.com/pmd/pmd/issues/2426">#2426</a>: [core] CodeClimate renderer links are dead</li>
      <li><a href="https://github.com/pmd/pmd/pull/2432">#2432</a>: [core] Close ZIP data sources even if a runtime exception or error is thrown</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2355">#2355</a>: [doc] Improve documentation about incremental analysis</li>
      <li><a href="https://github.com/pmd/pmd/issues/2356">#2356</a>: [doc] Add missing doc about pmd.github.io</li>
      <li><a href="https://github.com/pmd/pmd/issues/2412">#2412</a>: [core] HTMLRenderer doesn’t render links to source files</li>
      <li><a href="https://github.com/pmd/pmd/issues/2413">#2413</a>: [doc] Improve documentation about the available renderers (PMD/CPD)</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2378">#2378</a>: [java] AbstractJUnitRule has bad performance on large code bases</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2398">#2398</a>: [java] AbstractClassWithoutAbstractMethod false negative with inner abstract classes</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1164">#1164</a>: [java] ClassNamingConventions suggests to add Util for class containing only static constants</li>
      <li><a href="https://github.com/pmd/pmd/issues/1723">#1723</a>: [java] UseDiamondOperator false-positive inside lambda</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2390">#2390</a>: [java] AbstractClassWithoutAnyMethod: missing violation for nested classes</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2402">#2402</a>: [java] CloseResource possible false positive with Primitive Streams</li>
    </ul>
  </li>
  <li>java-multithreading
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2313">#2313</a>: [java] Documenation for DoNotUseThreads is outdated</li>
    </ul>
  </li>
  <li>javascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1235">#1235</a>: [javascript] Use of let results in an Empty Statement in the AST</li>
      <li><a href="https://github.com/pmd/pmd/issues/2379">#2379</a>: [javascript] Support for-of loop</li>
    </ul>
  </li>
  <li>javascript-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/384">#384</a>: [javascript] Trailing commas not detected on French default locale</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-15">API Changes</h3>

<h4 id="deprecated-apis-2">Deprecated APIs</h4>

<h5 id="internal-api-4">Internal API</h5>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.23.0/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.23.0/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.23.0/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.23.0/net/sourceforge/pmd/lang/rule/xpath/XPathRuleQuery.html#"><code>XPathRuleQuery</code></a></li>
</ul>

<h5 id="in-asts">In ASTs</h5>

<p>As part of the changes we’d like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated in the <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.23.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
which for rules, means that they never need to instantiate node themselves.
Those constructors will be made package private with 7.0.0.</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.23.0/net/sourceforge/pmd/lang/vf/ast/VfNode.html#"><code>VfNode</code></a> or
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.23.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.</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.23.0/net/sourceforge/pmd/lang/Parser.html#"><code>Parser</code></a> (eg <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.23.0/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.23.0/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.23.0/net/sourceforge/pmd/lang/TokenManager.html#"><code>TokenManager</code></a> (eg <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.23.0/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.23.0/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.23.0/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.23.0/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.23.0/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.23.0/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.23.0/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.23.0/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.23.0/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.23.0/net/sourceforge/pmd/lang/cpp/CppTokenManager.html#"><code>CppTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.23.0/net/sourceforge/pmd/lang/java/JavaTokenManager.html#"><code>JavaTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.23.0/net/sourceforge/pmd/lang/ecmascript5/Ecmascript5TokenManager.html#"><code>Ecmascript5TokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.23.0/net/sourceforge/pmd/lang/jsp/JspTokenManager.html#"><code>JspTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.23.0/net/sourceforge/pmd/lang/matlab/MatlabTokenManager.html#"><code>MatlabTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-modelica/6.23.0/net/sourceforge/pmd/lang/modelica/ModelicaTokenManager.html#"><code>ModelicaTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.23.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCTokenManager.html#"><code>ObjectiveCTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.23.0/net/sourceforge/pmd/lang/plsql/PLSQLTokenManager.html#"><code>PLSQLTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.23.0/net/sourceforge/pmd/lang/python/PythonTokenManager.html#"><code>PythonTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.23.0/net/sourceforge/pmd/lang/vf/VfTokenManager.html#"><code>VfTokenManager</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.23.0/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.23.0/net/sourceforge/pmd/lang/java/ast/ASTAdditiveExpression.html#getImage()"><code>ASTAdditiveExpression#getImage</code></a> - use <code class="language-plaintext highlighter-rouge">getOperator()</code> instead</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.23.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getImage()"><code>ASTVariableDeclaratorId#getImage</code></a> - use <code class="language-plaintext highlighter-rouge">getName()</code> instead</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.23.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getVariableName()"><code>ASTVariableDeclaratorId#getVariableName</code></a> - use <code class="language-plaintext highlighter-rouge">getName()</code> instead</li>
</ul>

<h5 id="for-removal-4">For removal</h5>

<ul>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.23.0/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.23.0/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.23.0/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.23.0/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.23.0/net/sourceforge/pmd/cpd/token/AntlrToken.html#getType()"><code>AntlrToken#getType</code></a> - use <code class="language-plaintext highlighter-rouge">getKind()</code> instead.</li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.23.0/net/sourceforge/pmd/lang/rule/ImmutableLanguage.html#"><code>ImmutableLanguage</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.23.0/net/sourceforge/pmd/lang/rule/MockRule.html#"><code>MockRule</code></a></li>
  <li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.23.0/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.23.0/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.23.0/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.23.0/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.23.0/net/sourceforge/pmd/lang/rule/XPathRule.html#"><code>XPathRule</code></a>. See javadoc for details.</li>
</ul>

<h3 id="external-contributions-18">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2312">#2312</a>: [apex] Update ApexCRUDViolation Rule - <a href="https://github.com/jarquile">Joshua S Arquilevich</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2314">#2314</a>: [doc] maven integration - Add version to plugin - <a href="https://github.com/gpbp">Pham Hai Trung</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2353">#2353</a>: [plsql] xmlforest with optional AS - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2383">#2383</a>: [apex] Fix invalid apex in documentation - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2395">#2395</a>: [apex] New Rule: Unused local variables - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2396">#2396</a>: [apex] New rule: field declarations should be at start - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2397">#2397</a>: [apex] fixed WITH SECURITY_ENFORCED regex to recognise line break characters - <a href="https://github.com/kieranlblack">Kieran Black</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2401">#2401</a>: [doc] Update DoNotUseThreads rule documentation - <a href="https://github.com/s4ik4t">Saikat Sengupta</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2403">#2403</a>: [java] #2402 fix false-positives on Primitive Streams - <a href="https://github.com/BerndFarkaDyna">Bernd Farka</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2409">#2409</a>: [java] ClassNamingConventions suggests to add Util for class containing only static constants, fixes #1164 - <a href="https://github.com/binu-r">Binu R J</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2411">#2411</a>: [java] Fix UseAssertEqualsInsteadOfAssertTrue Example - <a href="https://github.com/Blightbuster">Moritz Scheve</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2423">#2423</a>: [core] Fix Checkstyle OperatorWrap in AbstractTokenizer - <a href="https://github.com/harsh-kukreja">Harsh Kukreja</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2432">#2432</a>: [core] Close ZIP data sources even if a runtime exception or error is thrown - <a href="https://github.com/gibarsin">Gonzalo Exequiel Ibars Ingman</a></li>
</ul>

<h3 id="stats-18">Stats</h3>
<ul>
  <li>237 commits</li>
  <li>64 closed tickets &amp; PRs</li>
  <li>Days since last release: 42</li>
</ul>

<h2 id="12-march-2020---6220">12-March-2020 - 6.22.0</h2>

<p>The PMD team is pleased to announce PMD 6.22.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-19">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-14-support">Java 14 Support</a></li>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#apex-suppressions">Apex Suppressions</a></li>
      <li><a href="#improved-cpd-support-for-c#">Improved CPD support for C#</a></li>
      <li><a href="#xpath-rules">XPath Rules</a></li>
      <li><a href="#new-rules">New Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#internal-api">Internal API</a></li>
          <li><a href="#for-removal">For removal</a></li>
          <li><a href="#in-asts-(jsp)">In ASTs (JSP)</a></li>
          <li><a href="#in-asts-(velocity)">In ASTs (Velocity)</a></li>
        </ul>
      </li>
      <li><a href="#plsql-ast">PLSQL AST</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-18">New and noteworthy</h3>

<h4 id="java-14-support">Java 14 Support</h4>

<p>This release of PMD brings support for Java 14. PMD can parse <a href="https://openjdk.java.net/jeps/361">Switch Expressions</a>,
which have been promoted to be a standard language feature of Java.</p>

<p>PMD also parses <a href="https://openjdk.java.net/jeps/368">Text Blocks</a> as String literals, which is still a preview
language feature in Java 14.</p>

<p>The new <a href="https://openjdk.java.net/jeps/305">Pattern Matching for instanceof</a> can be used as well as
<a href="https://openjdk.java.net/jeps/359">Records</a>.</p>

<p>Note: The Text Blocks, Pattern Matching for instanceof and Records are all preview language features of OpenJDK 14
and are not enabled by default. In order to
analyze a project with PMD that uses these language features, you’ll need to enable it via the environment
variable <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS</code> and select the new language version <code class="language-plaintext highlighter-rouge">14-preview</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 14-preview ...
</code></pre></div></div>

<p>Note: Support for the extended break statement introduced in Java 12 as a preview language feature
has been removed from PMD with this version. The version “12-preview” is no longer available.</p>

<h4 id="updated-pmd-designer-3">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.21.0">PMD Designer Changelog</a>.</p>

<h4 id="apex-suppressions">Apex Suppressions</h4>

<p>In addition to suppressing violation with the <code class="language-plaintext highlighter-rouge">@SuppressWarnings</code> annotation, Apex now also supports
the suppressions with a <code class="language-plaintext highlighter-rouge">NOPMD</code> comment. See <a href="pmd_userdocs_suppressing_warnings.html">Suppressing warnings</a>.</p>

<h4 id="improved-cpd-support-for-c">Improved CPD support for C#</h4>

<p>The C# tokenizer is now based on an antlr grammar instead of a manual written tokenizer. This
should give more accurate results and especially fixes the problems with the using statement syntax
(see <a href="https://github.com/pmd/pmd/issues/2139">#2139</a>).</p>

<h4 id="xpath-rules">XPath Rules</h4>

<p>See the new documentation about <a href="pmd_userdocs_extending_writing_xpath_rules.html">Writing XPath Rules</a>.</p>

<p><em>Note:</em> As of PMD version 6.22.0, XPath versions 1.0 and the 1.0 compatibility mode are <strong>deprecated</strong>.
XPath 2.0 is superior in many ways, for example for its support for type checking, sequence values,
or quantified expressions. For a detailed but approachable review of the features of XPath 2.0 and above,
see the <a href="https://www.saxonica.com/documentation/index.html#!expressions">Saxon documentation</a>.</p>

<h4 id="new-rules-12">New Rules</h4>

<ul>
  <li>
    <p>The Rule <a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_apex_design.html#cognitivecomplexity"><code class="language-plaintext highlighter-rouge">CognitiveComplexity</code></a> (<code class="language-plaintext highlighter-rouge">apex-design</code>) finds methods and classes
that are highly complex and therefore difficult to read and more costly to maintain. In contrast
to cyclomatic complexity, this rule uses “Cognitive Complexity”, which is a measure of how
difficult it is for humans to read and understand a method.</p>
  </li>
  <li>
    <p>The Rule <a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_apex_errorprone.html#testmethodsmustbeintestclasses"><code class="language-plaintext highlighter-rouge">TestMethodsMustBeInTestClasses</code></a> (<code class="language-plaintext highlighter-rouge">apex-errorprone</code>) finds test methods
that are not residing in a test class. The test methods should be moved to a proper test class.
Support for tests inside functional classes was removed in Spring-13 (API Version 27.0), making classes
that violate this rule fail compile-time. This rule is however useful when dealing with legacy code.</p>
  </li>
</ul>

<h3 id="fixed-issues-19">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1087">#1087</a>: [apex] Support suppression via //NOPMD</li>
      <li><a href="https://github.com/pmd/pmd/issues/2306">#2306</a>: [apex] Switch statements are not parsed/supported</li>
    </ul>
  </li>
  <li>apex-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2162">#2162</a>: [apex] Cognitive Complexity rule</li>
    </ul>
  </li>
  <li>apex-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/639">#639</a>: [apex] Test methods should not be in classes other than test classes</li>
    </ul>
  </li>
  <li>cs
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2139">#2139</a>: [cs] CPD doesn’t understand alternate using statement syntax with C# 8.0</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2274">#2274</a>: [doc] Java API documentation for PMD</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2159">#2159</a>: [java] Prepare for JDK 14</li>
      <li><a href="https://github.com/pmd/pmd/issues/2268">#2268</a>: [java] Improve TypeHelper resilience</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2277">#2277</a>: [java] FP in UnusedImports for ambiguous static on-demand imports</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/911">#911</a>: [java] UselessOverridingMethod false positive when elevating access modifier</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2242">#2242</a>: [java] False-positive MisplacedNullCheck reported</li>
      <li><a href="https://github.com/pmd/pmd/issues/2250">#2250</a>: [java] InvalidLogMessageFormat flags logging calls using a slf4j-Marker</li>
      <li><a href="https://github.com/pmd/pmd/issues/2255">#2255</a>: [java] InvalidLogMessageFormat false-positive for a lambda argument</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2275">#2275</a>: [java] AppendCharacterWithChar flags literals in an expression</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2325">#2325</a>: [plsql] NullPointerException while running parsing test for CREATE TRIGGER</li>
      <li><a href="https://github.com/pmd/pmd/pull/2327">#2327</a>: [plsql] Parsing of WHERE CURRENT OF</li>
      <li><a href="https://github.com/pmd/pmd/issues/2328">#2328</a>: [plsql] Support XMLROOT</li>
      <li><a href="https://github.com/pmd/pmd/pull/2331">#2331</a>: [plsql] Fix in Comment statement</li>
      <li><a href="https://github.com/pmd/pmd/pull/2332">#2332</a>: [plsql] Fixed Execute Immediate statement parsing</li>
      <li><a href="https://github.com/pmd/pmd/pull/2340">#2340</a>: [plsql] Fixed parsing / as divide or execute</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-16">API Changes</h3>

<h4 id="deprecated-apis-3">Deprecated APIs</h4>

<h5 id="internal-api-5">Internal API</h5>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code>JavaLanguageHandler</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#"><code>JavaLanguageParser</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#"><code>JavaDataFlowHandler</code></a></li>
  <li>Implementations of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
language module, eg <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
See javadoc of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.</li>
  <li>
    <p>Implementations of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
eg <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a>.</p>
  </li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/rules/RuleFactory.html#"><code>RuleFactory</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/rules/RuleBuilder.html#"><code>RuleBuilder</code></a></li>
  <li>Constructors of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead</li>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.22.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.22.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code>AbstractApexNodeBase</code></a>, and the related <code class="language-plaintext highlighter-rouge">visit</code>
methods on <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.22.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
 Use <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.22.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.</li>
</ul>

<h5 id="for-removal-5">For removal</h5>

<ul>
  <li>pmd-core
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/dfa/DFAGraphRule.html#"><code>DFAGraphRule</code></a> and its implementations</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/dfa/DFAGraphMethod.html#"><code>DFAGraphMethod</code></a></li>
      <li>Many methods on the <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/ast/QualifiableNode.html#"><code>QualifiableNode</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/ast/QualifiedName.html#"><code>QualifiedName</code></a></li>
    </ul>
  </li>
  <li>pmd-java
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#"><code>AbstractJavaParser</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/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="language-plaintext highlighter-rouge">ASTAnyTypeDeclaration.TypeKind</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getKind()"><code>ASTAnyTypeDeclaration#getKind</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#"><code>JavaQualifiedName</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()"><code>ASTCatchStatement#getBlock</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()"><code>ASTCompilationUnit#declarationsAreInDefaultPackage</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#"><code>JavaQualifiableNode</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()"><code>ASTAnyTypeDeclaration#getQualifiedName</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code>ASTMethodOrConstructorDeclaration#getQualifiedName</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code>ASTLambdaExpression#getQualifiedName</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code>ASTMethodOrConstructorDeclaration</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#"><code>ASTLambdaExpression</code></a>.</li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()"><code>ASTAnyTypeDeclaration#getImage</code></a> will be removed. Please use <code class="language-plaintext highlighter-rouge">getSimpleName()</code>
instead. This affects <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()"><code>ASTEnumDeclaration#getImage</code></a>.</li>
      <li>Several methods of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
have been added. This includes the XPath attribute <code class="language-plaintext highlighter-rouge">@Finally</code>, replace it with a test for <code class="language-plaintext highlighter-rouge">child::FinallyStatement</code>.</li>
      <li>Several methods named <code class="language-plaintext highlighter-rouge">getGuardExpressionNode</code> are replaced with <code class="language-plaintext highlighter-rouge">getCondition</code>. This affects the
following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a>
anymore come 7.0.0. Test the type of the expression nested within it.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/metrics/JavaMetrics.html#"><code>JavaMetrics</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/metrics/JavaMetricsComputer.html#"><code>JavaMetricsComputer</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#getArgumentCount()"><code>ASTArguments#getArgumentCount</code></a>.
Use <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#size()"><code>size</code></a> instead.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTFormalParameters.html#getParameterCount()"><code>ASTFormalParameters#getParameterCount</code></a>.
Use <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.22.0/net/sourceforge/pmd/lang/apex/metrics/ApexMetrics.html#"><code>ApexMetrics</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.22.0/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsComputer.html#"><code>ApexMetricsComputer</code></a></li>
    </ul>
  </li>
</ul>

<h5 id="in-asts-jsp">In ASTs (JSP)</h5>

<p>As part of the changes we’d like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated <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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
which for rules, means that they never need to instantiate node themselves.
Those constructors will be made package private with 7.0.0.</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://javadoc.io/page/net.sourceforge.pmd/pmd-jsp/6.22.0/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> or
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.</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://javadoc.io/page/net.sourceforge.pmd/pmd-jsp/6.22.0/net/sourceforge/pmd/lang/jsp/JspParser.html#"><code>JspParser</code></a> is deprecated and should not be used directly.
Use <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser(ParserOptions)"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
</ul>

<p>Please look at <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-jsp/6.22.0/net/sourceforge/pmd/lang/jsp/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.jsp.ast</code></a> to find out the full list of deprecations.</p>

<h5 id="in-asts-velocity">In ASTs (Velocity)</h5>

<p>As part of the changes we’d like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated <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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
which for rules, means that they never need to instantiate node themselves.
Those constructors will be made package private with 7.0.0.</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://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.22.0/net/sourceforge/pmd/lang/vm/ast/VmNode.html#"><code>VmNode</code></a> or
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.</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://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.22.0/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.html#"><code>DirectiveMapper</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.22.0/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://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.22.0/net/sourceforge/pmd/lang/vm/VmParser.html#"><code>VmParser</code></a> is deprecated and should not be used directly.
Use <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.22.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser(ParserOptions)"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
</ul>

<p>Please look at <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.22.0/net/sourceforge/pmd/lang/vm/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.ast</code></a> to find out the full list of deprecations.</p>

<h4 id="plsql-ast">PLSQL AST</h4>

<p>The production and node <code class="language-plaintext highlighter-rouge">ASTCursorBody</code> was unnecessary, not used and has been removed. Cursors have been already
parsed as <code class="language-plaintext highlighter-rouge">ASTCursorSpecification</code>.</p>

<h3 id="external-contributions-19">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2251">#2251</a>: [java] FP for InvalidLogMessageFormat when using slf4j-Markers - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2253">#2253</a>: [modelica] Remove duplicated dependencies - <a href="https://github.com/pzygielo">Piotrek Żygieło</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2256">#2256</a>: [doc] Corrected XML attributes in release notes - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2276">#2276</a>: [java] AppendCharacterWithCharRule ignore literals in expressions - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2278">#2278</a>: [java] fix UnusedImports rule for ambiguous static on-demand imports - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2279">#2279</a>: [apex] Add support for suppressing violations using the // NOPMD comment - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2280">#2280</a>: [cs] CPD: Replace C# tokenizer by an Antlr-based one - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2297">#2297</a>: [apex] Cognitive complexity metrics - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2317">#2317</a>: [apex] New Rule - Test Methods Must Be In Test Classes - <a href="https://github.com/noerremark">Brian Nørremark</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2321">#2321</a>: [apex] Support switch statements correctly in Cognitive Complexity - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2326">#2326</a>: [plsql] Added XML functions to parser: extract(xml), xml_root and fixed xml_forest - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2327">#2327</a>: [plsql] Parsing of WHERE CURRENT OF added - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2331">#2331</a>: [plsql] Fix in Comment statement - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2332">#2332</a>: [plsql] Fixed Execute Immediate statement parsing - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2338">#2338</a>: [cs] CPD: fixes in filtering of using directives - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2339">#2339</a>: [cs] CPD: Fixed CPD –ignore-usings option - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2340">#2340</a>: [plsql] fix for parsing / as divide or execute - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2342">#2342</a>: [xml] Update property used in example - <a href="https://github.com/pzygielo">Piotrek Żygieło</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2344">#2344</a>: [doc] Update ruleset examples for ant - <a href="https://github.com/pzygielo">Piotrek Żygieło</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2343">#2343</a>: [ci] Disable checking for snapshots in jcenter - <a href="https://github.com/pzygielo">Piotrek Żygieło</a></li>
</ul>

<h2 id="24-january-2020---6210">24-January-2020 - 6.21.0</h2>

<p>The PMD team is pleased to announce PMD 6.21.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-20">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#modelica-support">Modelica support</a></li>
      <li><a href="#simple-xml-dump-of-ast">Simple XML dump of AST</a></li>
      <li><a href="#updated-apex-support">Updated Apex Support</a></li>
      <li><a href="#cpd-xml-format">CPD XML format</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#internal-api">Internal API</a></li>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-19">New and noteworthy</h3>

<h4 id="modelica-support">Modelica support</h4>

<p>Thanks to <a href="https://github.com/atrosinenko">Anatoly Trosinenko</a> PMD supports now a new language:
<a href="https://modelica.org/modelicalanguage">Modelica</a> is a language to model complex physical systems.
Both PMD and CPD are supported and there are already <a href="pmd_rules_modelica.html">3 rules available</a>.
The PMD Designer supports syntax highlighting for Modelica.</p>

<p>While the language implementation is quite complete, Modelica support is considered experimental
for now. This is to allow us to change the rule API (e.g. the AST classes) slightly and improve
the implementation based on your feedback.</p>

<h4 id="simple-xml-dump-of-ast">Simple XML dump of AST</h4>

<p>We added a experimental feature to dump the AST of a source file into XML. The XML format
is of course PMD specific and language dependent. That XML file can be used to execute
(XPath) queries against without PMD. It can also be used as a textual visualization of the AST
if you don’t want to use the <a href="https://github.com/pmd/pmd-designer">Designer</a>.</p>

<p>This feature is experimental and might change or even be removed in the future, if it is not
useful. A short description how to use it is available under <a href="pmd_devdocs_experimental_ast_dump.html">Creating XML dump of the AST</a>.</p>

<p>Any feedback about it, especially about your use cases, is highly appreciated.</p>

<h4 id="updated-apex-support-2">Updated Apex Support</h4>

<ul>
  <li>The Apex language support has been bumped to version 48 (Spring ‘20). All new language features are now properly
parsed and processed.</li>
</ul>

<h4 id="cpd-xml-format">CPD XML format</h4>

<p>The CPD XML output format has been enhanced to also report column information for found duplications
in addition to the line information. This allows to display the exact tokens, that are considered
duplicate.</p>

<p>If a CPD language doesn’t provide these exact information, then these additional attributes are omitted.</p>

<p>Each <code class="language-plaintext highlighter-rouge">&lt;file&gt;</code> element in the XML format now has 3 new attributes:</p>

<ul>
  <li>attribute <code class="language-plaintext highlighter-rouge">endline</code></li>
  <li>attribute <code class="language-plaintext highlighter-rouge">column</code> (if there is column information available)</li>
  <li>attribute <code class="language-plaintext highlighter-rouge">endcolumn</code> (if there is column information available)</li>
</ul>

<h4 id="modified-rules-7">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.21.0/pmd_rules_java_errorprone.html#avoidliteralsinifcondition"><code class="language-plaintext highlighter-rouge">AvoidLiteralsInIfCondition</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) has a new property
<code class="language-plaintext highlighter-rouge">ignoreExpressions</code>. This property is set by default to <code class="language-plaintext highlighter-rouge">true</code> in order to maintain compatibility. If this
property is set to false, then literals in more complex expressions are considered as well.</p>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.21.0/pmd_rules_apex_errorprone.html#apexcsrf"><code class="language-plaintext highlighter-rouge">ApexCSRF</code></a> (<code class="language-plaintext highlighter-rouge">apex-errorprone</code>) has been moved from category
“Security” to “Error Prone”. The Apex runtime already prevents DML statements from being executed, but only
at runtime. So, if you try to do this, you’ll get an error at runtime, hence this is error prone. See also
the discussion on <a href="https://github.com/pmd/pmd/issues/2064">#2064</a>.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.21.0/pmd_rules_java_documentation.html#commentrequired"><code class="language-plaintext highlighter-rouge">CommentRequired</code></a> (<code class="language-plaintext highlighter-rouge">java-documentation</code>) has a new property
<code class="language-plaintext highlighter-rouge">classCommentRequirement</code>. This replaces the now deprecated property <code class="language-plaintext highlighter-rouge">headerCommentRequirement</code>, since
the name was misleading. (File) header comments are not checked, but class comments are.</p>
  </li>
</ul>

<h3 id="fixed-issues-20">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2208">#2208</a>: [apex] ASTFormalComment should implement ApexNode&lt;T&gt;</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1984">#1984</a>: [java] Cyclomatic complexity is misreported (lack of clearing metrics cache)</li>
      <li><a href="https://github.com/pmd/pmd/issues/2006">#2006</a>: [core] PMD should warn about multiple instances of the same rule in a ruleset</li>
      <li><a href="https://github.com/pmd/pmd/issues/2161">#2161</a>: [core] ResourceLoader is deprecated and marked as internal but is exposed</li>
      <li><a href="https://github.com/pmd/pmd/issues/2170">#2170</a>: [core] DocumentFile doesn’t preserve newlines</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2214">#2214</a>: [doc] Link broken in pmd documentation for writing Xpath rules</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2212">#2212</a>: [java] JavaRuleViolation reports wrong class name</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2149">#2149</a>: [java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2167">#2167</a>: [java] UnnecessaryLocalBeforeReturn false positive with variable captured by method reference</li>
    </ul>
  </li>
  <li>java-documentation
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1683">#1683</a>: [java] CommentRequired property names are inconsistent</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2140">#2140</a>: [java] AvoidLiteralsInIfCondition: false negative for expressions</li>
      <li><a href="https://github.com/pmd/pmd/issues/2196">#2196</a>: [java] InvalidLogMessageFormat does not detect extra parameters when no placeholders</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2141">#2141</a>: [java] StringInstatiation: False negative with String-array access</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2008">#2008</a>: [plsql] In StringLiteral using alternative quoting mechanism single quotes cause parsing errors</li>
      <li><a href="https://github.com/pmd/pmd/issues/2009">#2009</a>: [plsql] Multiple DDL commands are skipped during parsing</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-17">API Changes</h3>

<h4 id="deprecated-apis-4">Deprecated APIs</h4>

<h5 id="internal-api-6">Internal API</h5>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code class="language-plaintext highlighter-rouge">JavaLanguageHandler</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#"><code class="language-plaintext highlighter-rouge">JavaLanguageParser</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#"><code class="language-plaintext highlighter-rouge">JavaDataFlowHandler</code></a></li>
  <li>Implementations of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code class="language-plaintext highlighter-rouge">RuleViolationFactory</code></a> in each
language module, eg <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code class="language-plaintext highlighter-rouge">JavaRuleViolationFactory</code></a>.
See javadoc of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code class="language-plaintext highlighter-rouge">RuleViolationFactory</code></a>.</li>
  <li>
    <p>Implementations of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleViolation.html#"><code class="language-plaintext highlighter-rouge">RuleViolation</code></a> in each language module,
eg <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code class="language-plaintext highlighter-rouge">JavaRuleViolation</code></a>. See javadoc of
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleViolation.html#"><code class="language-plaintext highlighter-rouge">RuleViolation</code></a>.</p>
  </li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/rules/RuleFactory.html#"><code class="language-plaintext highlighter-rouge">RuleFactory</code></a></li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/rules/RuleBuilder.html#"><code class="language-plaintext highlighter-rouge">RuleBuilder</code></a></li>
  <li>Constructors of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleSetFactory.html#"><code class="language-plaintext highlighter-rouge">RuleSetFactory</code></a>, use factory methods from <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code class="language-plaintext highlighter-rouge">RulesetsFactoryUtils</code></a> instead</li>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRulesetFactory(net.sourceforge.pmd.PMDConfiguration,net.sourceforge.pmd.util.ResourceLoader)"><code class="language-plaintext highlighter-rouge">getRulesetFactory</code></a></p>
  </li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code class="language-plaintext highlighter-rouge">AbstractApexNode</code></a></li>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code class="language-plaintext highlighter-rouge">AbstractApexNodeBase</code></a>, and the related <code class="language-plaintext highlighter-rouge">visit</code>
methods on <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code class="language-plaintext highlighter-rouge">ApexParserVisitor</code></a> and its implementations.
 Use <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code class="language-plaintext highlighter-rouge">ApexNode</code></a> instead, now considers comments too.</p>
  </li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/CharStream.html#"><code class="language-plaintext highlighter-rouge">CharStream</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/JavaCharStream.html#"><code class="language-plaintext highlighter-rouge">JavaCharStream</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/SimpleCharStream.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/JJTJavaParserState.html#"><code class="language-plaintext highlighter-rouge">JJTJavaParserState</code></a>.
This includes token classes, which will be replaced with a single implementation, and
subclasses of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/ParseException.html#"><code class="language-plaintext highlighter-rouge">ParseException</code></a>, whose usages will be replaced
by just that superclass.</li>
</ul>

<h5 id="for-removal-6">For removal</h5>

<ul>
  <li>pmd-core
    <ul>
      <li>Many methods on the <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/Node.html#"><code class="language-plaintext highlighter-rouge">Node</code></a> interface
and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code class="language-plaintext highlighter-rouge">AbstractNode</code></a> base class. See their javadoc for details.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code class="language-plaintext highlighter-rouge">Node#isFindBoundary</code></a> is deprecated for XPath queries.</li>
    </ul>
  </li>
  <li>pmd-java
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#"><code class="language-plaintext highlighter-rouge">AbstractJavaParser</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/AbstractJavaHandler.html#"><code class="language-plaintext highlighter-rouge">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="language-plaintext highlighter-rouge">ASTAnyTypeDeclaration.TypeKind</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.html#getKind()"><code class="language-plaintext highlighter-rouge">ASTAnyTypeDeclaration#getKind</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#"><code class="language-plaintext highlighter-rouge">JavaQualifiedName</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()"><code class="language-plaintext highlighter-rouge">ASTCatchStatement#getBlock</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()"><code class="language-plaintext highlighter-rouge">ASTCompilationUnit#declarationsAreInDefaultPackage</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#"><code class="language-plaintext highlighter-rouge">JavaQualifiableNode</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()"><code class="language-plaintext highlighter-rouge">ASTAnyTypeDeclaration#getQualifiedName</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code class="language-plaintext highlighter-rouge">ASTMethodOrConstructorDeclaration#getQualifiedName</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code class="language-plaintext highlighter-rouge">ASTLambdaExpression#getQualifiedName</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/qname/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.qname</code></a> and its contents</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/MethodLikeNode.html#"><code class="language-plaintext highlighter-rouge">MethodLikeNode</code></a>
        <ul>
          <li>Its methods will also be removed from its implementations,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code class="language-plaintext highlighter-rouge">ASTMethodOrConstructorDeclaration</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#"><code class="language-plaintext highlighter-rouge">ASTLambdaExpression</code></a>.</li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()"><code class="language-plaintext highlighter-rouge">ASTAnyTypeDeclaration#getImage</code></a> will be removed. Please use <code class="language-plaintext highlighter-rouge">getSimpleName()</code>
instead. This affects <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code class="language-plaintext highlighter-rouge">ASTAnnotationTypeDeclaration#getImage</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code class="language-plaintext highlighter-rouge">ASTClassOrInterfaceDeclaration#getImage</code></a>, and
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()"><code class="language-plaintext highlighter-rouge">ASTEnumDeclaration#getImage</code></a>.</li>
      <li>Several methods of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code class="language-plaintext highlighter-rouge">ASTTryStatement</code></a>, replacements with other names
have been added. This includes the XPath attribute <code class="language-plaintext highlighter-rouge">@Finally</code>, replace it with a test for <code class="language-plaintext highlighter-rouge">child::FinallyStatement</code>.</li>
      <li>Several methods named <code class="language-plaintext highlighter-rouge">getGuardExpressionNode</code> are replaced with <code class="language-plaintext highlighter-rouge">getCondition</code>. This affects the
following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code class="language-plaintext highlighter-rouge">ASTYieldStatement</code></a> will not implement <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code class="language-plaintext highlighter-rouge">TypeNode</code></a>
anymore come 7.0.0. Test the type of the expression nested within it.</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-20">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2041">#2041</a>: [modelica] Initial implementation for PMD - <a href="https://github.com/atrosinenko">Anatoly Trosinenko</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2051">#2051</a>: [doc] Update the docs on adding a new language - <a href="https://github.com/atrosinenko">Anatoly Trosinenko</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2069">#2069</a>: [java] CommentRequired: make property names consistent - <a href="https://github.com/snuyanzin">snuyanzin</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2169">#2169</a>: [modelica] Follow-up fixes for Modelica language module - <a href="https://github.com/atrosinenko">Anatoly Trosinenko</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2193">#2193</a>: [core] Fix odd logic in test runner - <a href="https://github.com/Egor18">Egor Bredikhin</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2194">#2194</a>: [java] Fix odd logic in AvoidUsingHardCodedIPRule - <a href="https://github.com/Egor18">Egor Bredikhin</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2195">#2195</a>: [modelica] Normalize invalid node ranges - <a href="https://github.com/atrosinenko">Anatoly Trosinenko</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2199">#2199</a>: [modelica] Fix Javadoc tags - <a href="https://github.com/atrosinenko">Anatoly Trosinenko</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2225">#2225</a>: [core] CPD: report endLine / column informations for found duplications - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
</ul>

<h2 id="29-november-2019---6200">29-November-2019 - 6.20.0</h2>

<p>The PMD team is pleased to announce PMD 6.20.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-21">Table Of Contents</h3>

<ul>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="fixed-issues-21">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2092">#2092</a>: [apex] ApexLexer logs visible when Apex is the selected language upon starting the designer</li>
      <li><a href="https://github.com/pmd/pmd/issues/2136">#2136</a>: [apex] Provide access to underlying query of SoqlExpression</li>
    </ul>
  </li>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2002">#2002</a>: [doc] Issue with http://pmdapplied.com/ linking to a gambling Web site</li>
      <li><a href="https://github.com/pmd/pmd/issues/2062">#2062</a>: [core] Shortnames parameter does not work with Ant</li>
      <li><a href="https://github.com/pmd/pmd/issues/2090">#2090</a>: [ci] Release notes and draft releases</li>
      <li><a href="https://github.com/pmd/pmd/issues/2096">#2096</a>: [core] Referencing category errorprone.xml produces deprecation warnings for InvalidSlf4jMessageFormat</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1861">#1861</a>: [java] Be more lenient with version numbers</li>
      <li><a href="https://github.com/pmd/pmd/issues/2105">#2105</a>: [java] Wrong name for inner classes in violations</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2016">#2016</a>: [java] UnusedImports: False positive if wildcard is used and only static methods</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1362">#1362</a>: [java] LinguisticNaming flags Predicates with boolean-style names</li>
      <li><a href="https://github.com/pmd/pmd/issues/2029">#2029</a>: [java] UnnecessaryFullyQualifiedName false-positive for non-static nested classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/2098">#2098</a>: [java] UnnecessaryFullyQualifiedName: regression / false positive</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2075">#2075</a>: [java] ImmutableField false positive with inner class</li>
      <li><a href="https://github.com/pmd/pmd/issues/2125">#2125</a>: [java] ImmutableField: False positive when variable is updated in conditional loop</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2102">#2102</a>: [java] False positive MissingStaticMethodInNonInstantiatableClass when inheritors are instantiable</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-21">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2088">#2088</a>: [java] Add more version shortcuts for older java - <a href="https://github.com/hgschmie">Henning Schmiedehausen</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2089">#2089</a>: [core] Minor unrelated improvements to code - <a href="https://github.com/gibarsin">Gonzalo Exequiel Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2091">#2091</a>: [core] Fix pmd warnings (IdenticalCatchCases) - <a href="https://github.com/gibarsin">Gonzalo Exequiel Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2106">#2106</a>: [java] Wrong name for inner classes - <a href="https://github.com/andipabst">Andi Pabst</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2121">#2121</a>: [java] Predicates treated like booleans - <a href="https://github.com/ozangulle">Ozan Gulle</a></li>
</ul>

<h2 id="31-october-2019---6190">31-October-2019 - 6.19.0</h2>

<p>The PMD team is pleased to announce PMD 6.19.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-22">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#java-metrics">Java Metrics</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#renamed-rules">Renamed Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#for-removal">For removal</a></li>
          <li><a href="#internal-apis">Internal APIs</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-20">New and noteworthy</h3>

<h4 id="updated-pmd-designer-4">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.19.0">PMD Designer Changelog</a>.</p>

<h4 id="java-metrics">Java Metrics</h4>

<ul>
  <li>The new metric “Class Fan Out Complexity” has been added. See
<a href="pmd_java_metrics_index.html#class-fan-out-complexity-class_fan_out">Java Metrics Documentation</a> for details.</li>
</ul>

<h4 id="modified-rules-8">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rules <a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_errorprone.html#invalidlogmessageformat"><code class="language-plaintext highlighter-rouge">InvalidLogMessageFormat</code></a> and <a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_errorprone.html#morethanonelogger"><code class="language-plaintext highlighter-rouge">MoreThanOneLogger</code></a>
(<code class="language-plaintext highlighter-rouge">java-errorprone</code>) now both support <a href="https://logging.apache.org/log4j/2.x/">Log4j2</a>. Note that the
rule “InvalidSlf4jMessageFormat” has been renamed to “InvalidLogMessageFormat” to reflect the fact, that it now
supports more than slf4j.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_design.html#lawofdemeter"><code class="language-plaintext highlighter-rouge">LawOfDemeter</code></a> (<code class="language-plaintext highlighter-rouge">java-design</code>) ignores now also Builders, that are
not assigned to a local variable, but just directly used within a method call chain. The method, that creates
the builder needs to end with “Builder”, e.g. <code class="language-plaintext highlighter-rouge">newBuilder()</code> or <code class="language-plaintext highlighter-rouge">initBuilder()</code> works. This change
fixes a couple of false positives.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_errorprone.html#dataflowanomalyanalysis"><code class="language-plaintext highlighter-rouge">DataflowAnomalyAnalysis</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) doesn’t check for
UR anomalies (undefined and then referenced) anymore. These checks were all false-positives, since actual
UR occurrences would lead to compile errors.</p>
  </li>
  <li>
    <p>The java rule <a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_multithreading.html#donotusethreads"><code class="language-plaintext highlighter-rouge">DoNotUseThreads</code></a> (<code class="language-plaintext highlighter-rouge">java-multithreading</code>) has been changed
to not report usages of <code class="language-plaintext highlighter-rouge">java.lang.Runnable</code> anymore. Just using <code class="language-plaintext highlighter-rouge">Runnable</code> does not automatically create
a new thread. While the check for <code class="language-plaintext highlighter-rouge">Runnable</code> has been removed, the rule now additionally checks for
usages of <code class="language-plaintext highlighter-rouge">Executors</code> and <code class="language-plaintext highlighter-rouge">ExecutorService</code>. Both create new threads, which are not managed by a J2EE
server.</p>
  </li>
</ul>

<h4 id="renamed-rules-3">Renamed Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_errorprone.html#invalidslf4jmessageformat"><code class="language-plaintext highlighter-rouge">InvalidSlf4jMessageFormat</code></a> has been renamed to
<a href="https://pmd.github.io/pmd-6.19.0/pmd_rules_java_errorprone.html#invalidlogmessageformat"><code class="language-plaintext highlighter-rouge">InvalidLogMessageFormat</code></a> since it supports now both slf4j and log4j2
message formats.</li>
</ul>

<h3 id="fixed-issues-22">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1978">#1978</a>: [core] PMD fails on excluding unknown rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/2014">#2014</a>: [core] Making add(SourceCode sourceCode) public for alternative file systems</li>
      <li><a href="https://github.com/pmd/pmd/issues/2020">#2020</a>: [core] Wrong deprecation warnings for unused XPath attributes</li>
      <li><a href="https://github.com/pmd/pmd/issues/2036">#2036</a>: [core] Wrong include/exclude patterns are silently ignored</li>
      <li><a href="https://github.com/pmd/pmd/issues/2048">#2048</a>: [core] Enable type resolution by default for XPath rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/2067">#2067</a>: [core] Build issue on Windows</li>
      <li><a href="https://github.com/pmd/pmd/pull/2068">#2068</a>: [core] Rule loader should use the same resources loader for the ruleset</li>
      <li><a href="https://github.com/pmd/pmd/issues/2071">#2071</a>: [ci] Add travis build on windows</li>
      <li><a href="https://github.com/pmd/pmd/issues/2072">#2072</a>: [test][core] Not enough info in “test setup error” when numbers of lines do not match</li>
      <li><a href="https://github.com/pmd/pmd/issues/2082">#2082</a>: [core] Incorrect logging of deprecated/renamed rules</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2042">#2042</a>: [java] PMD crashes with ClassFormatError: Absent Code attribute…</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1531">#1531</a>: [java] UnusedPrivateMethod false-positive with method result</li>
      <li><a href="https://github.com/pmd/pmd/issues/2025">#2025</a>: [java] UnusedImports when @see / @link pattern includes a FQCN</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2017">#2017</a>: [java] UnnecessaryFullyQualifiedName triggered for inner class</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1912">#1912</a>: [java] Metrics not computed correctly with annotations</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/336">#336</a>: [java] InvalidSlf4jMessageFormat applies to log4j2</li>
      <li><a href="https://github.com/pmd/pmd/issues/1636">#1636</a>: [java] Stop checking UR anomalies for DataflowAnomalyAnalysis</li>
    </ul>
  </li>
  <li>java-multithreading
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1627">#1627</a>: [java] DoNotUseThreads should not warn on Runnable</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/2058">#2058</a>: [doc] CLI reference for <code class="language-plaintext highlighter-rouge">-norulesetcompatibility</code> shows a boolean default value</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-18">API Changes</h3>

<h4 id="deprecated-apis-5">Deprecated APIs</h4>

<h5 id="for-removal-7">For removal</h5>

<ul>
  <li>pmd-core
    <ul>
      <li>All the package <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/dcd/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.dcd</code></a> and its subpackages. See <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/dcd/DCD.html#"><code class="language-plaintext highlighter-rouge">DCD</code></a>.</li>
      <li>In <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/LanguageRegistry.html#"><code class="language-plaintext highlighter-rouge">LanguageRegistry</code></a>:
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/LanguageRegistry.html#commaSeparatedTerseNamesForLanguageVersion(List)"><code class="language-plaintext highlighter-rouge">commaSeparatedTerseNamesForLanguageVersion</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/LanguageRegistry.html#commaSeparatedTerseNamesForLanguage(List)"><code class="language-plaintext highlighter-rouge">commaSeparatedTerseNamesForLanguage</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/LanguageRegistry.html#findAllVersions()"><code class="language-plaintext highlighter-rouge">findAllVersions</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/LanguageRegistry.html#findLanguageVersionByTerseName(String)"><code class="language-plaintext highlighter-rouge">findLanguageVersionByTerseName</code></a></li>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/LanguageRegistry.html#getInstance()"><code class="language-plaintext highlighter-rouge">getInstance</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/RuleSet.html#getExcludePatterns()"><code class="language-plaintext highlighter-rouge">RuleSet#getExcludePatterns</code></a>. Use the new method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/RuleSet.html#getFileExclusions()"><code class="language-plaintext highlighter-rouge">getFileExclusions</code></a> instead.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/RuleSet.html#getIncludePatterns()"><code class="language-plaintext highlighter-rouge">RuleSet#getIncludePatterns</code></a>. Use the new method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/RuleSet.html#getFileInclusions()"><code class="language-plaintext highlighter-rouge">getFileInclusions</code></a> instead.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/Parser.html#canParse()"><code class="language-plaintext highlighter-rouge">Parser#canParse</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/lang/Parser.html#getSuppressMap()"><code class="language-plaintext highlighter-rouge">Parser#getSuppressMap</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/rules/RuleBuilder.html#RuleBuilder(String,String,String)"><code class="language-plaintext highlighter-rouge">RuleBuilder#RuleBuilder</code></a>. Use the new constructor with the correct ResourceLoader instead.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/rules/RuleFactory.html#RuleFactory()"><code class="language-plaintext highlighter-rouge">RuleFactory#RuleFactory</code></a>. Use the new constructor with the correct ResourceLoader instead.</li>
    </ul>
  </li>
  <li>pmd-java
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/ast/CanSuppressWarnings.html#"><code class="language-plaintext highlighter-rouge">CanSuppressWarnings</code></a> and its implementations</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaRule.html#isSuppressed(Node)"><code class="language-plaintext highlighter-rouge">isSuppressed</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaRule.html#getDeclaringType(Node)"><code class="language-plaintext highlighter-rouge">getDeclaringType</code></a>.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#isSupressed(Node,Rule)"><code class="language-plaintext highlighter-rouge">isSupressed</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclarator.html#"><code class="language-plaintext highlighter-rouge">ASTMethodDeclarator</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getMethodName()"><code class="language-plaintext highlighter-rouge">getMethodName</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getBlock()"><code class="language-plaintext highlighter-rouge">getBlock</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.19.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getParameterCount()"><code class="language-plaintext highlighter-rouge">getParameterCount</code></a></li>
    </ul>
  </li>
  <li>pmd-apex
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.19.0/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.html#"><code class="language-plaintext highlighter-rouge">CanSuppressWarnings</code></a> and its implementations</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.19.0/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.html#isSupressed(Node,Rule)"><code class="language-plaintext highlighter-rouge">isSupressed</code></a></li>
    </ul>
  </li>
</ul>

<h5 id="internal-apis">Internal APIs</h5>

<ul>
  <li>pmd-core
    <ul>
      <li>All the package <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/util/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util</code></a> and its subpackages,
except <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/util/datasource/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.datasource</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/util/database/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.database</code></a>.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/cpd/GridBagHelper.html#"><code class="language-plaintext highlighter-rouge">GridBagHelper</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.19.0/net/sourceforge/pmd/renderers/ColumnDescriptor.html#"><code class="language-plaintext highlighter-rouge">ColumnDescriptor</code></a></li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-22">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/2010">#2010</a>: [java] LawOfDemeter to support inner builder pattern - <a href="https://github.com/gregorriegler">Gregor Riegler</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2012">#2012</a>: [java] Fixes 336, slf4j log4j2 support - <a href="https://github.com/markhall82">Mark Hall</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2032">#2032</a>: [core] Allow adding SourceCode directly into CPD - <a href="https://github.com/nbraun-Google">Nathan Braun</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2047">#2047</a>: [java] Fix computation of metrics with annotations - <a href="https://github.com/andipabst">Andi Pabst</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2065">#2065</a>: [java] Stop checking UR anomalies - <a href="https://github.com/l0s">Carlos Macasaet</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2068">#2068</a>: [core] Rule loader should use the same resources loader for the ruleset - <a href="https://github.com/willamette">Chen Yang</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2070">#2070</a>: [core] Fix renderer tests for windows builds - <a href="https://github.com/Saladoc">Saladoc</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2073">#2073</a>: [test][core] Add expected and actual line of numbers to message wording - <a href="https://github.com/snuyanzin">snuyanzin</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2076">#2076</a>: [java] Add Metric ClassFanOutComplexity - <a href="https://github.com/andipabst">Andi Pabst</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2078">#2078</a>: [java] DoNotUseThreads should not warn on Runnable #1627 - <a href="https://github.com/mclay">Michael Clay</a></li>
</ul>

<h2 id="15-september-2019---6180">15-September-2019 - 6.18.0</h2>

<p>The PMD team is pleased to announce PMD 6.18.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-23">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-13-support">Java 13 Support</a></li>
      <li><a href="#full-support-for-scala">Full support for Scala</a></li>
      <li><a href="#new-rule-designer-documentation">New rule designer documentation</a></li>
      <li><a href="#new-rules">New rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#changes-to-renderer">Changes to Renderer</a></li>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#for-removal">For removal</a></li>
          <li><a href="#internal-apis">Internal APIs</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-21">New and noteworthy</h3>

<h4 id="java-13-support">Java 13 Support</h4>

<p>This release of PMD brings support for Java 13. PMD can parse <a href="http://openjdk.java.net/jeps/354">Switch Expressions</a>
with the new <code class="language-plaintext highlighter-rouge">yield</code> statement and resolve the type of such an expression.</p>

<p>PMD also parses <a href="http://openjdk.java.net/jeps/355">Text Blocks</a> as String literals.</p>

<p>Note: The Switch Expressions and Text Blocks are a preview language feature of OpenJDK 13
and are not enabled by default. In order to
analyze a project with PMD that uses these language features, you’ll need to enable it via the environment
variable <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS</code> and select the new language version <code class="language-plaintext highlighter-rouge">13-preview</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 13-preview ...
</code></pre></div></div>

<p>Note: Support for the extended break statement introduced in Java 12 as a preview language feature
will be removed with the next PMD version 6.19.0.</p>

<h4 id="full-support-for-scala">Full support for Scala</h4>

<p>Thanks to <a href="https://github.com/tophersmith">Chris Smith</a> PMD now fully supports Scala. Now rules for analyzing Scala
code can be developed in addition to the Copy-Paste-Detection (CPD) functionality. There are no rules yet, so
contributions are welcome.</p>

<p>Additionally Scala support has been upgraded from 2.12.4 to 2.13.</p>

<h4 id="new-rule-designer-documentation">New rule designer documentation</h4>

<p>The documentation for the rule designer is now available on the main PMD documentation page:
<a href="pmd_userdocs_extending_designer_reference.html">Rule Designer Reference</a>. Check it out to learn
about the usage and features of the rule designer.</p>

<h4 id="new-rules-13">New rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.18.0/pmd_rules_java_bestpractices.html#avoidmessagedigestfield"><code class="language-plaintext highlighter-rouge">AvoidMessageDigestField</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) detects fields
of the type <code class="language-plaintext highlighter-rouge">java.security.MessageDigest</code>. Using a message digest instance as a field would need to be
synchronized, as it can easily be used by multiple threads. Without synchronization the calculated hash could
be entirely wrong. Instead of declaring this as a field and synchronize access to use it from multiple threads,
a new instance should be created when needed. This rule is also active when using java’s quickstart ruleset.</p>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.18.0/pmd_rules_apex_bestpractices.html#debugsshoulduselogginglevel"><code class="language-plaintext highlighter-rouge">DebugsShouldUseLoggingLevel</code></a> (<code class="language-plaintext highlighter-rouge">apex-bestpractices</code>) detects
usages of <code class="language-plaintext highlighter-rouge">System.debug()</code> method calls that are used without specifying the log level. Having the log
level specified provides a cleaner log, and improves readability of it.</p>
  </li>
</ul>

<h4 id="modified-rules-9">Modified Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.18.0/pmd_rules_java_errorprone.html#closeresource"><code class="language-plaintext highlighter-rouge">CloseResource</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) now ignores by default instances
of <code class="language-plaintext highlighter-rouge">java.util.stream.Stream</code>. These streams are <code class="language-plaintext highlighter-rouge">AutoCloseable</code>, but most streams are backed by collections,
arrays, or generating functions, which require no special resource management. However, there are some exceptions:
The stream returned by <code class="language-plaintext highlighter-rouge">Files::lines(Path)</code> is backed by a actual file and needs to be closed. These instances
won’t be found by default by the rule anymore.</li>
</ul>

<h3 id="fixed-issues-23">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1465">#1465</a>: [core] Stylesheet pmd-report.xslt fails to display filepath if ‘java’ in path</li>
      <li><a href="https://github.com/pmd/pmd/issues/1923">#1923</a>: [core] Incremental analysis does not work with shortnames</li>
      <li><a href="https://github.com/pmd/pmd/pull/1983">#1983</a>: [core] Avoid crashes with analysis cache when classpath references non-existing directories</li>
      <li><a href="https://github.com/pmd/pmd/pull/1990">#1990</a>: [core] Incremental analysis mixes XPath rule violations</li>
    </ul>
  </li>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1901">#1901</a>: [apex] Expose super type name of UserClass</li>
      <li><a href="https://github.com/pmd/pmd/issues/1942">#1942</a>: [apex] Add best practice rule for debug statements in Apex</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1930">#1930</a>: [java] Add Java 13 support</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1227">#1227</a>: [java] UnusedFormalParameter should explain checkAll better</li>
      <li><a href="https://github.com/pmd/pmd/issues/1862">#1862</a>: [java] New rule for MessageDigest.getInstance</li>
      <li><a href="https://github.com/pmd/pmd/issues/1952">#1952</a>: [java] UnusedPrivateField not triggering if @Value annotation present</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1951">#1951</a>: [java] UnnecessaryFullyQualifiedName rule triggered when variable name clashes with package name</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1922">#1922</a>: [java] CloseResource possible false positive with Streams</li>
      <li><a href="https://github.com/pmd/pmd/issues/1966">#1966</a>: [java] CloseResource false positive if Stream is passed as method parameter</li>
      <li><a href="https://github.com/pmd/pmd/issues/1967">#1967</a>: [java] CloseResource false positive with late assignment of variable</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1933">#1933</a>: [plsql] ParseException with cursor declared in anonymous block</li>
      <li><a href="https://github.com/pmd/pmd/issues/1935">#1935</a>: [plsql] ParseException with SELECT INTO record defined as global variable</li>
      <li><a href="https://github.com/pmd/pmd/issues/1936">#1936</a>: [plslq] ParseException with cursor inside procedure declaration</li>
      <li><a href="https://github.com/pmd/pmd/issues/1946">#1946</a>: [plsql] ParseException with using TRIM inside IF statements condition</li>
      <li><a href="https://github.com/pmd/pmd/issues/1947">#1947</a>: [plsql] ParseError - SELECT with FOR UPDATE OF</li>
      <li><a href="https://github.com/pmd/pmd/issues/1948">#1948</a>: [plsql] ParseException with INSERT INTO using package global variables</li>
      <li><a href="https://github.com/pmd/pmd/issues/1950">#1950</a>: [plsql] ParseException with UPDATE and package record variable</li>
      <li><a href="https://github.com/pmd/pmd/issues/1953">#1953</a>: [plsql] ParseException with WITH in CURSOR</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-19">API Changes</h3>

<h4 id="changes-to-renderer">Changes to Renderer</h4>

<ul>
  <li>
    <p>Each renderer has now a new method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/renderers/Renderer.html#setUseShortNames(List)"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/renderers/AbstractRenderer.html#determineFileName(String)"><code class="language-plaintext highlighter-rouge">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>

<h4 id="deprecated-apis-6">Deprecated APIs</h4>

<h5 id="for-removal-8">For removal</h5>

<ul>
  <li>The methods <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getImportedNameNode()"><code class="language-plaintext highlighter-rouge">getImportedNameNode</code></a> and
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getPackage()"><code class="language-plaintext highlighter-rouge">getPackage</code></a> have been deprecated and
will be removed with PMD 7.0.0.</li>
  <li>The method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/RuleContext.html#setSourceCodeFilename(String)"><code class="language-plaintext highlighter-rouge">RuleContext#setSourceCodeFilename</code></a> has been deprecated
and will be removed. The already existing method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/RuleContext.html#setSourceCodeFile(File)"><code class="language-plaintext highlighter-rouge">RuleContext#setSourceCodeFile</code></a>
should be used instead. The method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/RuleContext.html#getSourceCodeFilename()"><code class="language-plaintext highlighter-rouge">RuleContext#getSourceCodeFilename</code></a> still
exists and returns just the filename without the full path.</li>
  <li>The method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/processor/AbstractPMDProcessor.html#filenameFrom(DataSource)"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/Report.html#metrics()"><code class="language-plaintext highlighter-rouge">Report#metrics</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/Report.html#"><code class="language-plaintext highlighter-rouge">Report</code></a> have
been deprecated. They were leftovers from a previous deprecation round targeting
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/lang/rule/stat/StatisticalRule.html#"><code class="language-plaintext highlighter-rouge">StatisticalRule</code></a>.</li>
</ul>

<h5 id="internal-apis-1">Internal APIs</h5>

<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="language-plaintext highlighter-rouge">@InternalApi</code> annotation. You’ll also get a deprecation warning.</p>

<ul>
  <li>pmd-core
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.18.0/net/sourceforge/pmd/cache/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache</code></a></li>
    </ul>
  </li>
  <li>pmd-java
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/typeresolution/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.typeresolution</code></a>: Everything, including
subpackages, except <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code class="language-plaintext highlighter-rouge">TypeHelper</code></a> and
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.html#"><code class="language-plaintext highlighter-rouge">JavaTypeDefinition</code></a>.</li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#getClassTypeResolver()"><code class="language-plaintext highlighter-rouge">ASTCompilationUnit#getClassTypeResolver</code></a></li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-23">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1943">#1943</a>: [apex] Adds “debug should use logging level” best practice rule for Apex - <a href="https://github.com/renatoliveira">Renato Oliveira</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1965">#1965</a>: [scala] Use Scalameta for parsing - <a href="https://github.com/tophersmith">Chris Smith</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1970">#1970</a>: [java] DoubleBraceInitialization: Fix example - <a href="https://github.com/tweimer">Tobias Weimer</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1971">#1971</a>: [java] 1862 - Message Digest should not be used as class field - <a href="https://github.com/AnthonyKot">AnthonyKot</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1972">#1972</a>: [plsql] ParseError - SELECT with FOR UPDATE OF - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1974">#1974</a>: [plsql] Fixes for referencing record type variables - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1975">#1975</a>: [plsql] TRIM function with record type variables - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1976">#1976</a>: [plsql] Fix for mistaking / for MultiplicativeExpression - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1977">#1977</a>: [plsql] fix for skipping sql starting with WITH - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1986">#1986</a>: [plsql] Fix for cursors in anonymous blocks - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1994">#1994</a>: [core] Resolve pmd-report failure when java folder in filepath - <a href="https://github.com/shahamish150294">Amish Shah</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/2015">#2015</a>: [java] Update doc for unused formal parameter - <a href="https://github.com/shahamish150294">Amish Shah</a></li>
</ul>

<h2 id="28-july-2019---6170">28-July-2019 - 6.17.0</h2>

<p>The PMD team is pleased to announce PMD 6.17.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-24">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#lua-support">Lua support</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-22">New and noteworthy</h3>

<h4 id="updated-pmd-designer-5">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.17.0">PMD Designer Changelog</a>.
It contains a new feature to edit test cases directly within the designer. Any feedback is highly appreciated.</p>

<h4 id="lua-support">Lua support</h4>

<p>Thanks to the contribution from <a href="https://github.com/maikelsteneker">Maikel Steneker</a>, and built on top of the ongoing efforts to fully support Antlr-based languages,
PMD now has CPD support for <a href="https://www.lua.org/">Lua</a>.</p>

<p>Being based on a proper Antlr grammar, CPD can:</p>
<ul>
  <li>ignore comments</li>
  <li>honor <a href="pmd_userdocs_cpd.html#suppression">comment-based suppressions</a></li>
</ul>

<h4 id="modified-rules-10">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.17.0/pmd_rules_java_errorprone.html#closeresource"><code class="language-plaintext highlighter-rouge">CloseResource</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) ignores now by default
<code class="language-plaintext highlighter-rouge">java.io.ByteArrayInputStream</code> and <code class="language-plaintext highlighter-rouge">java.io.CharArrayWriter</code>. Such streams/writers do not need to be closed.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.17.0/pmd_rules_java_errorprone.html#missingstaticmethodinnoninstantiatableclass"><code class="language-plaintext highlighter-rouge">MissingStaticMethodInNonInstantiatableClass</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) has now
the new property <code class="language-plaintext highlighter-rouge">annotations</code>.
When one of the private constructors is annotated with one of the annotations, then the class is not considered
non-instantiatable anymore and no violation will be reported. By default, Spring’s <code class="language-plaintext highlighter-rouge">@Autowired</code> and
Java EE’s <code class="language-plaintext highlighter-rouge">@Inject</code> annotations are recognized.</p>
  </li>
</ul>

<h3 id="fixed-issues-24">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1913">#1913</a>: [core] “-help” CLI option ends with status code != 0</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1896">#1896</a>: [doc] Error in changelog 6.16.0 due to not properly closed rule tag</li>
      <li><a href="https://github.com/pmd/pmd/issues/1898">#1898</a>: [doc] Incorrect code example for DoubleBraceInitialization in documentation on website</li>
      <li><a href="https://github.com/pmd/pmd/issues/1906">#1906</a>: [doc] Broken link for adding own CPD languages</li>
      <li><a href="https://github.com/pmd/pmd/issues/1909">#1909</a>: [doc] Sample usage example refers to deprecated ruleset “basic.xml” instead of “quickstart.xml”</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1910">#1910</a>: [java] ATFD calculation problem</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1749">#1749</a>: [java] DD False Positive in DataflowAnomalyAnalysis</li>
      <li><a href="https://github.com/pmd/pmd/issues/1832">#1832</a>: [java] False positives for MissingStaticMethodInNonInstantiatableClass when DI is used</li>
      <li><a href="https://github.com/pmd/pmd/issues/1921">#1921</a>: [java] CloseResource false positive with ByteArrayInputStream</li>
    </ul>
  </li>
  <li>java-multithreading
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1903">#1903</a>: [java] UnsynchronizedStaticFormatter doesn’t allow block-level synchronization when using allowMethodLevelSynchronization=true</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1902">#1902</a>: [pslql] ParseException when parsing (+)</li>
    </ul>
  </li>
  <li>xml
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1666">#1666</a>: [xml] wrong cdata rule description and examples</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-24">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1869">#1869</a>: [xml] fix #1666 wrong cdata rule description and examples - <a href="https://github.com/KroArtem">Artem</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1892">#1892</a>: [lua] [cpd] Added CPD support for Lua - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1905">#1905</a>: [java] DataflowAnomalyAnalysis Rule in right order - <a href="https://github.com/YoonhoChoi96">YoonhoChoi96</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1908">#1908</a>: [doc] Update ruleset filename from deprecated basic.xml to quickstart.xml - <a href="https://github.com/crunsk">crunsk</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1916">#1916</a>: [java] Exclude Autowired and Inject for MissingStaticMethodInNonInstantiatableClass - <a href="https://github.com/AnthonyKot">AnthonyKot</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1917">#1917</a>: [core] Add ‘no error’ return option, and assign it to the cli when the help command is invoked - <a href="https://github.com/renatoliveira">Renato Oliveira</a></li>
</ul>

<h2 id="30-june-2019---6160">30-June-2019 - 6.16.0</h2>

<p>The PMD team is pleased to announce PMD 6.16.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-25">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
      <li><a href="#plsql-grammar-updates">PLSQL Grammar Updates</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#in-asts">In ASTs</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-23">New and noteworthy</h3>

<h4 id="updated-pmd-designer-6">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/releases/tag/6.16.0">PMD Designer Changelog</a>.</p>

<h4 id="plsql-grammar-updates">PLSQL Grammar Updates</h4>

<p>The grammar has been updated to support inline constraints in CREATE TABLE statements. Additionally, the
CREATE TABLE statement may now be followed by physical properties and table properties. However, these
properties are skipped over during parsing.</p>

<p>The CREATE VIEW statement now supports subquery views.</p>

<p>The EXTRACT function can now be parsed correctly. It is used to extract values from a specified
datetime field. Also date time literals are parsed now correctly.</p>

<p>The CASE expression can now be properly used within SELECT statements.</p>

<p>Table aliases are now supported when specifying columns in INSERT INTO clauses.</p>

<h4 id="new-rules-14">New Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_bestpractices.html#doublebraceinitialization"><code class="language-plaintext highlighter-rouge">DoubleBraceInitialization</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>)
detects non static initializers in anonymous classes also known as “double brace initialization”.
This can be problematic, since a new class file is generated and object holds a strong reference
to the surrounding class.</p>

    <p>Note: This rule is also part of the Java quickstart ruleset (<code class="language-plaintext highlighter-rouge">rulesets/java/quickstart.xml</code>).</p>
  </li>
</ul>

<h4 id="modified-rules-11">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_bestpractices.html#unusedprivatefield"><code class="language-plaintext highlighter-rouge">UnusedPrivateField</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) now ignores by
default fields, that are annotated with the Lombok experimental annotation <code class="language-plaintext highlighter-rouge">@Delegate</code>. This can be
customized with the property <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code>.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_design.html#singularfield"><code class="language-plaintext highlighter-rouge">SingularField</code></a> (<code class="language-plaintext highlighter-rouge">java-design</code>) now ignores by
default fields, that are annotated with the Lombok experimental annotation <code class="language-plaintext highlighter-rouge">@Delegate</code>. This can be
customized with the property <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code>.</p>
  </li>
  <li>
    <p>The Java rules <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_multithreading.html#unsynchronizedstaticformatter"><code class="language-plaintext highlighter-rouge">UnsynchronizedStaticFormatter</code></a> and
<a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_multithreading.html#unsynchronizedstaticdateformatter"><code class="language-plaintext highlighter-rouge">UnsynchronizedStaticDateFormatter</code></a> (<code class="language-plaintext highlighter-rouge">java-multithreading</code>)
now prefer synchronized blocks by default. They will raise a violation, if the synchronization is implemented
on the method level. To allow the old behavior, the new property <code class="language-plaintext highlighter-rouge">allowMethodLevelSynchronization</code> can
be enabled.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_design.html#useutilityclass"><code class="language-plaintext highlighter-rouge">UseUtilityClass</code></a> (<code class="language-plaintext highlighter-rouge">java-design</code>) has a new property <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code>.
By default, classes that are annotated with Lombok’s <code class="language-plaintext highlighter-rouge">@UtilityClass</code> are ignored now.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_errorprone.html#nonstaticinitializer"><code class="language-plaintext highlighter-rouge">NonStaticInitializer</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) does not report
non static initializers in anonymous classes anymore. For this use case, there is a new rule now:
<a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_bestpractices.html#doublebraceinitialization"><code class="language-plaintext highlighter-rouge">DoubleBraceInitialization</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>).</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier"><code class="language-plaintext highlighter-rouge">CommentDefaultAccessModifier</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) was enhanced
in the last version 6.15.0 to check also top-level types by default. This created many new violations.
Missing the access modifier for top-level types is not so critical, since it only decreases the visibility
of the type.</p>

    <p>The default behaviour has been restored. If you want to enable the check for top-level types, you can
use the new property <code class="language-plaintext highlighter-rouge">checkTopLevelTypes</code>.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_errorprone.html#closeresource"><code class="language-plaintext highlighter-rouge">CloseResource</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) now by default searches
for any unclosed <code class="language-plaintext highlighter-rouge">java.lang.AutoCloseable</code> resource. This includes now the standard <code class="language-plaintext highlighter-rouge">java.io.*Stream</code> classes.
Previously only SQL-related resources were considered by this rule. The types can still be configured
via the <code class="language-plaintext highlighter-rouge">types</code> property. Some resources do not need to be closed (e.g. <code class="language-plaintext highlighter-rouge">ByteArrayOutputStream</code>). These
exceptions can be configured via the new property <code class="language-plaintext highlighter-rouge">allowedResourceTypes</code>.
In order to restore the old behaviour, just remove the type <code class="language-plaintext highlighter-rouge">java.lang.AutoCloseable</code> from the <code class="language-plaintext highlighter-rouge">types</code>
property and keep the remaining SQL-related classes.</p>
  </li>
</ul>

<h4 id="deprecated-rules-7">Deprecated Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_codestyle.html#avoidfinallocalvariable"><code class="language-plaintext highlighter-rouge">AvoidFinalLocalVariable</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) has been deprecated
and will be removed with PMD 7.0.0. The rule is controversial and also contradicts other existing
rules such as <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_codestyle.html#localvariablecouldbefinal"><code class="language-plaintext highlighter-rouge">LocalVariableCouldBeFinal</code></a>. If the goal is to avoid defining
constants in a scope smaller than the class, then the rule <a href="https://pmd.github.io/pmd-6.16.0/pmd_rules_java_errorprone.html#avoidduplicateliterals"><code class="language-plaintext highlighter-rouge">AvoidDuplicateLiterals</code></a>
should be used instead.</li>
</ul>

<h3 id="fixed-issues-25">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1664">#1664</a>: [apex] False positive ApexSharingViolationsRule, unsupported Apex feature</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1848">#1848</a>: [java] Local classes should preserve their modifiers</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1703">#1703</a>: [java] UnusedPrivateField on member annotated with lombok @Delegate</li>
      <li><a href="https://github.com/pmd/pmd/issues/1845">#1845</a>: [java] Regression in MethodReturnsInternalArray not handling enums</li>
      <li><a href="https://github.com/pmd/pmd/issues/1854">#1854</a>: [java] Rule to check for double brace initialisation</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1612">#1612</a>: [java] Deprecate AvoidFinalLocalVariable</li>
      <li><a href="https://github.com/pmd/pmd/issues/1880">#1880</a>: [java] CommentDefaultAccessModifier should be configurable for top-level classes</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1094">#1094</a>: [java] UseUtilityClass should be LombokAware</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1000">#1000</a>: [java] The rule CloseResource should deal with IO stream as default</li>
      <li><a href="https://github.com/pmd/pmd/issues/1853">#1853</a>: [java] False positive for NonStaticInitializer in anonymous class</li>
    </ul>
  </li>
  <li>java-multithreading
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1814">#1814</a>: [java] UnsynchronizedStaticFormatter documentation and implementation wrong</li>
      <li><a href="https://github.com/pmd/pmd/issues/1815">#1815</a>: [java] False negative in UnsynchronizedStaticFormatter</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1828">#1828</a>: [plsql] Parentheses stopped working</li>
      <li><a href="https://github.com/pmd/pmd/issues/1850">#1850</a>: [plsql] Parsing errors with INSERT using returning or records and TRIM expression</li>
      <li><a href="https://github.com/pmd/pmd/issues/1873">#1873</a>: [plsql] Expression list not working</li>
      <li><a href="https://github.com/pmd/pmd/issues/1878">#1878</a>: [pslql] ParseException when parsing USING</li>
      <li><a href="https://github.com/pmd/pmd/issues/1879">#1879</a>: [pslql] ParseException when parsing LEFT JOIN</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-20">API Changes</h3>

<h4 id="deprecated-apis-7">Deprecated APIs</h4>

<blockquote>
  <p>Reminder: Please don’t use members marked with the annotation <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.16.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code class="language-plaintext highlighter-rouge">InternalApi</code></a>, as they will likely be removed, hidden, or otherwise intentionally broken with 7.0.0.</p>
</blockquote>

<h5 id="in-asts-1">In ASTs</h5>

<p>As part of the changes we’d like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated <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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.16.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.16.0/net/sourceforge/pmd/lang/java/ast/JavaNode.html#"><code class="language-plaintext highlighter-rouge">JavaNode</code></a> or  <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.16.0/net/sourceforge/pmd/lang/ast/Node.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.16.0/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast</code></a> to find out the full list
of deprecations.</p>

<h3 id="external-contributions-25">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1482">#1482</a>: [java] Explain the existence of AvoidFinalLocalVariable in it’s description - <a href="https://github.com/krichter722">Karl-Philipp Richter</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1792">#1792</a>: [java] Added lombok.experimental to AbstractLombokAwareRule - <a href="https://github.com/jakivey32">jakivey32</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1808">#1808</a>: [plsql] Fix PL/SQL Syntax errors - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1829">#1829</a>: [java] Fix false negative in UnsynchronizedStaticFormatter - <a href="https://github.com/Srini1993">Srinivasan Venkatachalam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1847">#1847</a>: [java] Regression in MethodReturnsInternalArray not handling enums - <a href="https://github.com/KroArtem">Artem</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1863">#1863</a>: [plsql] Add Table InlineConstraint - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1864">#1864</a>: [plsql] Add support for Subquery Views - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1865">#1865</a>: [plsql] Add Support for Extract Expression - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1874">#1874</a>: [plsql] Add parenthesis equation support for Update - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1876">#1876</a>: [plsql] Datetime support for queries - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1883">#1883</a>: [plsql] Fix #1873 Expression list not working - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1884">#1884</a>: [plsql] fix #1878 Support explicit INNER word for INNER JOIN - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1885">#1885</a>: [plsql] Correct case expression - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1886">#1886</a>: [plsql] Support table alias for Insert Clause - <a href="https://github.com/kabroxiko">Hugo Araya Nash</a></li>
</ul>

<h2 id="26-may-2019---6150">26-May-2019 - 6.15.0</h2>

<p>The PMD team is pleased to announce PMD 6.15.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-26">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#enhanced-matlab-support">Enhanced Matlab support</a></li>
      <li><a href="#enhanced-c++-support">Enhanced C++ support</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-24">New and noteworthy</h3>

<h4 id="enhanced-matlab-support">Enhanced Matlab support</h4>

<p>Thanks to the contributions from <a href="https://github.com/maikelsteneker">Maikel Steneker</a> CPD for Matlab can
now parse Matlab programs which use the question mark operator to specify access to
class members:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>classdef Class1
properties (SetAccess = ?Class2)
</code></pre></div></div>

<p>CPD also understands now double quoted strings, which are supported since version R2017a of Matlab:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>str = "This is a string"
</code></pre></div></div>

<h4 id="enhanced-c-support">Enhanced C++ support</h4>

<p>CPD now supports digit separators in C++ (language module “cpp”). This is a C++14 feature.</p>

<p>Example: <code class="language-plaintext highlighter-rouge">auto integer_literal = 1'000'000;</code></p>

<p>The single quotes can be used to add some structure to large numbers.</p>

<p>CPD also parses raw string literals now correctly (see <a href="https://github.com/pmd/pmd/issues/1784">#1784</a>).</p>

<h4 id="new-rules-15">New Rules</h4>

<ul>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) checks the naming
conventions for field declarations. By default this rule uses the standard Apex naming convention (Camel case),
but it can be configured through properties.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) checks the
naming conventions for formal parameters of methods. By default this rule uses the standard Apex naming
convention (Camel case), but it can be configured through properties.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) checks the
naming conventions for local variable declarations. By default this rule uses the standard Apex naming
convention (Camel case), but it can be configured through properties.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#propertynamingconventions"><code class="language-plaintext highlighter-rouge">PropertyNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) checks the naming
conventions for property declarations. By default this rule uses the standard Apex naming convention (Camel case),
but it can be configured through properties.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_codestyle.html#useshortarrayinitializer"><code class="language-plaintext highlighter-rouge">UseShortArrayInitializer</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) searches for
array initialization expressions, which can be written shorter.</p>
  </li>
</ul>

<h4 id="modified-rules-12">Modified Rules</h4>

<ul>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#classnamingconventions"><code class="language-plaintext highlighter-rouge">ClassNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) can now be configured
using various properties for the specific kind of type declarations (e.g. class, interface, enum).
As before, this rule uses by default the standard Apex naming convention (Pascal case).</p>
  </li>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#methodnamingconventions"><code class="language-plaintext highlighter-rouge">MethodNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) can now be configured
using various properties to differenciate e.g. static methods and test methods.
As before, this rule uses by default the standard Apex naming convention (Camel case).</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) now by default ignores
the field <code class="language-plaintext highlighter-rouge">serialPersistentFields</code>. Since this is a field which needs to have this special name, no
field naming conventions can be applied here. It is excluded the same way like <code class="language-plaintext highlighter-rouge">serialVersionUID</code> via the
property <code class="language-plaintext highlighter-rouge">exclusions</code>.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_documentation.html#commentrequired"><code class="language-plaintext highlighter-rouge">CommentRequired</code></a> (<code class="language-plaintext highlighter-rouge">java-documentation</code>) has a new property
<code class="language-plaintext highlighter-rouge">serialPersistentFieldsCommentRequired</code> with the default value “Ignored”. This means that from now
on comments for the field <code class="language-plaintext highlighter-rouge">serialPersistentFields</code> are not required anymore. You can change the property
to restore the old behavior.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#properlogger"><code class="language-plaintext highlighter-rouge">ProperLogger</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) has two new properties
to configure the logger class (e.g. “org.slf4j.Logger”) and the logger name of the special case,
when the logger is not static. The name of the static logger variable was already configurable.
The new property “loggerClass” allows to use this rule for different logging frameworks.
This rule covers all the cases of the now deprecated rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#loggerisnotstaticfinal"><code class="language-plaintext highlighter-rouge">LoggerIsNotStaticFinal</code></a>.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier"><code class="language-plaintext highlighter-rouge">CommentDefaultAccessModifier</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) now reports also
missing comments for top-level classes and annotations, that are package-private.</p>
  </li>
</ul>

<h4 id="deprecated-rules-8">Deprecated Rules</h4>

<ul>
  <li>
    <p>The Apex rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#variablenamingconventions"><code class="language-plaintext highlighter-rouge">VariableNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) has been deprecated and
will be removed with PMD 7.0.0. The rule is replaced by the more general rules
<a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a>,
<a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a>,
<a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a>, and
<a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#propertynamingconventions"><code class="language-plaintext highlighter-rouge">PropertyNamingConventions</code></a>.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#loggerisnotstaticfinal"><code class="language-plaintext highlighter-rouge">LoggerIsNotStaticFinal</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) has been deprecated
and will be removed with PMD 7.0.0. The rule is replaced by <a href="https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#properlogger"><code class="language-plaintext highlighter-rouge">ProperLogger</code></a>.</p>
  </li>
</ul>

<h3 id="fixed-issues-26">Fixed Issues</h3>

<ul>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1321">#1321</a>: [apex] Should VariableNamingConventions require properties to start with a lowercase letter?</li>
      <li><a href="https://github.com/pmd/pmd/issues/1783">#1783</a>: [apex] comments on constructor not recognized when the Class has inner class</li>
    </ul>
  </li>
  <li>cpp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1784">#1784</a>: [cpp] Improve support for raw string literals</li>
    </ul>
  </li>
  <li>dart
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1809">#1809</a>: [dart] [cpd] Parse error with escape sequences</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1842">#1842</a>: [java] Annotated module declarations cause parse error</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1738">#1738</a>: [java] MethodReturnsInternalArray does not work in inner classes</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1495">#1495</a>: [java] Rule to detect overly verbose array initializiation</li>
      <li><a href="https://github.com/pmd/pmd/issues/1684">#1684</a>: [java] Properly whitelist serialPersistentFields</li>
      <li><a href="https://github.com/pmd/pmd/issues/1804">#1804</a>: [java] NPE in UnnecessaryLocalBeforeReturnRule</li>
    </ul>
  </li>
  <li>python
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1810">#1810</a>: [python] [cpd] Parse error when using Python 2 backticks</li>
    </ul>
  </li>
  <li>matlab
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1830">#1830</a>: [matlab] [cpd] Parse error with comments</li>
      <li><a href="https://github.com/pmd/pmd/issues/1793">#1793</a>: [java] CommentDefaultAccessModifier not working for classes</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-21">API Changes</h3>

<h4 id="deprecated-apis-8">Deprecated APIs</h4>

<h5 id="for-removal-9">For removal</h5>

<ul>
  <li>The <code class="language-plaintext 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://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.15.0/net/sourceforge/pmd/lang/apex/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.ast.DumpFacade</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.15.0/net/sourceforge/pmd/lang/java/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast.DumpFacade</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-javascript/6.15.0/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ecmascript.ast.DumpFacade</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-jsp/6.15.0/net/sourceforge/pmd/lang/jsp/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.jsp.ast.DumpFacade</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-plsql/6.15.0/net/sourceforge/pmd/lang/plsql/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.plsql.ast.DumpFacade</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-visualforce/6.15.0/net/sourceforge/pmd/lang/vf/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vf.ast.DumpFacade</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.15.0/net/sourceforge/pmd/lang/vm/ast/AbstractVmNode.html#dump(String,boolean,Writer)"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vm.ast.AbstractVmNode#dump</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-xml/6.15.0/net/sourceforge/pmd/lang/xml/ast/DumpFacade.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.xml.ast.DumpFacade</code></a></li>
    </ul>
  </li>
  <li>The method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.15.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDumpFacade(Writer,String,boolean)"><code class="language-plaintext highlighter-rouge">LanguageVersionHandler#getDumpFacade</code></a> will be
removed as well. It is deprecated, along with all its implementations in the subclasses of <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.15.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code class="language-plaintext highlighter-rouge">LanguageVersionHandler</code></a>.</li>
</ul>

<h3 id="external-contributions-26">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1647">#1647</a>: [java] Rule to detect overly verbose array initialization - <a href="https://github.com/IDoCodingStuffs">Victor</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1762">#1762</a>: [java] LoggerIsNotStaticFinal and ProperLogger - make class-name configurable - <a href="https://github.com/bedla">Ivo Šmíd</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1798">#1798</a>: [java] Make CommentDefaultAccessModifier work for top-level classes - <a href="https://github.com/boris-petrov">Boris Petrov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1799">#1799</a>: [java] MethodReturnsInternalArray does not work in inner classes - Fixed #1738 - <a href="https://github.com/Srini1993">Srinivasan Venkatachalam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1802">#1802</a>: [python] [cpd] Add support for Python 2 backticks - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1803">#1803</a>: [dart] [cpd] Dart escape sequences - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1807">#1807</a>: [ci] Fix missing local branch issues when executing pmd-regression-tester - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1813">#1813</a>: [matlab] [cpd] Matlab comments - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1816">#1816</a>: [apex] Fix ApexDoc handling with inner classes - <a href="https://github.com/jeffhube">Jeff Hube</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1817">#1817</a>: [apex] Add configurable naming convention rules - <a href="https://github.com/jeffhube">Jeff Hube</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1819">#1819</a>: [cpp] [cpd] Add support for digit separators - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1820">#1820</a>: [cpp] [cpd] Improve support for raw string literals - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1821">#1821</a>: [matlab] [cpd] Matlab question mark token - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1822">#1822</a>: [matlab] [cpd] Double quoted string - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1837">#1837</a>: [core] Minor performance improvements - <a href="https://github.com/TheRealHaui">Michael Hausegger</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1838">#1838</a>: [dart] [cpd] Improved string tokenization - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1840">#1840</a>: [java] Whitelist serialPersistentFields - <a href="https://github.com/marcelhaerle">Marcel Härle</a></li>
</ul>

<h2 id="28-april-2019---6140">28-April-2019 - 6.14.0</h2>

<p>The PMD team is pleased to announce PMD 6.14.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-27">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#dart-support">Dart support</a></li>
      <li><a href="#updated-pmd-designer">Updated PMD Designer</a></li>
    </ul>
  </li>
  <li><a href="#modified-rules">Modified Rules</a></li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-25">New and noteworthy</h3>

<h4 id="dart-support">Dart support</h4>

<p>Thanks to the contribution from <a href="https://github.com/maikelsteneker">Maikel Steneker</a>, and built on top of the ongoing efforts to fully support Antlr-based languages,
PMD now has CPD support for <a href="https://www.dartlang.org/">Dart</a>.</p>

<p>Being based on a proper Antlr grammar, CPD can:</p>
<ul>
  <li>ignore comments</li>
  <li>ignore imports / libraries</li>
  <li>honor <a href="pmd_userdocs_cpd.html#suppression">comment-based suppressions</a></li>
</ul>

<h4 id="updated-pmd-designer-7">Updated PMD Designer</h4>

<p>This PMD release ships a new version of the pmd-designer.
For the changes, see <a href="https://github.com/pmd/pmd-designer/blob/6.14.0/CHANGELOG.md">PMD Designer Changelog</a>.</p>

<h3 id="modified-rules-13">Modified Rules</h3>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.14.0/pmd_rules_java_errorprone.html#assignmenttononfinalstatic"><code class="language-plaintext highlighter-rouge">AssignmentToNonFinalStatic</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) will now report on each
assignment made within a constructor rather than on the field declaration. This makes it easier for developers to
find the offending statements.</p>
  </li>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.14.0/pmd_rules_java_codestyle.html#nopackage"><code class="language-plaintext highlighter-rouge">NoPackage</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) will now report additionally enums
and annotations that do not have a package declaration.</p>
  </li>
</ul>

<h3 id="fixed-issues-27">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1515">#1515</a>: [core] Module pmd-lang-test is missing javadoc artifact</li>
      <li><a href="https://github.com/pmd/pmd/issues/1788">#1788</a>: [cpd] [core] Use better <code class="language-plaintext highlighter-rouge">ClassLoader</code> for <code class="language-plaintext highlighter-rouge">ServiceLoader</code> in <code class="language-plaintext highlighter-rouge">LanguageFactory</code></li>
      <li><a href="https://github.com/pmd/pmd/issues/1794">#1794</a>: [core] Ruleset Compatibility fails with excluding rules</li>
    </ul>
  </li>
  <li>go
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1751">#1751</a>: [go] Parsing errors encountered with escaped backslash</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1532">#1532</a>: [java] NPE with incomplete auxclasspath</li>
      <li><a href="https://github.com/pmd/pmd/issues/1691">#1691</a>: [java] Possible Data Race in JavaTypeDefinitionSimple.getGenericType</li>
      <li><a href="https://github.com/pmd/pmd/issues/1729">#1729</a>: [java] JavaRuleViolation loses information in <code class="language-plaintext highlighter-rouge">className</code> field when class has package-private access level</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1190">#1190</a>: [java] UnusedLocalVariable/UnusedPrivateField false-positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/1720">#1720</a>: [java] UnusedImports false positive for Javadoc link with array type</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1775">#1755</a>: [java] False negative in UnnecessaryLocalBeforeReturn when splitting statements across multiple lines</li>
      <li><a href="https://github.com/pmd/pmd/issues/1782">#1782</a>: [java] NoPackage: False Negative for enums</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1760">#1760</a>: [java] UseObjectForClearerAPI flags private methods</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-22">API Changes</h3>

<p>No changes.</p>

<h3 id="external-contributions-27">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1745">#1745</a>: [doc] Fixed some errors in docs - <a href="https://github.com/0xflotus">0xflotus</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1746">#1746</a>: [java] Update rule to prevent UnusedImport when using JavaDoc with array type - <a href="https://github.com/itaigilo">itaigilo</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1752">#1752</a>: [java] UseObjectForClearerAPI Only For Public - <a href="https://github.com/Vampire">Björn Kautler</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1761">#1761</a>: [dart] [cpd] Added CPD support for Dart - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1776">#1776</a>: [java] Show more detailed message when can’t resolve field type - <a href="https://github.com/andrey-fomin">Andrey Fomin</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1781">#1781</a>: [java] Location change in AssignmentToNonFinalStatic - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1789">#1789</a>: [cpd] [core] Use current classloader instead of Thread’s classloader - <a href="https://github.com/aaschmid">Andreas Schmid</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1791">#1791</a>: [dart] [cpd] Dart escaped string - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
</ul>

<h2 id="31-march-2019---6130">31-March-2019 - 6.13.0</h2>

<p>The PMD team is pleased to announce PMD 6.13.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-28">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#call-for-logo">Call For Logo</a></li>
      <li><a href="#java-12-support">Java 12 Support</a></li>
      <li><a href="#quickstart-ruleset-for-apex">Quickstart Ruleset for Apex</a></li>
      <li><a href="#pmd-designer">PMD Designer</a></li>
      <li><a href="#improved-apex-support">Improved Apex Support</a></li>
      <li><a href="#new-rules">New Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#command-line-interface">Command Line Interface</a></li>
      <li><a href="#deprecated-api">Deprecated API</a></li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-26">New and noteworthy</h3>

<h4 id="call-for-logo">Call For Logo</h4>

<p>We are still searching for a new logo for PMD for the next major release.</p>

<p>Learn more about how to participate on <a href="https://github.com/pmd/pmd/issues/1663">github issue 1663</a>.</p>

<h4 id="java-12-support">Java 12 Support</h4>

<p>This release of PMD brings support for Java 12. PMD can parse the new <a href="http://openjdk.java.net/jeps/325">Switch Expressions</a>
and resolve the type of such an expression.</p>

<p>Note: The Switch Expressions are a preview language feature of OpenJDK 12 and are not enabled by default. In order to
analyze a project with PMD that uses these language features, you’ll need to enable it via the new environment
variable <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd ...
</code></pre></div></div>

<h4 id="quickstart-ruleset-for-apex">Quickstart Ruleset for Apex</h4>

<p>PMD provides now a quickstart ruleset for Salesforce.com Apex, which you can use as a base ruleset to
get your custom ruleset started. You can reference it with <code class="language-plaintext highlighter-rouge">rulesets/apex/quickstart.xml</code>.
You are strongly encouraged to <a href="https://pmd.github.io/pmd-6.12.0/pmd_userdocs_making_rulesets.html">create your own ruleset</a>
though.</p>

<p>The quickstart ruleset has the intention, to be useful out-of-the-box for many projects. Therefore it
references only rules, that are most likely to apply everywhere.</p>

<p>Any feedback would be greatly appreciated.</p>

<h4 id="pmd-designer">PMD Designer</h4>

<p>The rule designer’s codebase has been moved out of the main repository and
will be developed at <a href="https://github.com/pmd/pmd-designer">pmd/pmd-designer</a>
from now on. The maven coordinates will stay the same for the time being.
The designer will still be shipped with PMD’s binaries.</p>

<h4 id="improved-apex-support">Improved Apex Support</h4>

<ul>
  <li>Many AST nodes now expose more information which makes it easier to write XPath-based rules for Apex. Here are
some examples:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">Annotation[@Resolved = false()]</code> finds unsupported annotations.</li>
      <li><code class="language-plaintext highlighter-rouge">AnnotationParameter[@Name='RestResource'][@Value='/myurl']</code> gives access to
annotation parameters.</li>
      <li><code class="language-plaintext highlighter-rouge">CatchBlockStatement[@ExceptionType='Exception'][@VariableName='e']</code> finds catch
block for specific exception types.</li>
      <li><code class="language-plaintext highlighter-rouge">Field[@Type='String']</code> find all String fields, <code class="language-plaintext highlighter-rouge">Field[string-length(@Name) &lt; 5]</code>
finds all fields with short names and <code class="language-plaintext highlighter-rouge">Field[@Value='a']</code> find alls fields, that are
initialized with a specific value.</li>
      <li><code class="language-plaintext highlighter-rouge">LiteralExpression[@String = true()]</code> finds all String literals. There are attributes
for each type: <code class="language-plaintext highlighter-rouge">@Boolean</code>, <code class="language-plaintext highlighter-rouge">@Integer</code>, <code class="language-plaintext highlighter-rouge">@Double</code>, <code class="language-plaintext highlighter-rouge">@Long</code>, <code class="language-plaintext highlighter-rouge">@Decimal</code>, <code class="language-plaintext highlighter-rouge">@Null</code>.</li>
      <li><code class="language-plaintext highlighter-rouge">Method[@Constructor = true()]</code> selects all constructors. <code class="language-plaintext highlighter-rouge">Method[@ReturnType = 'String']</code>
selects all methods that return a String.</li>
      <li>The <code class="language-plaintext highlighter-rouge">ModifierNode</code> node has a couple of attributes to check for the existence of specific
modifiers: <code class="language-plaintext highlighter-rouge">@Test</code>, <code class="language-plaintext highlighter-rouge">@TestOrTestSetup</code>, <code class="language-plaintext highlighter-rouge">@WithSharing</code>, <code class="language-plaintext highlighter-rouge">@WithoutSharing</code>, <code class="language-plaintext highlighter-rouge">@InheritedSharing</code>,
<code class="language-plaintext highlighter-rouge">@WebService</code>, <code class="language-plaintext highlighter-rouge">@Global</code>, <code class="language-plaintext highlighter-rouge">@Override</code>.</li>
      <li>Many nodes now expose their type. E.g. with <code class="language-plaintext highlighter-rouge">Parameter[@Type='Integer']</code> you can find all
method parameters of type Integer. The same attribute <code class="language-plaintext highlighter-rouge">Type</code> exists as well for:
<code class="language-plaintext highlighter-rouge">NewObjectExpression</code>, <code class="language-plaintext highlighter-rouge">Property</code>, <code class="language-plaintext highlighter-rouge">VariableDeclaration</code>.</li>
      <li><code class="language-plaintext highlighter-rouge">VariableExpression[@Image='i']</code> finds all variable usages of the variable “i”.</li>
    </ul>
  </li>
</ul>

<h4 id="new-rules-16">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_java_design.html#avoiduncheckedexceptionsinsignatures"><code class="language-plaintext highlighter-rouge">AvoidUncheckedExceptionsInSignatures</code></a> (<code class="language-plaintext highlighter-rouge">java-design</code>) finds methods or constructors
that declare unchecked exceptions in their <code class="language-plaintext highlighter-rouge">throws</code> clause. This forces the caller to handle the exception,
even though it is a runtime exception.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_java_errorprone.html#detachedtestcase"><code class="language-plaintext highlighter-rouge">DetachedTestCase</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) searches for public
methods in test classes, which are not annotated with <code class="language-plaintext highlighter-rouge">@Test</code>. These methods might be test cases where
the annotation has been forgotten. Because of that those test cases are never executed.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_java_bestpractices.html#whileloopwithliteralboolean"><code class="language-plaintext highlighter-rouge">WhileLoopWithLiteralBoolean</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) finds
Do-While-Loops and While-Loops that can be simplified since they use simply <code class="language-plaintext highlighter-rouge">true</code> or <code class="language-plaintext highlighter-rouge">false</code> as their
loop condition.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_apex_bestpractices.html#apexassertionsshouldincludemessage"><code class="language-plaintext highlighter-rouge">ApexAssertionsShouldIncludeMessage</code></a> (<code class="language-plaintext highlighter-rouge">apex-bestpractices</code>)
searches for assertions in unit tests and checks, whether they use a message argument.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_apex_bestpractices.html#apexunittestmethodshouldhaveistestannotation"><code class="language-plaintext highlighter-rouge">ApexUnitTestMethodShouldHaveIsTestAnnotation</code></a> (<code class="language-plaintext highlighter-rouge">apex-bestpractices</code>)
searches for methods in test classes, which are missing the <code class="language-plaintext highlighter-rouge">@IsTest</code> annotation.</p>
  </li>
  <li>
    <p>The new PLSQL rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_plsql_codestyle.html#avoidtabcharacter"><code class="language-plaintext highlighter-rouge">AvoidTabCharacter</code></a> (<code class="language-plaintext highlighter-rouge">plsql-codestyle</code>) checks, that there are
no tab characters (“\t”) in the source file.</p>
  </li>
  <li>
    <p>The new PLSQL rule <a href="https://pmd.github.io/pmd-6.13.0/pmd_rules_plsql_codestyle.html#linelength"><code class="language-plaintext highlighter-rouge">LineLength</code></a> (<code class="language-plaintext highlighter-rouge">plsql-codestyle</code>) helps to enforce a maximum
line length.</p>
  </li>
</ul>

<h3 id="fixed-issues-28">Fixed Issues</h3>

<ul>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1721">#1721</a>: [doc] Documentation provides an invalid property configuration example</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1537">#1537</a>: [java] Java 12 support</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1701">#1701</a>: [java] UseTryWithResources does not handle multiple argument close methods</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1527">#1527</a>: [java] UseUnderscoresInNumericLiterals false positive on floating point numbers</li>
      <li><a href="https://github.com/pmd/pmd/issues/1674">#1674</a>: [java] documentation of CommentDefaultAccessModifier is wrong</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1570">#1570</a>: [java] AvoidDuplicateLiterals warning about deprecated separator property when not used</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1510">#1510</a>: [plsql] Support XMLTABLE functions</li>
      <li><a href="https://github.com/pmd/pmd/issues/1716">#1716</a>: [plsql] Support access to whole plsql code</li>
      <li><a href="https://github.com/pmd/pmd/issues/1731">#1731</a>: [pslql] ParseException when parsing ELSIF</li>
      <li><a href="https://github.com/pmd/pmd/issues/1733">#1733</a>: [plsql] % not supported in “TestSearch%notfound”</li>
      <li><a href="https://github.com/pmd/pmd/issues/1734">#1734</a>: [plsql] TooManyMethods false-negative</li>
      <li><a href="https://github.com/pmd/pmd/issues/1735">#1735</a>: [plsql] False-negatives for TO_DATE_TO_CHAR, TO_DATEWithoutDateFormat, TO_TIMESTAMPWithoutDateFormat</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-23">API Changes</h3>

<h4 id="command-line-interface-1">Command Line Interface</h4>

<p>The start scripts <code class="language-plaintext highlighter-rouge">run.sh</code>, <code class="language-plaintext highlighter-rouge">pmd.bat</code> and <code class="language-plaintext highlighter-rouge">cpd.bat</code> support the new environment variable <code class="language-plaintext 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="language-plaintext highlighter-rouge">PMD_JAVA_OPTS=-Xmx512m</code>)
or enable preview language features (e.g. <code class="language-plaintext highlighter-rouge">PMD_JAVA_OPTS=--enable-preview</code>).</p>

<p>The previously available variables such as <code class="language-plaintext highlighter-rouge">OPTS</code> or <code class="language-plaintext highlighter-rouge">HEAPSIZE</code> are deprecated and will be removed with PMD 7.0.0.</p>

<h4 id="deprecated-api-6">Deprecated API</h4>

<ul>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.13.0/net/sourceforge/pmd/renderers/CodeClimateRule.html#"><code class="language-plaintext highlighter-rouge">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="language-plaintext 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="language-plaintext highlighter-rouge">rulesets/apex/quickstart.xml</code> instead.</p>
  </li>
</ul>

<h3 id="external-contributions-28">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1694">#1694</a>: [apex] New rules for test method and assert statements - <a href="https://github.com/triandicAnt">triandicAnt</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1697">#1697</a>: [doc] Update CPD documentation - <a href="https://github.com/matifraga">Matías Fraga</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1704">#1704</a>: [java] Added AvoidUncheckedExceptionsInSignatures Rule - <a href="https://github.com/pamidi99">Bhanu Prakash Pamidi</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1706">#1706</a>: [java] Add DetachedTestCase rule - <a href="https://github.com/davidburstromspotify">David Burström</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1709">#1709</a>: [java] Detect while loops with literal booleans conditions - <a href="https://github.com/davidburstromspotify">David Burström</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1717">#1717</a>: [java] Fix false positive in useTryWithResources when using a custom close method with multiple arguments - <a href="https://github.com/jainrish">Rishabh Jain</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1724">#1724</a>: [doc] Correct property override example - <a href="https://github.com/FWDekker">Felix W. Dekker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1737">#1737</a>: [java] fix escaping of CommentDefaultAccessModifier documentation - <a href="https://github.com/itaigilo">itaigilo</a></li>
</ul>

<h2 id="24-february-2019---6120">24-February-2019 - 6.12.0</h2>

<p>The PMD team is pleased to announce PMD 6.12.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-29">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#call-for-logo">Call For Logo</a></li>
      <li><a href="#cpd-suppression-for-antlr-based-languages">CPD Suppression for Antlr-based languages</a></li>
      <li><a href="#pl-sql-grammar-improvements">PL/SQL Grammar improvements</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-27">New and noteworthy</h3>

<h4 id="call-for-logo-1">Call For Logo</h4>

<p>PMD’s logo was great for a long time. But now we want to take the opportunity with the next major release to change
our logo in order to use a more “politically correct” one.</p>

<p>Learn more about how to participate on <a href="https://github.com/pmd/pmd/issues/1663">github issue 1663</a>.</p>

<h4 id="cpd-suppression-for-antlr-based-languages">CPD Suppression for Antlr-based languages</h4>

<p><a href="https://www.itba.edu.ar/">ITBA</a> students <a href="https://github.com/matifraga">Matías Fraga</a>,
<a href="https://github.com/tomidelucca">Tomi De Lucca</a> and <a href="https://github.com/lsoncini">Lucas Soncini</a>
keep working on bringing full Antlr support to PMD. For this release, they have implemented
token filtering in an equivalent way as we did for JavaCC languages, adding support for CPD
suppressions through <code class="language-plaintext highlighter-rouge">CPD-OFF</code> and <code class="language-plaintext highlighter-rouge">CPD-ON</code> comments for all Antlr-based languages.</p>

<p>This means, you can now ignore arbitrary blocks of code on:</p>
<ul>
  <li>Go</li>
  <li>Kotlin</li>
  <li>Swift</li>
</ul>

<p>Simply start the suppression with any comment (single or multiline) containing <code class="language-plaintext highlighter-rouge">CPD-OFF</code>,
and resume again with a comment containing <code class="language-plaintext highlighter-rouge">CPD-ON</code>.</p>

<p>More information is available in <a href="pmd_userdocs_cpd.html#suppression">the user documentation</a>.</p>

<h4 id="plsql-grammar-improvements">PL/SQL Grammar improvements</h4>

<ul>
  <li>In this release, many more parser bugs in our PL/SQL support have been fixed. This adds more complete
support for UPDATE statements and subqueries and hierarchical queries in SELECT statements.</li>
  <li>Support for analytic functions such as LISTAGG has been added.</li>
  <li>Conditions in WHERE clauses support now REGEX_LIKE and multiset conditions.</li>
</ul>

<h4 id="new-rules-17">New Rules</h4>

<ul>
  <li>The new Java rule <a href="https://pmd.github.io/pmd-6.12.0/pmd_rules_java_bestpractices.html#usetrywithresources"><code class="language-plaintext highlighter-rouge">UseTryWithResources</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) searches
for try-blocks, that could be changed to a try-with-resources statement. This statement ensures that
each resource is closed at the end of the statement and is available since Java 7.</li>
</ul>

<h4 id="modified-rules-14">Modified Rules</h4>

<ul>
  <li>The Apex rule <a href="https://pmd.github.io/pmd-6.12.0/pmd_rules_apex_codestyle.html#methodnamingconventions"><code class="language-plaintext highlighter-rouge">MethodNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) has a new
property <code class="language-plaintext highlighter-rouge">skipTestMethodUnderscores</code>, which is by default disabled. The new property allows for ignoring
all test methods, either using the <code class="language-plaintext highlighter-rouge">testMethod</code> modifier or simply annotating them <code class="language-plaintext highlighter-rouge">@isTest</code>.</li>
</ul>

<h3 id="fixed-issues-29">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1462">#1462</a>: [core] Failed build on Windows with source zip archive</li>
      <li><a href="https://github.com/pmd/pmd/issues/1559">#1559</a>: [core] CPD: Lexical error in file (no file name provided)</li>
      <li><a href="https://github.com/pmd/pmd/issues/1671">#1671</a>: [doc] Wrong escaping in suppressing warnings for nopmd-comment</li>
      <li><a href="https://github.com/pmd/pmd/pull/1693">#1693</a>: [ui] Improved error reporting for the designer</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/808">#808</a>: [java] AccessorMethodGeneration false positives with compile time constants</li>
      <li><a href="https://github.com/pmd/pmd/issues/1405">#1405</a>: [java] New Rule: UseTryWithResources - Replace close and IOUtils.closeQuietly with try-with-resources</li>
      <li><a href="https://github.com/pmd/pmd/issues/1555">#1555</a>: [java] UnusedImports false positive for method parameter type in @see Javadoc</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1543">#1543</a>: [java] LinguisticNaming should ignore overriden methods</li>
      <li><a href="https://github.com/pmd/pmd/issues/1547">#1547</a>: [java] AtLeastOneConstructorRule: false-positive with lombok.AllArgsConstructor</li>
      <li><a href="https://github.com/pmd/pmd/issues/1624">#1624</a>: [java] UseDiamondOperator false positive with var initializer</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1641">#1641</a>: [java] False-positive with Lombok and inner classes</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/780">#780</a>: [java] BeanMembersShouldSerializeRule does not recognize lombok accessors</li>
    </ul>
  </li>
  <li>java-multithreading
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1633">#1633</a>: [java] UnsynchronizedStaticFormatter reports commons lang FastDateFormat</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1632">#1632</a>: [java] ConsecutiveLiteralAppends false positive over catch</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1587">#1587</a>: [plsql] ParseException with EXISTS</li>
      <li><a href="https://github.com/pmd/pmd/issues/1589">#1589</a>: [plsql] ParseException with subqueries in WHERE clause</li>
      <li><a href="https://github.com/pmd/pmd/issues/1590">#1590</a>: [plsql] ParseException when using hierarchical query clause</li>
      <li><a href="https://github.com/pmd/pmd/issues/1656">#1656</a>: [plsql] ParseException with analytic functions, trim and subqueries</li>
    </ul>
  </li>
  <li>designer
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1679">#1679</a>: [ui] No default language version selected</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-24">API Changes</h3>

<p>No changes.</p>

<h3 id="external-contributions-29">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1623">#1623</a>: [java] Fix lombok.AllArgsConstructor support - <a href="https://github.com/CasualSuperman">Bobby Wertman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1625">#1625</a>: [java] UnusedImports false positive for method parameter type in @see Javadoc - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1628">#1628</a>: [java] LinguisticNaming should ignore overriden methods - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1634">#1634</a>: [java] BeanMembersShouldSerializeRule does not recognize lombok accessors - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1635">#1635</a>: [java] UnsynchronizedStaticFormatter reports commons lang FastDateFormat - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1637">#1637</a>: [java] Compile time constants initialized by literals avoided by AccessorMethodGenerationRule - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1640">#1640</a>: [java] Update instead of override classHasLombokAnnotation flag - <a href="https://github.com/fluxroot">Phokham Nonava</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1644">#1644</a>: [apex] Add property to allow apex test methods to contain underscores - <a href="https://github.com/tomdaly">Tom</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1645">#1645</a>: [java] ConsecutiveLiteralAppends false positive - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1646">#1646</a>: [java] UseDiamondOperator doesn’t work with var - <a href="https://github.com/Shubham-2k17">Shubham</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1654">#1654</a>: [core] Antlr token filter - <a href="https://github.com/tomidelucca">Tomi De Lucca</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1655">#1655</a>: [kotlin] Kotlin tokenizer refactor - <a href="https://github.com/lsoncini">Lucas Soncini</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1686">#1686</a>: [doc] Replaced wrong escaping with “&gt;” - <a href="https://github.com/hpandeycodeit">Himanshu Pandey</a></li>
</ul>

<h2 id="27-january-2019---6110">27-January-2019 - 6.11.0</h2>

<p>The PMD team is pleased to announce PMD 6.11.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-30">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#updated-apex-support">Updated Apex Support</a></li>
      <li><a href="#pl/sql-grammar-improvements">PL/SQL Grammar improvements</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-28">New and noteworthy</h3>

<h4 id="updated-apex-support-3">Updated Apex Support</h4>

<ul>
  <li>The Apex language support has been bumped to version 45 (Spring ‘19). All new language features are now properly
parsed and processed.</li>
  <li>Many nodes now expose more informations, such as the operator for BooleanExpressions. This makes these operators
consumable by XPath rules, e.g. <code class="language-plaintext highlighter-rouge">//BooleanExpression[@Operator='&amp;&amp;']</code>.</li>
</ul>

<h4 id="plsql-grammar-improvements-1">PL/SQL Grammar improvements</h4>

<ul>
  <li>In this release, many parser bugs in our PL/SQL support have been fixed. This adds e.g. support for
table collection expressions (<code class="language-plaintext highlighter-rouge">SELECT * FROM TABLE(expr)</code>).</li>
  <li>Support for parsing insert statements has been added.</li>
  <li>More improvements are planned for the next release of PMD.</li>
</ul>

<h4 id="new-rules-18">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_multithreading.html#unsynchronizedstaticformatter"><code class="language-plaintext highlighter-rouge">UnsynchronizedStaticFormatter</code></a> (<code class="language-plaintext highlighter-rouge">java-multithreading</code>) detects
unsynchronized usages of static <code class="language-plaintext highlighter-rouge">java.text.Format</code> instances. This rule is a more generic replacement of the
rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_multithreading.html#unsynchronizedstaticdateformatter"><code class="language-plaintext highlighter-rouge">UnsynchronizedStaticDateFormatter</code></a> which focused just on <code class="language-plaintext highlighter-rouge">DateFormat</code>.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_bestpractices.html#forloopvariablecount"><code class="language-plaintext highlighter-rouge">ForLoopVariableCount</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) checks for
the number of control variables in a for-loop. Having a lot of control variables makes it harder to understand
what the loop does. The maximum allowed number of variables is by default 1 and can be configured by a
property.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_bestpractices.html#avoidreassigningloopvariables"><code class="language-plaintext highlighter-rouge">AvoidReassigningLoopVariables</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) searches
for loop variables that are reassigned. Changing the loop variables additionally to the loop itself can lead to
hard-to-find bugs.</p>
  </li>
  <li>
    <p>The new Java rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_codestyle.html#usediamondoperator"><code class="language-plaintext highlighter-rouge">UseDiamondOperator</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) looks for constructor
calls with explicit type parameters. Since Java 1.7, these type parameters are not necessary anymore, as they
can be inferred now.</p>
  </li>
</ul>

<h4 id="modified-rules-15">Modified Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_codestyle.html#localvariablecouldbefinal"><code class="language-plaintext highlighter-rouge">LocalVariableCouldBeFinal</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) has a new
property <code class="language-plaintext highlighter-rouge">ignoreForEachDecl</code>, which is by default disabled. The new property allows for ignoring
non-final loop variables in a for-each statement.</li>
</ul>

<h4 id="deprecated-rules-9">Deprecated Rules</h4>

<ul>
  <li>The Java rule <a href="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_multithreading.html#unsynchronizedstaticdateformatter"><code class="language-plaintext 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="https://pmd.github.io/pmd-6.11.0/pmd_rules_java_multithreading.html#unsynchronizedstaticformatter"><code class="language-plaintext highlighter-rouge">UnsynchronizedStaticFormatter</code></a>.</li>
</ul>

<h3 id="fixed-issues-30">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1196">#1196</a>: [core] CPD results not consistent between runs</li>
      <li><a href="https://github.com/pmd/pmd/issues/1496">#1496</a> [core] Refactor metrics to be dealt with generically from pmd-core</li>
    </ul>
  </li>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/1542">#1542</a>: [apex] Include the documentation category</li>
      <li><a href="https://github.com/pmd/pmd/issues/1546">#1546</a>: [apex] PMD parsing exception for Apex classes using ‘inherited sharing’ keyword</li>
      <li><a href="https://github.com/pmd/pmd/pull/1568">#1568</a>: [apex] AST node attribute @Image not usable / always null in XPath rule / Designer</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1556">#1556</a>: [java] Default methods should not be considered abstract</li>
      <li><a href="https://github.com/pmd/pmd/issues/1578">#1578</a>: [java] Private field is detected as public inside nested classes in interfaces</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/658">#658</a>: [java] OneDeclarationPerLine: False positive for loops</li>
      <li><a href="https://github.com/pmd/pmd/issues/1518">#1518</a>: [java] New rule: AvoidReassigningLoopVariable</li>
      <li><a href="https://github.com/pmd/pmd/issues/1519">#1519</a>: [java] New rule: ForLoopVariableCount</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1513">#1513</a>: [java] LocalVariableCouldBeFinal: allow excluding the variable in a for-each loop</li>
      <li><a href="https://github.com/pmd/pmd/issues/1517">#1517</a>: [java] New Rule: UseDiamondOperator</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1035">#1035</a>: [java] ReturnFromFinallyBlock: False positive on lambda expression in finally block</li>
      <li><a href="https://github.com/pmd/pmd/issues/1549">#1549</a>: [java] NPE in PMD 6.8.0 InvalidSlf4jMessageFormat</li>
    </ul>
  </li>
  <li>java-multithreading
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1533">#1533</a>: [java] New rule: UnsynchronizedStaticFormatter</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li>
        <table>
          <tbody>
            <tr>
              <td><a href="https://github.com/pmd/pmd/issues/1507">#1507</a>: [plsql] Parse Exception when using ‘</td>
              <td> </td>
              <td>’ operator in where clause</td>
            </tr>
          </tbody>
        </table>
      </li>
      <li><a href="https://github.com/pmd/pmd/issues/1508">#1508</a>: [plsql] Parse Exception when using SELECT COUNT(*)</li>
      <li><a href="https://github.com/pmd/pmd/issues/1509">#1509</a>: [plsql] Parse Exception with OUTER/INNER Joins</li>
      <li><a href="https://github.com/pmd/pmd/issues/1511">#1511</a>: [plsql] Parse Exception with IS NOT NULL</li>
      <li><a href="https://github.com/pmd/pmd/issues/1526">#1526</a>: [plsql] ParseException when using TableCollectionExpression</li>
      <li><a href="https://github.com/pmd/pmd/issues/1583">#1583</a>: [plsql] Update Set Clause should allow multiple columns</li>
      <li><a href="https://github.com/pmd/pmd/issues/1586">#1586</a>: [plsql] Parse Exception when functions are used with LIKE</li>
      <li><a href="https://github.com/pmd/pmd/issues/1588">#1588</a>: [plsql] Parse Exception with function calls in WHERE clause</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-25">API Changes</h3>

<ul>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/lang/rule/stat/StatisticalRule.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/stat/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.stat</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/lang/rule/stat/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.rule.stat</code></a>,
and also <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.11.0/net/sourceforge/pmd/lang/java/rule/AbstractStatisticalJavaRule.html#"><code class="language-plaintext highlighter-rouge">AbstractStatisticalJavaRule</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.11.0/net/sourceforge/pmd/lang/apex/rule/AbstractStatisticalApexRule.html#"><code class="language-plaintext highlighter-rouge">AbstractStatisticalApexRule</code></a> and the like.
The methods <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/Report.html#addMetric(net.sourceforge.pmd.stat.Metric)"><code class="language-plaintext highlighter-rouge">Report#addMetric</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/ThreadSafeReportListener.html#metricAdded(net.sourceforge.pmd.stat.Metric)"><code class="language-plaintext highlighter-rouge">metricAdded</code></a>
will also be removed.</li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/properties/PropertySource.html#setProperty(net.sourceforge.pmd.properties.MultiValuePropertyDescriptor,Object[])"><code class="language-plaintext highlighter-rouge">setProperty</code></a> is deprecated,
because <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.11.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">MultiValuePropertyDescriptor</code></a> is deprecated as well</li>
</ul>

<h3 id="external-contributions-30">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1503">#1503</a>: [java] Fix for ReturnFromFinallyBlock false-positives - <a href="https://github.com/rishabhdeepsingh">RishabhDeep Singh</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1514">#1514</a>: [java] LocalVariableCouldBeFinal: allow excluding the variable in a for-each loop - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1516">#1516</a>: [java] OneDeclarationPerLine: Don’t report multiple variables in a for statement. - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1520">#1520</a>: [java] New rule: ForLoopVariableCount: check the number of control variables in a for loop - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1521">#1521</a>: [java] Upgrade to ASM7 for JDK 11 support - <a href="https://github.com/markpritchard">Mark Pritchard</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1530">#1530</a>: [java] New rule: AvoidReassigningLoopVariables - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1534">#1534</a>: [java] This is the change regarding the usediamondoperator #1517 - <a href="https://github.com/hemanshu070">hemanshu070</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1545">#1545</a>: [doc] fixing dead links + tool to check for dead links automatically - <a href="https://github.com/kris-scheibe">Kris Scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1551">#1551</a>: [java] InvalidSlf4jMessageFormatRule should not throw NPE for enums - <a href="https://github.com/rmartinus">Robbie Martinus</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1552">#1552</a>: [core] Upgrading Google Gson from 2.5 to 2.8.5 - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1553">#1553</a>: [core] Upgrading System Rules dependency from 1.8.0 to 1.19.0 - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1554">#1554</a>: [plsql] updates should allow for multiple statements - <a href="https://github.com/tashiscool">tashiscool</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1584">#1584</a>: [core] Fixes 1196: inconsistencies of clones returned by different CPD executions for the same files  - <a href="https://github.com/bmbferreira">Bruno Ferreira</a></li>
</ul>

<h2 id="09-december-2018---6100">09-December-2018 - 6.10.0</h2>

<p>The PMD team is pleased to announce PMD 6.10.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-31">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#kotlin-support-for-cpd">Kotlin support for CPD</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    <ul>
      <li><a href="#properties-framework">Properties framework</a>
        <ul>
          <li><a href="#changes-to-how-you-define-properties">Changes to how you define properties</a></li>
          <li><a href="#architectural-simplifications">Architectural simplifications</a></li>
          <li><a href="#changes-to-the-propertydescriptor-interface">Changes to the PropertyDescriptor interface</a></li>
        </ul>
      </li>
      <li><a href="#deprecated-apis">Deprecated APIs</a>
        <ul>
          <li><a href="#for-internalization">For internalization</a></li>
          <li><a href="#for-removal">For removal</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-29">New and noteworthy</h3>

<h4 id="kotlin-support-for-cpd">Kotlin support for CPD</h4>

<p>Thanks to <a href="https://github.com/maikelsteneker">Maikel Steneker</a>, CPD now supports <a href="https://kotlinlang.org/">Kotlin</a>.
This means, you can use CPD to find duplicated code in your Kotlin projects.</p>

<h4 id="new-rules-19">New Rules</h4>

<ul>
  <li>The new Java rule <a href="https://pmd.github.io/pmd-6.10.0/pmd_rules_java_codestyle.html#useunderscoresinnumericliterals"><code class="language-plaintext highlighter-rouge">UseUnderscoresInNumericLiterals</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
verifies that numeric literals over a given length (4 chars by default, but configurable) are using
underscores every 3 digits for readability. The rule only applies to Java 7+ codebases.</li>
</ul>

<h4 id="modified-rules-16">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="https://pmd.github.io/pmd-6.10.0/pmd_rules_java_bestpractices.html#junittestsshouldincludeassert"><code class="language-plaintext highlighter-rouge">JUnitTestsShouldIncludeAssert</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>)
now also detects <a href="https://github.com/joel-costigliola/assertj-core">Soft Assertions</a>.</p>
  </li>
  <li>
    <p>The property <code class="language-plaintext highlighter-rouge">exceptionfile</code> of the rule <a href="https://pmd.github.io/pmd-6.10.0/pmd_rules_java_errorprone.html#avoidduplicateliterals"><code class="language-plaintext highlighter-rouge">AvoidDuplicateLiterals</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>)
has been deprecated and will be removed with 7.0.0. Please use <code class="language-plaintext highlighter-rouge">exceptionList</code> instead.</p>
  </li>
</ul>

<h3 id="fixed-issues-31">Fixed Issues</h3>
<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1284">#1284</a>: [doc] Keep record of every currently deprecated API</li>
      <li><a href="https://github.com/pmd/pmd/issues/1318">#1318</a>: [test] Kotlin DSL to ease test writing</li>
      <li><a href="https://github.com/pmd/pmd/issues/1328">#1328</a>: [ci] Building docs for release fails</li>
      <li><a href="https://github.com/pmd/pmd/issues/1341">#1341</a>: [doc] Documentation Error with Regex Properties</li>
      <li><a href="https://github.com/pmd/pmd/issues/1468">#1468</a>: [doc] Missing escaping leads to XSS</li>
      <li><a href="https://github.com/pmd/pmd/issues/1471">#1471</a>: [core] XMLRenderer: ProcessingErrors from exceptions without a message missing</li>
      <li><a href="https://github.com/pmd/pmd/issues/1477">#1477</a>: [core] Analysis cache fails with wildcard classpath entries</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1460">#1460</a>: [java] Intermittent PMD failure : PMD processing errors while no violations reported</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/647">#647</a>: [java] JUnitTestsShouldIncludeAssertRule should support <code class="language-plaintext highlighter-rouge">this.exception</code> as well as just <code class="language-plaintext highlighter-rouge">exception</code></li>
      <li><a href="https://github.com/pmd/pmd/issues/1435">#1435</a>: [java] JUnitTestsShouldIncludeAssert: Support AssertJ soft assertions</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1232">#1232</a>: [java] Detector for large numbers not separated by _</li>
      <li><a href="https://github.com/pmd/pmd/issues/1372">#1372</a>: [java] false positive for UselessQualifiedThis</li>
      <li><a href="https://github.com/pmd/pmd/issues/1440">#1440</a>: [java] CommentDefaultAccessModifierRule shows incorrect message</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1151">#1151</a>: [java] ImmutableField false positive with multiple constructors</li>
      <li><a href="https://github.com/pmd/pmd/issues/1483">#1483</a>: [java] Cyclo metric should count conditions of for statements correctly</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1512">#1512</a>: [java] InvalidSlf4jMessageFormatRule causes NPE in lambda and static blocks</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1454">#1454</a>: [plsql] ParseException for IF/CASE statement with &gt;=, &lt;=, !=</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-26">API Changes</h3>

<h4 id="properties-framework">Properties framework</h4>

<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>

<h5 id="changes-to-how-you-define-properties">Changes to how you define properties</h5>

<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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/builders/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders</code></a>,
is being replaced by the simpler <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyBuilder.html#"><code class="language-plaintext highlighter-rouge">PropertyBuilder</code></a>. Their APIs enjoy a high degree of source compatibility.</p>
  </li>
  <li>
    <p>Concrete property classes like <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code class="language-plaintext highlighter-rouge">IntegerProperty</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">PropertyDescriptor</code></a>
interface, e.g. <code class="language-plaintext highlighter-rouge">PropertyDescriptor&lt;Integer&gt;</code> or <code class="language-plaintext 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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code class="language-plaintext highlighter-rouge">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="language-plaintext highlighter-rouge">PropertyFactory</code>:</p>
    <ul>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code class="language-plaintext highlighter-rouge">IntegerProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#intProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#intProperty</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/IntegerMultiProperty.html#"><code class="language-plaintext highlighter-rouge">IntegerMultiProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#intListProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#intListProperty</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/FloatProperty.html#"><code class="language-plaintext highlighter-rouge">FloatProperty</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/DoubleProperty.html#"><code class="language-plaintext highlighter-rouge">DoubleProperty</code></a> are both replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#doubleProperty</code></a>.
Having a separate property for floats wasn’t that useful.
        <ul>
          <li>Similarly, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/FloatMultiProperty.html#"><code class="language-plaintext highlighter-rouge">FloatMultiProperty</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/DoubleMultiProperty.html#"><code class="language-plaintext highlighter-rouge">DoubleMultiProperty</code></a> are replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleListProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#doubleListProperty</code></a>.</li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/StringProperty.html#"><code class="language-plaintext highlighter-rouge">StringProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#stringProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#stringProperty</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code class="language-plaintext highlighter-rouge">StringMultiProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#stringListProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#stringListProperty</code></a></li>
        </ul>
      </li>
      <li>
        <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/RegexProperty.html#"><code class="language-plaintext highlighter-rouge">RegexProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#regexProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#regexProperty</code></a></p>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code class="language-plaintext highlighter-rouge">EnumeratedProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#enumProperty(java.lang.String,java.util.Map)"><code class="language-plaintext highlighter-rouge">PropertyFactory#enumProperty</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code class="language-plaintext highlighter-rouge">EnumeratedProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#enumListProperty(java.lang.String,java.util.Map)"><code class="language-plaintext highlighter-rouge">PropertyFactory#enumListProperty</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/BooleanProperty.html#"><code class="language-plaintext highlighter-rouge">BooleanProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#booleanProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#booleanProperty</code></a>
        <ul>
          <li>Its multi-valued counterpart, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/BooleanMultiProperty.html#"><code class="language-plaintext highlighter-rouge">BooleanMultiProperty</code></a>, is not replaced, because it doesn’t have a use case.</li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/CharacterProperty.html#"><code class="language-plaintext highlighter-rouge">CharacterProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#charProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#charProperty</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/CharacterMultiProperty.html#"><code class="language-plaintext highlighter-rouge">CharacterMultiProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#charListProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#charListProperty</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/LongProperty.html#"><code class="language-plaintext highlighter-rouge">LongProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#longIntProperty</code></a>
        <ul>
          <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/LongMultiProperty.html#"><code class="language-plaintext highlighter-rouge">LongMultiProperty</code></a> is replaced by <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntListProperty(java.lang.String)"><code class="language-plaintext highlighter-rouge">PropertyFactory#longIntListProperty</code></a></li>
        </ul>
      </li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/MethodProperty.html#"><code class="language-plaintext highlighter-rouge">MethodProperty</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/FileProperty.html#"><code class="language-plaintext highlighter-rouge">FileProperty</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/TypeProperty.html#"><code class="language-plaintext highlighter-rouge">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>Here’s 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>You’re highly encouraged to migrate to using this new API as soon as possible, to ease your migration to 7.0.0.</p>

<h5 id="architectural-simplifications">Architectural simplifications</h5>

<ul>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/EnumeratedPropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">EnumeratedPropertyDescriptor</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/NumericPropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">NumericPropertyDescriptor</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PackagedPropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">PackagedPropertyDescriptor</code></a>,
and the related builders (in <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/builders/package-summary.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/constraints/PropertyConstraint.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyNumeric()"><code class="language-plaintext highlighter-rouge">PropertyTypeId#isPropertyNumeric</code></a> and
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyPackaged()"><code class="language-plaintext highlighter-rouge">PropertyTypeId#isPropertyPackaged</code></a> are also deprecated.</p>
  </li>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">MultiValuePropertyDescriptor</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/SingleValuePropertyDescriptor.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code class="language-plaintext highlighter-rouge">PropertyDescriptor#isMultiValue</code></a> will be removed
accordingly.</p>
  </li>
</ul>

<h5 id="changes-to-the-propertydescriptor-interface">Changes to the PropertyDescriptor interface</h5>

<ul>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#preferredRowCount()"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#uiOrder()"><code class="language-plaintext highlighter-rouge">uiOrder</code></a> and <code class="language-plaintext 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="language-plaintext highlighter-rouge">PropertyDescriptor</code> will not extend <code class="language-plaintext highlighter-rouge">Comparable&lt;PropertyDescriptor&gt;</code> anymore come 7.0.0.</li>
  <li>The method <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#propertyErrorFor(net.sourceforge.pmd.Rule)"><code class="language-plaintext highlighter-rouge">propertyErrorFor</code></a> is deprecated and will be removed with no intended
replacement. It’s really just a shortcut for <code class="language-plaintext highlighter-rouge">prop.errorFor(rule.getProperty(prop))</code>.</li>
  <li><code class="language-plaintext highlighter-rouge">T </code><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#valueFrom(java.lang.String)"><code class="language-plaintext highlighter-rouge">valueFrom(String)</code></a> and <code class="language-plaintext highlighter-rouge">String </code><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#asDelimitedString(java.lang.Object)"><code class="language-plaintext highlighter-rouge">asDelimitedString</code></a><code class="language-plaintext 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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code class="language-plaintext highlighter-rouge">isMultiValue</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#type()"><code class="language-plaintext highlighter-rouge">type</code></a> are deprecated and won’t be replaced. The new XML syntax will remove the need
for a divide between multi- and single-value properties, and will allow arbitrary types to be represented.
Since arbitrary types may be represented, <code class="language-plaintext highlighter-rouge">type</code> will become obsolete as it can’t represent generic types,
which will nevertheless be representable with the XML syntax. It was only used for documentation, but a
new way to document these properties exhaustively will be added with 7.0.0.</li>
  <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#errorFor(java.lang.Object)"><code class="language-plaintext highlighter-rouge">errorFor</code></a> is deprecated as its return type will be changed to <code class="language-plaintext highlighter-rouge">Optional&lt;String&gt;</code> with the shift to Java 8.</li>
</ul>

<h4 id="deprecated-apis-9">Deprecated APIs</h4>

<h5 id="for-internalization">For internalization</h5>

<ul>
  <li>
    <p>The implementation of the adapters for the XPath engines Saxon and Jaxen (package <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/ast/xpath/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ast.xpath</code></a>)
are now deprecated. They’ll be moved to an internal package come 7.0.0. Only <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/ast/xpath/Attribute.html#"><code class="language-plaintext highlighter-rouge">Attribute</code></a> remains public API.</p>
  </li>
  <li>
    <p>The classes <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptorField.html#"><code class="language-plaintext highlighter-rouge">PropertyDescriptorField</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/builders/PropertyDescriptorBuilderConversionWrapper.html#"><code class="language-plaintext highlighter-rouge">PropertyDescriptorBuilderConversionWrapper</code></a>, and the methods
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#attributeValuesById"><code class="language-plaintext highlighter-rouge">PropertyDescriptor#attributeValuesById</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isDefinedExternally()"><code class="language-plaintext highlighter-rouge">PropertyDescriptor#isDefinedExternally</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/PropertyTypeId.html#getFactory()"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/ValueParserConstants.html#"><code class="language-plaintext highlighter-rouge">ValueParserConstants</code></a> and the interface <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/ValueParser.html#"><code class="language-plaintext highlighter-rouge">ValueParser</code></a>.</p>
  </li>
  <li>
    <p>All classes from <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/metrics/impl/visitors/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.metrics.impl.visitors</code></a> are now considered internal API. They’re deprecated
and will be moved into an internal package with 7.0.0. To implement your own metrics visitors,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorAdapter.html#"><code class="language-plaintext highlighter-rouge">JavaParserVisitorAdapter</code></a> should be directly subclassed.</p>
  </li>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowHandler()"><code class="language-plaintext highlighter-rouge">LanguageVersionHandler#getDataFlowHandler()</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDFAGraphRule()"><code class="language-plaintext highlighter-rouge">LanguageVersionHandler#getDFAGraphRule()</code></a></p>
  </li>
  <li>
    <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/VisitorStarter.html#"><code class="language-plaintext highlighter-rouge">VisitorStarter</code></a></p>
  </li>
</ul>

<h5 id="for-removal-10">For removal</h5>

<ul>
  <li>
    <p>All classes from <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/properties/modules/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.modules</code></a> will be removed.</p>
  </li>
  <li>
    <p>The interface <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/Dimensionable.html#"><code class="language-plaintext highlighter-rouge">Dimensionable</code></a> has been deprecated.
It gets in the way of a grammar change for 7.0.0 and won’t be needed anymore (see <a href="https://github.com/pmd/pmd/issues/997">#997</a>).</p>
  </li>
  <li>
    <p>Several methods from <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#"><code class="language-plaintext highlighter-rouge">ASTLocalVariableDeclaration</code></a> and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code class="language-plaintext highlighter-rouge">ASTFieldDeclaration</code></a> have
also been deprecated:</p>

    <ul>
      <li>
        <p><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code class="language-plaintext highlighter-rouge">ASTFieldDeclaration</code></a> won’t be a <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code class="language-plaintext highlighter-rouge">TypeNode</code></a> come 7.0.0, so
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getType()"><code class="language-plaintext highlighter-rouge">getType</code></a> and
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getTypeDefinition()"><code class="language-plaintext highlighter-rouge">getTypeDefinition</code></a> are deprecated.</p>
      </li>
      <li>
        <p>The method <code class="language-plaintext 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="language-plaintext highlighter-rouge">Iterator&lt;</code><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#"><code class="language-plaintext highlighter-rouge">ASTVariableDeclaratorId</code></a><code class="language-plaintext 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 didn’t prove cost-effective.</p>

    <ul>
      <li>In <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast</code></a>: <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/JavaParserDecoratedVisitor.html#"><code class="language-plaintext highlighter-rouge">JavaParserDecoratedVisitor</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitor.html#"><code class="language-plaintext highlighter-rouge">JavaParserControllessVisitor</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitorAdapter.html#"><code class="language-plaintext highlighter-rouge">JavaParserControllessVisitorAdapter</code></a>, and <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.10.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorDecorator.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-cpp/6.10.0/net/sourceforge/pmd/lang/cpp/CppHandler.html#"><code class="language-plaintext highlighter-rouge">CppHandler</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-cpp/6.10.0/net/sourceforge/pmd/lang/cpp/CppLanguageModule.html#"><code class="language-plaintext highlighter-rouge">CppLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-cpp/6.10.0/net/sourceforge/pmd/lang/cpp/CppParser.html#"><code class="language-plaintext highlighter-rouge">CppParser</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-cs/6.10.0/net/sourceforge/pmd/lang/cs/CsLanguageModule.html#"><code class="language-plaintext highlighter-rouge">CsLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-fortran/6.10.0/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.html#"><code class="language-plaintext highlighter-rouge">FortranLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-groovy/6.10.0/net/sourceforge/pmd/lang/groovy/GroovyLanguageModule.html#"><code class="language-plaintext highlighter-rouge">GroovyLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-matlab/6.10.0/net/sourceforge/pmd/lang/matlab/MatlabHandler.html#"><code class="language-plaintext highlighter-rouge">MatlabHandler</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-matlab/6.10.0/net/sourceforge/pmd/lang/matlab/MatlabLanguageModule.html#"><code class="language-plaintext highlighter-rouge">MatlabLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-matlab/6.10.0/net/sourceforge/pmd/lang/matlab/MatlabParser.html#"><code class="language-plaintext highlighter-rouge">MatlabParser</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-objectivec/6.10.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.html#"><code class="language-plaintext highlighter-rouge">ObjectiveCHandler</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-objectivec/6.10.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.html#"><code class="language-plaintext highlighter-rouge">ObjectiveCLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-objectivec/6.10.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.html#"><code class="language-plaintext highlighter-rouge">ObjectiveCParser</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-php/6.10.0/net/sourceforge/pmd/lang/php/PhpLanguageModule.html#"><code class="language-plaintext highlighter-rouge">PhpLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-python/6.10.0/net/sourceforge/pmd/lang/python/PythonHandler.html#"><code class="language-plaintext highlighter-rouge">PythonHandler</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-python/6.10.0/net/sourceforge/pmd/lang/python/PythonLanguageModule.html#"><code class="language-plaintext highlighter-rouge">PythonLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-python/6.10.0/net/sourceforge/pmd/lang/python/PythonParser.html#"><code class="language-plaintext highlighter-rouge">PythonParser</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-ruby/6.10.0/net/sourceforge/pmd/lang/ruby/RubyLanguageModule.html#"><code class="language-plaintext highlighter-rouge">RubyLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-scala/6.10.0/net/sourceforge/pmd/lang/scala/ScalaLanguageModule.html#"><code class="language-plaintext highlighter-rouge">ScalaLanguageModule</code></a></li>
      <li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-swift/6.10.0/net/sourceforge/pmd/lang/swift/SwiftLanguageModule.html#"><code class="language-plaintext highlighter-rouge">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://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/Rule.html#"><code class="language-plaintext highlighter-rouge">Rule</code></a>: <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/Rule.html#isDfa()"><code class="language-plaintext highlighter-rouge">isDfa()</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/Rule.html#isTypeResolution()"><code class="language-plaintext highlighter-rouge">isTypeResolution()</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/Rule.html#isMultifile()"><code class="language-plaintext highlighter-rouge">isMultifile()</code></a> and their
respective setters.</li>
      <li>In <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSet.html#"><code class="language-plaintext highlighter-rouge">RuleSet</code></a>: <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSet.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code class="language-plaintext highlighter-rouge">usesDFA(Language)</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSet.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code class="language-plaintext highlighter-rouge">usesTypeResolution(Language)</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSet.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code class="language-plaintext highlighter-rouge">usesMultifile(Language)</code></a></li>
      <li>In <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSets.html#"><code class="language-plaintext highlighter-rouge">RuleSets</code></a>: <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSets.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code class="language-plaintext highlighter-rouge">usesDFA(Language)</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSets.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code class="language-plaintext highlighter-rouge">usesTypeResolution(Language)</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/RuleSets.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code class="language-plaintext highlighter-rouge">usesMultifile(Language)</code></a></li>
      <li>In <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code class="language-plaintext highlighter-rouge">LanguageVersionHandler</code></a>: <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowFacade()"><code class="language-plaintext highlighter-rouge">getDataFlowFacade()</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade()"><code class="language-plaintext highlighter-rouge">getSymbolFacade()</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade(java.lang.ClassLoader)"><code class="language-plaintext highlighter-rouge">getSymbolFacade(ClassLoader)</code></a>,
<a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getTypeResolutionFacade(java.lang.ClassLoader)"><code class="language-plaintext highlighter-rouge">getTypeResolutionFacade(ClassLoader)</code></a>, <a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.10.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getQualifiedNameResolutionFacade(java.lang.ClassLoader)"><code class="language-plaintext highlighter-rouge">getQualifiedNameResolutionFacade(ClassLoader)</code></a></li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-31">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1384">#1384</a>: [java] New Rule - UseUnderscoresInNumericLiterals - <a href="https://github.com/rajeshggwp">RajeshR</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1424">#1424</a>: [doc] #1341 Updating Regex Values in default Value Property - <a href="https://github.com/vishva007">avishvat</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1428">#1428</a>: [core] Upgrading JCommander from 1.48 to 1.72 - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1430">#1430</a>: [doc] Who really knows regex? - <a href="https://github.com/dpilafian">Dem Pilafian</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1434">#1434</a>: [java] JUnitTestsShouldIncludeAssert: Recognize AssertJ soft assertions as valid assert statements - <a href="https://github.com/ledoyen">Loïc Ledoyen</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1439">#1439</a>: [java] Avoid FileInputStream and FileOutputStream - <a href="https://github.com/reudismam">reudismam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1441">#1441</a>: [kotlin] [cpd] Added CPD support for Kotlin - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1447">#1447</a>: [fortran] Use diamond operator in impl - <a href="https://github.com/reudismam">reudismam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1453">#1453</a>: [java] Adding the fix for #1440. Showing correct message for CommentDefaultAccessmodifier. - <a href="https://github.com/stationeros">Rohit Kumar</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1457">#1457</a>: [java] Adding test for Issue #647 - <a href="https://github.com/orimarko">orimarko</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1464">#1464</a>: [doc] Fix XSS on documentation web page - <a href="https://github.com/marob">Maxime Robert</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1469">#1469</a>: [core] Configurable max loops in DAAPathFinder - <a href="https://github.com/albfernandez">Alberto Fernández</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1494">#1494</a>: [java] 1151: Rephrase ImmutableField documentation in design.xml - <a href="https://github.com/rmartinus">Robbie Martinus</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1504">#1504</a>: [java] NPE in InvalidSlf4jMessageFormatRule if a logger call with a variable as parameter is not inside a method or constructor - <a href="https://github.com/kris-scheibe">kris-scheibe</a></li>
</ul>

<h2 id="28-october-2018---690">28-October-2018 - 6.9.0</h2>

<p>The PMD team is pleased to announce PMD 6.9.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-32">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#improved-golang-cpd-support">Improved Golang CPD Support</a></li>
      <li><a href="#new-rules">New Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-30">New and noteworthy</h3>

<h4 id="improved-golang-cpd-support">Improved Golang CPD Support</h4>

<p>Thanks to the work of <a href="https://www.itba.edu.ar/">ITBA</a> students <a href="https://github.com/matifraga">Matías Fraga</a>,
<a href="https://github.com/tomidelucca">Tomi De Lucca</a> and <a href="https://github.com/lsoncini">Lucas Soncini</a>,
Golang is now backed by a proper Antlr Grammar. This means CPD is now better at detecting duplicates,
as comments are recognized as such and ignored.</p>

<h4 id="new-rules-20">New Rules</h4>

<ul>
  <li>The new PLSQL rule <a href="https://pmd.github.io/pmd-6.9.0/pmd_rules_plsql_codestyle.html#codeformat"><code class="language-plaintext highlighter-rouge">CodeFormat</code></a> (<code class="language-plaintext highlighter-rouge">plsql-codestyle</code>) verifies that
PLSQL code is properly formatted. It checks e.g. for correct indentation in select statements and verifies
that each parameter is defined on a separate line.</li>
</ul>

<h3 id="fixed-issues-32">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/649">#649</a>: [core] Exclude specific files from command line</li>
      <li><a href="https://github.com/pmd/pmd/issues/1272">#1272</a>: [core] Could not find or load main class when using symlinked run.sh</li>
      <li><a href="https://github.com/pmd/pmd/issues/1377">#1377</a>: [core] LanguageRegistry uses default class loader when invoking ServiceLocator</li>
      <li><a href="https://github.com/pmd/pmd/issues/1394">#1394</a>: [doc] How to configure “-cache <path>"</path></li>
      <li><a href="https://github.com/pmd/pmd/issues/1412">#1412</a>: [doc] Broken link to adding new cpd language documentation</li>
    </ul>
  </li>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1396">#1396</a>: [apex] ClassCastException caused by Javadoc</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1330">#1330</a>: [java] PMD crashes with java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/xml/ws/Service</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1202">#1202</a>: [java] GuardLogStatement: “There is log block not surrounded by if” doesn’t sound right</li>
      <li><a href="https://github.com/pmd/pmd/issues/1209">#1209</a>: [java] UnusedImports false positive for static import with package-private method usage</li>
      <li><a href="https://github.com/pmd/pmd/issues/1343">#1343</a>: [java] Update CommentDefaultAccessModifierRule to extend AbstractIgnoredAnnotationRule</li>
      <li><a href="https://github.com/pmd/pmd/issues/1365">#1365</a>: [java] JUnitTestsShouldIncludeAssert false positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/1404">#1404</a>: [java] UnusedImports false positive with static ondemand import with method call</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1199">#1199</a>: [java] UnnecessaryFullyQualifiedName doesn’t flag same package FQCNs</li>
      <li><a href="https://github.com/pmd/pmd/issues/1356">#1356</a>: [java] UnnecessaryModifier wrong message public-&gt;static</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1369">#1369</a>: [java] Processing error (ClassCastException) if a TYPE_USE annotation is used on a base class in the “extends” clause</li>
    </ul>
  </li>
  <li>jsp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1402">#1402</a>: [jsp] JspTokenManager has a problem about jsp scriptlet</li>
    </ul>
  </li>
  <li>documentation
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/1349">#1349</a>: [doc] Provide some explanation for WHY duplicate code is bad, like mutations</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-27">API Changes</h3>

<ul>
  <li>PMD has a new CLI option <code class="language-plaintext highlighter-rouge">-ignorelist</code>. With that, you can provide a file containing a comma-delimit list of files,
that should be excluded during analysis. The ignorelist is applied after the files have been selected
via <code class="language-plaintext highlighter-rouge">-dir</code> or <code class="language-plaintext highlighter-rouge">-filelist</code>, which means, if the file is in both lists, then it will be ignored.
Note: there is no corresponding option for the Ant task, since the feature is already available via
Ant’s FileSet include/exclude filters.</li>
</ul>

<h3 id="external-contributions-32">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1338">#1338</a>: [core] [cpd] Generalize ANTLR tokens preparing support for ANTLR token filter - <a href="https://github.com/matifraga">Matías Fraga</a> and <a href="https://github.com/tomidelucca">Tomi De Lucca</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1361">#1361</a>: [doc] Update cpd.md with information about risks - <a href="https://github.com/davidmichaelkarr">David M. Karr</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1366">#1366</a>: [java] Static Modifier on Internal Interface pmd #1356 - <a href="https://github.com/vishva007">avishvat</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1368">#1368</a>: [doc] Updated outdated note in the building documentation. - <a href="https://github.com/maikelsteneker">Maikel Steneker</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1374">#1374</a>: [java] Simplify check for ‘Test’ annotation in JUnitTestsShouldIncludeAssertRule. - <a href="https://github.com/winder">Will Winder</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1375">#1375</a>: [java] Add missing null check AbstractJavaAnnotatableNode - <a href="https://github.com/winder">Will Winder</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1376">#1376</a>: [all] Upgrading Apache Commons IO from 2.4 to 2.6 - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1378">#1378</a>: [all] Upgrading Apache Commons Lang 3 from 3.7 to 3.8.1 - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1382">#1382</a>: [all] Replacing deprecated IO methods with ones that specify a charset - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1383">#1383</a>: [java] Improved message for GuardLogStatement rule - <a href="https://github.com/fblampe">Felix Lampe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1386">#1386</a>: [go] [cpd] Add CPD support for Antlr based grammar on Golang - <a href="https://github.com/matifraga">Matías Fraga</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1398">#1398</a>: [all] Upgrading SLF4J from 1.7.12 to 1.7.25 - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1400">#1400</a>: [java] Fix Issue 1343: Update CommentDefaultAccessModifierRule - <a href="https://github.com/CrazyUnderdog">CrazyUnderdog</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1401">#1401</a>: [all] Replacing IOUtils.closeQuietly(foo) with try-with-resources statements - <a href="https://github.com/Thunderforge">Thunderforge</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1406">#1406</a>: [jsp] Fix issue 1402: JspTokenManager has a problem about jsp scriptlet - <a href="https://github.com/JustPRV">JustPRV</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1411">#1411</a>: [core] Add ignore file path functionality - <a href="https://github.com/darakian">Jon Moroney</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1414">#1414</a>: [doc] Fix broken link. Fixes #1412 - <a href="https://github.com/johanhammar">Johan Hammar</a></li>
</ul>

<h2 id="30-september-2018---680">30-September-2018 - 6.8.0</h2>

<p>The PMD team is pleased to announce PMD 6.8.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-33">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#drawing-a-line-between-private-and-public-api">Drawing a line between private and public API</a>
      * <a href="#`.internal`-packages-and-`@internalapi`-annotation"><code class="language-plaintext highlighter-rouge">.internal</code> packages and <code class="language-plaintext highlighter-rouge">@InternalApi</code> annotation</a>
      * <a href="#`@reservedsubclassing`"><code class="language-plaintext highlighter-rouge">@ReservedSubclassing</code></a>
      * <a href="#`@experimental`"><code class="language-plaintext highlighter-rouge">@Experimental</code></a>
      * <a href="#`@deprecated`"><code class="language-plaintext highlighter-rouge">@Deprecated</code></a>
      * <a href="#the-transition">The transition</a></li>
      <li><a href="#quickstart-ruleset">Quickstart Ruleset</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#plsql">PLSQL</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-31">New and noteworthy</h3>

<h4 id="drawing-a-line-between-private-and-public-api">Drawing a line between private and public API</h4>

<p>Until now, all released public members and types were implicitly considered part
of PMD’s 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>

<h6 id="internal-packages-and-internalapi-annotation"><code class="language-plaintext highlighter-rouge">.internal</code> packages and <code class="language-plaintext highlighter-rouge">@InternalApi</code> annotation</h6>

<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="language-plaintext highlighter-rouge">.internal</code> segment is considered internal.
The <code class="language-plaintext 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 shouldn’t be used outside of PMD (again,
these can be removed anytime).</p>

<h6 id="reservedsubclassing"><code class="language-plaintext highlighter-rouge">@ReservedSubclassing</code></h6>

<p>Types marked with the <code class="language-plaintext 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 doesn’t prevent its implementors to be subclassed.</p>

<h6 id="experimental"><code class="language-plaintext highlighter-rouge">@Experimental</code></h6>

<p>APIs marked with the <code class="language-plaintext 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>

<h6 id="deprecated"><code class="language-plaintext highlighter-rouge">@Deprecated</code></h6>

<p>APIs marked with the <code class="language-plaintext 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>

<h6 id="the-transition">The transition</h6>

<p><em>All currently supported APIs will remain so until 7.0.0</em>. All APIs that are to be moved to
<code class="language-plaintext highlighter-rouge">.internal</code> packages or hidden will be tagged <code class="language-plaintext highlighter-rouge">@InternalApi</code> before that major release, and
the breaking API changes will be performed in 7.0.0.</p>

<h4 id="quickstart-ruleset">Quickstart Ruleset</h4>

<p>PMD 6.8.0 provides a first quickstart ruleset for Java, which you can use as a base ruleset to get your
custom ruleset started. You can reference it with <code class="language-plaintext highlighter-rouge">rulesets/java/quickstart.xml</code>.
You are strongly encouraged to <a href="https://pmd.github.io/pmd-6.7.0/pmd_userdocs_making_rulesets.html">create your own ruleset</a>
though.</p>

<p>The quickstart ruleset has the intention, to be useful out-of-the-box for many projects. Therefore it
references only rules, that are most likely to apply everywhere.</p>

<p>Any feedback would be greatly appreciated.</p>

<h4 id="new-rules-21">New Rules</h4>

<ul>
  <li>The new Apex rule <a href="https://pmd.github.io/pmd-6.8.0/pmd_rules_apex_documentation.html#apexdoc"><code class="language-plaintext highlighter-rouge">ApexDoc</code></a> (<code class="language-plaintext highlighter-rouge">apex-documentation</code>)
enforces the inclusion of ApexDoc on classes, interfaces, properties and methods; as well as some
sanity rules for such docs (no missing parameters, parameters’ order, and return value). By default,
method overrides and test classes are allowed to not include ApexDoc.</li>
</ul>

<h4 id="modified-rules-17">Modified Rules</h4>

<ul>
  <li>The rule <a href="https://pmd.github.io/pmd-6.8.0/pmd_rules_java_errorprone.html#missingserialversionuid"><code class="language-plaintext highlighter-rouge">MissingSerialVersionUID</code></a> (<code class="language-plaintext highlighter-rouge">java-errorprone</code>) has been modified
in order to recognize also missing <code class="language-plaintext highlighter-rouge">serialVersionUID</code> fields in abstract classes, if they are serializable.
Each individual class in the inheritance chain needs an own serialVersionUID field. See also <a href="https://stackoverflow.com/questions/893259/should-an-abstract-class-have-a-serialversionuid">Should an abstract class have a serialVersionUID</a>.
This change might lead to additional violations in existing code bases.</li>
</ul>

<h4 id="plsql">PLSQL</h4>

<p>The grammar for PLSQL has been revamped in order to fully parse <code class="language-plaintext highlighter-rouge">SELECT INTO</code>, <code class="language-plaintext highlighter-rouge">UPDATE</code>, and <code class="language-plaintext highlighter-rouge">DELETE</code>
statements. Previously such statements have been simply skipped ahead, now PMD is parsing them, giving access
to the individual parts of a SELECT-statement, such as the Where-Clause. This might produce new parsing errors
where PMD previously could successfully parse PLSQL code. If this happens, please report a new <a href="https://github.com/pmd/pmd/issues/new">issue</a> to get this problem fixed.</p>

<h3 id="fixed-issues-33">Fixed Issues</h3>

<ul>
  <li>apex-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1348">#1348</a>: [apex] AvoidGlobalModifierRule gives warning even when its a webservice - false positive</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1329">#1329</a>: [java] FieldNamingConventions: false positive in serializable class with serialVersionUID</li>
      <li><a href="https://github.com/pmd/pmd/issues/1334">#1334</a>: [java] LinguisticNaming should support AtomicBooleans</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1350">#1350</a>: [java] MissingSerialVersionUID false-positive on interfaces</li>
      <li><a href="https://github.com/pmd/pmd/issues/1352">#1352</a>: [java] MissingSerialVersionUID false-negative with abstract classes</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1325">#1325</a>: [java] False positive in ConsecutiveLiteralAppends</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/1279">#1279</a>: [plsql] Support for SELECT INTO</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-28">API Changes</h3>

<ul>
  <li>
    <p>A couple of methods and fields in <code class="language-plaintext 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="language-plaintext highlighter-rouge">propertyDescriptors</code>, <code class="language-plaintext highlighter-rouge">propertyValuesByDescriptor</code>,
<code class="language-plaintext highlighter-rouge">copyPropertyDescriptors()</code>, <code class="language-plaintext highlighter-rouge">copyPropertyValues()</code>, <code class="language-plaintext highlighter-rouge">ignoredProperties()</code>, <code class="language-plaintext highlighter-rouge">usesDefaultValues()</code>,
<code class="language-plaintext highlighter-rouge">useDefaultValueFor()</code>.</p>
  </li>
  <li>
    <p>Some methods in <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertySource</code> have been deprecated as well:
<code class="language-plaintext highlighter-rouge">usesDefaultValues()</code>, <code class="language-plaintext highlighter-rouge">useDefaultValueFor()</code>, <code class="language-plaintext highlighter-rouge">ignoredProperties()</code>.</p>
  </li>
  <li>
    <p>The class <code class="language-plaintext 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="language-plaintext 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="language-plaintext highlighter-rouge">setRuleReference()</code>,
<code class="language-plaintext highlighter-rouge">hasOverriddenProperty()</code>, <code class="language-plaintext highlighter-rouge">usesDefaultValues()</code>, <code class="language-plaintext highlighter-rouge">useDefaultValueFor()</code>.</p>
  </li>
</ul>

<h3 id="external-contributions-33">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1309">#1309</a>: [core] [CPD] Decouple Antlr Tokenizer implementation from any CPD language supported with Antlr - <a href="https://github.com/matifraga">Matías Fraga</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1314">#1314</a>: [apex] Add validation of ApexDoc comments - <a href="https://github.com/jeffhube">Jeff Hube</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1339">#1339</a>: [ci] Improve danger message - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1340">#1340</a>: [java] Derive correct classname for non-public non-classes - <a href="https://github.com/kris-scheibe">kris-scheibe</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1357">#1357</a>: [doc] Improve Codacy description - <a href="https://github.com/DReigada">Daniel Reigada</a></li>
</ul>

<h2 id="02-september-2018---670">02-September-2018 - 6.7.0</h2>

<p>The PMD team is pleased to announce PMD 6.7.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-34">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-32">New and noteworthy</h3>

<h4 id="modified-rules-18">Modified Rules</h4>

<ul>
  <li>The Java rule <a href="pmd_rules_java_bestpractices.html#onedeclarationperline"><code class="language-plaintext highlighter-rouge">OneDeclarationPerLine</code></a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) has been revamped to
consider not only local variable declarations, but field declarations too.</li>
</ul>

<h4 id="new-rules-22">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#linguisticnaming"><code class="language-plaintext highlighter-rouge">LinguisticNaming</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
detects cases, when a method name indicates it returns a boolean (such as <code class="language-plaintext highlighter-rouge">isSmall()</code>) but it doesn’t.
Besides method names, the rule also checks field and variable names. It also checks, that getters return
something but setters won’t. The rule has several properties with which it can be customized.</p>
  </li>
  <li>
    <p>The new PL/SQL rule <a href="pmd_rules_plsql_codestyle.html#forloopnaming"><code class="language-plaintext highlighter-rouge">ForLoopNaming</code></a> (<code class="language-plaintext highlighter-rouge">plsql-codestyle</code>)
enforces a naming convention for “for loops”. Both “cursor for loops” and “index for loops” are covered.
The rule can be customized via patterns. By default, short variable names are reported.</p>
  </li>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
detects field names that don’t comply to a given convention. It defaults to standard Java convention of using camelCase,
but can be configured with ease for e.g. constants or static fields.</p>
  </li>
  <li>
    <p>The new Apex rule <a href="pmd_rules_apex_codestyle.html#onedeclarationperline"><code class="language-plaintext highlighter-rouge">OneDeclarationPerLine</code></a> (<code class="language-plaintext highlighter-rouge">apex-codestyle</code>) enforces declaring a
single field / variable per line; or per statement if the <code class="language-plaintext highlighter-rouge">strictMode</code> property is set.
It’s an Apex equivalent of the already existing Java rule of the same name.</p>
  </li>
</ul>

<h4 id="deprecated-rules-10">Deprecated Rules</h4>

<ul>
  <li>The Java rules <a href="pmd_rules_java_codestyle.html#variablenamingconventions"><code class="language-plaintext highlighter-rouge">VariableNamingConventions</code></a>, <a href="pmd_rules_java_codestyle.html#misleadingvariablename"><code class="language-plaintext highlighter-rouge">MIsLeadingVariableName</code></a>,
<a href="pmd_rules_java_codestyle.html#suspiciousconstantfieldname"><code class="language-plaintext highlighter-rouge">SuspiciousConstantFieldName</code></a>, and <a href="pmd_rules_java_codestyle.html#avoidprefixingmethodparameters"><code class="language-plaintext 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="language-plaintext highlighter-rouge">FieldNamingConventions</code></a>, <a href="pmd_rules_java_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a>, and
<a href="pmd_rules_java_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a>.</li>
</ul>

<h3 id="fixed-issues-34">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1191">#1191</a>: [core] Test Framework: Sort violations by line/column</li>
      <li><a href="https://github.com/pmd/pmd/issues/1283">#1283</a>: [core] Deprecate ReportTree</li>
      <li><a href="https://github.com/pmd/pmd/issues/1288">#1288</a>: [core] No supported build listeners found with Gradle</li>
      <li><a href="https://github.com/pmd/pmd/issues/1300">#1300</a>: [core] PMD stops processing file completely, if one rule in a rule chain fails</li>
      <li><a href="https://github.com/pmd/pmd/issues/1317">#1317</a>: [ci] Coveralls hasn’t built the project since June 25th</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/940">#940</a>: [java] JUnit 4 false positives for JUnit 5 tests</li>
      <li><a href="https://github.com/pmd/pmd/pull/1267">#1267</a>: [java] MissingOverrideRule: Avoid NoClassDefFoundError with incomplete classpath</li>
      <li><a href="https://github.com/pmd/pmd/issues/1323">#1323</a>: [java] AvoidUsingHardCodedIP ignores match pattern</li>
      <li><a href="https://github.com/pmd/pmd/pull/1327">#1327</a>: [java] AvoidUsingHardCodedIP false positive for “:bee”</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1255">#1255</a>: [java] UnnecessaryFullyQualifiedName false positive: static method on shadowed implicitly imported class</li>
      <li><a href="https://github.com/pmd/pmd/issues/1285">#1258</a>: [java] False positive “UselessParentheses” for parentheses that contain assignment</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1078">#1078</a>: [java] MissingSerialVersionUID rule does not seem to catch inherited classes</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1291">#1291</a>: [java] InvalidSlf4jMessageFormat false positive: too many arguments with string concatenation operator</li>
      <li><a href="https://github.com/pmd/pmd/issues/1298">#1298</a>: [java] RedundantFieldInitializer - NumberFormatException with Long</li>
    </ul>
  </li>
  <li>jsp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1274">#1274</a>: [jsp] Support EL in tag attributes</li>
      <li><a href="https://github.com/pmd/pmd/issues/1276">#1276</a>: [jsp] add support for jspf and tag extensions</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/681">#681</a>: [plsql] Parse error with Cursor For Loop</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-29">API Changes</h3>

<ul>
  <li>
    <p>All classes in the package <code class="language-plaintext 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="language-plaintext 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="language-plaintext 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 they’re not needed and
make ShiftExpression inconsistent. The operator of a ShiftExpression is now accessible through
ShiftExpression#getOperator.</p>
  </li>
</ul>

<h3 id="external-contributions-34">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/109">#109</a>: [java] Add two linguistics rules under naming - <a href="https://github.com/ardaasln">Arda Aslan</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1254">#1254</a>: [ci] [GSoC] Integrating the danger and pmdtester to travis CI - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1258">#1258</a>: [java] Use typeof in MissingSerialVersionUID - <a href="https://github.com/krichter722">krichter722</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1264">#1264</a>: [cpp] Fix NullPointerException in CPPTokenizer:99 - <a href="https://github.com/mrfyda">Rafael Cortês</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1277">#1277</a>: [jsp] #1276 add support for jspf and tag extensions - <a href="https://github.com/jordillachmrf">Jordi Llach</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1275">#1275</a>: [jsp] Issue #1274 - Support EL in tag attributes - <a href="https://github.com/jordillachmrf">Jordi Llach</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1278">#1278</a>: [ci] [GSoC] Use pmdtester 1.0.0.pre.beta3 - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1289">#1289</a>: [java] UselessParentheses: Fix false positive with assignments - <a href="https://github.com/cobratbq">cobratbq</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1290">#1290</a>: [docs] [GSoC] Create the documentation about pmdtester - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1256">#1256</a>: [java] #940 Avoid JUnit 4 false positives for JUnit 5 tests - <a href="https://github.com/vovkss">Alex Shesterov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1315">#1315</a>: [apex] Add OneDeclarationPerStatement rule - <a href="https://github.com/jeffhube">Jeff Hube</a></li>
</ul>

<h2 id="29-july-2018---660">29-July-2018 - 6.6.0</h2>

<p>The PMD team is pleased to announce PMD 6.6.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-35">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-11-support">Java 11 Support</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-33">New and noteworthy</h3>

<h4 id="java-11-support">Java 11 Support</h4>

<p>PMD is now able to parse the local-variable declaration syntax <code class="language-plaintext highlighter-rouge">var xxx</code>, that has been
extended for lambda parameters with Java 11 via
<a href="http://openjdk.java.net/jeps/323">JEP 323: Local-Variable Syntax for Lambda Parameters</a>.</p>

<h4 id="new-rules-23">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a>
(<code class="language-plaintext highlighter-rouge">java-codestyle</code>) detects local variable names that don’t comply to a given convention. It defaults to standard
Java convention of using camelCase, but can be configured. Special cases can be configured for final variables
and caught exceptions’ names.</p>
  </li>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a>
(<code class="language-plaintext highlighter-rouge">java-codestyle</code>) detects formal parameter names that don’t comply to a given convention. It defaults to
standard Java convention of using camelCase, but can be configured. Special cases can be configured for final
parameters and lambda parameters (considering whether they are explicitly typed or not).</p>
  </li>
</ul>

<h4 id="modified-rules-19">Modified Rules</h4>

<ul>
  <li>The Java rules <a href="pmd_rules_java_bestpractices.html#accessorclassgeneration"><code class="language-plaintext highlighter-rouge">AccessorClassGeneration</code></a> and
<a href="pmd_rules_java_bestpractices.html#accessormethodgeneration"><code class="language-plaintext highlighter-rouge">AccessorMethodGeneration</code></a> (both in category
<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) have been modified to be only valid up until Java 10. Java 11 adds support for
<a href="http://openjdk.java.net/jeps/181">JEP 181: Nest-Based Access Control</a> which avoids the generation of
accessor classes / methods altogether.</li>
</ul>

<h3 id="fixed-issues-35">Fixed Issues</h3>

<ul>
  <li>core
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1178">#1178</a>: [core] “Unsupported build listener” in gradle build</li>
      <li><a href="https://github.com/pmd/pmd/issues/1225">#1225</a>: [core] Error in sed expression on line 82 of run.sh while detecting installed version of Java</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1215">#1215</a>: [doc] TOC links don’t work?</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1211">#1211</a>: [java] CommentDefaultAccessModifier false positive with nested interfaces (regression from 6.4.0)</li>
      <li><a href="https://github.com/pmd/pmd/issues/1216">#1216</a>: [java] UnnecessaryFullyQualifiedName false positive for the same name method</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1217">#1217</a>: [java] CyclomaticComplexityRule counts ?-operator twice</li>
      <li><a href="https://github.com/pmd/pmd/issues/1226">#1226</a>: [java] NPath complexity false negative due to overflow</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/980">#980</a>: [plsql] ParseException for CREATE TABLE</li>
      <li><a href="https://github.com/pmd/pmd/issues/981">#981</a>: [plsql] ParseException when parsing VIEW</li>
      <li><a href="https://github.com/pmd/pmd/issues/1047">#1047</a>: [plsql] ParseException when parsing EXECUTE IMMEDIATE</li>
    </ul>
  </li>
  <li>ui
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1233">#1233</a>: [ui] XPath autocomplete arrows on first and last items</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-30">API Changes</h3>

<ul>
  <li>The <code class="language-plaintext highlighter-rouge">findDescendantsOfType</code> methods in <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ast.AbstractNode</code> no longer search for
exact type matches, but will match subclasses, too. That means, it’s now possible to look for abstract node
types such as <code class="language-plaintext highlighter-rouge">AbstractJavaTypeNode</code> and not only for it’s concrete subtypes.</li>
</ul>

<h3 id="external-contributions-35">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/1182">#1182</a>: [ui] XPath AutoComplete - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1231">#1231</a>: [doc] Minor typo fix in installation.md - <a href="https://github.com/ashishrana160796">Ashish Rana</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1250">#1250</a>: [ci] [GSoC] Upload baseline of pmdtester automatically - <a href="https://github.com/djydewang">BBG</a></li>
</ul>

<h2 id="26-june-2018---650">26-June-2018 - 6.5.0</h2>

<p>The PMD team is pleased to announce PMD 6.5.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-36">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-34">New and noteworthy</h3>

<h4 id="new-rules-24">New Rules</h4>

<ul>
  <li>The new Apex rule <a href="pmd_rules_apex_errorprone.html#avoidnonexistentannotations"><code class="language-plaintext highlighter-rouge">AvoidNonExistentAnnotations</code></a> (<code class="language-plaintext highlighter-rouge">apex-errorprone</code>)
detects usages non-officially supported annotations. Apex supported non existent annotations for legacy reasons.
In the future, use of such non-existent annotations could result in broken Apex code that will not compile.
A full list of supported annotations can be found <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation.htm">here</a></li>
</ul>

<h4 id="modified-rules-20">Modified Rules</h4>

<ul>
  <li>The Java rule <a href="pmd_rules_java_codestyle.html#unnecessarymodifier">UnnecessaryModifier</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
now detects enum constrcutors with explicit <code class="language-plaintext highlighter-rouge">private</code> modifier. The rule now produces better error messages
letting you know exactly which modifiers are redundant at each declaration.</li>
</ul>

<h3 id="fixed-issues-36">Fixed Issues</h3>
<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1119">#1119</a>: [doc] Make the landing page of the documentation website more useful</li>
      <li><a href="https://github.com/pmd/pmd/issues/1168">#1168</a>: [core] xml renderer schema definitions (#538) break included xslt files</li>
      <li><a href="https://github.com/pmd/pmd/issues/1173">#1173</a>: [core] Some characters in CPD are not shown correctly.</li>
      <li><a href="https://github.com/pmd/pmd/issues/1193">#1193</a>: [core] Designer doesn’t start with run.sh</li>
    </ul>
  </li>
  <li>ecmascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/861">#861</a>: [ecmascript] InnaccurateNumericLiteral false positive with hex literals</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1074">#1074</a>: [java] MissingOverrideRule exception when analyzing PMD under Java 9</li>
      <li><a href="https://github.com/pmd/pmd/issues/1174">#1174</a>: [java] CommentUtil.multiLinesIn() could lead to StringIndexOutOfBoundsException</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/651">#651</a>: [java] SwitchStmtsShouldHaveDefault should be aware of enum types</li>
      <li><a href="https://github.com/pmd/pmd/issues/869">#869</a>: [java] GuardLogStatement false positive on return statements and Math.log</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/667">#667</a>: [java] Make AtLeastOneConstructor Lombok-aware</li>
      <li><a href="https://github.com/pmd/pmd/pull/1154">#1154</a>: [java] CommentDefaultAccessModifierRule FP with nested enums</li>
      <li><a href="https://github.com/pmd/pmd/issues/1158">#1158</a>: [java] Fix IdenticalCatchBranches false positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/1186">#1186</a>: [java] UnnecessaryFullyQualifiedName doesn’t detect java.lang FQ names as violations</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1200">#1200</a>: [java] New default NcssCount method report level is drastically reduced from values of deprecated NcssMethodCount and NcssTypeCount</li>
    </ul>
  </li>
  <li>xml
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/715">#715</a>: [xml] ProjectVersionAsDependencyVersion false positive</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-31">API Changes</h3>

<ul>
  <li>
    <p>The utility class <code class="language-plaintext 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="language-plaintext highlighter-rouge">FormalComment</code>, which contains as children <code class="language-plaintext highlighter-rouge">JavadocElement</code> nodes, which in
turn provide access to the <code class="language-plaintext highlighter-rouge">JavadocTag</code>.</p>

    <p>All comment AST nodes (<code class="language-plaintext highlighter-rouge">FormalComment</code>, <code class="language-plaintext highlighter-rouge">MultiLineComment</code>, <code class="language-plaintext highlighter-rouge">SingleLineComment</code>) have a new method
<code class="language-plaintext highlighter-rouge">getFilteredComment()</code> which provide access to the comment text without the leading <code class="language-plaintext highlighter-rouge">/*</code> markers.</p>
  </li>
  <li>
    <p>The method <code class="language-plaintext highlighter-rouge">AbstractCommentRule.tagsIndicesIn()</code> has been deprecated and will be removed with
PMD 7.0.0. It is not very useful, since it doesn’t extract the information
in a useful way. You would still need check, which tags have been found, and with which
data they might be accompanied.</p>
  </li>
</ul>

<h3 id="external-contributions-36">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/836">#836</a>: [apex] Add a rule to prevent use of non-existent annotations - <a href="https://github.com/anand13s">anand13s</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1159">#1159</a>: [ui] Allow to setup the auxclasspath in the designer - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1169">#1169</a>: [core] Update stylesheets with a default namespace - <a href="https://github.com/mduggan">Matthew Duggan</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1183">#1183</a>: [java] fixed typos in rule remediation - <a href="https://github.com/jakehemmerle">Jake Hemmerle</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1206">#1206</a>: [java] Recommend StringBuilder next to StringBuffer - <a href="https://github.com/krichter722">krichter722</a></li>
</ul>

<h2 id="29-may-2018---640">29-May-2018 - 6.4.0</h2>

<p>The PMD team is pleased to announce PMD 6.4.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-37">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#java-10-support">Java 10 Support</a></li>
      <li><a href="#xpath-type-resolution-functions">XPath Type Resolution Functions</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-35">New and noteworthy</h3>

<h4 id="java-10-support">Java 10 Support</h4>

<p>PMD is now able to understand local-variable type inference as introduced by Java 10.
Simple type resolution features are available, e.g. the type of the variable <code class="language-plaintext highlighter-rouge">s</code> is inferred
correctly as <code class="language-plaintext highlighter-rouge">String</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>var s = "Java 10";
</code></pre></div></div>

<h4 id="xpath-type-resolution-functions">XPath Type Resolution Functions</h4>

<p>For some time now PMD has supported Type Resolution, and exposed this functionality to XPath rules for the Java language
with the <code class="language-plaintext highlighter-rouge">typeof</code> function. This function however had a number of shortcomings:</p>

<ul>
  <li>It would take a first arg with the name to match if types couldn’t be resolved. In all cases this was <code class="language-plaintext highlighter-rouge">@Image</code>
but was still required.</li>
  <li>It required 2 separate arguments for the Fully Qualified Class Name and the simple name of the class against
which to test.</li>
  <li>If only the Fully Qualified Class Name was provided, no simple name check was performed (not documented,
but abused on some rules to “fix” some false positives).</li>
</ul>

<p>In this release we are deprecating <code class="language-plaintext highlighter-rouge">typeof</code> in favor of a simpler <code class="language-plaintext highlighter-rouge">typeIs</code> function, which behaves exactly as the
old <code class="language-plaintext highlighter-rouge">typeof</code> when given all 3 arguments.</p>

<p><code class="language-plaintext highlighter-rouge">typeIs</code> receives a single parameter, which is the fully qualified name of the class to test against.</p>

<p>So, calls such as:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="sr">//</span><span class="no">ClassOrInterfaceType</span><span class="p">[</span><span class="n">typeof</span><span class="p">(</span><span class="vi">@Image</span><span class="p">,</span> <span class="s1">'junit.framework.TestCase'</span><span class="p">,</span> <span class="s1">'TestCase'</span><span class="p">)]</span>
</code></pre></div></div>

<p>can now we expressed much more concisely as:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="sr">//</span><span class="no">ClassOrInterfaceType</span><span class="p">[</span><span class="n">typeIs</span><span class="p">(</span><span class="s1">'junit.framework.TestCase'</span><span class="p">)]</span>
</code></pre></div></div>

<p>With this change, we also allow to check against array types by just appending <code class="language-plaintext highlighter-rouge">[]</code> to the fully qualified class name.
These can be repeated for arrays of arrays (e.g. <code class="language-plaintext highlighter-rouge">byte[][]</code> or <code class="language-plaintext highlighter-rouge">java.lang.String[]</code>).</p>

<p>Additionally, we introduce the companion function <code class="language-plaintext highlighter-rouge">typeIsExactly</code>, that receives the same parameters as <code class="language-plaintext highlighter-rouge">typeIs</code>,
but checks for exact type matches, without considering the type hierarchy. That is, the test
<code class="language-plaintext highlighter-rouge">typeIsExactly('junit.framework.TestCase')</code> will match only if the context node is an instance of <code class="language-plaintext highlighter-rouge">TestCase</code>, but
not if it’s an instance of a subclass of <code class="language-plaintext highlighter-rouge">TestCase</code>. Be aware then, that using that method with abstract types will
never match.</p>

<h4 id="new-rules-25">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_security.html#hardcodedcryptokey"><code class="language-plaintext highlighter-rouge">HardCodedCryptoKey</code></a> (<code class="language-plaintext highlighter-rouge">java-security</code>)
detects hard coded keys used for encryption. It is recommended to store keys outside of the source code.</p>
  </li>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#identicalcatchbranches"><code class="language-plaintext highlighter-rouge">IdenticalCatchBranches</code></a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
finds catch blocks,
that catch different exception but perform the same exception handling and thus can be collapsed into a
multi-catch try statement.</p>
  </li>
</ul>

<h4 id="modified-rules-21">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="pmd_rules_java_bestpractices.html#junit4testshouldusetestannotation">JUnit4TestShouldUseTestAnnotation</a> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>)
has a new parameter “testClassPattern”. It is used to distinguish test classes from other classes and
avoid false positives. By default, any class, that has “Test” in its name, is considered a test class.</p>
  </li>
  <li>
    <p>The Java rule <a href="pmd_rules_java_codestyle.html#commentdefaultaccessmodifier">CommentDefaultAccessModifier</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
allows now by default the comment “<code class="language-plaintext highlighter-rouge">/* package */</code> in addition to “<code class="language-plaintext highlighter-rouge">/* default */</code>. This behavior can
still be adjusted by setting the property <code class="language-plaintext highlighter-rouge">regex</code>.</p>
  </li>
</ul>

<h3 id="fixed-issues-37">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1018">#1018</a>: [java] Performance degradation of 250% between 6.1.0 and 6.2.0</li>
      <li><a href="https://github.com/pmd/pmd/issues/1145">#1145</a>: [core] JCommander’s help text for option -min is wrong</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/672">#672</a>: [java] Support exact type matches for type resolution from XPath</li>
      <li><a href="https://github.com/pmd/pmd/issues/743">#743</a>: [java] Prepare for Java 10</li>
      <li><a href="https://github.com/pmd/pmd/issues/1077">#1077</a>: [java] Analyzing enum with lambda passed in constructor fails with “The enclosing scope must exist.”</li>
      <li><a href="https://github.com/pmd/pmd/issues/1115">#1115</a>: [java] Simplify xpath typeof syntax</li>
      <li><a href="https://github.com/pmd/pmd/issues/1131">#1131</a>: [java] java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/application/FacesMessage$Severity</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/572">#527</a>: [java] False Alarm of JUnit4TestShouldUseTestAnnotation on Predicates</li>
      <li><a href="https://github.com/pmd/pmd/issues/1063">#1063</a>: [java] MissingOverride is triggered in illegal places</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/720">#720</a>: [java] ShortVariable should whitelist lambdas</li>
      <li><a href="https://github.com/pmd/pmd/issues/955">#955</a>: [java] Detect identical catch statements</li>
      <li><a href="https://github.com/pmd/pmd/issues/1114">#1114</a>: [java] Star import overwritten by explicit import is not correctly handled</li>
      <li><a href="https://github.com/pmd/pmd/issues/1064">#1064</a>: [java] ClassNamingConventions suggests to add Util suffix for simple exception wrappers</li>
      <li><a href="https://github.com/pmd/pmd/issues/1065">#1065</a>: [java] ClassNamingConventions shouldn’t prohibit numbers in class names</li>
      <li><a href="https://github.com/pmd/pmd/issues/1067">#1067</a>: [java] [6.3.0] PrematureDeclaration false-positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/1096">#1096</a>: [java] ClassNamingConventions is too ambitious on finding utility classes</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/824">#824</a>: [java] UseUtilityClass false positive when extending</li>
      <li><a href="https://github.com/pmd/pmd/issues/1021">#1021</a>: [java] False positive for <code class="language-plaintext highlighter-rouge">DoNotExtendJavaLangError</code></li>
      <li><a href="https://github.com/pmd/pmd/pull/1097">#1097</a>: [java] False negative in AvoidThrowingRawExceptionTypes</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1051">#1051</a>: [java] ConsecutiveAppendsShouldReuse false-negative</li>
      <li><a href="https://github.com/pmd/pmd/pull/1098">#1098</a>: [java] Simplify LongInstantiation, IntegerInstantiation, ByteInstantiation, and ShortInstantiation using type resolution</li>
      <li><a href="https://github.com/pmd/pmd/issues/1125">#1125</a>: [java] Improve message of InefficientEmptyStringCheck for String.trim().isEmpty()</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/999">#999</a>: [doc] Add a header before the XPath expression in rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/1082">#1082</a>: [doc] Multifile analysis doc is invalid</li>
    </ul>
  </li>
  <li>vf-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1100">#1100</a>: [vf] URLENCODE is ignored as valid escape method</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-32">API Changes</h3>

<ul>
  <li>The following classes in package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.benchmark</code> have been deprecated: <code class="language-plaintext highlighter-rouge">Benchmark</code>, <code class="language-plaintext highlighter-rouge">Benchmarker</code>,
<code class="language-plaintext highlighter-rouge">BenchmarkReport</code>, <code class="language-plaintext highlighter-rouge">BenchmarkResult</code>, <code class="language-plaintext highlighter-rouge">RuleDuration</code>, <code class="language-plaintext highlighter-rouge">StringBuilderCR</code> and <code class="language-plaintext 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="language-plaintext highlighter-rouge">TimeTracker</code> instead, which can be found
in the same package.</li>
  <li>The class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.xpath.TypeOfFunction</code> has been deprecated. Use the newer <code class="language-plaintext highlighter-rouge">TypeIsFunction</code> in the same package.</li>
  <li>The <code class="language-plaintext highlighter-rouge">typeof</code> methdos in <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.xpath.JavaFunctions</code> have been deprecated.
Use the newer <code class="language-plaintext highlighter-rouge">typeIs</code> method in the same class instead..</li>
  <li>The methods <code class="language-plaintext highlighter-rouge">isA</code>, <code class="language-plaintext highlighter-rouge">isEither</code> and <code class="language-plaintext highlighter-rouge">isNeither</code> of <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.typeresolution.TypeHelper</code>.
Use the new <code class="language-plaintext highlighter-rouge">isExactlyAny</code> and <code class="language-plaintext highlighter-rouge">isExactlyNone</code> methods in the same class instead.</li>
</ul>

<h3 id="external-contributions-37">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/966">#966</a>: [java] Issue #955: add new rule to detect identical catch statement - <a href="https://github.com/oowekyala">Clément Fournier</a> and <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1046">#1046</a>: [java] New security rule for finding hard-coded keys used for cryptographic operations - <a href="https://github.com/sgorbaty">Sergey Gorbaty</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1101">#1101</a>: [java] Fixes false positive for <code class="language-plaintext highlighter-rouge">DoNotExtendJavaLangError</code>  - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1106">#1106</a>: [vf] URLENCODE is ignored as valid escape method - <a href="https://github.com/rsoesemann">Robert Sösemann</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1126">#1126</a>: [java] Improve implementation hint in InefficientEmptyStringCheck - <a href="https://github.com/krichter722">krichter722</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1129">#1129</a>: [java] Adjust InefficientEmptyStringCheck documentation - <a href="https://github.com/krichter722">krichter722</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1137">#1137</a>: [ui] Removes the need for RefreshAST - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
</ul>

<h2 id="29-april-2018---630">29-April-2018 - 6.3.0</h2>

<p>The PMD team is pleased to announce PMD 6.3.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-38">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#tree-traversal-revision">Tree Traversal Revision</a></li>
      <li><a href="#naming-rules-enhancements">Naming Rules Enhancements</a></li>
      <li><a href="#cpd-suppression">CPD Suppression</a></li>
      <li><a href="#swift-41-support">Swift 4.1 Support</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-36">New and noteworthy</h3>

<h4 id="tree-traversal-revision">Tree Traversal Revision</h4>

<p>As described in <a href="https://github.com/pmd/pmd/issues/904">#904</a>, when searching for child nodes of the AST methods
such as <code class="language-plaintext highlighter-rouge">hasDescendantOfType</code>, <code class="language-plaintext highlighter-rouge">getFirstDescendantOfType</code> and <code class="language-plaintext highlighter-rouge">findDescendantsOfType</code> were found to behave inconsistently,
not all of them honoring find boundaries; that is, nodes that define a self-contained entity which should be considered separately
(think of lambdas, nested classes, anonymous classes, etc.). We have modified these methods to ensure all of them honor
find boundaries.</p>

<p>This change implies several false positives / unexpected results
(ie: <code class="language-plaintext highlighter-rouge">ASTBlockStatement</code> falsely returning <code class="language-plaintext highlighter-rouge">true</code> to <code class="language-plaintext highlighter-rouge">isAllocation()</code>)
have been fixed; and lots of searches are now restricted to smaller search areas, which improves performance
(depending on the project, we have measured up to 10% improvements during Type Resolution, Symbol Table analysis,
and some rules’ application).</p>

<h4 id="naming-rules-enhancements">Naming Rules Enhancements</h4>

<ul>
  <li>
    <p><a href="pmd_rules_java_codestyle.html#classnamingconventions">ClassNamingConventions</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
has been enhanced to allow granular configuration of naming
conventions for different kinds of type declarations (eg enum or abstract
class). Each kind of declaration can use its own naming convention
using a regex property. See the rule’s documentation for more info about
configuration and default conventions.</p>
  </li>
  <li>
    <p><a href="pmd_rules_java_codestyle.html#methodnamingconventions">MethodNamingConventions</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
has been enhanced in the same way.</p>
  </li>
</ul>

<h4 id="cpd-suppression">CPD Suppression</h4>

<p>Back in PMD 5.6.0 we introduced the ability to suppress CPD warnings in Java using comments, by
including <code class="language-plaintext highlighter-rouge">CPD-OFF</code> (to start ignoring code), or <code class="language-plaintext highlighter-rouge">CPD-ON</code> (to resume analysis) during CPD execution.
This has proved to be much more flexible and versatile than the old annotation-based approach,
and has since been the preferred way to suppress CPD warnings.</p>

<p>On this occasion, we are extending support for comment-based suppressions to many other languages:</p>

<ul>
  <li>C/C++</li>
  <li>Ecmascript / Javascript</li>
  <li>Matlab</li>
  <li>Objective-C</li>
  <li>PL/SQL</li>
  <li>Python</li>
</ul>

<p>So for instance, in Python we could now do:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">BaseHandler</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="c1"># some unignored code
</span>
        <span class="c1"># tell cpd to start ignoring code - CPD-OFF
</span>
        <span class="c1"># mission critical code, manually loop unroll
</span>        <span class="n">GoDoSomethingAwesome</span><span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
        <span class="n">GoDoSomethingAwesome</span><span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
        <span class="n">GoDoSomethingAwesome</span><span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
        <span class="n">GoDoSomethingAwesome</span><span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
        <span class="n">GoDoSomethingAwesome</span><span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
        <span class="n">GoDoSomethingAwesome</span><span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>

        <span class="c1"># resume CPD analysis - CPD-ON
</span>
        <span class="c1"># further code will *not* be ignored
</span></code></pre></div></div>

<p>Other languages are equivalent.</p>

<h4 id="swift-41-support">Swift 4.1 Support</h4>

<p>Thanks to major contributions from <a href="https://github.com/kenji21">kenji21</a> the Swift grammar has been updated to
support Swift 4.1. This is a major update, since the old grammar was quite dated, and we are sure all iOS
developers will enjoy it.</p>

<p>Unfortunately, this change is not compatible. The grammar elements that have been removed (ie: the keywords <code class="language-plaintext highlighter-rouge">__FILE__</code>,
<code class="language-plaintext highlighter-rouge">__LINE__</code>, <code class="language-plaintext highlighter-rouge">__COLUMN__</code> and <code class="language-plaintext highlighter-rouge">__FUNCTION__</code>) are no longer supported. We don’t usually introduce such
drastic / breaking changes in minor releases, however, given that the whole Swift ecosystem pushes hard towards
always using the latest versions, and that Swift needs all code and libraries to be currently compiling against
the same Swift version, we felt strongly this change was both safe and necessary to be shipped as soon as possible.
We had great feedback from the community during the process but if you have a legitimate use case for older Swift
versions, please let us know <a href="https://github.com/pmd/pmd/issues">on our Issue Tracker</a>.</p>

<h4 id="new-rules-26">New Rules</h4>

<ul>
  <li>The new Java rule <a href="pmd_rules_java_security.html#insecurecryptoiv">InsecureCryptoIv</a> (<code class="language-plaintext highlighter-rouge">java-security</code>)
detects hard coded initialization vectors used in cryptographic operations. It is recommended to use
a randomly generated IV.</li>
</ul>

<h4 id="modified-rules-22">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <a href="pmd_rules_java_codestyle.html#unnecessaryconstructor">UnnecessaryConstructor</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
has been rewritten as a Java rule (previously it was a XPath-based rule). It supports a new property
<code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> and ignores by default empty constructors,
that are annotated with <code class="language-plaintext highlighter-rouge">javax.inject.Inject</code>. Additionally, it detects now also unnecessary private constructors
in enums.</p>
  </li>
  <li>
    <p>The property <code class="language-plaintext highlighter-rouge">checkNativeMethods</code> of the Java rule <a href="pmd_rules_java_codestyle.html#methodnamingconventions">MethodNamingConventions</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
is now deprecated, as it is now superseded by <code class="language-plaintext highlighter-rouge">nativePattern</code>. Support for that property will be maintained until
7.0.0.</p>
  </li>
  <li>
    <p>The Java rule <a href="pmd_rules_java_codestyle.html#controlstatementbraces">ControlStatementBraces</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>)
supports a new boolean property <code class="language-plaintext highlighter-rouge">checkSingleIfStmt</code>. When unset, the rule won’t report <code class="language-plaintext highlighter-rouge">if</code> statements which lack
braces, if the statement is not part of an <code class="language-plaintext highlighter-rouge">if ... else if</code> chain. This property defaults to true.</p>
  </li>
</ul>

<h4 id="deprecated-rules-11">Deprecated Rules</h4>

<ul>
  <li>The Java rule <a href="pmd_rules_java_codestyle.html#abstractnaming">AbstractNaming</a> (<code class="language-plaintext highlighter-rouge">java-codestyle</code>) is deprecated
in favour of <a href="pmd_rules_java_codestyle.html#classnamingconventions">ClassNamingConventions</a>.
See <a href="#naming-rules-enhancements">Naming rules enhancements</a>.</li>
</ul>

<h3 id="fixed-issues-38">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/695">#695</a>: [core] Extend comment-based suppression to all JavaCC languages</li>
      <li><a href="https://github.com/pmd/pmd/issues/988">#988</a>: [core] FileNotFoundException for missing classes directory with analysis cache enabled</li>
      <li><a href="https://github.com/pmd/pmd/issues/1036">#1036</a>: [core] Non-XML output breaks XML-based CLI integrations</li>
    </ul>
  </li>
  <li>apex-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/776">#776</a>: [apex] AvoidHardcodingId false positives</li>
    </ul>
  </li>
  <li>documentation
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/994">#994</a>: [doc] Delete duplicate page contributing.md on the website</li>
      <li><a href="https://github.com/pmd/pmd/issues/1057">#1057</a>: [doc] Documentation of ignoredAnnotations property is misleading</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/894">#894</a>: [java] Maven PMD plugin fails to process some files without any explanation</li>
      <li><a href="https://github.com/pmd/pmd/issues/899">#899</a>: [java] JavaTypeDefinitionSimple.toString can cause NPEs</li>
      <li><a href="https://github.com/pmd/pmd/issues/1020">#1020</a>: [java] The CyclomaticComplexity rule runs forever in 6.2.0</li>
      <li><a href="https://github.com/pmd/pmd/pull/1030">#1030</a>: [java] NoClassDefFoundError when analyzing PMD with PMD</li>
      <li><a href="https://github.com/pmd/pmd/issues/1061">#1061</a>: [java] Update ASM to handle Java 10 bytecode</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/370">#370</a>: [java] GuardLogStatementJavaUtil not considering lambdas</li>
      <li><a href="https://github.com/pmd/pmd/issues/558">#558</a>: [java] ProperLogger Warnings for enums</li>
      <li><a href="https://github.com/pmd/pmd/issues/719">#719</a>: [java] Unused Code: Java 8 receiver parameter with an internal class</li>
      <li><a href="https://github.com/pmd/pmd/issues/1009">#1009</a>: [java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1003">#1003</a>: [java] UnnecessaryConstructor triggered on required empty constructor (Dagger @Inject)</li>
      <li><a href="https://github.com/pmd/pmd/issues/1023">#1023</a>: [java] False positive for useless parenthesis</li>
      <li><a href="https://github.com/pmd/pmd/issues/1004">#1004</a>: [java] ControlStatementBraces is missing checkIfStmt property</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/1056">#1056</a>: [java] Property ignoredAnnotations does not work for SingularField and ImmutableField</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/629">#629</a>: [java] NullAssignment false positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/816">#816</a>: [java] SingleMethodSingleton false positives with inner classes</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/586">#586</a>: [java] AvoidUsingShortType erroneously triggered on overrides of 3rd party methods</li>
    </ul>
  </li>
  <li>swift
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/678">#678</a>: [swift][cpd] Exception when running for Swift 4 code (KeyPath)</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-38">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/778">#778</a>: [swift] Support Swift 4 grammar - <a href="https://github.com/kenji21">kenji21</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1002">#1002</a>: [doc] Delete duplicate page contributing.md on the website - <a href="https://github.com/ishanSrt">Ishan Srivastava</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1008">#1008</a>: [core] DOC: fix closing tag for &lt;pmdVersion&gt; - <a href="https://github.com/stonio">stonio</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1010">#1010</a>: [java] UnnecessaryConstructor triggered on required empty constructor (Dagger @Inject) - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1012">#1012</a>: [java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5 - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1024">#1024</a>: [java] Issue 558: Properlogger for enums - <a href="https://github.com/utkuc">Utku Cuhadaroglu</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1041">#1041</a>: [java] Make BasicProjectMemoizer thread safe. - <a href="https://github.com/bergander">bergander</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1042">#1042</a>: [java] New security rule: report usage of hard coded IV in crypto operations - <a href="https://github.com/sgorbaty">Sergey Gorbaty</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1044">#1044</a>: [java] Fix for issue #816 - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1048">#1048</a>: [core] Make MultiThreadProcessor more space efficient - <a href="https://github.com/gibarsin">Gonzalo Exequiel Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/1062">#1062</a>: [core] Update ASM to version 6.1.1 - <a href="https://github.com/AustinShalit">Austin Shalit</a></li>
</ul>

<h2 id="26-march-2018---620">26-March-2018 - 6.2.0</h2>

<p>The PMD team is pleased to announce PMD 6.2.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-39">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#ecmascript-javascript">Ecmascript (JavaScript)</a></li>
      <li><a href="#disable-incremental-analysis">Disable Incremental Analysis</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-37">New and noteworthy</h3>

<h4 id="ecmascript-javascript">Ecmascript (JavaScript)</h4>

<p>The <a href="https://github.com/mozilla/rhino">Rhino Library</a> has been upgraded from version 1.7.7 to version 1.7.7.2.</p>

<p>Detailed changes for changed in Rhino can be found:</p>
<ul>
  <li><a href="https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md#rhino-1772">For 1.7.7.2</a></li>
  <li><a href="https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md#rhino-1771">For 1.7.7.1</a></li>
</ul>

<p>Both are bugfixing releases.</p>

<h4 id="disable-incremental-analysis">Disable Incremental Analysis</h4>

<p>Some time ago, we added support for <a href="pmd_userdocs_incremental_analysis.html">Incremental Analysis</a>. On PMD 6.0.0, we
started to add warns when not using it, as we strongly believe it’s a great improvement to our user’s experience as
analysis time is greatly reduced; and in the future we plan to have it enabled by default. However, we realize some
scenarios don’t benefit from it (ie: CI jobs), and having the warning logged can be noisy and cause confusion.</p>

<p>To this end, we have added a new flag to allow you to explicitly disable incremental analysis. On CLI, this is
the new <code class="language-plaintext highlighter-rouge">-no-cache</code> flag. On Ant, there is a <code class="language-plaintext highlighter-rouge">noCache</code> attribute for the <code class="language-plaintext highlighter-rouge">&lt;pmd&gt;</code> task.</p>

<p>On both scenarios, disabling the cache takes precedence over setting a cache location.</p>

<h4 id="new-rules-27">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_bestpractices.html#missingoverride"><code class="language-plaintext highlighter-rouge">MissingOverride</code></a>
(category <code class="language-plaintext highlighter-rouge">bestpractices</code>) detects overridden and implemented methods, which are not marked with the
<code class="language-plaintext highlighter-rouge">@Override</code> annotation. Annotating overridden methods with <code class="language-plaintext highlighter-rouge">@Override</code> ensures at compile time that
the method really overrides one, which helps refactoring and clarifies intent.</p>
  </li>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#unnecessaryannotationvalueelement"><code class="language-plaintext highlighter-rouge">UnnecessaryAnnotationValueElement</code></a>
(category <code class="language-plaintext highlighter-rouge">codestyle</code>) detects annotations with a single element (<code class="language-plaintext highlighter-rouge">value</code>) that explicitely names it.
That is, doing <code class="language-plaintext highlighter-rouge">@SuppressWarnings(value = "unchecked")</code> would be flagged in favor of
<code class="language-plaintext highlighter-rouge">@SuppressWarnings("unchecked")</code>.</p>
  </li>
  <li>
    <p>The new Java rule <a href="pmd_rules_java_codestyle.html#controlstatementbraces"><code class="language-plaintext highlighter-rouge">ControlStatementBraces</code></a>
(category <code class="language-plaintext highlighter-rouge">codestyle</code>) enforces the presence of braces on control statements where they are optional.
Properties allow to customize which statements are required to have braces. This rule replaces the now
deprecated rules <code class="language-plaintext highlighter-rouge">WhileLoopMustUseBraces</code>, <code class="language-plaintext highlighter-rouge">ForLoopMustUseBraces</code>, <code class="language-plaintext highlighter-rouge">IfStmtMustUseBraces</code>, and
<code class="language-plaintext highlighter-rouge">IfElseStmtMustUseBraces</code>. More than covering the use cases of those rules, this rule also supports
<code class="language-plaintext highlighter-rouge">do ... while</code> statements and <code class="language-plaintext highlighter-rouge">case</code> labels of <code class="language-plaintext highlighter-rouge">switch</code> statements (disabled by default).</p>
  </li>
</ul>

<h4 id="modified-rules-23">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">CommentContentRule</code> (<code class="language-plaintext highlighter-rouge">java-documentation</code>) previously had the property <code class="language-plaintext highlighter-rouge">wordsAreRegex</code>. But this 
property never had been implemented and is removed now.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnusedPrivateField</code> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) now has a new <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> property
that allows to configure annotations that imply the field should be ignored. By default <code class="language-plaintext highlighter-rouge">@java.lang.Deprecated</code>
and <code class="language-plaintext highlighter-rouge">@javafx.fxml.FXML</code> are ignored.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnusedPrivateMethod</code> (<code class="language-plaintext highlighter-rouge">java-bestpractices</code>) now has a new <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> property
that allows to configure annotations that imply the method should be ignored. By default <code class="language-plaintext highlighter-rouge">@java.lang.Deprecated</code>
is ignored.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">ImmutableField</code> (<code class="language-plaintext highlighter-rouge">java-design</code>) now has a new <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> property
that allows to configure annotations that imply the method should be ignored. By default several <code class="language-plaintext highlighter-rouge">lombok</code>
annotations are ignored</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">SingularField</code> (<code class="language-plaintext highlighter-rouge">java-design</code>) now has a new <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> property
that allows to configure annotations that imply the method should be ignored. By default several <code class="language-plaintext highlighter-rouge">lombok</code>
annotations are ignored</p>
  </li>
</ul>

<h4 id="deprecated-rules-12">Deprecated Rules</h4>

<ul>
  <li>The Java rules <code class="language-plaintext highlighter-rouge">WhileLoopMustUseBraces</code>, <code class="language-plaintext highlighter-rouge">ForLoopMustUseBraces</code>, <code class="language-plaintext highlighter-rouge">IfStmtMustUseBraces</code>, and <code class="language-plaintext highlighter-rouge">IfElseStmtMustUseBraces</code>
are deprecated. They will be replaced by the new rule <code class="language-plaintext highlighter-rouge">ControlStatementBraces</code>, in the category <code class="language-plaintext highlighter-rouge">codestyle</code>.</li>
</ul>

<h3 id="fixed-issues-39">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/928">#928</a>: [core] PMD build failure on Windows</li>
    </ul>
  </li>
  <li>java-bestpracrtices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/907">#907</a>: [java] UnusedPrivateField false-positive with @FXML</li>
      <li><a href="https://github.com/pmd/pmd/issues/965">#963</a>: [java] ArrayIsStoredDirectly not triggered from variadic functions</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/974">#974</a>: [java] Merge *StmtMustUseBraces rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/983">#983</a>: [java] Detect annotations with single value element</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/832">#832</a>: [java] AvoidThrowingNullPointerException documentation suggestion</li>
      <li><a href="https://github.com/pmd/pmd/issues/837">#837</a>: [java] CFGs of declared but not called lambdas are treated as parts of an enclosing method’s CFG</li>
      <li><a href="https://github.com/pmd/pmd/issues/839">#839</a>: [java] SignatureDeclareThrowsException’s IgnoreJUnitCompletely property not honored for constructors</li>
      <li><a href="https://github.com/pmd/pmd/issues/968">#968</a>: [java] UseUtilityClassRule reports false positive with lombok NoArgsConstructor</li>
    </ul>
  </li>
  <li>documentation
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/978">#978</a>: [core] Broken link in CONTRIBUTING.md</li>
      <li><a href="https://github.com/pmd/pmd/issues/992">#992</a>: [core] Include info about rule doc generation in “Writing Documentation” md page</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-33">API Changes</h3>

<ul>
  <li>
    <p>A new CLI switch, <code class="language-plaintext highlighter-rouge">-no-cache</code>, disables incremental analysis and the related suggestion. This overrides the
    <code class="language-plaintext highlighter-rouge">-cache</code> option. The corresponding Ant task parameter is <code class="language-plaintext highlighter-rouge">noCache</code>.</p>
  </li>
  <li>
    <p>The static method <code class="language-plaintext highlighter-rouge">PMDParameters.transformParametersIntoConfiguration(PMDParameters)</code> is now deprecated,
for removal in 7.0.0. The new instance method <code class="language-plaintext highlighter-rouge">PMDParameters.toConfiguration()</code> replaces it.</p>
  </li>
  <li>
    <p>The method <code class="language-plaintext highlighter-rouge">ASTConstructorDeclaration.getParameters()</code> has been deprecated in favor of the new method
<code class="language-plaintext highlighter-rouge">getFormalParameters()</code>. This method is available for both <code class="language-plaintext highlighter-rouge">ASTConstructorDeclaration</code> and
<code class="language-plaintext highlighter-rouge">ASTMethodDeclaration</code>.</p>
  </li>
</ul>

<h3 id="external-contributions-39">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/941">#941</a>: [java] Use char notation to represent a character to improve performance - <a href="https://github.com/reudismam">reudismam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/943">#943</a>: [java] UnusedPrivateField false-positive with @FXML - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/951">#951</a>: [java] Add ignoredAnnotations property to unusedPrivateMethod rule - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/952">#952</a>: [java] SignatureDeclareThrowsException’s IgnoreJUnitCompletely property not honored for constructors - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/958">#958</a>: [java] Refactor how we ignore annotated elements in rules - <a href="https://github.com/djydewang">BBG</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/965">#965</a>: [java] Make Varargs trigger ArrayIsStoredDirectly - <a href="https://github.com/pmd/pmd/issues/907">Stephen</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/967">#967</a>: [doc] Issue 959: fixed broken link to XPath Rule Tutorial - <a href="https://github.com/epidemia">Andrey Mochalov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/969">#969</a>: [java] Issue 968 Add logic to handle lombok private constructors with utility classes - <a href="https://github.com/clem0110">Kirk Clemens</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/970">#970</a>: [java] Fixed inefficient use of keySet iterator instead of entrySet iterator - <a href="https://github.com/epidemia">Andrey Mochalov</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/984">#984</a>: [java] issue983 Add new UnnecessaryAnnotationValueElement rule - <a href="https://github.com/clem0110">Kirk Clemens</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/989">#989</a>: [core] Update Contribute.md to close Issue #978 - <a href="https://github.com/refactormyself">Bolarinwa Saheed Olayemi</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/990">#990</a>: [java] Updated Doc on AvoidThrowingNullPointerException to close Issue #832 - <a href="https://github.com/refactormyself">Bolarinwa Saheed Olayemi</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/993">#993</a>: [core] Update writing_documentation.md to fix Issue #992 - <a href="https://github.com/refactormyself">Bolarinwa Saheed Olayemi</a></li>
</ul>

<h2 id="25-february-2018---610">25-February-2018 - 6.1.0</h2>

<p>The PMD team is pleased to announce PMD 6.1.0.</p>

<p>This is a minor release.</p>

<h3 id="table-of-contents-40">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#designer-ui">Designer UI</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a>
    *   <a href="#changes-to-the-node-interface">Changes to the Node interface</a>
    *   <a href="#changes-to-cpd-renderers">Changes to CPD renderers</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-38">New and noteworthy</h3>

<h4 id="designer-ui">Designer UI</h4>

<p>The Designer now supports configuring properties for XPath based rule development.
The Designer is still under development and any feedback is welcome.</p>

<p>You can start the designer via <code class="language-plaintext highlighter-rouge">run.sh designer</code> or <code class="language-plaintext highlighter-rouge">designer.bat</code>.</p>

<h3 id="fixed-issues-40">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/569">#569</a>: [core] XPath support requires specific toString implementations</li>
      <li><a href="https://github.com/pmd/pmd/issues/795">#795</a>: [cpd] java.lang.OutOfMemoryError</li>
      <li><a href="https://github.com/pmd/pmd/issues/848">#848</a>: [doc] Test failures when building pmd-doc under Windows</li>
      <li><a href="https://github.com/pmd/pmd/issues/872">#872</a>: [core] NullPointerException at FileDataSource.glomName()</li>
      <li><a href="https://github.com/pmd/pmd/issues/854">#854</a>: [ci] Use Java9 for building PMD</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/791">#791</a>: [doc] Documentation site reorganisation</li>
      <li><a href="https://github.com/pmd/pmd/issues/891">#891</a>: [doc] Apex @SuppressWarnings should use single quotes instead of double quotes</li>
      <li><a href="https://github.com/pmd/pmd/issues/909">#909</a>: [doc] Please add new PMD Eclipse Plugin to tool integration section</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/825">#825</a>: [java] Excessive*Length ignores too much</li>
      <li><a href="https://github.com/pmd/pmd/issues/888">#888</a>: [java] ParseException occurs with valid ‘&lt;&gt;’ in Java 1.8 mode</li>
      <li><a href="https://github.com/pmd/pmd/pull/920">#920</a>: [java] Update valid identifiers in grammar</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/784">#784</a>: [java] ForLoopCanBeForeach false-positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/925">#925</a>: [java] UnusedImports false positive for static import</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/855">#855</a>: [java] ImmutableField false-positive with lambdas</li>
    </ul>
  </li>
  <li>java-documentation
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/877">#877</a>: [java] CommentRequired valid rule configuration causes PMD error</li>
    </ul>
  </li>
  <li>java-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/885">#885</a>: [java] CompareObjectsWithEqualsRule trigger by enum1 != enum2</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/541">#541</a>: [java] ConsecutiveLiteralAppends with types other than string</li>
    </ul>
  </li>
  <li>scala
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/853">#853</a>: [scala] Upgrade scala version to support Java 9</li>
    </ul>
  </li>
  <li>xml
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/739">#739</a>: [xml] IllegalAccessException when accessing attribute using Saxon on JRE 9</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-34">API Changes</h3>

<h4 id="changes-to-the-node-interface">Changes to the Node interface</h4>

<p>The method <code class="language-plaintext highlighter-rouge">getXPathNodeName</code> is added to the <code class="language-plaintext highlighter-rouge">Node</code> interface, which removes the
use of the <code class="language-plaintext 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>).
A default implementation is provided in <code class="language-plaintext highlighter-rouge">AbstractNode</code>, to stay compatible
with existing implementors.</p>

<p>The <code class="language-plaintext highlighter-rouge">toString</code> method of a Node is not changed for the time being, and still produces
the name of the XPath node. That behaviour may however change in future major releases,
e.g. to produce a more useful message for debugging.</p>

<h4 id="changes-to-cpd-renderers">Changes to CPD renderers</h4>

<p>The interface <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.Renderer</code> has been deprecated. A new interface <code class="language-plaintext 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="language-plaintext 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="language-plaintext highlighter-rouge">OutOfMemoryError</code>s (see <a href="https://github.com/pmd/pmd/issues/795">#795</a>).</p>

<p><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.FileReporter</code> has also been deprecated as part of this change, as it’s no longer needed.</p>

<h3 id="external-contributions-40">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/790">#790</a>: [java] Added some comments for JDK 9 - <a href="https://github.com/tweimer">Tobias Weimer</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/803">#803</a>: [doc] Added SpotBugs as successor of FindBugs - <a href="https://github.com/tweimer">Tobias Weimer</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/828">#828</a>: [core] Add operations to manipulate a document - <a href="https://github.com/gibarsin">Gonzalo Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/830">#830</a>: [java] UseArraysAsList: Description added - <a href="https://github.com/tweimer">Tobias Weimer</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/845">#845</a>: [java] Fix false negative PreserveStackTrace on string concatenation - <a href="https://github.com/albfernandez">Alberto Fernández</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/868">#868</a>: [core] Improve XPath documentation &amp;&amp; make small refactors - <a href="https://github.com/gibarsin">Gonzalo Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/875">#875</a>: [core] Support shortnames when using filelist - <a href="https://github.com/johnjiabinzhang">John Zhang</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/886">#886</a>: [java] Fix #885 - <a href="https://github.com/MatiasComercio">Matias Comercio</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/900">#900</a>: [core] Use the isEmpty method instead of comparing the value of size() to 0 - <a href="https://github.com/reudismam">reudismam</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/914">#914</a>: [doc] Apex @SuppressWarnings documentation updated - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/918">#918</a>: [doc] Add qa-eclipse as new tool - <a href="https://github.com/akshatbahety">Akshat Bahety</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/927">#927</a>: [java][doc] Fix example of AbstractClassWithoutAnyMethod - <a href="https://github.com/wata727">Kazuma Watanabe</a></li>
</ul>

<h2 id="21-january-2018---601">21-January-2018 - 6.0.1</h2>

<p>The PMD team is pleased to announce PMD 6.0.1.</p>

<p>This is a bug fixing release.</p>

<h3 id="table-of-contents-41">Table Of Contents</h3>

<ul>
  <li><a href="#additional-information-about-the-new-introduced-rule-categories">Additional information about the new introduced rule categories</a></li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="additional-information-about-the-new-introduced-rule-categories">Additional information about the new introduced rule categories</h3>

<p>With the release of PMD 6.0.0, all rules have been sorted into one of the following eight categories:</p>

<ol>
  <li><strong>Best Practices</strong>: These are rules which enforce generally accepted best practices.</li>
  <li><strong>Code Style</strong>: These rules enforce a specific coding style.</li>
  <li><strong>Design</strong>: Rules that help you discover design issues.</li>
  <li><strong>Documentation</strong>: These rules are related to code documentation.</li>
  <li><strong>Error Prone</strong>: Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.</li>
  <li><strong>Multithreading</strong>: These are rules that flag issues when dealing with multiple threads of execution.</li>
  <li><strong>Performance</strong>: Rules that flag suboptimal code.</li>
  <li><strong>Security</strong>: Rules that flag potential security flaws.</li>
</ol>

<p>Please note, that not every category in every language may have a rule. There might be categories with no
rules at all, such as <code class="language-plaintext highlighter-rouge">category/java/security.xml</code>, which has currently no rules.
There are even languages, which only have rules of one category (e.g. <code class="language-plaintext highlighter-rouge">category/xml/errorprone.xml</code>).</p>

<p>You can find the information about available rules in the generated rule documentation, available
at <a href="https://pmd.github.io/6.0.1/">https://pmd.github.io/6.0.1/</a>.</p>

<p>In order to help migrate to the new category scheme, the new name for the old, deprecated rule names will
be logged as a warning. See <a href="https://github.com/pmd/pmd/pull/865">PR #865</a>. Please note, that the deprecated
rule names will keep working throughout PMD 6. You can upgrade to PMD 6 without the immediate need
to migrate your current ruleset. That backwards compatibility will be maintained until PMD 7.0.0 is released.</p>

<h3 id="fixed-issues-41">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/842">#842</a>: [core] Use correct java bootclasspath for compiling</li>
    </ul>
  </li>
  <li>apex-errorprone
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/792">#792</a>: [apex] AvoidDirectAccessTriggerMap incorrectly detects array access in classes</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/788">#788</a>: [apex] Method chaining breaks ApexCRUDViolation</li>
    </ul>
  </li>
  <li>doc
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/782">#782</a>: [doc] Wrong information in the Release Notes about the Security ruleset</li>
      <li><a href="https://github.com/pmd/pmd/issues/794">#794</a>: [doc] Broken documentation links for 6.0.0</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/793">#793</a>: [java] Parser error with private method in nested classes in interfaces</li>
      <li><a href="https://github.com/pmd/pmd/issues/814">#814</a>: [java] UnsupportedClassVersionError is failure instead of a warning</li>
      <li><a href="https://github.com/pmd/pmd/issues/831">#831</a>: [java] StackOverflow in JavaTypeDefinitionSimple.toString</li>
    </ul>
  </li>
  <li>java-bestpractices
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/783">#783</a>: [java] GuardLogStatement regression</li>
      <li><a href="https://github.com/pmd/pmd/issues/800">#800</a>: [java] ForLoopCanBeForeach NPE when looping on <code class="language-plaintext highlighter-rouge">this</code> object</li>
    </ul>
  </li>
  <li>java-codestyle
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/817">#817</a>: [java] UnnecessaryModifierRule crashes on valid code</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/785">#785</a>: [java] NPE in DataClass rule</li>
      <li><a href="https://github.com/pmd/pmd/issues/812">#812</a>: [java] Exception applying rule DataClass</li>
      <li><a href="https://github.com/pmd/pmd/issues/827">#827</a>: [java] GodClass crashes with java.lang.NullPointerException</li>
    </ul>
  </li>
  <li>java-performance
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/841">#841</a>: [java] InsufficientStringBufferDeclaration NumberFormatException</li>
    </ul>
  </li>
  <li>java-typeresolution
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/866">#866</a>: [java] rulesets/java/typeresolution.xml lists non-existent rules</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-35">API Changes</h3>

<ul>
  <li>The constant <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.PMD.VERSION</code> has been deprecated and will be removed with PMD 7.0.0.
Please use <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.PMDVersion.VERSION</code> instead.</li>
</ul>

<h3 id="external-contributions-41">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/796">#796</a>: [apex] AvoidDirectAccessTriggerMap incorrectly detects array access in classes - <a href="https://github.com/up2go-rsoesemann">Robert Sösemann</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/799">#799</a>: [apex] Method chaining breaks ApexCRUDViolation - <a href="https://github.com/up2go-rsoesemann">Robert Sösemann</a></li>
</ul>

<h2 id="15-december-2017---600">15-December-2017 - 6.0.0</h2>

<p>The PMD team is pleased to announce PMD 6.0.0.</p>

<p>This is a major release.</p>

<h3 id="table-of-contents-42">Table Of Contents</h3>

<ul>
  <li><a href="#new-and-noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#new-rule-designer">New Rule Designer</a></li>
      <li><a href="#java-9-support">Java 9 support</a></li>
      <li><a href="#revamped-apex-cpd">Revamped Apex CPD</a></li>
      <li><a href="#java-type-resolution">Java Type Resolution</a></li>
      <li><a href="#metrics-framework">Metrics Framework</a></li>
      <li><a href="#error-reporting">Error Reporting</a></li>
      <li><a href="#apex-rule-suppression">Apex Rule Suppression</a></li>
      <li><a href="#rule-categories">Rule Categories</a></li>
      <li><a href="#new-rules">New Rules</a></li>
      <li><a href="#modified-rules">Modified Rules</a></li>
      <li><a href="#deprecated-rules">Deprecated Rules</a></li>
      <li><a href="#removed-rules">Removed Rules</a></li>
      <li><a href="#java-symbol-table">Java Symbol Table</a></li>
      <li><a href="#apex-parser-update">Apex Parser Update</a></li>
      <li><a href="#incremental-analysis">Incremental Analysis</a></li>
      <li><a href="#rule-and-report-properties">Rule and Report Properties</a></li>
    </ul>
  </li>
  <li><a href="#fixed-issues">Fixed Issues</a></li>
  <li><a href="#api-changes">API Changes</a></li>
  <li><a href="#external-contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-39">New and noteworthy</h3>

<h4 id="new-rule-designer">New Rule Designer</h4>

<p>Thanks to <a href="https://github.com/oowekyala">Clément Fournier</a>, we now have a new rule designer GUI, which
is based on JavaFX. It replaces the old designer and can be started via</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">bin/run.sh designer</code> (on Unix-like platform such as Linux and Mac OS X)</li>
  <li><code class="language-plaintext highlighter-rouge">bin\designer.bat</code> (on Windows)</li>
</ul>

<p>Note: At least Java8 is required for the designer. The old designer is still available
as <code class="language-plaintext highlighter-rouge">designerold</code> but will be removed with the next major release.</p>

<h4 id="java-9-support">Java 9 support</h4>

<p>The Java grammar has been updated to support analyzing Java 9 projects:</p>

<ul>
  <li>private methods in interfaces are possible</li>
  <li>The underscore “_” is considered an invalid identifier</li>
  <li>Diamond operator for anonymous classes</li>
  <li>The module declarations in <code class="language-plaintext highlighter-rouge">module-info.java</code> can be parsed</li>
  <li>Concise try-with-resources statements are supported</li>
</ul>

<p>Java 9 support is enabled by default. You can switch back to an older java version
via the command line, e.g. <code class="language-plaintext highlighter-rouge">-language java -version 1.8</code>.</p>

<h4 id="revamped-apex-cpd">Revamped Apex CPD</h4>

<p>We are now using the Apex Jorje Lexer to tokenize Apex code for CPD. This change means:</p>

<ul>
  <li>All comments are now ignored for CPD. This is consistent with how other languages such as Java and Groovy work.</li>
  <li>Tokenization honors the language specification, which improves accuracy.</li>
</ul>

<p>CPD will therefore have less false positives and false negatives.</p>

<h4 id="java-type-resolution">Java Type Resolution</h4>

<p>As part of Google Summer of Code 2017, <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a> worked on type resolution
for Java. For this release he has extended support for method calls for both instance and static methods.</p>

<p>Method shadowing and overloading are supported, as are varargs. However, the selection of the target method upon
the presence of generics and type inference is still work in progress. Expect it in forecoming releases.</p>

<p>As for fields, the basic support was in place for release 5.8.0, but has now been expanded to support static fields.</p>

<h4 id="metrics-framework">Metrics Framework</h4>

<p>As part of Google Summer of Code 2017, <a href="https://github.com/oowekyala">Clément Fournier</a> is worked
on the new metrics framework for object-oriented metrics.</p>

<p>There are already a couple of metrics (e.g. ATFD, WMC, Cyclo, LoC) implemented. More metrics are planned.
Based on those metrics, rules like “GodClass” detection could be implemented more easily.
The following rules benefit from the metrics framework: NcssCount (java), NPathComplexity (java),
CyclomaticComplexity (both java and apex).</p>

<p>The Metrics framework has been abstracted and is available in <code class="language-plaintext highlighter-rouge">pmd-core</code> for other languages. With this
PMD release, the metrics framework is supported for both Java and Apex.</p>

<h4 id="error-reporting">Error Reporting</h4>

<p>A number of improvements on error reporting have taken place, meaning changes to some of the report formats.</p>

<p>Also of note, the xml report now provides a XML Schema definition, allowing easier parsing and validation.</p>

<h5 id="processing-errors">Processing Errors</h5>

<p>Processing errors can now provide not only the message previously included on some reports, but also a full stacktrace.
This will allow better error reports when providing feedback to the PMD team and help in debugging issues.</p>

<p>The report formats providing full stacktrace of errors are:</p>

<ul>
  <li>html</li>
  <li>summaryhtml</li>
  <li>textcolor</li>
  <li>vbhtml</li>
  <li>xml</li>
</ul>

<h5 id="configuration-errors">Configuration Errors</h5>

<p>For a long time reports have been notified of configuration errors on rules, but they have remained hidden.
On a push to make these more evident to users, and help them get the best results out of PMD, we have started
to include them on the reports.</p>

<p>So far, only reports that include processing errors are showing configuration errors. In other words, the report formats
providing configuration error reporting are:</p>

<ul>
  <li>csv</li>
  <li>html</li>
  <li>summaryhtml</li>
  <li>text</li>
  <li>textcolor</li>
  <li>vbhtml</li>
  <li>xml</li>
</ul>

<p>As we move forward we will be able to detect and report more configuration errors (ie: incomplete <code class="language-plaintext highlighter-rouge">auxclasspath</code>)
and include them to such reports.</p>

<h4 id="apex-rule-suppression">Apex Rule Suppression</h4>

<p>Apex violations can now be suppressed very similarly to how it’s done in Java, by making use of a
<code class="language-plaintext highlighter-rouge">@SuppressWarnings</code> annotation.</p>

<p>Supported syntax includes:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>@SupressWarnings('PMD') // to supress all Apex rules
@SupressWarnings('all') // to supress all Apex rules
@SupressWarnings('PMD.ARuleName') // to supress only the rule named ARuleName
@SupressWarnings('PMD.ARuleName, PMD.AnotherRuleName') // to supress only the rule named ARuleName or AnotherRuleName
</code></pre></div></div>

<p>Notice this last scenario is slightly different to the Java syntax. This is due to differences in the Apex grammar for annotations.</p>

<h4 id="rule-categories">Rule Categories</h4>

<p>All built-in rules have been sorted into one of eight categories:</p>

<ol>
  <li><strong>Best Practices</strong>: These are rules which enforce generally accepted best practices.</li>
  <li><strong>Code Style</strong>: These rules enforce a specific coding style.</li>
  <li><strong>Design</strong>: Rules that help you discover design issues.</li>
  <li><strong>Documentation</strong>: These rules are related to code documentation.</li>
  <li><strong>Error Prone</strong>: Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.</li>
  <li><strong>Multithreading</strong>: These are rules that flag issues when dealing with multiple threads of execution.</li>
  <li><strong>Performance</strong>: Rules that flag suboptimal code.</li>
  <li><strong>Security</strong>: Rules that flag potential security flaws.</li>
</ol>

<p>These categories help you to find rules and figure out the relevance and impact for your project.</p>

<p>All rules have been moved accordingly, e.g. the rule “JumbledIncrementer”, which was previously defined in the
ruleset “java-basic” has now been moved to the “Error Prone” category. The new rule reference to be used is
<code class="language-plaintext highlighter-rouge">&lt;rule ref="category/java/errorprone.xml/JumbledIncrementer"/&gt;</code>.</p>

<p>The old rulesets like “java-basic” are still kept for backwards-compatibility but will be removed eventually.
The rule reference documentation has been updated to reflect these changes.</p>

<h4 id="new-rules-28">New Rules</h4>

<ul>
  <li>
    <p>The new Java rule <code class="language-plaintext highlighter-rouge">NcssCount</code> (category <code class="language-plaintext highlighter-rouge">design</code>) replaces the three rules “NcssConstructorCount”, “NcssMethodCount”,
and “NcssTypeCount”. The new rule uses the metrics framework to achieve the same. It has two properties, to
define the report level for method and class sizes separately. Constructors and methods are considered the same.</p>
  </li>
  <li>
    <p>The new Java rule <code class="language-plaintext highlighter-rouge">DoNotExtendJavaLangThrowable</code> (category <code class="language-plaintext highlighter-rouge">errorprone</code>) is a companion for the
<code class="language-plaintext highlighter-rouge">java-strictexception.xml/DoNotExtendJavaLangError</code>, detecting direct extensions of <code class="language-plaintext highlighter-rouge">java.lang.Throwable</code>.</p>
  </li>
  <li>
    <p>The new Java rule <code class="language-plaintext highlighter-rouge">ForLoopCanBeForeach</code> (category <code class="language-plaintext highlighter-rouge">errorprone</code>) helps to identify those for-loops that can
be safely refactored into for-each-loops available since java 1.5.</p>
  </li>
  <li>
    <p>The new Java rule <code class="language-plaintext highlighter-rouge">AvoidFileStream</code> (category <code class="language-plaintext highlighter-rouge">performance</code>) helps to identify code relying on <code class="language-plaintext highlighter-rouge">FileInputStream</code> / <code class="language-plaintext highlighter-rouge">FileOutputStream</code>
which, by using a finalizer, produces extra / unnecessary overhead to garbage collection, and should be replaced with
<code class="language-plaintext highlighter-rouge">Files.newInputStream</code> / <code class="language-plaintext highlighter-rouge">Files.newOutputStream</code> available since java 1.7.</p>
  </li>
  <li>
    <p>The new Java rule <code class="language-plaintext highlighter-rouge">DataClass</code> (category <code class="language-plaintext highlighter-rouge">design</code>) detects simple data-holders without behaviour. This might indicate
that the behaviour is scattered elsewhere and the data class exposes the internal data structure,
which breaks encapsulation.</p>
  </li>
  <li>
    <p>The new Apex rule <code class="language-plaintext highlighter-rouge">AvoidDirectAccessTriggerMap</code> (category <code class="language-plaintext highlighter-rouge">errorprone</code>) helps to identify direct array access to triggers,
which can produce bugs by either accessing non-existing indexes, or leaving them out. You should use for-each-loops
instead.</p>
  </li>
  <li>
    <p>The new Apex rule <code class="language-plaintext highlighter-rouge">AvoidHardcodingId</code> (category <code class="language-plaintext highlighter-rouge">errorprone</code>) detects hardcoded strings that look like identifiers
and flags them. Record IDs change between environments, meaning hardcoded ids are bound to fail under a different
setup.</p>
  </li>
  <li>
    <p>The new Apex rule <code class="language-plaintext highlighter-rouge">CyclomaticComplexity</code> (category <code class="language-plaintext highlighter-rouge">design</code>) detects overly complex classes and methods. The
report threshold can be configured separately for classes and methods.</p>
  </li>
  <li>A whole bunch of new rules has been added to Apex. They all fit into the category <code class="language-plaintext highlighter-rouge">errorprone</code>.
The 5 rules are migrated for Apex from the equivalent Java rules and include:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">EmptyCatchBlock</code> to detect catch blocks completely ignoring exceptions.</li>
      <li><code class="language-plaintext highlighter-rouge">EmptyIfStmt</code> for if blocks with no content, that can be safely removed.</li>
      <li><code class="language-plaintext highlighter-rouge">EmptyTryOrFinallyBlock</code> for empty try / finally blocks that can be safely removed.</li>
      <li><code class="language-plaintext highlighter-rouge">EmptyWhileStmt</code> for empty while loops that can be safely removed.</li>
      <li><code class="language-plaintext highlighter-rouge">EmptyStatementBlock</code> for empty code blocks that can be safely removed.</li>
    </ul>
  </li>
  <li>The new Apex rule <code class="language-plaintext highlighter-rouge">AvoidSoslInLoops</code> (category <code class="language-plaintext highlighter-rouge">performance</code>) is the companion of the old
<code class="language-plaintext highlighter-rouge">AvoidSoqlInLoops</code> rule, flagging SOSL (Salesforce Object Search Language) queries when within
loops, to avoid governor issues, and hitting the database too often.</li>
</ul>

<h4 id="modified-rules-24">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnnecessaryFinalModifier</code> (category <code class="language-plaintext highlighter-rouge">codestyle</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-unnecessarycode</code>)
has been merged into the rule <code class="language-plaintext highlighter-rouge">UnnecessaryModifier</code>. As part of this, the rule  has been revamped to detect more cases.
It will now flag anonymous class’ methods marked as final (can’t be overridden, so it’s pointless), along with
final methods overridden / defined within enum instances. It will also flag <code class="language-plaintext highlighter-rouge">final</code> modifiers on try-with-resources.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnnecessaryParentheses</code> (category <code class="language-plaintext highlighter-rouge">codestyle</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-controversial</code>)
has been merged into <code class="language-plaintext highlighter-rouge">UselessParentheses</code> (category <code class="language-plaintext highlighter-rouge">codestyle</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-unnecessary</code>).
The rule covers all scenarios previously covered by either rule.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UncommentedEmptyConstructor</code> (category <code class="language-plaintext highlighter-rouge">documentation</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-design</code>)
 will now ignore empty constructors annotated with <code class="language-plaintext highlighter-rouge">javax.inject.Inject</code>.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">AbstractClassWithoutAnyMethod</code> (category <code class="language-plaintext highlighter-rouge">bestpractices</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-design</code>)
will now ignore classes annotated with <code class="language-plaintext highlighter-rouge">com.google.auto.value.AutoValue</code>.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">GodClass</code> (category <code class="language-plaintext highlighter-rouge">design', former ruleset </code>java-design`) has been revamped to use
the new metrics framework.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">LooseCoupling</code> (category <code class="language-plaintext highlighter-rouge">bestpractices</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-coupling</code>) has been
replaced by the typeresolution-based implementation.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">CloneMethodMustImplementCloneable</code> (category <code class="language-plaintext highlighter-rouge">errorprone</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-clone</code>)
has been replaced by the typeresolution-based
implementation and is now able to detect cases if a class implements or extends a Cloneable class/interface.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnusedImports</code> (category <code class="language-plaintext highlighter-rouge">bestpractices</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-imports</code>) has been
replaced by the typeresolution-based
implementation and is now able to detect unused on-demand imports.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">SignatureDeclareThrowsException</code> (category <code class="language-plaintext highlighter-rouge">design</code>, former ruleset ‘java-strictexception’)
has been replaced by the
typeresolution-based implementation. It has a new property <code class="language-plaintext highlighter-rouge">IgnoreJUnitCompletely</code>, which allows all
methods in a JUnit testcase to throw exceptions.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">NPathComplexity</code> (category <code class="language-plaintext highlighter-rouge">design</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-codesize</code>) has been revamped
to use the new metrics framework.
Its report threshold can be configured via the property <code class="language-plaintext highlighter-rouge">reportLevel</code>, which replaces the now
deprecated property <code class="language-plaintext highlighter-rouge">minimum</code>.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">CyclomaticComplexity</code> (category <code class="language-plaintext highlighter-rouge">design</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-codesize</code>) has been
revamped to use the new metrics framework.
Its report threshold can be configured via the properties <code class="language-plaintext highlighter-rouge">classReportLevel</code> and <code class="language-plaintext highlighter-rouge">methodReportLevel</code> separately.
The old property <code class="language-plaintext highlighter-rouge">reportLevel</code>, which configured the level for both total class and method complexity,
is deprecated.</p>
  </li>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">CommentRequired</code> (category <code class="language-plaintext highlighter-rouge">documentation</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-comments</code>)
has been revamped to include 2 new properties:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">accessorCommentRequirement</code> to specify documentation requirements for getters and setters (default to <code class="language-plaintext highlighter-rouge">ignored</code>)</li>
      <li><code class="language-plaintext highlighter-rouge">methodWithOverrideCommentRequirement</code> to specify documentation requirements for methods annotated with <code class="language-plaintext highlighter-rouge">@Override</code> (default to <code class="language-plaintext highlighter-rouge">ignored</code>)</li>
    </ul>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">EmptyCatchBlock</code> (category <code class="language-plaintext highlighter-rouge">errorprone</code>, former ruleset <code class="language-plaintext highlighter-rouge">java-empty</code>) has been changed to ignore
exceptions named <code class="language-plaintext highlighter-rouge">ignore</code> or <code class="language-plaintext highlighter-rouge">expected</code> by default. You can still override this behaviour by setting the <code class="language-plaintext highlighter-rouge">allowExceptionNameRegex</code> property.</p>
  </li>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">OptimizableToArrayCall</code> (category <code class="language-plaintext highlighter-rouge">performance</code>, former ruleset <code class="language-plaintext highlighter-rouge">design</code>) has been
modified to fit for the current JVM implementations: It basically detects now the opposite and suggests to
use <code class="language-plaintext highlighter-rouge">Collection.toArray(new E[0])</code> with a zero-sized array.
See <a href="https://shipilev.net/blog/2016/arrays-wisdom-ancients/">Arrays of Wisdom of the Ancients</a>.</li>
</ul>

<h4 id="deprecated-rules-13">Deprecated Rules</h4>

<ul>
  <li>
    <p>The Java rules <code class="language-plaintext highlighter-rouge">NcssConstructorCount</code>, <code class="language-plaintext highlighter-rouge">NcssMethodCount</code>, and <code class="language-plaintext highlighter-rouge">NcssTypeCount</code> (ruleset <code class="language-plaintext highlighter-rouge">java-codesize</code>) have been
deprecated. They will be replaced by the new rule <code class="language-plaintext highlighter-rouge">NcssCount</code> in the category <code class="language-plaintext highlighter-rouge">design</code>.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">LooseCoupling</code> in ruleset <code class="language-plaintext highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with the same name
from category <code class="language-plaintext highlighter-rouge">bestpractices</code> instead.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">CloneMethodMustImplementCloneable</code> in ruleset <code class="language-plaintext highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with
the same name from category <code class="language-plaintext highlighter-rouge">errorprone</code> instead.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnusedImports</code> in ruleset <code class="language-plaintext highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with
the same name from category <code class="language-plaintext highlighter-rouge">bestpractices</code> instead.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">SignatureDeclareThrowsException</code> in ruleset <code class="language-plaintext highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule
with the same name from category <code class="language-plaintext highlighter-rouge">design</code> instead.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">EmptyStaticInitializer</code> in ruleset <code class="language-plaintext highlighter-rouge">java-empty</code> is deprecated. Use the rule <code class="language-plaintext highlighter-rouge">EmptyInitializer</code>
from the category <code class="language-plaintext highlighter-rouge">errorprone</code>, which covers both static and non-static empty initializers.`</p>
  </li>
  <li>
    <p>The Java rules <code class="language-plaintext highlighter-rouge">GuardDebugLogging</code> (ruleset <code class="language-plaintext highlighter-rouge">java-logging-jakarta-commons</code>) and <code class="language-plaintext highlighter-rouge">GuardLogStatementJavaUtil</code>
(ruleset <code class="language-plaintext highlighter-rouge">java-logging-java</code>) have been deprecated. Use the rule <code class="language-plaintext highlighter-rouge">GuardLogStatement</code> from the
category <code class="language-plaintext highlighter-rouge">bestpractices</code>, which covers all cases regardless of the logging framework.</p>
  </li>
</ul>

<h4 id="removed-rules">Removed Rules</h4>

<ul>
  <li>The deprecated Java rule <code class="language-plaintext highlighter-rouge">UseSingleton</code> has been removed from the ruleset <code class="language-plaintext highlighter-rouge">java-design</code>. The rule has been renamed
long time ago to <code class="language-plaintext highlighter-rouge">UseUtilityClass</code> (category <code class="language-plaintext highlighter-rouge">design</code>).</li>
</ul>

<h4 id="java-symbol-table">Java Symbol Table</h4>

<p>A <a href="https://github.com/pmd/pmd/pull/549/commits/0958621ca884a8002012fc7738308c8dfc24b97c">bug in symbol table</a> prevented
the symbol table analysis to properly match primitive arrays types. The issue <a href="https://github.com/pmd/pmd/issues/521">affected the <code class="language-plaintext highlighter-rouge">java-unsedcode/UnusedPrivateMethod</code></a>
rule, but other rules may now produce improved results as consequence of this fix.</p>

<h4 id="apex-parser-update">Apex Parser Update</h4>

<p>The Apex parser version was bumped, from <code class="language-plaintext highlighter-rouge">1.0-sfdc-187</code> to <code class="language-plaintext highlighter-rouge">210-SNAPSHOT</code>. This update let us take full advantage
of the latest improvements from Salesforce, but introduces some breaking changes:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">BlockStatements</code> are now created for all control structures, even if no brace is used. We have therefore added
a <code class="language-plaintext highlighter-rouge">hasCurlyBrace</code> method to differentiate between both scenarios.</li>
  <li>New AST node types are available. In particular <code class="language-plaintext highlighter-rouge">CastExpression</code>, <code class="language-plaintext highlighter-rouge">ConstructorPreamble</code>, <code class="language-plaintext highlighter-rouge">IllegalStoreExpression</code>,
<code class="language-plaintext highlighter-rouge">MethodBlockStatement</code>, <code class="language-plaintext highlighter-rouge">Modifier</code>, <code class="language-plaintext highlighter-rouge">MultiStatement</code>, <code class="language-plaintext highlighter-rouge">NestedExpression</code>, <code class="language-plaintext highlighter-rouge">NestedStoreExpression</code>,
<code class="language-plaintext highlighter-rouge">NewKeyValueObjectExpression</code> and <code class="language-plaintext highlighter-rouge">StatementExecuted</code></li>
  <li>Some nodes have been removed. Such is the case of <code class="language-plaintext highlighter-rouge">TestNode</code>, <code class="language-plaintext highlighter-rouge">DottedExpression</code> and <code class="language-plaintext highlighter-rouge">NewNameValueObjectExpression</code>
(replaced by <code class="language-plaintext highlighter-rouge">NewKeyValueObjectExpression</code>)</li>
</ul>

<p>All existing rules have been updated to reflect these changes. If you have custom rules, be sure to update them.</p>

<p>For more info about the included Apex parser, see the new pmd module “pmd-apex-jorje”, which packages and provides
the parser as a binary.</p>

<h4 id="incremental-analysis">Incremental Analysis</h4>

<p>The incremental analysis feature first introduced in PMD 5.6.0 has been enhanced. A few minor issues have been fixed,
and several improvements have been performed to make it more accurate.</p>

<p>The cache will now detect changes to the JARs referenced in the <code class="language-plaintext highlighter-rouge">auxclasspath</code> instead of simply looking at their paths
and order. This means that if you are referencing a JAR you are overwriting in some way, the incremental analysis can
now detect it and invalidate it’s cache to avoid false reports.</p>

<p>Similarly, any changes to the execution classpath of PMD will invalidate the cache. This means that if you have custom
rules packaged in a jar, any changes to it will invalidate the cache automatically.</p>

<p>We have also improved logging on the analysis code, allowing better insight into how the cache is performing,
under debug / verbose builds you can even see individual hits / misses to the cache (and the reason for any miss!)</p>

<p>Finally, as this feature keeps maturing, we are gently pushing this forward. If not using incremental analysis,
a warning will now be produced suggesting users to adopt it for better performance.</p>

<h4 id="rule-and-report-properties">Rule and Report Properties</h4>

<p>The implementation around the properties support for rule properties and report properties has been revamped
to be fully typesafe. Along with that change, the support classes have been moved into an own
package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties</code>. While there is no change necessary in the ruleset XML files,
when using/setting values for rules, there are adjustments necessary when declaring properties in Java-implemented
rules.</p>

<p>Rule properties can be declared both for Java based rules and XPath rules.
This is now very well documented in <a href="pmd_userdocs_extending_defining_properties.html">Working with properties</a>.</p>

<p>With PMD 6.0.0, multivalued properties are now also possible with XPath rules.</p>

<h3 id="fixed-issues-42">Fixed Issues</h3>

<ul>
  <li>all
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/394">#394</a>: [core] PMD exclude rules are failing with IllegalArgumentException with non-default minimumPriority</li>
      <li><a href="https://github.com/pmd/pmd/issues/532">#532</a>: [core] security concerns on URL-based rulesets</li>
      <li><a href="https://github.com/pmd/pmd/issues/538">#538</a>: [core] Provide an XML Schema for XML reports</li>
      <li><a href="https://github.com/pmd/pmd/issues/600">#600</a>: [core] Nullpointer while creating cache File</li>
      <li><a href="https://github.com/pmd/pmd/issues/604">#604</a>: [core] Incremental analysis should detect changes to jars in classpath</li>
      <li><a href="https://github.com/pmd/pmd/issues/608">#608</a>: [core] Add DEBUG log when applying incremental analysis</li>
      <li><a href="https://github.com/pmd/pmd/issues/618">#618</a>: [core] Incremental Analysis doesn’t close file correctly on Windows upon a cache hit</li>
      <li><a href="https://github.com/pmd/pmd/issues/643">#643</a>: [core] PMD Properties (dev-properties) breaks markup on CodeClimateRenderer</li>
      <li><a href="https://github.com/pmd/pmd/pull/680">#680</a>: [core] Isolate classloaders for runtime and auxclasspath</li>
      <li><a href="https://github.com/pmd/pmd/issues/762">#762</a>: [core] Remove method and file property from available property descriptors for XPath rules</li>
      <li><a href="https://github.com/pmd/pmd/issues/763">#763</a>: [core] Turn property descriptor util into an enum and enrich its interface</li>
    </ul>
  </li>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/265">#265</a>: [apex] Make Rule suppression work</li>
      <li><a href="https://github.com/pmd/pmd/pull/488">#488</a>: [apex] Use Apex lexer for CPD</li>
      <li><a href="https://github.com/pmd/pmd/pull/489">#489</a>: [apex] Update Apex compiler</li>
      <li><a href="https://github.com/pmd/pmd/issues/500">#500</a>: [apex] Running through CLI shows jorje optimization messages</li>
      <li><a href="https://github.com/pmd/pmd/issues/605">#605</a>: [apex] java.lang.NoClassDefFoundError in the latest build</li>
      <li><a href="https://github.com/pmd/pmd/issues/637">#637</a>: [apex] Avoid SOSL in loops</li>
      <li><a href="https://github.com/pmd/pmd/issues/760">#760</a>: [apex] EmptyStatementBlock complains about missing rather than empty block</li>
      <li><a href="https://github.com/pmd/pmd/issues/766">#766</a>: [apex] Replace old Jorje parser with new one</li>
      <li><a href="https://github.com/pmd/pmd/issues/768">#768</a>: [apex] java.lang.NullPointerException from PMD</li>
    </ul>
  </li>
  <li>cpp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/448">#448</a>: [cpp] Write custom CharStream to handle continuation characters</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1454/">#1454</a>: [java] OptimizableToArrayCall is outdated and invalid in current JVMs</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1513/">#1513</a>: [java] Remove deprecated rule UseSingleton</li>
      <li><a href="https://github.com/pmd/pmd/issues/328">#328</a>: [java] java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/jsp/PageContext</li>
      <li><a href="https://github.com/pmd/pmd/pull/487">#487</a>: [java] Fix typeresolution for anonymous extending object</li>
      <li><a href="https://github.com/pmd/pmd/issues/496">#496</a>: [java] processing error on generics inherited from enclosing class</li>
      <li><a href="https://github.com/pmd/pmd/issues/510">#510</a>: [java] Typeresolution fails on a simple primary when the source is loaded from a class literal</li>
      <li><a href="https://github.com/pmd/pmd/issues/527">#527</a>: [java] Lombok getter annotation on enum is not recognized correctly</li>
      <li><a href="https://github.com/pmd/pmd/issues/534">#534</a>: [java] NPE in MethodTypeResolution for static methods</li>
      <li><a href="https://github.com/pmd/pmd/issues/603">#603</a>: [core] incremental analysis should invalidate upon Java rule plugin changes</li>
      <li><a href="https://github.com/pmd/pmd/issues/650">#650</a>: [java] ProcesingError analyzing code under 5.8.1</li>
      <li><a href="https://github.com/pmd/pmd/issues/732">#732</a>: [java] LinkageError with aux classpath</li>
    </ul>
  </li>
  <li>java-basic
    <ul>
      <li><a href="https://github.com/pmd/pmd/pull/565">#565</a>: [java] False negative on DontCallThreadRun when extending Thread</li>
    </ul>
  </li>
  <li>java-comments
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/396">#396</a>: [java] CommentRequired: add properties to ignore @Override method and getters / setters</li>
      <li><a href="https://github.com/pmd/pmd/issues/536">#536</a>: [java] CommentDefaultAccessModifierRule ignores constructors</li>
    </ul>
  </li>
  <li>java-controversial
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/388">#388</a>: [java] controversial.AvoidLiteralsInIfCondition 0.0 false positive</li>
      <li><a href="https://github.com/pmd/pmd/issues/408">#408</a>: [java] DFA not analyzing asserts</li>
      <li><a href="https://github.com/pmd/pmd/issues/537">#537</a>: [java] UnnecessaryParentheses fails to detect obvious scenario</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/357">#357</a>: [java] UncommentedEmptyConstructor consider annotations on Constructor</li>
      <li><a href="https://github.com/pmd/pmd/issues/438">#438</a>: [java] Relax AbstractClassWithoutAnyMethod when class is annotated by @AutoValue</li>
      <li><a href="https://github.com/pmd/pmd/issues/590">#590</a>: [java] False positive on MissingStaticMethodInNonInstantiatableClass</li>
    </ul>
  </li>
  <li>java-logging
    *   <a href="https://github.com/pmd/pmd/issues/457">#457</a>: [java] Merge all log guarding rules
    *   <a href="https://github.com/pmd/pmd/issues/721">#721</a>: [java] NPE in PMD 5.8.1 InvalidSlf4jMessageFormat</li>
  <li>java-sunsecure
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/468">#468</a>: [java] ArrayIsStoredDirectly false positive</li>
    </ul>
  </li>
  <li>java-unusedcode
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/521">#521</a>: [java] UnusedPrivateMethod returns false positives with primitive data type in map argument</li>
    </ul>
  </li>
  <li>java-unnecessarycode
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/412">#412</a>: [java] java-unnecessarycode/UnnecessaryFinalModifier missing cases</li>
      <li><a href="https://github.com/pmd/pmd/issues/676">#676</a>: [java] java-unnecessarycode/UnnecessaryFinalModifier on try-with-resources</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-36">API Changes</h3>

<ul>
  <li>
    <p>The class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.dfa.NodeType</code> has been converted to an enum.
All node types are enum members now instead of int constants. The names for node types are retained.</p>
  </li>
  <li>
    <p>The <em>Properties API</em> (rule and report properties) has been revamped to be fully typesafe. This is everything
around <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertyDescriptor</code>.</p>

    <p>Note: All classes related to properties have been moved into the package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties</code>.</p>
  </li>
  <li>
    <p>The rule classes <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.rule.apexunit.ApexUnitTestClassShouldHaveAsserts</code>
and <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.rule.apexunit.ApexUnitTestShouldNotUseSeeAllDataTrue</code> have been
renamed to <code class="language-plaintext highlighter-rouge">ApexUnitTestClassShouldHaveAssertsRule</code> and <code class="language-plaintext highlighter-rouge">ApexUnitTestShouldNotUseSeeAllDataTrueRule</code>,
respectively. This is to comply with the naming convention, that each rule class should be suffixed with “Rule”.</p>

    <p>This change has no impact on custom rulesets, since the rule names themselves didn’t change.</p>
  </li>
  <li>
    <p>The never implemented method <code class="language-plaintext highlighter-rouge">PMD.processFiles(PMDConfiguration, RuleSetFactory, Collection&lt;File&gt;, RuleContext, ProgressMonitor)</code> along with the interface <code class="language-plaintext highlighter-rouge">ProgressMonitor</code> has been removed.</p>
  </li>
  <li>
    <p>The method <code class="language-plaintext highlighter-rouge">PMD.setupReport(RuleSets, RuleContext, String)</code> is gone. It was used to report dysfunctional
rules. But PMD does this now automatically before processing the files, so there is no need for this
method anymore.</p>
  </li>
  <li>All APIs deprecated in older versions are now removed. This includes:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">Renderer.getPropertyDefinitions</code></li>
      <li><code class="language-plaintext highlighter-rouge">AbstractRenderer.defineProperty(String, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">AbstractRenderer.propertyDefinitions</code></li>
      <li><code class="language-plaintext highlighter-rouge">ReportListener</code></li>
      <li><code class="language-plaintext highlighter-rouge">Report.addListener(ReportListener)</code></li>
      <li><code class="language-plaintext highlighter-rouge">SynchronizedReportListener</code></li>
      <li><code class="language-plaintext highlighter-rouge">CPDConfiguration.CPDConfiguration(int, Language, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">CPDConfiguration.getRendererFromString(String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StreamUtil</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.appendXmlEscaped(StringBuilder, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.htmlEncode(String)</code></li>
    </ul>
  </li>
  <li>Several methods in <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.CollectionUtil</code> have been deprecated and will be removed in PMD 7.0.0. In particular:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">CollectionUtil.addWithoutDuplicates(T[], T)</code></li>
      <li><code class="language-plaintext highlighter-rouge">CollectionUtil.addWithoutDuplicates(T[], T[])</code></li>
      <li><code class="language-plaintext highlighter-rouge">CollectionUtil.areSemanticEquals(T[], T[])</code></li>
      <li><code class="language-plaintext highlighter-rouge">CollectionUtil.areEqual(Object, Object)</code></li>
      <li><code class="language-plaintext highlighter-rouge">CollectionUtil.arraysAreEqual(Object, Object)</code></li>
      <li><code class="language-plaintext highlighter-rouge">CollectionUtil.valuesAreTransitivelyEqual(Object[], Object[])</code></li>
    </ul>
  </li>
  <li>Several methods in <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.StringUtil</code> have been deprecated and will be removed in PMD 7.0.0. In particular:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.startsWithAny(String, String[])</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.isNotEmpty(String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.isEmpty(String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.isMissing(String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.areSemanticEquals(String, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.replaceString(String, String, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.replaceString(String, char, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.substringsOf(String, char)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.substringsOf(String, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.asStringOn(StringBuffer, Iterator, String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.asStringOn(StringBuilder, Object[], String)</code></li>
      <li><code class="language-plaintext highlighter-rouge">StringUtil.lpad(String, int)</code></li>
    </ul>
  </li>
  <li>
    <p>The class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.typeresolution.typedefinition.JavaTypeDefinition</code> is now abstract, and has been enhanced
to provide several new methods.</p>
  </li>
  <li>
    <p>The constructor of <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSetFactory</code>, which took a <code class="language-plaintext highlighter-rouge">ClassLoader</code> is deprecated.
Please use the alternative constructor with the <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.ResourceLoader</code> instead.</p>
  </li>
  <li>The following GUI related classes have been deprecated and will be removed in PMD 7.0.0.
The tool “bgastviewer”, that could be started via the script <code class="language-plaintext highlighter-rouge">bgastviewer.bat</code> or <code class="language-plaintext highlighter-rouge">run.sh bgastviewer</code> is
deprecated, too, and will be removed in PMD 7.0.0.
Both the “old designer” and “bgastviewer” are replaced by the <a href="#new-rule-designer">New Rule Designer</a>.
    <ul>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.designer.CodeEditorTextPane</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.designer.CreateXMLRulePanel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.designer.Designer</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.designer.DFAPanel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.designer.LineGetter</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.Viewer</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.ActionCommands</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.ASTPanel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.EvaluationResultsPanel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.MainFrame</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.ParseExceptionHandler</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.SourceCodePanel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.XPathPanel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.menu.ASTNodePopupMenu</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.menu.AttributesSubMenu</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.menu.SimpleNodeSubMenu</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.gui.menu.XPathFragmentAddingItem</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.model.ASTModel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.model.AttributeToolkit</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.model.SimpleNodeTreeNodeAdapter</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.model.ViewerModel</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.model.ViewerModelEvent</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.model.ViewerModelListener</code></li>
      <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.viewer.util.NLS</code></li>
    </ul>
  </li>
  <li>The following methods in <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.Rule</code> have been deprecated and will be removed in PMD 7.0.0.
All methods are replaced by their bean-like counterparts
    <ul>
      <li><code class="language-plaintext highlighter-rouge">void setUsesDFA()</code>. Use <code class="language-plaintext highlighter-rouge">void setDfa(boolean)</code> instead.</li>
      <li><code class="language-plaintext highlighter-rouge">boolean usesDFA()</code>. Use <code class="language-plaintext highlighter-rouge">boolean isDfa()</code> instead.</li>
      <li><code class="language-plaintext highlighter-rouge">void setUsesTypeResolution()</code>. Use <code class="language-plaintext highlighter-rouge">void setTypeResolution(boolean)</code> instead.</li>
      <li><code class="language-plaintext highlighter-rouge">boolean usesTypeResolution()</code>. Use <code class="language-plaintext highlighter-rouge">boolean isTypeResolution()</code> instead.</li>
      <li><code class="language-plaintext highlighter-rouge">void setUsesMultifile()</code>. Use <code class="language-plaintext highlighter-rouge">void setMultifile(boolean)</code> instead.</li>
      <li><code class="language-plaintext highlighter-rouge">boolean usesMultifile()</code>. Use <code class="language-plaintext highlighter-rouge">boolean isMultifile()</code> instead.</li>
      <li><code class="language-plaintext highlighter-rouge">boolean usesRuleChain()</code>. Use <code class="language-plaintext highlighter-rouge">boolean isRuleChain()</code> instead.</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-42">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/287">#287</a>: [apex] Make Rule suppression work - <a href="https://github.com/up2go-rsoesemann">Robert Sösemann</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/420">#420</a>: [java] Fix UR anomaly in assert statements - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/482">#482</a>: [java] Metrics testing framework + improved capabilities for metrics - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/484">#484</a>: [core] Changed linux usage to a more unix like path - <a href="https://github.com/patriksevallius">patriksevallius</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/486">#486</a>: [java] Add basic method typeresolution - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/492">#492</a>: [java] Typeresolution for overloaded methods - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/495">#495</a>: [core] Custom rule reinitialization code - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/479">#479</a>: [core] Typesafe and immutable properties - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/499">#499</a>: [java] Metrics memoization tests - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/501">#501</a>: [java] Add support for most specific vararg method type resolution - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/502">#502</a>: [java] Add support for static field type resolution - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/505">#505</a>: [java] Followup on metrics - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/506">#506</a>: [java] Add reduction rules to type inference - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/511">#511</a>: [core] Prepare abstraction of the metrics framework - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/512">#512</a>: [java] Add incorporation to type inference - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/513">#513</a>: [java] Fix for maximally specific method selection - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/514">#514</a>: [java] Add static method type resolution - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/517">#517</a>: [doc] Metrics documentation - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/518">#518</a>: [core] Properties refactoring: factorized enumerated property - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/523">#523</a>: [java] Npath complexity metric and rule - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/524">#524</a>: [java] Add support for explicit type arguments with method invocation - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/525">#525</a>: [core] Fix line ending and not ignored files issues - <a href="https://github.com/MatiasComercio">Matias Comercio</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/528">#528</a>: [core] Fix typo - <a href="https://github.com/kayoub5">Ayoub Kaanich</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/529">#529</a>: [java] Abstracted the Java metrics framework - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/530">#530</a>: [java] Fix issue #527: Lombok getter annotation on enum is not recognized correctly - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/533">#533</a>: [core] improve error message - <a href="https://github.com/deki">Dennis Kieselhorst</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/535">#535</a>: [apex] Fix broken Apex visitor adapter - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/542">#542</a>: [java] Metrics abstraction - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/545">#545</a>: [apex] Apex metrics framework - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/548">#548</a>: [java] Metrics documentation - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/550">#550</a>: [java] Add basic resolution to type inference - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/553">#553</a>: [java] Refactored ParserTst into a static utility class + add getSourceFromClass - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/554">#554</a>: [java] Fix #537: UnnecessaryParentheses fails to detect obvious scenario - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/555">#555</a>: [java] Changed metrics/CyclomaticComplexityRule to use WMC when reporting classes - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/556">#556</a>: [java] Fix #357: UncommentedEmptyConstructor consider annotations on Constructor - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/557">#557</a>: [java] Fix NPath metric not counting ternaries correctly - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/563">#563</a>: [java] Add support for basic method type inference for strict invocation - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/566">#566</a>: [java] New rule in migrating ruleset: ForLoopCanBeForeach - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/567">#567</a>: [java] Last API change for metrics (metric options) - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/570">#570</a>: [java] Model lower, upper and intersection types - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/573">#573</a>: [java] Data class rule - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/576">#576</a>: [doc][java] Add hint for Guava users in InefficientEmptyStringCheck - <a href="https://github.com/mmoehring">mmoehring</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/578">#578</a>: [java] Refactored god class rule - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/579">#579</a>: [java] Update parsing to produce upper and lower bounds - <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/580">#580</a>: [core] Add AbstractMetric to topple the class hierarchy of metrics - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/581">#581</a>: [java] Relax AbstractClassWithoutAnyMethod when class is annotated by @AutoValue - <a href="https://github.com/vanniktech">Niklas Baudy</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/583">#583</a>: [java] Documentation about writing metrics - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/585">#585</a>: [java] Moved NcssCountRule to codesize.xml - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/587">#587</a>: [core] Properties refactoring: Move static constants of ValueParser to class ValueParserConstants - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/588">#588</a>: [java] XPath function to compute metrics - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/598">#598</a>: [java] Fix #388: controversial.AvoidLiteralsInIfCondition 0.0 false positive - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/602">#602</a>: [java] [apex] Separate multifile analysis from metrics - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/620">#620</a>: [core] Moved properties to n.s.pmd.properties - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/625">#625</a>: [apex] empty code ruleset for apex - <a href="https://github.com/JAertgeerts">Jan Aertgeerts</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/632">#632</a>: [apex] Add AvoidDirectAccessTriggerMap rule to the style set - <a href="https://github.com/JAertgeerts">Jan Aertgeerts</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/644">#644</a>: [core] Prevent internal dev-properties from being displayed on CodeClimate renderer - <a href="https://github.com/filipesperandio">Filipe Esperandio</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/660">#660</a>: [apex] avoid sosl in loops - <a href="https://github.com/JAertgeerts">Jan Aertgeerts</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/661">#661</a>: [apex] avoid hardcoding id’s - <a href="https://github.com/JAertgeerts">Jan Aertgeerts</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/666">#666</a>: [java] Add DoNotExtendJavaLangThrowable rule - <a href="https://github.com/robertpainsi">Robert Painsi</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/668">#668</a>: [core] Fix javadoc warnings on pmd-core - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/669">#669</a>: [core] Builder pattern for properties - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/675">#675</a>: [java] Fix in Java grammar: Try with final resource node error - <a href="https://github.com/gibarsin">Gonzalo Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/679">#679</a>: [core] Token scheme generalization - <a href="https://github.com/gibarsin">Gonzalo Ibars Ingman</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/694">#694</a>: [core] Add minor fixes to root pom - <a href="https://github.com/MatiasComercio">Matias Comercio</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/696">#696</a>: [core] Add remove operation over nodes - <a href="https://github.com/MatiasComercio">Matias Comercio</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/711">#711</a>: [ui] New rule designer - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/722">#722</a>: [java] Move NPathComplexity from metrics to design - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/723">#723</a>: [core] Rule factory refactoring - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/726">#726</a>: [java] Fix issue #721 (NPE in InvalidSlf4jMessageFormat) - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/727">#727</a>: [core] Fix #725: numeric property descriptors now check their default value - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/733">#733</a>: [java] Some improvements to CommentRequired - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/734">#734</a>: [java] Move CyclomaticComplexity from metrics to design - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/736">#736</a>: [core] Make Saxon support multi valued XPath properties - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/737">#737</a>: [doc] Fix NPathComplexity documentation bad rendering - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/744">#744</a>: [doc] Added Apex to supported languages - <a href="https://github.com/coola">Michał Kuliński</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/746">#746</a>: [doc] Fix typo in incremental analysis log message - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/749">#749</a>: [doc] Update the documentation for properties - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/758">#758</a>: [core] Expose the full mapping from property type id to property extractor - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/764">#764</a>: [core] Prevent method and file property use in XPath rules - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/771">#771</a>: [apex] Fix Apex metrics framework failing on triggers, refs #768 - <a href="https://github.com/oowekyala">Clément Fournier</a></li>
  <li><a href="https://github.com/pmd/pmd/pull/774">#774</a>: [java] Avoid using FileInput/Output - see JDK-8080225 - <a href="https://github.com/chonton">Chas Honton</a></li>
</ul>

<h2 id="01-july-2017---581">01-July-2017 - 5.8.1</h2>

<p>The PMD team is pleased to announce PMD 5.8.1.</p>

<p>This is a bug fixing release.</p>

<h3 id="fixed-issues-43">Fixed Issues</h3>

<ul>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/471">#471</a>: [java] Error while processing class when EnumMap is used in PMD 5.8.0</li>
      <li><a href="https://github.com/pmd/pmd/issues/477">#477</a>: [core] NoClassDefFoundError under 5.8</li>
      <li><a href="https://github.com/pmd/pmd/issues/478">#478</a>: [core] Processing issues dealing with anonymous classes</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-37">API Changes</h3>

<ul>
  <li>The <code class="language-plaintext highlighter-rouge">getGenericArgs()</code> method introduced to <code class="language-plaintext highlighter-rouge">TypeNode</code> in 5.8.0 was removed. You can access to generics’ info through the <code class="language-plaintext highlighter-rouge">JavaTypeDefinition</code> object.</li>
  <li>The <code class="language-plaintext highlighter-rouge">JavaTypeDefinitionBuilder</code> class introduced in 5.8.0 is not more. You can use factory methods available on <code class="language-plaintext highlighter-rouge">JavaTypeDefinition</code></li>
</ul>

<h3 id="external-contributions-43">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/472">#472</a>: [java] fix error with raw types, bug #471</li>
</ul>

<h2 id="24-june-2017---580">24-June-2017 - 5.8.0</h2>

<p>The PMD team is pleased to announce PMD 5.8.0.</p>

<p>This is a minor release.</p>

<h3 id="new-and-noteworthy-40">New and noteworthy</h3>

<h4 id="java-type-resolution-1">Java Type Resolution</h4>

<p>As part of Google Summer of Code 2017, <a href="https://github.com/WinterGrascph">Bendegúz Nagy</a> has been working on completing type resolution for Java.
His progress so far has allowed to properly resolve, in addition to previously supported statements:</p>

<ul>
  <li>References to <code class="language-plaintext highlighter-rouge">this</code> and <code class="language-plaintext highlighter-rouge">super</code>, even when qualified</li>
  <li>References to fields, even when chained (ie: <code class="language-plaintext highlighter-rouge">this.myObject.aField</code>), and properly handling inheritance / shadowing</li>
</ul>

<p>Lambda parameter types where these are infered rather than explicit are still not supported. Expect future releases to do so.</p>

<h4 id="metrics-framework-1">Metrics Framework</h4>

<p>As part of Google Summer of Code 2017, <a href="https://github.com/oowekyala">Clément Fournier</a> has been working on
a new metrics framework for object-oriented metrics.</p>

<p>The basic groundwork has been done already and with this release, including a first rule based on the
metrics framework as a proof-of-concept: The rule <em>CyclomaticComplexity</em>, currently in the temporary
ruleset <em>java-metrics</em>, uses the Cyclomatic Complexity metric to find overly complex code.
This rule will eventually replace the existing three <em>CyclomaticComplexity</em> rules that are currently
defined in the <em>java-codesize</em> ruleset (see also <a href="https://github.com/pmd/pmd/issues/445">issue #445</a>).</p>

<p>Since this work is still in progress, the metrics API (package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.oom</code>)
is not finalized yet and is expected to change.</p>

<h4 id="modified-rules-25">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnnecessaryFinalModifier</code> (ruleset java-unnecessary) now also reports on private methods marked as <code class="language-plaintext highlighter-rouge">final</code>.
Being private, such methods can’t be overriden, and therefore, the final keyword is redundant.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">PreserveStackTrace</code> (ruleset java-design) has been relaxed to support the builder pattern on thrown exception.
This change may introduce some false positives if using the exception in non-orthodox ways for things other than setting the
root cause of the exception. Contact us if you find any such scenarios.</p>
  </li>
  <li>
    <p>The ruleset java-junit now properly detects JUnit5, and rules are being adapted to the changes on it’s API.
This support is, however, still incomplete. Let us know of any uses we are still missing on the <a href="https://github.com/pmd/pmd/issues">issue tracker</a></p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">EmptyTryBlock</code> (ruleset java-empty) now allows empty blocks when using try-with-resources.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">EmptyCatchBlock</code> (ruleset java-empty) now exposes a new property called <code class="language-plaintext highlighter-rouge">allowExceptionNameRegex</code>.
This allow to setup a regular expression for names of exceptions you wish to ignore for this rule. For instance,
setting it to <code class="language-plaintext highlighter-rouge">^(ignored|expected)$</code> would ignore all empty catch blocks where the catched exception is named
either <code class="language-plaintext highlighter-rouge">ignored</code> or <code class="language-plaintext highlighter-rouge">expected</code>. The default ignores no exceptions, being backwards compatible.</p>
  </li>
</ul>

<h4 id="deprecated-rules-14">Deprecated Rules</h4>

<ul>
  <li>The three complexity rules <code class="language-plaintext highlighter-rouge">CyclomaticComplexity</code>, <code class="language-plaintext highlighter-rouge">StdCyclomaticComplexity</code>, <code class="language-plaintext highlighter-rouge">ModifiedCyclomaticComplexity</code> (ruleset java-codesize) have been deprecated. They will be eventually replaced
by a new CyclomaticComplexity rule based on the metrics framework. See also <a href="https://github.com/pmd/pmd/issues/445">issue #445</a>.</li>
</ul>

<h3 id="fixed-issues-44">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/380">#380</a>: [core] NPE in RuleSet.hashCode</li>
      <li><a href="https://github.com/pmd/pmd/issues/407">#407</a>: [web] Release date is not properly formatted</li>
      <li><a href="https://github.com/pmd/pmd/issues/429">#429</a>: [core] Error when running PMD from folder with space</li>
    </ul>
  </li>
  <li>apex
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/427">#427</a>: [apex] CPD error when parsing apex code from release 5.5.3</li>
    </ul>
  </li>
  <li>cpp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/431">#431</a>: [cpp] CPD gives wrong duplication blocks for CPP code</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/414">#414</a>: [java] Java 8 parsing problem with annotations for wildcards</li>
      <li><a href="https://github.com/pmd/pmd/issues/415">#415</a>: [java] Parsing Error when having an Annotated Inner class</li>
      <li><a href="https://github.com/pmd/pmd/issues/417">#417</a>: [java] Parsing Problem with Annotation for Array Member Types</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/397">#397</a>: [java] ConstructorCallsOverridableMethodRule: false positive for method called from lambda expression</li>
      <li><a href="https://github.com/pmd/pmd/issues/410">#410</a>: [java] ImmutableField: False positive with lombok</li>
      <li><a href="https://github.com/pmd/pmd/issues/422">#422</a>: [java] PreserveStackTraceRule: false positive when using builder pattern</li>
    </ul>
  </li>
  <li>java-empty
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/413">#413</a>: [java] EmptyCatchBlock don’t fail when exception is named ignore / expected</li>
      <li><a href="https://github.com/pmd/pmd/issues/432">#432</a>: [java] EmptyTryBlock: false positive for empty try-with-resource</li>
    </ul>
  </li>
  <li>java-imports:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/348">#348</a>: [java] imports/UnusedImport rule not considering static inner classes of imports</li>
    </ul>
  </li>
  <li>java-junit
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/428">#428</a>: [java] PMD requires public modifier on JUnit 5 test</li>
      <li><a href="https://github.com/pmd/pmd/issues/465">#465</a>: [java] NullPointerException in JUnitTestsShouldIncludeAssertRule</li>
    </ul>
  </li>
  <li>java-logging:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/365">#365</a>: [java] InvalidSlf4jMessageFormat does not handle inline incrementation of arguments</li>
    </ul>
  </li>
  <li>java-strictexceptions
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/350">#350</a>: [java] Throwing Exception in method signature is fine if the method is overriding or implementing something</li>
    </ul>
  </li>
  <li>java-typeresolution
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/350">#350</a>: [java] Throwing Exception in method signature is fine if the method is overriding or implementing something</li>
    </ul>
  </li>
  <li>java-unnecessary
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/421">#421</a>: [java] UnnecessaryFinalModifier final in private method</li>
    </ul>
  </li>
  <li>jsp
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/311">#311</a>: [jsp] Parse error on HTML boolean attribute</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-44">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/406">#406</a>: [java] False positive with lambda in java-design/ConstructorCallsOverridableMethod</li>
  <li><a href="https://github.com/pmd/pmd/pull/409">#409</a>: [java] Groundwork for the upcoming metrics framework</li>
  <li><a href="https://github.com/pmd/pmd/pull/416">#416</a>: [java] FIXED: Java 8 parsing problem with annotations for wildcards</li>
  <li><a href="https://github.com/pmd/pmd/pull/418">#418</a>: [java] Type resolution: super and this keywords</li>
  <li><a href="https://github.com/pmd/pmd/pull/423">#423</a>: [java] Add field access type resolution in non-generic cases</li>
  <li><a href="https://github.com/pmd/pmd/pull/425">#425</a>: [java] False positive with builder pattern in java-design/PreserveStackTrace</li>
  <li><a href="https://github.com/pmd/pmd/pull/426">#426</a>: [java] UnnecessaryFinalModifier final in private method</li>
  <li><a href="https://github.com/pmd/pmd/pull/436">#436</a>: [java] Metrics framework tests and various improvements</li>
  <li><a href="https://github.com/pmd/pmd/pull/440">#440</a>: [core] Created ruleset schema 3.0.0 (to use metrics)</li>
  <li><a href="https://github.com/pmd/pmd/pull/443">#443</a>: [java] Optimize typeresolution, by skipping package and import declarations in visit(ASTName)</li>
  <li><a href="https://github.com/pmd/pmd/pull/444">#444</a>: [java] [typeresolution]: add support for generic fields</li>
  <li><a href="https://github.com/pmd/pmd/pull/451">#451</a>: [java] Metrics framework: first metrics + first rule</li>
</ul>

<h2 id="20-mai-2017---570">20-Mai-2017 - 5.7.0</h2>

<p>The PMD team is pleased to announce PMD 5.7.0.</p>

<p>This is a minor release.</p>

<h3 id="new-and-noteworthy-41">New and noteworthy</h3>

<h4 id="modified-rules-26">Modified Rules</h4>

<ul>
  <li>
    <p>The rule “FieldDeclarationsShouldBeAtStartOfClass” of the java-design ruleset has a new property <code class="language-plaintext highlighter-rouge">ignoreInterfaceDeclarations</code>.
Setting this property to <code class="language-plaintext highlighter-rouge">true</code> ignores interface declarations, that precede fields.
Example usage:</p>

    <rule ref="rulesets/java/design.xml/FieldDeclarationsShouldBeAtStartOfClass">
    <properties>
        <property name="ignoreInterfaceDeclarations" value="true" />
    </properties>
</rule>
  </li>
</ul>

<h4 id="renderers">Renderers</h4>

<ul>
  <li>Added the ‘empty’ renderer which will write nothing.  Does not affect other behaviors, for example the command line PMD exit status
will still indicate whether violations were found.</li>
</ul>

<h3 id="fixed-issues-45">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/377">#377</a>: [core] Use maven wrapper and upgrade to maven 3.5.0</li>
      <li><a href="https://github.com/pmd/pmd/issues/376">#376</a>: [core] Improve build time on travis</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/378">#378</a>: [java] Parser Error for empty statements</li>
    </ul>
  </li>
  <li>java-coupling
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1427/">#1427</a>: [java] Law of Demeter violations for the Builder pattern</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/345">#345</a>: [java] FieldDeclarationsShouldBeAtStartOfClass: Add ability to ignore interfaces</li>
      <li><a href="https://github.com/pmd/pmd/issues/389">#389</a>: [java] RuleSetCompatibility - not taking rename of UnusedModifier into account</li>
    </ul>
  </li>
  <li>java-junit
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/358">#358</a>: [java] Mockito verify method is not taken into account in JUnitTestsShouldIncludeAssert rule</li>
    </ul>
  </li>
  <li>java-strings
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/334">#334</a>: [java] [doc] Add suggestion to use StringUtils#isBlank for InefficientEmptyStringCheck</li>
    </ul>
  </li>
  <li>jsp-basic
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/369">#369</a>: [jsp] Wrong issue “JSP file should use UTF-8 encoding”</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-38">API Changes</h3>

<ul>
  <li>The method <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.StringUtil#htmlEncode(String)</code> is deprecated.
<code class="language-plaintext highlighter-rouge">org.apache.commons.lang3.StringEscapeUtils#escapeHtml4(String)</code> should be used instead.</li>
</ul>

<h3 id="external-contributions-45">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/368">#368</a>: [vf] Adding proper AST support for negation expressions</li>
  <li><a href="https://github.com/pmd/pmd/pull/372">#372</a>: [core] Fix XSS in HTML renderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/374">#374</a>: [java] Add property to ignore interfaces in FieldDeclarationsShouldBeAtStartOfClassRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/381">#381</a>: [core] Fix broken link in the site’s doc</li>
  <li><a href="https://github.com/pmd/pmd/pull/382">#382</a>: [java] Added documentation details on InefficientEmptyStringCheck</li>
  <li><a href="https://github.com/pmd/pmd/pull/383">#383</a>: [jsp] Fixed JspEncoding false positive</li>
  <li><a href="https://github.com/pmd/pmd/pull/390">#390</a>: [java] Remove trailing whitespaces in design.xml</li>
  <li><a href="https://github.com/pmd/pmd/pull/391">#391</a>: [apex] Fix documentation typo</li>
  <li><a href="https://github.com/pmd/pmd/pull/392">#392</a>: [java] False positive for Law Of Demeter (Builder pattern)</li>
  <li><a href="https://github.com/pmd/pmd/pull/395">#395</a>: [java] Mockito verify method is not taken into account in JUnitTestsShouldIncludeAssert rule</li>
</ul>

<h2 id="29-april-2017---561">29-April-2017 - 5.6.1</h2>

<p>The PMD team is pleased to announce PMD 5.6.1.</p>

<p>This is a bug fixing release.</p>

<h3 id="fixed-issues-46">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/363">#363</a>: [core] Rule documentation pages are missing</li>
      <li><a href="https://github.com/pmd/pmd/issues/364">#364</a>: [core] Stream closed exception when running through maven</li>
      <li><a href="https://github.com/pmd/pmd/issues/373">#373</a>: [core] RuleSetFactory - add more helper methods</li>
    </ul>
  </li>
</ul>

<h2 id="22-april-2017---560">22-April-2017 - 5.6.0</h2>

<p>The PMD team is pleased to announce PMD 5.6.0.</p>

<p>The most significant changes are on analysis performance, support for Salesforce’s Visualforce language
a whole new <strong>Apex Security Rule Set</strong> and the new <strong>Braces Rule Set for Apex</strong>.</p>

<p>We have added initial support for <strong>incremental analysis</strong>. The experimental feature allows
PMD to cache analysis results between executions to speed up the analysis for all
languages. New CLI flags and Ant options are available to configure it. Currently
<em>the feature is disabled by default</em>, but this may change as it matures.</p>

<p>Multithread performance has been enhanced by reducing thread-contention on a
bunch of areas. This is still an area of work, as the speedup of running
multithreaded analysis is still relatively small (4 threads produce less
than a 50% speedup). Future releases will keep improving on this area.</p>

<p>Once again, <em>Symbol Table</em> has been an area of great performance improvements.
This time we were able to further improve it’s performance by roughly 10% on all
supported languages. In <em>Java</em> in particular, several more improvements were possible,
improving <em>Symbol Table</em> performance by a whooping 80%, that’s over 15X faster
than PMD 5.5.1, when we first started working on it.</p>

<p>Java developers will also appreciate the revamp of <code class="language-plaintext highlighter-rouge">CloneMethodMustImplementCloneable</code>,
making it over 500X faster, and <code class="language-plaintext highlighter-rouge">PreserveStackTrace</code> which is now 7X faster.</p>

<h3 id="new-and-noteworthy-42">New and noteworthy</h3>

<h4 id="incremental-analysis-1">Incremental Analysis</h4>

<p>PMD now supports incremental analysis. Analysis results can be cached and reused between runs.
This allows PMD to skip files without violations that have remained unchanged. In future releases,
we plan to extend this behavior to unchanged files with violations too.</p>

<p>The cache is automatically invalidated if:</p>
<ul>
  <li>the used PMD version changes</li>
  <li>the <code class="language-plaintext highlighter-rouge">auxclasspath</code> changed and any rules require type resolution</li>
  <li>the configured rule set has changed</li>
</ul>

<p>This feature is <em>incubating</em> and is disabled by default. It’s only enabled if you
specifically configure a cache file.</p>

<p>To configure the cache file from CLI, a new <code class="language-plaintext highlighter-rouge">-cache &lt;path/to/file&gt;</code> flag has been added.</p>

<p>For Ant, a new <code class="language-plaintext highlighter-rouge">cacheLocation</code> attribute has been added. For instance:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">"pmd"</span><span class="nt">&gt;</span>
        <span class="nt">&lt;taskdef</span> <span class="na">name=</span><span class="s">"pmd"</span> <span class="na">classname=</span><span class="s">"net.sourceforge.pmd.ant.PMDTask"</span><span class="nt">/&gt;</span>
        <span class="nt">&lt;pmd</span> <span class="na">cacheLocation=</span><span class="s">"build/pmd/pmd.cache"</span><span class="nt">&gt;</span>
            <span class="nt">&lt;ruleset&gt;</span>rulesets/java/design.xml<span class="nt">&lt;/ruleset&gt;</span>
            <span class="nt">&lt;ruleset&gt;</span>java-basic<span class="nt">&lt;/ruleset&gt;</span>
            <span class="nt">&lt;formatter</span> <span class="na">type=</span><span class="s">"xml"</span> <span class="na">toFile=</span><span class="s">"c:\pmd_report.xml"</span><span class="nt">/&gt;</span>
            <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">"/usr/local/j2sdk1.4.1_01/src/"</span><span class="nt">&gt;</span>
                <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">"java/lang/*.java"</span><span class="nt">/&gt;</span>
            <span class="nt">&lt;/fileset&gt;</span>
        <span class="nt">&lt;/pmd&gt;</span>
    <span class="nt">&lt;/target&gt;</span>
</code></pre></div></div>

<h4 id="visualforce-support">Visualforce Support</h4>

<p>Salesforce developers rejoice. To out growing Apex support we have added full Visualforce support.
Both CPD and PD are available. So far only a security ruleset is available (<code class="language-plaintext highlighter-rouge">vf-security</code>).</p>

<h5 id="visualforce-security-rule-set">Visualforce Security Rule Set</h5>

<h6 id="vfunescapeel">VfUnescapeEl</h6>

<p>The rule looks for Expression Language occurances printing unescaped values from the backend. These
could lead to XSS attacks.</p>

<h6 id="vfcsrf">VfCsrf</h6>

<p>The rule looks for <code class="language-plaintext highlighter-rouge">&lt;apex:page&gt;</code> tags performing an action on page load, definish such <code class="language-plaintext highlighter-rouge">action</code>
through Expression Language, as doing so is vulnerable to CSRF attacks.</p>

<h4 id="apex-security-rule-set">Apex Security Rule Set</h4>

<p>A new ruleset focused on security has been added, consisting of a wide range of rules
to detect most common security problems.</p>

<h5 id="apexbadcrypto">ApexBadCrypto</h5>

<p>The rule makes sure you are using randomly generated IVs and keys for <code class="language-plaintext highlighter-rouge">Crypto</code> calls.
Hard-wiring these values greatly compromises the security of encrypted data.</p>

<p>For instance, it would report violations on code such as:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class without sharing Foo {
    Blob hardCodedIV = Blob.valueOf('Hardcoded IV 123');
    Blob hardCodedKey = Blob.valueOf('0000000000000000');
    Blob data = Blob.valueOf('Data to be encrypted');
    Blob encrypted = Crypto.encrypt('AES128', hardCodedKey, hardCodedIV, data);
}

</code></pre></div></div>

<h5 id="apexcrudviolation">ApexCRUDViolation</h5>

<p>The rule validates you are checking for access permissions before a SOQL/SOSL/DML operation.
Since Apex runs in system mode not having proper permissions checks results in escalation of
privilege and may produce runtime errors. This check forces you to handle such scenarios.</p>

<p>For example, the following code is considered valid:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class Foo {
    public Contact foo(String status, String ID) {
        Contact c = [SELECT Status__c FROM Contact WHERE Id=:ID];

        // Make sure we can update the database before even trying
        if (!Schema.sObjectType.Contact.fields.Name.isUpdateable()) {
            return null;
        }

        c.Status__c = status;
        update c;
        return c;
    }
}
</code></pre></div></div>

<h5 id="apexcsrf">ApexCSRF</h5>

<p>Check to avoid making DML operations in Apex class constructor/init method. This prevents
modification of the database just by accessing a page.</p>

<p>For instance, the following code would be invalid:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class Foo {
    public init() {
        insert data;
    }

    public Foo() {
        insert data;
    }
}
</code></pre></div></div>

<h5 id="apexdangerousmethods">ApexDangerousMethods</h5>

<p>Checks against calling dangerous methods.</p>

<p>For the time being, it reports:</p>

<ul>
  <li>Against <code class="language-plaintext highlighter-rouge">FinancialForce</code>’s <code class="language-plaintext highlighter-rouge">Configuration.disableTriggerCRUDSecurity()</code>. Disabling CRUD security
opens the door to several attacks and requires manual validation, which is unreliable.</li>
  <li>Calling <code class="language-plaintext highlighter-rouge">System.debug</code> passing sensitive data as parameter, which could lead to exposure
of private data.</li>
</ul>

<h5 id="apexinsecureendpoint">ApexInsecureEndpoint</h5>

<p>Checks against accessing endpoints under plain <strong>http</strong>. You should always use
<strong>https</strong> for security.</p>

<h5 id="apexopenredirect">ApexOpenRedirect</h5>

<p>Checks against redirects to user-controlled locations. This prevents attackers from
redirecting users to phishing sites.</p>

<p>For instance, the following code would be reported:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class without sharing Foo {
    String unsafeLocation = ApexPage.getCurrentPage().getParameters.get('url_param');
    PageReference page() {
       return new PageReference(unsafeLocation);
    }
}
</code></pre></div></div>

<h5 id="apexsharingviolations">ApexSharingViolations</h5>

<p>Detect classes declared without explicit sharing mode if DML methods are used. This
forces the developer to take access restrictions into account before modifying objects.</p>

<h5 id="apexsoqlinjection">ApexSOQLInjection</h5>

<p>Detects the usage of untrusted / unescaped variables in DML queries.</p>

<p>For instance, it would report on:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class Foo {
    public void test1(String t1) {
        Database.query('SELECT Id FROM Account' + t1);
    }
}
</code></pre></div></div>

<h5 id="apexsuggestusingnamedcred">ApexSuggestUsingNamedCred</h5>

<p>Detects hardcoded credentials used in requests to an endpoint.</p>

<p>You should refrain from hardcoding credentials:</p>
<ul>
  <li>They are hard to mantain by being mixed in application code</li>
  <li>Particularly hard to update them when used from different classes</li>
  <li>Granting a developer access to the codebase means granting knowledge
 of credentials, keeping a two-level access is not possible.</li>
  <li>Using different credentials for different environments is troublesome
 and error-prone.</li>
</ul>

<p>Instead, you should use <em>Named Credentials</em> and a callout endpoint.</p>

<p>For more information, you can check <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm">this</a></p>

<h5 id="apexxssfromescapefalse">ApexXSSFromEscapeFalse</h5>

<p>Reports on calls to <code class="language-plaintext highlighter-rouge">addError</code> with disabled escaping. The message passed to <code class="language-plaintext highlighter-rouge">addError</code>
will be displayed directly to the user in the UI, making it prime ground for XSS
attacks if unescaped.</p>

<h5 id="apexxssfromurlparam">ApexXSSFromURLParam</h5>

<p>Makes sure that all values obtained from URL parameters are properly escaped / sanitized
to avoid XSS attacks.</p>

<h4 id="apex-braces-rule-set">Apex Braces Rule Set</h4>

<p>The Braces Rule Set has been added and serves the same purpose as the Braces Rule Set from Java:
It checks the use and placement of braces around if-statements, for-loops and so on.</p>

<h5 id="ifstmtsmustusebraces">IfStmtsMustUseBraces</h5>

<p>Avoid using if statements without using braces to surround the code block. If the code
formatting or indentation is lost then it becomes difficult to separate the code being
controlled from the rest.</p>

<p>For instance, the following code shows the different. PMD would report on the not recommended approach:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>if (foo)    // not recommended
    x++;

if (foo) {  // preferred approach
    x++;
}
</code></pre></div></div>

<h5 id="whileloopsmustusebraces">WhileLoopsMustUseBraces</h5>

<p>Avoid using ‘while’ statements without using braces to surround the code block. If the code
formatting or indentation is lost then it becomes difficult to separate the code being
controlled from the rest.</p>

<p>For instance, the following code shows the different. PMD would report on the not recommended approach:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>while (true)    // not recommended
      x++;

while (true) {  // preferred approach
      x++;
}
</code></pre></div></div>

<h5 id="ifelsestmtsmustusebraces">IfElseStmtsMustUseBraces</h5>

<p>Avoid using if..else statements without using surrounding braces. If the code formatting
or indentation is lost then it becomes difficult to separate the code being controlled
from the rest.</p>

<p>For instance, the following code shows the different. PMD would report on the not recommended approach:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>// this is not recommended
if (foo)
       x = x+1;
   else
       x = x-1;

// preferred approach
if (foo) {
   x = x+1;
} else {
   x = x-1;
}
</code></pre></div></div>

<h5 id="forloopsmustusebraces">ForLoopsMustUseBraces</h5>

<p>Avoid using ‘for’ statements without using surrounding braces. If the code formatting or
indentation is lost then it becomes difficult to separate the code being controlled
from the rest.</p>

<p>For instance, the following code shows the different. PMD would report on the not recommended approach:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>for (int i = 0; i &lt; 42; i++) // not recommended
    foo();

for (int i = 0; i &lt; 42; i++) { // preferred approach
    foo();
}
</code></pre></div></div>

<h4 id="new-rules-29">New Rules</h4>

<h5 id="accessormethodgeneration-java-design">AccessorMethodGeneration (java-design)</h5>

<p>When accessing a private field / method from another class, the Java compiler will generate an accessor method
with package-private visibility. This adds overhead, and to the dex method count on Android. This situation can
be avoided by changing the visibility of the field / method from private to package-private.</p>

<p>For instance, it would report violations on code such as:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class OuterClass {
    private int counter;
    /* package */ int id;

    public class InnerClass {
        InnerClass() {
            OuterClass.this.counter++; // wrong, accessor method will be generated
        }

        public int getOuterClassId() {
            return OuterClass.this.id; // id is package-private, no accessor method needed
        }
    }
}
</code></pre></div></div>

<p>This new rule is part of the <code class="language-plaintext highlighter-rouge">java-design</code> ruleset.</p>

<h4 id="modified-rules-27">Modified Rules</h4>

<ul>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UnnecessaryLocalBeforeReturn</code> (ruleset java-design) now has a new property <code class="language-plaintext highlighter-rouge">statementOrderMatters</code>.
It is enabled by default to stay backwards compatible. But if this property is set to <code class="language-plaintext highlighter-rouge">false</code>, this rule
no longer requires the variable declaration
and return statement to be on consecutive lines. Any variable that is used solely in a return statement will be
reported.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">UseLocaleWithCaseConversions</code> (ruleset java-design) has been modified, to detect calls
to <code class="language-plaintext highlighter-rouge">toLowerCase</code> and to <code class="language-plaintext highlighter-rouge">toUpperCase</code> also within method call chains. This leads to more detected cases
and potentially new false positives.
See also <a href="https://sourceforge.net/p/pmd/bugs/1556/">bugfix #1556</a>.</p>
  </li>
  <li>
    <p>The Java rule <code class="language-plaintext highlighter-rouge">AvoidConstantsInterface</code> (ruleset java-design) has been removed. It is completely replaced by
the rule <code class="language-plaintext highlighter-rouge">ConstantsInInterface</code>.</p>
  </li>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">UnusedModifier</code> (ruleset java-unusedcode) has been moved to the ruleset java-unnecessary
and has been renamed to <code class="language-plaintext highlighter-rouge">UnnecessaryModifier</code>.
Additionally, it has been expanded to consider more redundant modifiers:
    <ul>
      <li>Annotations marked as <code class="language-plaintext highlighter-rouge">abstract</code>.</li>
      <li>Nested annotations marked as <code class="language-plaintext highlighter-rouge">static</code>.</li>
      <li>Nested annotations within another interface or annotation marked as <code class="language-plaintext highlighter-rouge">public</code>.</li>
      <li>Classes, interfaces or annotations nested within an annotation marked as <code class="language-plaintext highlighter-rouge">public</code> or <code class="language-plaintext highlighter-rouge">static</code>.</li>
      <li>Nested enums marked as <code class="language-plaintext highlighter-rouge">static</code>.</li>
    </ul>
  </li>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">JUnitTestsShouldIncludeAssert</code> (ruleset java-junit) now accepts usage of <code class="language-plaintext highlighter-rouge">@Rule</code> <code class="language-plaintext highlighter-rouge">ExpectedException</code>
to set expectations on exceptions, and are considered as valid assertions.</li>
</ul>

<h4 id="cpd-suppression-1">CPD Suppression</h4>

<p>It is now possible to allow CPD suppression through comments in <strong>Java</strong>. You tell CPD to ignore
the following code with a comment containin <code class="language-plaintext highlighter-rouge">CPD-OFF</code> and with <code class="language-plaintext highlighter-rouge">CPD-ON</code> you tell CPD to resume
analysis. The old approach via <code class="language-plaintext highlighter-rouge">@SuppressWarnings</code> annotation is still supported, but is considered
<strong>deprecated</strong>, since it is limited to locations where the <code class="language-plaintext highlighter-rouge">SuppressWarnings</code> annotation is allowed.
See <a href="https://github.com/pmd/pmd/pull/250">PR #250</a>.</p>

<p>For example:</p>

<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="kd">public</span> <span class="nc">Object</span> <span class="nf">someMethod</span><span class="o">(</span><span class="kt">int</span> <span class="n">x</span><span class="o">)</span> <span class="kd">throws</span> <span class="nc">Exception</span> <span class="o">{</span>
        <span class="c1">// some unignored code</span>

        <span class="c1">// tell cpd to start ignoring code - CPD-OFF</span>

        <span class="c1">// mission critical code, manually loop unroll</span>
        <span class="n">goDoSomethingAwesome</span><span class="o">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="o">);</span>
        <span class="n">goDoSomethingAwesome</span><span class="o">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="o">);</span>
        <span class="n">goDoSomethingAwesome</span><span class="o">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="o">);</span>
        <span class="n">goDoSomethingAwesome</span><span class="o">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="o">);</span>
        <span class="n">goDoSomethingAwesome</span><span class="o">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="o">);</span>
        <span class="n">goDoSomethingAwesome</span><span class="o">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">x</span> <span class="o">/</span> <span class="mi">2</span><span class="o">);</span>

        <span class="c1">// resume CPD analysis - CPD-ON</span>

        <span class="c1">// further code will *not* be ignored</span>
    <span class="o">}</span>
</code></pre></div></div>

<h4 id="cpd-filelist-command-line-option">CPD filelist command line option</h4>

<p>CPD now supports the command line option <code class="language-plaintext highlighter-rouge">--filelist</code>. With that, you can specify a file, which
contains the names and paths of the files, that should be analyzed. This is similar to PMD’s filelist option.
You need to use this, if you have a large project with many files, and you hit the command line length limit.</p>

<h3 id="fixed-issues-47">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1511/">#1511</a>: [core] Inconsistent behavior of Rule.start/Rule.end</li>
      <li><a href="https://github.com/pmd/pmd/issues/234">#234</a>: [core] Zip file stream closes spuriously when loading rulesets</li>
      <li><a href="https://github.com/pmd/pmd/issues/256">#256</a>: [core] shortnames option is broken with relative paths</li>
      <li><a href="https://github.com/pmd/pmd/issues/305">#305</a>: [core] PMD not executing under git bash</li>
      <li><a href="https://github.com/pmd/pmd/issues/324">#324</a>: [core] Automated release - github release notes missing</li>
      <li><a href="https://github.com/pmd/pmd/issues/337">#337</a>: [core] Version 5.5.4 seems to hold file lock on rules JAR (affects Windows only)</li>
    </ul>
  </li>
  <li>apex-apexunit
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1543/">#1543</a>: [apex] ApexUnitTestClassShouldHaveAsserts assumes APEX is case sensitive</li>
    </ul>
  </li>
  <li>apex-complexity
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/183">#183</a>: [apex] NCSS Method length is incorrect when using method chaining</li>
      <li><a href="https://github.com/pmd/pmd/issues/251">#251</a>: [apex] NCSS Type length is incorrect when using method chaining</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/264">#264</a>: [apex] ApexXSSFromURLParamRule shouldn’t enforce ESAPI usage. String.escapeHtml4 is sufficient.</li>
      <li><a href="https://github.com/pmd/pmd/issues/315">#315</a>: [apex] Documentation flaw on Apex Sharing Violations</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/185">#185</a>: [java] CPD runs into NPE when analyzing Lucene</li>
      <li><a href="https://github.com/pmd/pmd/issues/206">#206</a>: [java] Parse error on annotation fields with generics</li>
      <li><a href="https://github.com/pmd/pmd/issues/207">#207</a>: [java] Parse error on method reference with generics</li>
      <li><a href="https://github.com/pmd/pmd/issues/208">#208</a>: [java] Parse error with local class with 2 or more annotations</li>
      <li><a href="https://github.com/pmd/pmd/issues/213">#213</a>: [java] CPD: OutOfMemory when analyzing Lucene</li>
      <li><a href="https://github.com/pmd/pmd/issues/309">#309</a>: [java] Parse error on method reference</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1542/">#1542</a>: [java] CPD throws an NPE when parsing enums with -ignore-identifiers</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1545/">#1545</a>: [java] Symbol Table fails to resolve inner classes</li>
    </ul>
  </li>
  <li>java-basic
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/232">#232</a>: [java] SimplifiedTernary: Incorrect ternary operation can be simplified.</li>
    </ul>
  </li>
  <li>java-coupling
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/270">#270</a>: [java] LoD false positive</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/933/">#933</a>: [java] UnnecessaryLocalBeforeReturn false positive for SuppressWarnings annotation</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1448/">#1448</a>: [java] ImmutableField: Private field in inner class gives false positive with lambdas</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1495/">#1495</a>: [java] UnnecessaryLocalBeforeReturn with assert</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1496/">#1496</a>: [java] New Rule: AccesorMethodGeneration - complements accessor class rule</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1512/">#1512</a>: [java] Combine rules AvoidConstantsInInterface and ConstantsInInterface</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1552/">#1552</a>: [java] MissingBreakInSwitch - False positive for continue</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1556/">#1556</a>: [java] UseLocaleWithCaseConversions does not works with <code class="language-plaintext highlighter-rouge">ResultSet</code> (false negative)</li>
      <li><a href="https://github.com/pmd/pmd/issues/177">#177</a>: [java] SingularField with lambdas as final fields</li>
      <li><a href="https://github.com/pmd/pmd/issues/216">#216</a>: [java] [doc] NonThreadSafeSingleton: Be more explicit as to why double checked locking is not recommended</li>
      <li><a href="https://github.com/pmd/pmd/issues/219">#219</a>: [java] UnnecessaryLocalBeforeReturn: ClassCastException in switch case with local variable returned</li>
      <li><a href="https://github.com/pmd/pmd/issues/240">#240</a>: [java] UnnecessaryLocalBeforeReturn: Enhance by checking usages</li>
      <li><a href="https://github.com/pmd/pmd/issues/274">#274</a>: [java] AccessorMethodGeneration: Method inside static inner class incorrectly reported</li>
      <li><a href="https://github.com/pmd/pmd/issues/275">#275</a>: [java] FinalFieldCouldBeStatic: Constant in @interface incorrectly reported as “could be made static”</li>
      <li><a href="https://github.com/pmd/pmd/issues/282">#282</a>: [java] UnnecessaryLocalBeforeReturn false positive when cloning Maps</li>
      <li><a href="https://github.com/pmd/pmd/issues/291">#291</a>: [java] Improve quality of AccessorClassGeneration</li>
      <li><a href="https://github.com/pmd/pmd/issues/310">#310</a>: [java] UnnecessaryLocalBeforeReturn enhancement is overly restrictive – method order matters</li>
      <li><a href="https://github.com/pmd/pmd/issues/352">#352</a>: [java] AccessorClassGeneration throws ClassCastException when seeing array construction</li>
    </ul>
  </li>
  <li>java-imports
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/338">#338</a>: [java] False positive on DontImportJavaLang when importing java.lang.ProcessBuilder</li>
      <li><a href="https://github.com/pmd/pmd/issues/339">#339</a>: [java] False positive on DontImportJavaLang when importing Java 7’s java.lang.invoke.MethodHandles</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1546/">#1546</a>: [java] UnnecessaryFullyQualifiedNameRule doesn’t take into consideration conflict resolution</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1547/">#1547</a>: [java] UnusedImportRule - False Positive for only usage in Javadoc - {@link ClassName#CONSTANT}</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1555/">#1555</a>: [java] UnnecessaryFullyQualifiedName: Really necessary fully qualified name</li>
    </ul>
  </li>
  <li>java-junit
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/285">#285</a>: [java] JUnitTestsShouldIncludeAssertRule should support @Rule as well as @Test(expected = …)</li>
      <li><a href="https://github.com/pmd/pmd/issues/330">#330</a>: [java] NPE applying rule JUnitTestsShouldIncludeAssert</li>
    </ul>
  </li>
  <li>java-logging-java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1541/">#1541</a>: [java] InvalidSlf4jMessageFormat: False positive with placeholder and exception</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1551/">#1551</a>: [java] InvalidSlf4jMessageFormat: fails with NPE</li>
    </ul>
  </li>
  <li>java-optimizations
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/215">#215</a>: [java] RedundantFieldInitializer report for annotation field not explicitly marked as final</li>
      <li><a href="https://github.com/pmd/pmd/issues/222">#222</a>: [java] UseStringBufferForStringAppends: False Positive with ternary operator</li>
    </ul>
  </li>
  <li>java-strings
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/202">#202</a>: [java] [doc] ConsecutiveAppendsShouldReuse is not really an optimization</li>
      <li><a href="https://github.com/pmd/pmd/issues/290">#290</a>: [java] InefficientEmptyStringCheck misses String.trim().isEmpty()</li>
    </ul>
  </li>
  <li>java-unnecessary
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/199">#199</a>: [java] UselessParentheses: Parentheses in return statement are incorrectly reported as useless</li>
    </ul>
  </li>
  <li>java-unusedcode
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/246">#246</a>: [java] UnusedModifier doesn’t check annotations</li>
      <li><a href="https://github.com/pmd/pmd/issues/247">#247</a>: [java] UnusedModifier doesn’t check annotations inner classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/248">#248</a>: [java] UnusedModifier doesn’t check static keyword on nested enum declaration</li>
      <li><a href="https://github.com/pmd/pmd/issues/257">#257</a>: [java] UnusedLocalVariable false positive</li>
    </ul>
  </li>
  <li>XML
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1518/">#1518</a>: [xml] Error while processing xml file with “.webapp” in the file or directory name</li>
    </ul>
  </li>
  <li>psql
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1549/">#1549</a>: [plsql] Parse error for IS [NOT] NULL construct</li>
    </ul>
  </li>
  <li>javascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/201">#201</a>: [javascript] template strings are not correctly parsed</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-39">API Changes</h3>

<ul>
  <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSetFactory</code> is now immutable and its behavior cannot be changed anymore.
It provides constructors to create new adjusted instances. This allows to avoid synchronization in RuleSetFactory.
See <a href="https://github.com/pmd/pmd/pull/131">PR #131</a>.</li>
  <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSet</code> is now immutable, too, and can only be created via <code class="language-plaintext highlighter-rouge">RuleSetFactory</code>.
See <a href="https://github.com/pmd/pmd/pull/145">PR #145</a>.</li>
  <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cli.XPathCLI</code> has been removed. It’s functionality is fully covered by the Designer.</li>
  <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.Report</code> now works with <code class="language-plaintext highlighter-rouge">ThreadSafeReportListener</code>s. Both <code class="language-plaintext highlighter-rouge">ReportListener</code> and
<code class="language-plaintext highlighter-rouge">SynchronizedReportListener</code> are deprecated in favor of <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.ThreadSafeReportListener</code>.
Therefore, the methods <code class="language-plaintext highlighter-rouge">getSynchronizedListeners()</code> and <code class="language-plaintext highlighter-rouge">addSynchronizedListeners(...)</code> have been
replaced by <code class="language-plaintext highlighter-rouge">getListeners()</code> and <code class="language-plaintext highlighter-rouge">addListeners(...)</code>. See <a href="https://github.com/pmd/pmd/pull/193">PR #193</a>.</li>
</ul>

<h3 id="external-contributions-46">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/123">#123</a>: [apex] Changing method names to lowercase so casing doesn’t matter</li>
  <li><a href="https://github.com/pmd/pmd/pull/129">#129</a>: [plsql] Added correct parse of IS [NOT] NULL and multiline DML</li>
  <li><a href="https://github.com/pmd/pmd/pull/137">#137</a>: [apex] Adjusted remediation points</li>
  <li><a href="https://github.com/pmd/pmd/pull/146">#146</a>: [apex] Detection of missing Apex CRUD checks for SOQL/DML operations</li>
  <li><a href="https://github.com/pmd/pmd/pull/147">#147</a>: [apex] Adding XSS detection to return statements</li>
  <li><a href="https://github.com/pmd/pmd/pull/148">#148</a>: [apex] Improving detection of SOQL injection</li>
  <li><a href="https://github.com/pmd/pmd/pull/149">#149</a>: [apex] Whitelisting String.isEmpty and casting</li>
  <li><a href="https://github.com/pmd/pmd/pull/152">#152</a>: [java] fixes #1552 continue does not require break</li>
  <li><a href="https://github.com/pmd/pmd/pull/154">#154</a>: [java] Fix #1547: UnusedImports: Adjust regex to support underscores</li>
  <li><a href="https://github.com/pmd/pmd/pull/158">#158</a>: [apex] Reducing FPs in SOQL with VF getter methods</li>
  <li><a href="https://github.com/pmd/pmd/pull/160">#160</a>: [apex] Flagging of dangerous method call</li>
  <li><a href="https://github.com/pmd/pmd/pull/163">#163</a>: [apex] Flagging of System.debug</li>
  <li><a href="https://github.com/pmd/pmd/pull/165">#165</a>: [apex] Improving open redirect rule to avoid test classes/methods</li>
  <li><a href="https://github.com/pmd/pmd/pull/167">#167</a>: [apex] GC and thread safety changes</li>
  <li><a href="https://github.com/pmd/pmd/pull/169">#169</a>: [apex] Improving detection for DML with inline new object</li>
  <li><a href="https://github.com/pmd/pmd/pull/170">#170</a>: [core] Ant Task Formatter encoding issue with XMLRenderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/172">#172</a>: [apex] Bug fix, detects both Apex fields and class members</li>
  <li><a href="https://github.com/pmd/pmd/pull/175">#175</a>: [apex] ApexXSSFromURLParam: Adding missing casting methods</li>
  <li><a href="https://github.com/pmd/pmd/pull/176">#176</a>: [apex] Bug fix for FP: open redirect for strings prefixed with / is safe</li>
  <li><a href="https://github.com/pmd/pmd/pull/179">#179</a>: [apex] Legacy test class declaration support</li>
  <li><a href="https://github.com/pmd/pmd/pull/181">#181</a>: [apex] Control flow based CRUD rule checking</li>
  <li><a href="https://github.com/pmd/pmd/pull/184">#184</a>: [apex] Improving open redirect detection for static fields &amp; assignment operations</li>
  <li><a href="https://github.com/pmd/pmd/pull/189">#189</a>: [apex] Bug fix of SOQL concatenated vars detection</li>
  <li><a href="https://github.com/pmd/pmd/pull/191">#191</a>: [apex] Detection of sharing violation when Database. methods are used</li>
  <li><a href="https://github.com/pmd/pmd/pull/192">#192</a>: [apex] Dead code removal</li>
  <li><a href="https://github.com/pmd/pmd/pull/200">#200</a>: [javascript] Templatestring grammar fix</li>
  <li><a href="https://github.com/pmd/pmd/pull/204">#204</a>: [apex] Sharing violation SOQL detection bug fix</li>
  <li><a href="https://github.com/pmd/pmd/pull/214">#214</a>: [apex] Sharing violation improving reporting of the correct node, de-duping</li>
  <li><a href="https://github.com/pmd/pmd/pull/217">#217</a>: [core] Make it build on Windows</li>
  <li><a href="https://github.com/pmd/pmd/pull/227">#227</a>: [apex] Improving detection of getters</li>
  <li><a href="https://github.com/pmd/pmd/pull/228">#228</a>: [apex] Excluding count from CRUD/FLS checks</li>
  <li><a href="https://github.com/pmd/pmd/pull/229">#229</a>: [apex] Dynamic SOQL is safe against Integer, Boolean, Double</li>
  <li><a href="https://github.com/pmd/pmd/pull/231">#231</a>: [apex] CRUD/FLS rule - add support for fields</li>
  <li><a href="https://github.com/pmd/pmd/pull/266">#266</a>: [java] corrected invalid reporting of LoD violation</li>
  <li><a href="https://github.com/pmd/pmd/pull/268">#268</a>: [apex] Support safe escaping via String method</li>
  <li><a href="https://github.com/pmd/pmd/pull/273">#273</a>: [apex] Shade jackson on apex</li>
  <li><a href="https://github.com/pmd/pmd/pull/279">#279</a>: [vf] New Salesforce VisualForce language support</li>
  <li><a href="https://github.com/pmd/pmd/pull/280">#280</a>: [apex] Support for Aggregate Result in CRUD rules</li>
  <li><a href="https://github.com/pmd/pmd/pull/281">#281</a>: [apex] Add Braces Rule Set</li>
  <li><a href="https://github.com/pmd/pmd/pull/283">#283</a>: [vf] CSRF in VF controller pages</li>
  <li><a href="https://github.com/pmd/pmd/pull/284">#284</a>: [vf] Adding support for parsing EL in script tags</li>
  <li><a href="https://github.com/pmd/pmd/pull/288">#288</a>: [vf] Setting the tab size to 4 for VF</li>
  <li><a href="https://github.com/pmd/pmd/pull/289">#289</a>: [apex] Complex SOQL Crud check bug fixes</li>
  <li><a href="https://github.com/pmd/pmd/pull/296">#296</a>: [apex] Adding String.IsNotBlank to the whitelist to prevent False positives</li>
  <li><a href="https://github.com/pmd/pmd/pull/297">#297</a>: [core] CPD: Adding the –filelist option from pmd to cpd</li>
  <li><a href="https://github.com/pmd/pmd/pull/303">#303</a>: [java] InefficientEmptyStringCheckRule now reports String.trim().isEmpty()</li>
  <li><a href="https://github.com/pmd/pmd/pull/307">#307</a>: [java] Fix false positive with UseStringBufferForStringAppendsRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/308">#308</a>: [java] JUnitTestsShouldIncludeAssertRule supports @Rule annotated ExpectedExceptions</li>
  <li><a href="https://github.com/pmd/pmd/pull/313">#313</a>: [vf] Apex:iFrame not being detected - bug fix</li>
  <li><a href="https://github.com/pmd/pmd/pull/314">#314</a>: [vf] Bug fixes for incorrect Id detection and escaping</li>
  <li><a href="https://github.com/pmd/pmd/pull/316">#316</a>: [apex] Ignoring certain rules in Batch classes, Queueable, and install scripts</li>
  <li><a href="https://github.com/pmd/pmd/pull/317">#317</a>: [apex] Add support for safe ID assignment from URL param</li>
  <li><a href="https://github.com/pmd/pmd/pull/326">#326</a>: [vf] Quote detection improvement and method argument detection</li>
  <li><a href="https://github.com/pmd/pmd/pull/327">#327</a>: [apex] Fixed SOQL injection detection for escaped vars</li>
  <li><a href="https://github.com/pmd/pmd/pull/331">#331</a>: [java] JunitTestsShouldIncludeAssertRule now handles AllocationExpression correctly</li>
  <li><a href="https://github.com/pmd/pmd/pull/332">#332</a>: [java] Future-proof DontImportJavaLangRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/340">#340</a>: [vf] Multiple parser bug fixes</li>
  <li><a href="https://github.com/pmd/pmd/pull/341">#341</a>: [vf] JSON.parse(..) and NOT(..) are safely evaluated</li>
  <li><a href="https://github.com/pmd/pmd/pull/343">#343</a>: [apex] int,id,boolean,ternary operator condition are not injection in Soql</li>
  <li><a href="https://github.com/pmd/pmd/pull/344">#344</a>: [apex] ApexCRUDViolationRule: Bug fix for ClassCastException</li>
  <li><a href="https://github.com/pmd/pmd/pull/351">#351</a>: [vf] Fixing regression introduced by #341</li>
</ul>

<h2 id="29-april-2017---557">29-April-2017 - 5.5.7</h2>

<p>The PMD team is pleased to announce PMD 5.5.7.</p>

<p>This is a bug fixing release.</p>

<h3 id="fixed-issues-48">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/364">#364</a>: [core] Stream closed exception when running through maven</li>
    </ul>
  </li>
</ul>

<h2 id="19-april-2017---556">19-April-2017 - 5.5.6</h2>

<p>The PMD team is pleased to announce PMD 5.5.6.</p>

<p>This is a bug fixing release.</p>

<h3 id="fixed-issues-49">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/324">#324</a>: [core] Automated release - github release notes missing</li>
      <li><a href="https://github.com/pmd/pmd/issues/337">#337</a>: [core] Version 5.5.4 seems to hold file lock on rules JAR (affects Windows only)</li>
    </ul>
  </li>
</ul>

<h2 id="27-march-2017---555">27-March-2017 - 5.5.5</h2>

<p>The PMD team is pleased to announce PMD 5.5.5.</p>

<h3 id="fixed-issues-50">Fixed Issues</h3>

<ul>
  <li>general:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/305">#305</a>: [core] PMD not executing under git bash</li>
    </ul>
  </li>
  <li>java:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/309">#309</a>: [java] Parse error on method reference</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/274">#274</a>: [java] AccessorMethodGeneration: Method inside static inner class incorrectly reported</li>
      <li><a href="https://github.com/pmd/pmd/issues/275">#275</a>: [java] FinalFieldCouldBeStatic: Constant in @interface incorrectly reported as “could be made static”</li>
      <li><a href="https://github.com/pmd/pmd/issues/282">#282</a>: [java] UnnecessaryLocalBeforeReturn false positive when cloning Maps</li>
      <li><a href="https://github.com/pmd/pmd/issues/291">#291</a>: [java] Improve quality of AccessorClassGeneration</li>
    </ul>
  </li>
  <li>java-junit:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/285">#285</a>: [java] JUnitTestsShouldIncludeAssertRule should support @Rule as well as @Test(expected = …)</li>
    </ul>
  </li>
  <li>java-optimizations:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/222">#222</a>: [java] UseStringBufferForStringAppends: False Positive with ternary operator</li>
    </ul>
  </li>
  <li>java-strings:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/290">#290</a>: [java] InefficientEmptyStringCheck misses String.trim().isEmpty()</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-47">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/280">#280</a>: [apex] Support for Aggregate Result in CRUD rules</li>
  <li><a href="https://github.com/pmd/pmd/pull/289">#289</a>: [apex] Complex SOQL Crud check bug fixes</li>
  <li><a href="https://github.com/pmd/pmd/pull/296">#296</a>: [apex] Adding String.IsNotBlank to the whitelist to prevent False positives</li>
  <li><a href="https://github.com/pmd/pmd/pull/303">#303</a>: [java] InefficientEmptyStringCheckRule now reports String.trim().isEmpty()</li>
  <li><a href="https://github.com/pmd/pmd/pull/307">#307</a>: [java] Fix false positive with UseStringBufferForStringAppendsRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/308">#308</a>: [java] JUnitTestsShouldIncludeAssertRule supports @Rule annotated ExpectedExceptions</li>
</ul>

<h2 id="25-februar-2017---554">25-Februar-2017 - 5.5.4</h2>

<p>The PMD team is pleased to announce PMD 5.5.4</p>

<h3 id="new-and-noteworthy-43">New and noteworthy</h3>

<h4 id="new-rules-30">New Rules</h4>

<h5 id="accessormethodgeneration-java-design-1">AccessorMethodGeneration (java-design)</h5>

<p>When accessing a private field / method from another class, the Java compiler will generate a accessor methods
with package-private visibility. This adds overhead, and to the dex method count on Android. This situation can
be avoided by changing the visibility of the field / method from private to package-private.</p>

<p>For instance, it would report violations on code such as:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class OuterClass {
    private int counter;
    /* package */ int id;

    public class InnerClass {
        InnerClass() {
            OuterClass.this.counter++; // wrong, accessor method will be generated
        }

        public int getOuterClassId() {
            return OuterClass.this.id; // id is package-private, no accessor method needed
        }
    }
}
</code></pre></div></div>

<p>This new rule is part of the <code class="language-plaintext highlighter-rouge">java-design</code> ruleset.</p>

<h4 id="modified-rules-28">Modified Rules</h4>

<ul>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">UnusedModifier</code> (ruleset java-unusedcode) has been expanded to consider more redundant modifiers.
    <ul>
      <li>Annotations marked as <code class="language-plaintext highlighter-rouge">abstract</code>.</li>
      <li>Nested annotations marked as <code class="language-plaintext highlighter-rouge">static</code>.</li>
      <li>Nested annotations within another interface or annotation marked as <code class="language-plaintext highlighter-rouge">public</code>.</li>
      <li>Classes, interfaces or annotations nested within an annotation marked as <code class="language-plaintext highlighter-rouge">public</code> or <code class="language-plaintext highlighter-rouge">static</code>.</li>
      <li>Nested enums marked as <code class="language-plaintext highlighter-rouge">static</code>.</li>
    </ul>
  </li>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">UnnecessaryLocalBeforeReturn</code> (ruleset java-design) no longer requires the variable declaration
and return statement to be on consecutive lines. Any variable that is used solely in a return statement will be
reported.</li>
</ul>

<h3 id="fixed-issues-51">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/234">#234</a>: [core] Zip file stream closes spuriously when loading rulesets</li>
      <li><a href="https://github.com/pmd/pmd/issues/256">#256</a>: [core] shortnames option is broken with relative paths</li>
    </ul>
  </li>
  <li>apex-complexity
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/251">#251</a>: [apex] NCSS Type length is incorrect when using method chaining</li>
    </ul>
  </li>
  <li>apex-security
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/264">#264</a>: [apex] ApexXSSFromURLParamRule shouldn’t enforce ESAPI usage. String.escapeHtml4 is sufficient.</li>
    </ul>
  </li>
  <li>java-basic
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/232">#232</a>: [java] SimplifiedTernary: Incorrect ternary operation can be simplified.</li>
    </ul>
  </li>
  <li>java-coupling
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/270">#270</a>: [java] LoD false positive</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/933/">#933</a>: [java] UnnecessaryLocalBeforeReturn false positive for SuppressWarnings annotation</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1496/">#1496</a>: [java] New Rule: AccesorMethodGeneration - complements accessor class rule</li>
      <li><a href="https://github.com/pmd/pmd/issues/216">#216</a>: [java] [doc] NonThreadSafeSingleton: Be more explicit as to why double checked locking is not recommended</li>
      <li><a href="https://github.com/pmd/pmd/issues/219">#219</a>: [java] UnnecessaryLocalBeforeReturn: ClassCastException in switch case with local variable returned</li>
      <li><a href="https://github.com/pmd/pmd/issues/240">#240</a>: [java] UnnecessaryLocalBeforeReturn: Enhance by checking usages</li>
    </ul>
  </li>
  <li>java-optimizations
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/215">#215</a>: [java] RedundantFieldInitializer report for annotation field not explicitly marked as final</li>
    </ul>
  </li>
  <li>java-unusedcode
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/246">#246</a>: [java] UnusedModifier doesn’t check annotations</li>
      <li><a href="https://github.com/pmd/pmd/issues/247">#247</a>: [java] UnusedModifier doesn’t check annotations inner classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/248">#248</a>: [java] UnusedModifier doesn’t check static keyword on nested enum declaration</li>
      <li><a href="https://github.com/pmd/pmd/issues/257">#257</a>: [java] UnusedLocalVariable false positive</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-48">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/227">#227</a>: [apex] Improving detection of getters</li>
  <li><a href="https://github.com/pmd/pmd/pull/228">#228</a>: [apex] Excluding count from CRUD/FLS checks</li>
  <li><a href="https://github.com/pmd/pmd/pull/229">#229</a>: [apex] Dynamic SOQL is safe against Integer, Boolean, Double</li>
  <li><a href="https://github.com/pmd/pmd/pull/231">#231</a>: [apex] CRUD/FLS rule - add support for fields</li>
  <li><a href="https://github.com/pmd/pmd/pull/266">#266</a>: [java] corrected invalid reporting of LoD violation</li>
  <li><a href="https://github.com/pmd/pmd/pull/268">#268</a>: [apex] Support safe escaping via String method</li>
  <li><a href="https://github.com/pmd/pmd/pull/273">#273</a>: [apex] Shade jackson on apex</li>
</ul>

<h2 id="28-january-2017---553">28-January-2017 - 5.5.3</h2>

<p>The PMD team is pleased to announce PMD 5.5.3</p>

<p>The most significant changes are on analysis performance and a whole new <strong>Apex Security Rule Set</strong>.</p>

<p>Multithread performance has been enhanced by reducing thread-contention on a
bunch of areas. This is still an area of work, as the speedup of running
multithreaded analysis is still relatively small (4 threads produce less
than a 50% speedup). Future releases will keep improving on this area.</p>

<p>Once again, <em>Symbol Table</em> has been an area of great performance improvements.
This time we were able to further improve it’s performance by roughly 10% on all
supported languages. In <em>Java</em> in particular, several more improvements were possible,
improving <em>Symbol Table</em> performance by a whooping 30%, that’s over 5X faster
than PMD 5.5.1, when we first started working on it.</p>

<p>Java developers will also appreciate the revamp of <code class="language-plaintext highlighter-rouge">CloneMethodMustImplementCloneable</code>,
making it over 500X faster, and <code class="language-plaintext highlighter-rouge">PreserveStackTrace</code> which is now 7X faster.</p>

<h3 id="new-and-noteworthy-44">New and noteworthy</h3>

<h4 id="apex-security-rule-set-1">Apex Security Rule Set</h4>

<p>A new ruleset focused on security has been added, consisting of a wide range of rules
to detect most common security problems.</p>

<h5 id="apexbadcrypto-1">ApexBadCrypto</h5>

<p>The rule makes sure you are using randomly generated IVs and keys for <code class="language-plaintext highlighter-rouge">Crypto</code> calls.
Hard-wiring these values greatly compromises the security of encrypted data.</p>

<p>For instance, it would report violations on code such as:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class without sharing Foo {
    Blob hardCodedIV = Blob.valueOf('Hardcoded IV 123');
    Blob hardCodedKey = Blob.valueOf('0000000000000000');
    Blob data = Blob.valueOf('Data to be encrypted');
    Blob encrypted = Crypto.encrypt('AES128', hardCodedKey, hardCodedIV, data);
}

</code></pre></div></div>

<h5 id="apexcrudviolation-1">ApexCRUDViolation</h5>

<p>The rule validates you are checking for access permissions before a SOQL/SOSL/DML operation.
Since Apex runs in system mode not having proper permissions checks results in escalation of
privilege and may produce runtime errors. This check forces you to handle such scenarios.</p>

<p>For example, the following code is considered valid:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class Foo {
    public Contact foo(String status, String ID) {
        Contact c = [SELECT Status__c FROM Contact WHERE Id=:ID];

        // Make sure we can update the database before even trying
        if (!Schema.sObjectType.Contact.fields.Name.isUpdateable()) {
            return null;
        }

        c.Status__c = status;
        update c;
        return c;
    }
}
</code></pre></div></div>

<h5 id="apexcsrf-1">ApexCSRF</h5>

<p>Check to avoid making DML operations in Apex class constructor/init method. This prevents
modification of the database just by accessing a page.</p>

<p>For instance, the following code would be invalid:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class Foo {
    public init() {
        insert data;
    }

    public Foo() {
        insert data;
    }
}
</code></pre></div></div>

<h5 id="apexdangerousmethods-1">ApexDangerousMethods</h5>

<p>Checks against calling dangerous methods.</p>

<p>For the time being, it reports:</p>

<ul>
  <li>Against <code class="language-plaintext highlighter-rouge">FinancialForce</code>’s <code class="language-plaintext highlighter-rouge">Configuration.disableTriggerCRUDSecurity()</code>. Disabling CRUD security
opens the door to several attacks and requires manual validation, which is unreliable.</li>
  <li>Calling <code class="language-plaintext highlighter-rouge">System.debug</code> passing sensitive data as parameter, which could lead to exposure
of private data.</li>
</ul>

<h5 id="apexinsecureendpoint-1">ApexInsecureEndpoint</h5>

<p>Checks against accessing endpoints under plain <strong>http</strong>. You should always use
<strong>https</strong> for security.</p>

<h5 id="apexopenredirect-1">ApexOpenRedirect</h5>

<p>Checks against redirects to user-controlled locations. This prevents attackers from
redirecting users to phishing sites.</p>

<p>For instance, the following code would be reported:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class without sharing Foo {
    String unsafeLocation = ApexPage.getCurrentPage().getParameters.get('url_param');
    PageReference page() {
       return new PageReference(unsafeLocation);
    }
}
</code></pre></div></div>

<h5 id="apexsharingviolations-1">ApexSharingViolations</h5>

<p>Detect classes declared without explicit sharing mode if DML methods are used. This
forces the developer to take access restrictions into account before modifying objects.</p>

<h5 id="apexsoqlinjection-1">ApexSOQLInjection</h5>

<p>Detects the usage of untrusted / unescaped variables in DML queries.</p>

<p>For instance, it would report on:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class Foo {
    public void test1(String t1) {
        Database.query('SELECT Id FROM Account' + t1);
    }
}
</code></pre></div></div>

<h5 id="apexsuggestusingnamedcred-1">ApexSuggestUsingNamedCred</h5>

<p>Detects hardcoded credentials used in requests to an endpoint.</p>

<p>You should refrain from hardcoding credentials:</p>
<ul>
  <li>They are hard to mantain by being mixed in application code</li>
  <li>Particularly hard to update them when used from different classes</li>
  <li>Granting a developer access to the codebase means granting knowledge
 of credentials, keeping a two-level access is not possible.</li>
  <li>Using different credentials for different environments is troublesome
 and error-prone.</li>
</ul>

<p>Instead, you should use <em>Named Credentials</em> and a callout endpoint.</p>

<p>For more information, you can check <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm">this</a></p>

<h5 id="apexxssfromescapefalse-1">ApexXSSFromEscapeFalse</h5>

<p>Reports on calls to <code class="language-plaintext highlighter-rouge">addError</code> with disabled escaping. The message passed to <code class="language-plaintext highlighter-rouge">addError</code>
will be displayed directly to the user in the UI, making it prime ground for XSS
attacks if unescaped.</p>

<h5 id="apexxssfromurlparam-1">ApexXSSFromURLParam</h5>

<p>Makes sure that all values obtained from URL parameters are properly escaped / sanitized
to avoid XSS attacks.</p>

<h4 id="modified-rules-29">Modified Rules</h4>

<p>The Java rule “UseLocaleWithCaseConversions” (ruleset java-design) has been modified, to detect calls
to <code class="language-plaintext highlighter-rouge">toLowerCase</code> and to <code class="language-plaintext highlighter-rouge">toUpperCase</code> also within method call chains. This leads to more detected cases
and potentially new false positives.
See also <a href="https://sourceforge.net/p/pmd/bugs/1556/">bugfix #1556</a>.</p>

<h3 id="fixed-issues-52">Fixed Issues</h3>

<ul>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1511/">#1511</a>: [core] Inconsistent behavior of Rule.start/Rule.end</li>
    </ul>
  </li>
  <li>apex-apexunit
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1543/">#1543</a>: [apex] ApexUnitTestClassShouldHaveAsserts assumes APEX is case sensitive</li>
    </ul>
  </li>
  <li>apex-complexity
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/183">#183</a>: [apex] NCSS Method length is incorrect when using method chaining</li>
    </ul>
  </li>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/185">#185</a>: [java] CPD runs into NPE when analyzing Lucene</li>
      <li><a href="https://github.com/pmd/pmd/issues/206">#206</a>: [java] Parse error on annotation fields with generics</li>
      <li><a href="https://github.com/pmd/pmd/issues/207">#207</a>: [java] Parse error on method reference with generics</li>
      <li><a href="https://github.com/pmd/pmd/issues/208">#208</a>: [java] Parse error with local class with 2 or more annotations</li>
      <li><a href="https://github.com/pmd/pmd/issues/213">#213</a>: [java] CPD: OutOfMemory when analyzing Lucene</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1542/">#1542</a>: [java] CPD throws an NPE when parsing enums with -ignore-identifiers</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1545/">#1545</a>: [java] Symbol Table fails to resolve inner classes</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1448/">#1448</a>: [java] ImmutableField: Private field in inner class gives false positive with lambdas</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1495/">#1495</a>: [java] UnnecessaryLocalBeforeReturn with assert</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1552/">#1552</a>: [java] MissingBreakInSwitch - False positive for continue</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1556/">#1556</a>: [java] UseLocaleWithCaseConversions does not works with <code class="language-plaintext highlighter-rouge">ResultSet</code> (false negative)</li>
      <li><a href="https://github.com/pmd/pmd/issues/177">#177</a>: [java] SingularField with lambdas as final fields</li>
    </ul>
  </li>
  <li>java-imports
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1546/">#1546</a>: [java] UnnecessaryFullyQualifiedNameRule doesn’t take into consideration conflict resolution</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1547/">#1547</a>: [java] UnusedImportRule - False Positive for only usage in Javadoc - {@link ClassName#CONSTANT}</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1555/">#1555</a>: [java] UnnecessaryFullyQualifiedName: Really necessary fully qualified name</li>
    </ul>
  </li>
  <li>java-logging-java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1541/">#1541</a>: [java] InvalidSlf4jMessageFormat: False positive with placeholder and exception</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1551/">#1551</a>: [java] InvalidSlf4jMessageFormat: fails with NPE</li>
    </ul>
  </li>
  <li>java-unnecessary
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/199">#199</a>: [java] UselessParentheses: Parentheses in return statement are incorrectly reported as useless</li>
    </ul>
  </li>
  <li>java-strings
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/202">#202</a>: [java] [doc] ConsecutiveAppendsShouldReuse is not really an optimization</li>
    </ul>
  </li>
  <li>XML
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1518/">#1518</a>: [xml] Error while processing xml file with “.webapp” in the file or directory name</li>
    </ul>
  </li>
  <li>psql
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1549/">#1549</a>: [plsql] Parse error for IS [NOT] NULL construct</li>
    </ul>
  </li>
  <li>javascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/201">#201</a>: [javascript] template strings are not correctly parsed</li>
    </ul>
  </li>
</ul>

<h3 id="api-changes-40">API Changes</h3>

<ul>
  <li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSetFactory</code> is now immutable and its behavior cannot be changed anymore.
It provides constructors to create new adjusted instances. This allows to avoid synchronization in RuleSetFactory.
See <a href="https://github.com/pmd/pmd/pull/131">PR #131</a>.</li>
</ul>

<h3 id="external-contributions-49">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/123">#123</a>: [apex] Changing method names to lowercase so casing doesn’t matter</li>
  <li><a href="https://github.com/pmd/pmd/pull/129">#129</a>: [plsql] Added correct parse of IS [NOT] NULL and multiline DML</li>
  <li><a href="https://github.com/pmd/pmd/pull/137">#137</a>: [apex] Adjusted remediation points</li>
  <li><a href="https://github.com/pmd/pmd/pull/146">#146</a>: [apex] Detection of missing Apex CRUD checks for SOQL/DML operations</li>
  <li><a href="https://github.com/pmd/pmd/pull/147">#147</a>: [apex] Adding XSS detection to return statements</li>
  <li><a href="https://github.com/pmd/pmd/pull/148">#148</a>: [apex] Improving detection of SOQL injection</li>
  <li><a href="https://github.com/pmd/pmd/pull/149">#149</a>: [apex] Whitelisting String.isEmpty and casting</li>
  <li><a href="https://github.com/pmd/pmd/pull/152">#152</a>: [java] fixes #1552 continue does not require break</li>
  <li><a href="https://github.com/pmd/pmd/pull/154">#154</a>: [java] Fix #1547: UnusedImports: Adjust regex to support underscores</li>
  <li><a href="https://github.com/pmd/pmd/pull/158">#158</a>: [apex] Reducing FPs in SOQL with VF getter methods</li>
  <li><a href="https://github.com/pmd/pmd/pull/160">#160</a>: [apex] Flagging of dangerous method call</li>
  <li><a href="https://github.com/pmd/pmd/pull/163">#163</a>: [apex] Flagging of System.debug</li>
  <li><a href="https://github.com/pmd/pmd/pull/165">#165</a>: [apex] Improving open redirect rule to avoid test classes/methods</li>
  <li><a href="https://github.com/pmd/pmd/pull/167">#167</a>: [apex] GC and thread safety changes</li>
  <li><a href="https://github.com/pmd/pmd/pull/169">#169</a>: [apex] Improving detection for DML with inline new object</li>
  <li><a href="https://github.com/pmd/pmd/pull/170">#170</a>: [core] Ant Task Formatter encoding issue with XMLRenderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/172">#172</a>: [apex] Bug fix, detects both Apex fields and class members</li>
  <li><a href="https://github.com/pmd/pmd/pull/175">#175</a>: [apex] ApexXSSFromURLParam: Adding missing casting methods</li>
  <li><a href="https://github.com/pmd/pmd/pull/176">#176</a>: [apex] Bug fix for FP: open redirect for strings prefixed with / is safe</li>
  <li><a href="https://github.com/pmd/pmd/pull/179">#179</a>: [apex] Legacy test class declaration support</li>
  <li><a href="https://github.com/pmd/pmd/pull/181">#181</a>: [apex] Control flow based CRUD rule checking</li>
  <li><a href="https://github.com/pmd/pmd/pull/184">#184</a>: [apex] Improving open redirect detection for static fields &amp; assignment operations</li>
  <li><a href="https://github.com/pmd/pmd/pull/189">#189</a>: [apex] Bug fix of SOQL concatenated vars detection</li>
  <li><a href="https://github.com/pmd/pmd/pull/191">#191</a>: [apex] Detection of sharing violation when Database. methods are used</li>
  <li><a href="https://github.com/pmd/pmd/pull/192">#192</a>: [apex] Dead code removal</li>
  <li><a href="https://github.com/pmd/pmd/pull/200">#200</a>: [javascript] Templatestring grammar fix</li>
  <li><a href="https://github.com/pmd/pmd/pull/204">#204</a>: [apex] Sharing violation SOQL detection bug fix</li>
  <li><a href="https://github.com/pmd/pmd/pull/214">#214</a>: [apex] Sharing violation improving reporting of the correct node, de-duping</li>
</ul>

<h2 id="05-november-2016---552">05-November-2016 - 5.5.2</h2>

<p><strong>Summary:</strong></p>

<ul>
  <li>1 new language for CPD: Groovy</li>
  <li>1 new rule: plsql-strictsyntax/MisplacedPragma</li>
  <li>12 pull requests</li>
  <li>17 bug fixes</li>
</ul>

<p><strong>New Supported Languages:</strong></p>

<ul>
  <li>CPD now supports Groovy. See <a href="https://github.com/pmd/pmd/pull/107">PR#107</a>.</li>
</ul>

<p><strong>Feature Requests and Improvements:</strong></p>

<ul>
  <li>plsql
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1539/">#1539</a>: [plsql] Create new rule for strict syntax checking: MisplacedPragma</li>
    </ul>
  </li>
</ul>

<p><strong>New Rules:</strong></p>

<ul>
  <li>New Rules for plsql
    <ul>
      <li>plsql-strictsyntax: MisplacedPragma</li>
    </ul>
  </li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/106">#106</a>: [java] CPD: Keep constructor names under ignoreIdentifiers</li>
  <li><a href="https://github.com/pmd/pmd/pull/107">#107</a>: [groovy] Initial support for CPD Groovy</li>
  <li><a href="https://github.com/pmd/pmd/pull/110">#110</a>: [java] Fix parser error (issue 1530)</li>
  <li><a href="https://github.com/pmd/pmd/pull/111">#111</a>: [java] Fix BooleanInstantiationRule for Java 8</li>
  <li><a href="https://github.com/pmd/pmd/pull/112">#112</a>: [java] Fix ClassCastException on CloneMethodMustImplementCloneable</li>
  <li><a href="https://github.com/pmd/pmd/pull/113">#113</a>: [java] Fix ClassCastException on SignatureDeclareThrowsException</li>
  <li><a href="https://github.com/pmd/pmd/pull/114">#114</a>: [core] Remove multihreading workaround for JRE5, as no PMD version supports running on JRE5 anymore</li>
  <li><a href="https://github.com/pmd/pmd/pull/115">#115</a>: [java] Simplify lambda parsing</li>
  <li><a href="https://github.com/pmd/pmd/pull/116">#116</a>: [core] [java] Improve collection usage</li>
  <li><a href="https://github.com/pmd/pmd/pull/117">#117</a>: [java] Improve symboltable performance</li>
  <li><a href="https://github.com/pmd/pmd/pull/118">#118</a>: [java] Simplify VariableDeclaratorId parsing</li>
  <li><a href="https://github.com/pmd/pmd/pull/119">#119</a>: [plsql] Fix PMD issue 1531- endless loop followed by OOM while parsing (PL)SQL</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>apex-apexunit
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1521/">#1521</a>: [apex] ApexUnitTestClassShouldHaveAsserts: Parsing error on APEX class: expected one element but was: &lt;BlockStatement, BlockStatement&gt;</li>
    </ul>
  </li>
  <li>Java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1530/">#1530</a>: [java] Parser exception on Java code</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1490/">#1490</a>: [java] PMD Error while processing - NullPointerException</li>
    </ul>
  </li>
  <li>java-basic/BooleanInstantiation
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1533/">#1533</a>: [java] BooleanInstantiation: ClassCastException with Annotation</li>
    </ul>
  </li>
  <li>java-comments
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1522/">#1522</a>: [java] CommentRequired: false positive</li>
    </ul>
  </li>
  <li>java-design/SingularField
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1494/">#1494</a>: [java] SingularField: lombok.Data false positive</li>
    </ul>
  </li>
  <li>java-imports/UnusedImports
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1529/">#1529</a>: [java] UnusedImports: The created rule violation has no class name</li>
    </ul>
  </li>
  <li>java-logging-java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1500/">#1500</a> [java] InvalidSlf4jMessageFormat: doesn’t ignore exception param</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1509/">#1509</a> [java] InvalidSlf4jMessageFormat: NPE</li>
    </ul>
  </li>
  <li>java-typeresolution/CloneMethodMustImplementCloneable
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1532/">#1532</a>: [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1534/">#1534</a>: [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8)</li>
    </ul>
  </li>
  <li>java-typeresolution/SignatureDeclareThrowsException
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1535/">#1535</a>: [java] SignatureDeclareThrowsException: ClassCastException with Annotation</li>
    </ul>
  </li>
  <li>PLSQL
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1520/">#1520</a>: [plsql] Missing PL/SQL language constructs in parser: Is Of Type, Using</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1527/">#1527</a>: [plsql] PRAGMA AUTONOMOUS_TRANSACTION gives processing errors</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1531/">#1531</a>: [plsql] OOM/Endless loop while parsing (PL)SQL</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1506/">#1506</a>: [core] When runing any RuleTst, start/end methods not called</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1517/">#1517</a>: [java] CPD reports on Java constructors when using ignoreIdentifiers</li>
    </ul>
  </li>
</ul>

<h2 id="27-july-2016---551">27-July-2016 - 5.5.1</h2>

<p><strong>New Rules:</strong></p>

<ul>
  <li>New rules for Salesforce.com Apex:
    <ul>
      <li>apex-apexunit: ApexUnitTestClassShouldHaveAsserts, ApexUnitTestShouldNotUseSeeAllDataTrue</li>
    </ul>
  </li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/101">#101</a>: [java] Improve multithreading performance: do not lock on classloader</li>
  <li><a href="https://github.com/pmd/pmd/pull/102">#102</a>: [apex] Restrict AvoidLogicInTrigger rule to max. 1 violation per file</li>
  <li><a href="https://github.com/pmd/pmd/pull/103">#103</a>: [java] [apex] Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
  <li><a href="https://github.com/pmd/pmd/pull/104">#104</a>: [core] [java] Close opened file handles</li>
  <li><a href="https://github.com/Up2Go/pmd/pull/43">apex #43</a>: [apex] Basic apex unit test rules</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>Apex
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1501/">#1501</a>: [java] [apex] CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
    </ul>
  </li>
  <li>Java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1501/">#1501</a>: [java] [apex] CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1499/">#1499</a>: [core] CPD test break PMD 5.5.1 build on Windows</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1508/">#1508</a>: [core] [java] PMD is leaking file handles</li>
    </ul>
  </li>
</ul>

<h2 id="25-june-2016---550">25-June-2016 - 5.5.0</h2>

<p><strong>System requirements:</strong></p>

<p>PMD and CPD need at least a java7 runtime environment. For analyzing Salesforce.com Apex source code,
you’ll need a java8 runtime environment.</p>

<p><strong>New Supported Languages:</strong></p>

<ul>
  <li>Salesforce.com Apex is now supported by PMD and CPD. See <a href="https://github.com/pmd/pmd/pull/86">PR#86</a>.</li>
  <li>CPD now supports Perl. See <a href="https://github.com/pmd/pmd/pull/82">PR#82</a>.</li>
  <li>CPD now supports Swift. See <a href="https://github.com/adangel/pmd/pull/33">PR#33</a>.</li>
</ul>

<p><strong>New and modified Rules:</strong></p>

<ul>
  <li>New rules in Java:
    <ul>
      <li>java-logging-java/InvalidSlf4jMessageFormat: Check for invalid message format in slf4j loggers.
See <a href="https://github.com/pmd/pmd/pull/73">PR#73</a>.</li>
      <li>java-design/ConstantsInInterface: Avoid constants in interfaces.
Interfaces should define types, constants are implementation details
better placed in classes or enums. See Effective Java, item 19.
See <a href="https://github.com/pmd/pmd/pull/93">PR#93</a>.</li>
    </ul>
  </li>
  <li>Modified rules in Java:
    <ul>
      <li>java-comments/CommentRequired: New property <code class="language-plaintext highlighter-rouge">serialVersionUIDCommentRequired</code> which controls the comment requirements
for <em>serialVersionUID</em> fields. By default, no comment is required for this field.</li>
      <li>java-design/UseVargs: public static void main method is ignored now and so are methods, that are annotated
with Override. See <a href="https://github.com/pmd/pmd/pull/79">PR#79</a>.</li>
    </ul>
  </li>
  <li>New rules for Salesforce.com Apex:
    <ul>
      <li>apex-complexity: AvoidDeeplyNestedIfStmts, ExcessiveParameterList, ExcessiveClassLength,
NcssMethodCount, NcssTypeCount, NcssConstructorCount, StdCyclomaticComplexity,
TooManyFields, ExcessivePublicCount</li>
      <li>apex-performance: AvoidDmlStatementsInLoops, AvoidSoqlInLoops</li>
      <li>apex-style: VariableNamingConventions, MethodNamingConventions, ClassNamingConventions,
MethodWithSameNameAsEnclosingClass, AvoidLogicInTrigger, AvoidGlobalModifier</li>
    </ul>
  </li>
  <li>Javascript
    <ul>
      <li>New Rule: ecmascript-unnecessary/NoElseReturn: The else block in a if-else-construct is
unnecessary if the <code class="language-plaintext highlighter-rouge">if</code> block contains a return. Then the content of the else block can be
put outside. See <a href="https://sourceforge.net/p/pmd/bugs/1486/">#1486</a>.</li>
    </ul>
  </li>
</ul>

<p><strong>Improvements and CLI changes:</strong></p>

<ul>
  <li>A JSON-renderer for PMD which is compatible with CodeClimate. See <a href="https://github.com/pmd/pmd/pull/83">PR#83</a>.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1360/">#1360</a>: [core] [java] Provide backwards compatibility for PMD configuration file</li>
  <li>CPD: If a complete filename is specified, the language dependent filename filter is not applied. This allows
to scan files, that are not using the standard file extension. If a directory is specified, the filename filter
is still applied and only those files with the correct file extension of the language are scanned.</li>
  <li>CPD: If no problems found, an empty report will be output instead of nothing. See also <a href="https://sourceforge.net/p/pmd/bugs/1481/">#1481</a></li>
  <li>CPD: New command line parameter <code class="language-plaintext highlighter-rouge">--ignore-usings</code>: Ignore using directives in C# when comparing text.</li>
  <li>PMD: New command line parameter: <code class="language-plaintext highlighter-rouge">-norulesetcompatibility</code> - this disables the ruleset factory
compatibility filter and fails, if e.g. an old rule name is used in the ruleset.
See also <a href="https://sourceforge.net/p/pmd/bugs/1360/">#1360</a>.
This option is also available for the ant task: <code class="language-plaintext highlighter-rouge">&lt;noRuleSetCompatibility&gt;true&lt;/noRuleSetCompatibility&gt;</code>.</li>
  <li>PMD: New command line parameter: <code class="language-plaintext highlighter-rouge">-filelist</code>- this provides an alternative way to define, which
files should be process by PMD. With this option, you can provide the path to a single file containing a comma
delimited list of files to analyze. If this is given, then you don’t need to provide <code class="language-plaintext highlighter-rouge">-dir</code>.
See <a href="https://github.com/pmd/pmd/pull/98">PR#98</a>.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/25">#25</a>: [cs] Added option to exclude C# using directives from CPD analysis</li>
  <li><a href="https://github.com/adangel/pmd/pull/27">#27</a>: [cpp] Added support for Raw String Literals (C++11).</li>
  <li>[#29)(https://github.com/adangel/pmd/pull/29): [jsp] Added support for files with UTF-8 BOM to JSP tokenizer.</li>
  <li><a href="https://github.com/adangel/pmd/pull/30">#30</a>: [core] CPD: Removed file filter for files that are explicitly specified on the CPD command line using the ‘–files’ command line option.</li>
  <li><a href="https://github.com/adangel/pmd/pull/31">#31</a>: [core] CPD: Added file encoding detection to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/32">#32</a>: [objectivec] Extended Objective-C grammar to accept UTF-8 escapes (\uXXXX) in string literals.</li>
  <li><a href="https://github.com/adangel/pmd/pull/33">#33</a>: [swift] Added support for Swift to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/34">#34</a>: multiple code improvements: squid:S1192, squid:S1118, squid:S1066, squid:S1854, squid:S2864</li>
  <li><a href="https://github.com/adangel/pmd/pull/35">#35</a>: [javascript] Javascript tokenizer now ignores comment tokens.</li>
  <li><a href="https://github.com/pmd/pmd/pull/72">#72</a>: [java] [jsp] Added capability in Java and JSP parser for tracking tokens.</li>
  <li><a href="https://github.com/pmd/pmd/pull/73">#73</a>: [java] InvalidSlf4jMessageFormat: Add rule to look for invalid message format in slf4j loggers</li>
  <li><a href="https://github.com/pmd/pmd/pull/74">#74</a>: [java] CommentDefaultAccessModifier: Fix rendering CommentDefaultAccessModifier description as code</li>
  <li><a href="https://github.com/pmd/pmd/pull/75">#75</a>: [core] RuleSetFactory Performance Enhancement</li>
  <li><a href="https://github.com/pmd/pmd/pull/76">#76</a>: [java] DoNotCallGarbageCollectionExplicitly: fix formatting typos in an example</li>
  <li><a href="https://github.com/pmd/pmd/pull/77">#77</a>: [java] [plsql] Fix various typos</li>
  <li><a href="https://github.com/pmd/pmd/pull/78">#78</a>: [java] MissingStaticMethodInNonInstantiatableClass: Add Builder pattern check</li>
  <li><a href="https://github.com/pmd/pmd/pull/79">#79</a>: [java] UseVarargs: do not flag public static void main(String[]), ignore @Override</li>
  <li><a href="https://github.com/pmd/pmd/pull/80">#80</a>: [site] Update mvn-plugin.md</li>
  <li><a href="https://github.com/pmd/pmd/pull/82">#82</a>: [perl] Add Perl support to CPD.</li>
  <li><a href="https://github.com/pmd/pmd/pull/83">#83</a>: [core] CodeClimateRenderer: Adds new Code Climate-compliant JSON renderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/84">#84</a>: [java] EmptyMethodInAbstractClassShouldBeAbstract: Change rule’s description.</li>
  <li><a href="https://github.com/pmd/pmd/pull/85">#85</a>: [java] UseStringBufferForStringAppends: False Positive with Ternary Operator (#1340)</li>
  <li><a href="https://github.com/pmd/pmd/pull/86">#86</a>: [apex] Added language module for Salesforce.com Apex incl. rules ported from Java and new ones.</li>
  <li><a href="https://github.com/pmd/pmd/pull/87">#87</a>: [core] [apex] Customize Code Climate Json “categories” + “remediation_points” as PMD rule properties</li>
  <li><a href="https://github.com/pmd/pmd/pull/88">#88</a>: [core] [apex] Fixed typo in ruleset.xml and problems with the CodeClimate renderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/89">#89</a>: [core] Some code enhancements</li>
  <li><a href="https://github.com/pmd/pmd/pull/90">#90</a>: [core] Refactored two test to stop using the deprecated ant class BuildFileTest</li>
  <li><a href="https://github.com/pmd/pmd/pull/91">#91</a>: [core] [java] [jsp] [plsql] [test] [vm] Small code enhancements, basically reordering variable declarations, constructors and variable modifiers</li>
  <li><a href="https://github.com/pmd/pmd/pull/92">#92</a>: [core] [apex] Improved Code Climate Renderer Output and a Bugfix for Apex StdCyclomaticComplexityRule on triggers</li>
  <li><a href="https://github.com/pmd/pmd/pull/93">#93</a>: [java] ConstantsInInterface: Add ConstantsInInterface rule. Effective Java, 19</li>
  <li><a href="https://github.com/pmd/pmd/pull/94">#94</a>: [core] [apex] Added property, fixed code climate renderer output and deleted unused rulessets</li>
  <li><a href="https://github.com/pmd/pmd/pull/95">#95</a>: [apex] AvoidDmlStatementsInLoops: New apex rule AvoidDmlStatementsInLoops</li>
  <li><a href="https://github.com/pmd/pmd/pull/96">#96</a>: [core] CodeClimateRenderer: Clean up Code Climate renderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/97">#97</a>: [java] BooleanGetMethodName: Don’t report bad method names on @Override</li>
  <li><a href="https://github.com/pmd/pmd/pull/98">#98</a>: [core] PMD: Input filelist parameter</li>
  <li><a href="https://github.com/pmd/pmd/pull/99">#99</a>: [apex] Fixed Trigger name is reported incorrectly</li>
  <li><a href="https://github.com/pmd/pmd/pull/100">#100</a>: [core] CSVRenderer: escape filenames with commas in csvrenderer</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-basic
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1471/">#1471</a>: [java] DoubleCheckedLocking: False positives</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1424/">#1424</a>: [java] SimplifiedTernary: False positive with ternary operator</li>
    </ul>
  </li>
  <li>java-codesize
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1457/">#1457</a>: [java] TooManyMethods: counts inner class methods</li>
    </ul>
  </li>
  <li>java-comments
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1430/">#1430</a>: [java] CommentDefaultAccessModifier: triggers on field
annotated with @VisibleForTesting</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1434/">#1434</a>: [java] CommentRequired: raises violation on serialVersionUID field</li>
    </ul>
  </li>
  <li>java-controversial
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1449/">#1449</a>: [java] AvoidUsingShortType: false positive when casting a variable to short</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1452/">#1452</a>: [java] AccessorClassGenerationRule: ArrayIndexOutOfBoundsException with Annotations</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1479/">#1479</a>: [java] CloseResource: false positive on Statement</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1438/">#1438</a>: [java] UseNotifyAllInsteadOfNotify: false positive</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1467/">#1467</a>: [java] UseUtilityClass: can’t correctly check functions with multiple annotations</li>
    </ul>
  </li>
  <li>java-finalizers
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1440/">#1440</a>: [java] AvoidCallingFinalize: NPE</li>
    </ul>
  </li>
  <li>java-imports
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1436/">#1436</a>: [java] UnnecessaryFullyQualifiedName: false positive on clashing static imports with enums</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1465/">#1465</a>: [java] UnusedImports: False Positve with javadoc @link</li>
    </ul>
  </li>
  <li>java-junit
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1373/">#1373</a>: [java] JUnitAssertionsShouldIncludeMessage: is no longer compatible with TestNG</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1453/">#1453</a>: [java] TestClassWithoutTestCases: false positive</li>
    </ul>
  </li>
  <li>java-migrating
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1446/">#1446</a>: [java] JUnit4TestShouldUseBeforeAnnotation: False positive when TestNG is used</li>
    </ul>
  </li>
  <li>java-naming
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1431/">#1431</a>: [java] SuspiciousEqualsMethodName: false positive</li>
    </ul>
  </li>
  <li>java-optimizations
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1443/">#1443</a>: [java] RedundantFieldInitializer: False positive for small floats</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1340/">#1340</a>: [java] UseStringBufferForStringAppends: False Positive with ternary operator</li>
    </ul>
  </li>
  <li>java-sunsecure
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1476/">#1476</a>: [java] ArrayIsStoredDirectly: False positive</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1475/">#1475</a>: [java] MethodReturnsInternalArray: False positive</li>
    </ul>
  </li>
  <li>java-unnecessary
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1464/">#1464</a>: [java] UnnecessaryFinalModifier: false positive on a @SafeVarargs method</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1422/">#1422</a>: [java] UselessQualifiedThis: False positive with Java 8 Function</li>
    </ul>
  </li>
  <li>java-unusedcode
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1456/">#1456</a>: [java] UnusedFormalParameter: should ignore overriding methods</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1484/">#1484</a>: [java] UnusedLocalVariable: false positive - parenthesis</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1480/">#1480</a>: [java] UnusedModifier: false positive on public modifier used with inner interface in enum</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1428/">#1428</a>: [java] UnusedPrivateField: False positive when local variable hides member variable
hides member variable</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1425/">#1425</a>: [core] XMLRenderer: Invalid XML Characters in Output</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1429/">#1429</a>: [java] Parser Error: Cast in return expression</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1441/">#1441</a>: [site] PMD: Update documentation how to compile after modularization</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1442/">#1442</a>: [java] PDMASMClassLoader: Java 9 Jigsaw readiness</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1455/">#1455</a>: [java] Parser: PMD doesn’t handle Java 8 explicit receiver parameters</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1458/">#1458</a>: [xml] Performance degradation scanning large XML files with XPath custom rules</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1461/">#1461</a>: [core] RuleSetFactory: Possible threading issue due to PR#75</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1470/">#1470</a>: [java] Parser: Error with type-bound lambda</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1478/">#1478</a>: [core] PMD CLI: Use first language as default if Java is not available</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1481/">#1481</a>: [core] CPD: no problems found results in blank file instead of empty xml</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1485/">#1485</a>: [apex] Analysis of some apex classes cause a stackoverflow error</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1488/">#1488</a>: [apex] Windows line endings falsify the location of issues</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1491/">#1491</a>: [core] CodeClimateRenderer: corrupt JSON output with real line breaks</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1492/">#1492</a>: [core] PMD CLI: IncompatibleClassChangeError when running PMD</li>
    </ul>
  </li>
</ul>

<h2 id="27-march-2017---546">27-March-2017 - 5.4.6</h2>

<p>The PMD team is pleased to announce PMD 5.4.6.</p>

<p>This is a bug fixing release.</p>

<h3 id="table-of-contents-43">Table Of Contents</h3>

<ul>
  <li><a href="#Fixed_Issues">Fixed Issues</a></li>
  <li><a href="#External_Contributions">External Contributions</a></li>
</ul>

<h3 id="fixed-issues-53">Fixed Issues</h3>

<ul>
  <li>general:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/305">#305</a>: [core] PMD not executing under git bash</li>
    </ul>
  </li>
  <li>java:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/309">#309</a>: [java] Parse error on method reference</li>
    </ul>
  </li>
  <li>java-design:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/275">#275</a>: [java] FinalFieldCouldBeStatic: Constant in @interface incorrectly reported as “could be made static”</li>
    </ul>
  </li>
  <li>java-junit:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/285">#285</a>: [java] JUnitTestsShouldIncludeAssertRule should support @Rule as well as @Test(expected = …)</li>
    </ul>
  </li>
  <li>java-optimizations:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/222">#222</a>: [java] UseStringBufferForStringAppends: False Positive with ternary operator</li>
    </ul>
  </li>
  <li>java-strings:
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/290">#290</a>: [java] InefficientEmptyStringCheck misses String.trim().isEmpty()</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-50">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/303">#303</a>: [java] InefficientEmptyStringCheckRule now reports String.trim().isEmpty()</li>
  <li><a href="https://github.com/pmd/pmd/pull/307">#307</a>: [java] Fix false positive with UseStringBufferForStringAppendsRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/308">#308</a>: [java] JUnitTestsShouldIncludeAssertRule supports @Rule annotated ExpectedExceptions</li>
</ul>

<h2 id="25-februar-2017---545">25-Februar-2017 - 5.4.5</h2>

<p>The PMD team is pleased to announce PMD 5.4.5</p>

<p>This is a bug fixing release.</p>

<h3 id="table-of-contents-44">Table Of Contents</h3>

<ul>
  <li><a href="#New_and_noteworthy">New and noteworthy</a>
    <ul>
      <li><a href="#Modified_Rules">Modified Rules</a></li>
    </ul>
  </li>
  <li><a href="#Fixed_Issues">Fixed Issues</a></li>
  <li><a href="#External_Contributions">External Contributions</a></li>
</ul>

<h3 id="new-and-noteworthy-45">New and noteworthy</h3>

<h4 id="modified-rules-30">Modified Rules</h4>

<ul>
  <li>The Java rule <code class="language-plaintext highlighter-rouge">UnusedModifier</code> (ruleset java-unusedcode) has been expanded to consider more redundant modifiers.
    <ul>
      <li>Annotations marked as <code class="language-plaintext highlighter-rouge">abstract</code>.</li>
      <li>Nested annotations marked as <code class="language-plaintext highlighter-rouge">static</code>.</li>
      <li>Nested annotations within another interface or annotation marked as <code class="language-plaintext highlighter-rouge">public</code>.</li>
      <li>Classes, interfaces or annotations nested within an annotation marked as <code class="language-plaintext highlighter-rouge">public</code> or <code class="language-plaintext highlighter-rouge">static</code>.</li>
      <li>Nested enums marked as <code class="language-plaintext highlighter-rouge">static</code>.</li>
    </ul>
  </li>
</ul>

<h3 id="fixed-issues-54">Fixed Issues</h3>

<ul>
  <li>general
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/234">#234</a>: [core] Zip file stream closes spuriously when loading rulesets</li>
      <li><a href="https://github.com/pmd/pmd/issues/256">#256</a>: [core] shortnames option is broken with relative paths</li>
    </ul>
  </li>
  <li>java-basic
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/232">#232</a>: [java] SimplifiedTernary: Incorrect ternary operation can be simplified.</li>
    </ul>
  </li>
  <li>java-coupling
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/270">#270</a>: [java] LoD false positive</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/216">#216</a>: [java] [doc] NonThreadSafeSingleton: Be more explicit as to why double checked locking is not recommended</li>
      <li><a href="https://github.com/pmd/pmd/issues/219">#219</a>: [java] UnnecessaryLocalBeforeReturn: ClassCastException in switch case with local variable returned</li>
    </ul>
  </li>
  <li>java-optimizations
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/215">#215</a>: [java] RedundantFieldInitializer report for annotation field not explicitly marked as final</li>
    </ul>
  </li>
  <li>java-unusedcode
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/246">#246</a>: [java] UnusedModifier doesn’t check annotations</li>
      <li><a href="https://github.com/pmd/pmd/issues/247">#247</a>: [java] UnusedModifier doesn’t check annotations inner classes</li>
      <li><a href="https://github.com/pmd/pmd/issues/248">#248</a>: [java] UnusedModifier doesn’t check static keyword on nested enum declaration</li>
      <li><a href="https://github.com/pmd/pmd/issues/257">#257</a>: [java] UnusedLocalVariable false positive</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-51">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/266">#266</a>: [java] corrected invalid reporting of LoD violation</li>
</ul>

<h2 id="28-january-2017---544">28-January-2017 - 5.4.4</h2>

<p>The PMD team is pleased to announce PMD 5.4.4</p>

<p>This is a bug fixing release. The most significant changes are on analysis performance.</p>

<p>Multithread performance has been enhanced by reducing thread-contention on a
bunch of areas. This is still an area of work, as the speedup of running
multithreaded analysis is still relatively small (4 threads produce less
than a 50% speedup). Future releases will keep improving on this area.</p>

<p>Once again, <em>Symbol Table</em> has been an area of great performance improvements.
This time we were able to further improve it’s performance by roughly 10% on all
supported languages. In <em>Java</em> in particular, several more improvements were possible,
improving <em>Symbol Table</em> performance by a whooping 30%, that’s over 5X faster
than PMD 5.4.2, when we first started working on it.</p>

<p>Java developers will also appreciate the revamp of <code class="language-plaintext highlighter-rouge">CloneMethodMustImplementCloneable</code>,
making it over 500X faster, and <code class="language-plaintext highlighter-rouge">PreserveStackTrace</code> which is now 7X faster.</p>

<h3 id="new-and-noteworthy-46">New and noteworthy</h3>

<p>This is a bug fixing release, no major changes were introduced.</p>

<h4 id="modified-rules-31">Modified Rules</h4>

<p>The Java rule “UseLocaleWithCaseConversions” (ruleset java-design) has been modified, to detect calls
to <code class="language-plaintext highlighter-rouge">toLowerCase</code> and to <code class="language-plaintext highlighter-rouge">toUpperCase</code> also within method call chains. This leads to more detected cases
and potentially new false positives.
See also <a href="https://sourceforge.net/p/pmd/bugs/1556/">bugfix #1556</a>.</p>

<h3 id="fixed-issues-55">Fixed Issues</h3>

<ul>
  <li>java
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/206">#206</a>: [java] Parse error on annotation fields with generics</li>
      <li><a href="https://github.com/pmd/pmd/issues/207">#207</a>: [java] Parse error on method reference with generics</li>
      <li><a href="https://github.com/pmd/pmd/issues/208">#208</a>: [java] Parse error with local class with 2 or more annotations</li>
      <li><a href="https://github.com/pmd/pmd/issues/213">#213</a>: [java] CPD: OutOfMemory when analyzing Lucene</li>
    </ul>
  </li>
  <li>java-design
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1448/">#1448</a>: [java] ImmutableField: Private field in inner class gives false positive with lambdas</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1495/">#1495</a>: [java] UnnecessaryLocalBeforeReturn with assert</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1552/">#1552</a>: [java] MissingBreakInSwitch - False positive for continue</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1556/">#1556</a>: [java] UseLocaleWithCaseConversions does not works with <code class="language-plaintext highlighter-rouge">ResultSet</code> (false negative)</li>
      <li><a href="https://github.com/pmd/pmd/issues/177">#177</a>: [java] SingularField with lambdas as final fields</li>
    </ul>
  </li>
  <li>java-imports
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1546/">#1546</a>: [java] UnnecessaryFullyQualifiedNameRule doesn’t take into consideration conflict resolution</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1547/">#1547</a>: [java] UnusedImportRule - False Positive for only usage in Javadoc - {@link ClassName#CONSTANT}</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1555/">#1555</a>: [java] UnnecessaryFullyQualifiedName: Really necessary fully qualified name</li>
    </ul>
  </li>
  <li>java-unnecessary
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/199">#199</a>: [java] UselessParentheses: Parentheses in return statement are incorrectly reported as useless</li>
    </ul>
  </li>
  <li>java-strings
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/202">#202</a>: [java] [doc] ConsecutiveAppendsShouldReuse is not really an optimization</li>
    </ul>
  </li>
  <li>XML
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1518/">#1518</a>: [xml] Error while processing xml file with “.webapp” in the file or directory name</li>
    </ul>
  </li>
  <li>psql
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1549/">#1549</a>: [plsql] Parse error for IS [NOT] NULL construct</li>
    </ul>
  </li>
  <li>javascript
    <ul>
      <li><a href="https://github.com/pmd/pmd/issues/201">#201</a>: [javascript] template strings are not correctly parsed</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1511/">#1511</a>: [core] Inconsistent behavior of Rule.start/Rule.end</li>
    </ul>
  </li>
</ul>

<h3 id="external-contributions-52">External Contributions</h3>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/129">#129</a>: [plsql] Added correct parse of IS [NOT] NULL and multiline DML</li>
  <li><a href="https://github.com/pmd/pmd/pull/152">#152</a>: [java] fixes #1552 continue does not require break</li>
  <li><a href="https://github.com/pmd/pmd/pull/154">#154</a>: [java] Fix #1547: UnusedImports: Adjust regex to support underscores</li>
  <li><a href="https://github.com/pmd/pmd/pull/170">#170</a>: [core] Ant Task Formatter encoding issue with XMLRenderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/200">#200</a>: [javascript] Templatestring grammar fix</li>
</ul>

<h2 id="04-november-2016---543">04-November-2016 - 5.4.3</h2>

<p><strong>Summary:</strong></p>

<ul>
  <li>7 pull requests</li>
  <li>16 bug fixes</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/35">#35</a>: [javascript] Javascript tokenizer now ignores comment tokens.</li>
  <li><a href="https://github.com/pmd/pmd/pull/103">#103</a>: [java] Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
  <li><a href="https://github.com/pmd/pmd/pull/110">#110</a>: [java] Fix parser error (issue 1530)</li>
  <li><a href="https://github.com/pmd/pmd/pull/111">#111</a>: [java] Fix BooleanInstantiationRule for Java 8</li>
  <li><a href="https://github.com/pmd/pmd/pull/112">#112</a>: [java] Fix ClassCastException on CloneMethodMustImplementCloneable</li>
  <li><a href="https://github.com/pmd/pmd/pull/113">#113</a>: [java] Fix ClassCastException on SignatureDeclareThrowsException</li>
  <li><a href="https://github.com/pmd/pmd/pull/119">#119</a>: [plsql] Fix PMD issue 1531- endless loop followed by OOM while parsing (PL)SQL</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>Java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1501/">#1501</a>: [java] CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1530/">#1530</a>: [java] Parser exception on Java code</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1490/">#1490</a>: [java] PMD Error while processing - NullPointerException</li>
    </ul>
  </li>
  <li>java-basic/BooleanInstantiation
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1533/">#1533</a>: [java] BooleanInstantiation: ClassCastException with Annotation</li>
    </ul>
  </li>
  <li>java-comments
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1522/">#1522</a>: [java] CommentRequired: false positive</li>
    </ul>
  </li>
  <li>java-design/SingularField
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1494/">#1494</a>: [java] SingularField: lombok.Data false positive</li>
    </ul>
  </li>
  <li>java-imports/UnusedImports
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1529/">#1529</a>: [java] UnusedImports: The created rule violation has no class name</li>
    </ul>
  </li>
  <li>java-typeresolution/CloneMethodMustImplementCloneable
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1532/">#1532</a>: [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1534/">#1534</a>: [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8)</li>
    </ul>
  </li>
  <li>java-typeresolution/SignatureDeclareThrowsException
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1535/">#1535</a>: [java] SignatureDeclareThrowsException: ClassCastException with Annotation</li>
    </ul>
  </li>
  <li>PLSQL
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1520/">#1520</a>: [plsql] Missing PL/SQL language constructs in parser: Is Of Type, Using</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1527/">#1527</a>: [plsql] PRAGMA AUTONOMOUS_TRANSACTION gives processing errors</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1531/">#1531</a>: [plsql] OOM/Endless loop while parsing (PL)SQL</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1499/">#1499</a>: [core] CPD test break PMD 5.5.1 build on Windows</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1506/">#1506</a>: [core] When runing any RuleTst, start/end methods not called</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1508/">#1508</a>: [core] [java] PMD is leaking file handles</li>
    </ul>
  </li>
</ul>

<h2 id="29-may-2016---542">29-May-2016 - 5.4.2</h2>

<p><strong>New Supported Languages:</strong></p>

<ul>
  <li>CPD supports now Swift (see <a href="https://github.com/adangel/pmd/pull/33">PR#33</a>).</li>
</ul>

<p><strong>Feature Request and Improvements:</strong></p>

<ul>
  <li>A JSON-renderer for PMD which is compatible with CodeClimate. See <a href="https://github.com/pmd/pmd/pull/83">PR#83</a>.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1360/">#1360</a>: Provide backwards compatibility for PMD configuration file</li>
</ul>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li>java-design/UseVargs: public static void main method is ignored now and so are methods, that are annotated
with Override. See <a href="https://github.com/pmd/pmd/pull/79">PR#79</a>.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/27">#27</a>: Added support for Raw String Literals (C++11).</li>
  <li><a href="https://github.com/adangel/pmd/pull/29">#29</a>: Added support for files with UTF-8 BOM to JSP tokenizer.</li>
  <li><a href="https://github.com/adangel/pmd/pull/30">#30</a>: Removed file filter for files that are explicitly specified on the CPD command line using the ‘–files’ command line option.</li>
  <li><a href="https://github.com/adangel/pmd/pull/31">#31</a>: Added file encoding detection to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/32">#32</a>: Extended Objective-C grammar to accept UTF-8 escapes (\uXXXX) in string literals.</li>
  <li><a href="https://github.com/adangel/pmd/pull/33">#33</a>: Added support for Swift to CPD.</li>
  <li><a href="https://github.com/pmd/pmd/pull/79">#79</a>: do not flag public static void main(String[]) as UseVarargs; ignore @Override for UseVarargs</li>
  <li><a href="https://github.com/pmd/pmd/pull/80">#80</a>: Update mvn-plugin.md</li>
  <li><a href="https://github.com/pmd/pmd/pull/83">#83</a>: Adds new Code Climate-compliant JSON renderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/85">#85</a>: #1340 UseStringBufferForStringAppends False Positive with Ternary Operator</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-basic/DoubleCheckedLocking:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1471/">#1471</a>: False positives for DoubleCheckedLocking</li>
    </ul>
  </li>
  <li>java-basic/SimplifiedTernary:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1424/">#1424</a>: False positive with ternary operator</li>
    </ul>
  </li>
  <li>java-codesize/TooManyMethods:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1457/">#1457</a>: TooManyMethods counts inner class methods</li>
    </ul>
  </li>
  <li>java-controversial/AvoidUsingShortType:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1449/">#1449</a>: false positive when casting a variable to short</li>
    </ul>
  </li>
  <li>java-design/AccessorClassGeneration:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1452/">#1452</a>: ArrayIndexOutOfBoundsException with Annotations for AccessorClassGenerationRule</li>
    </ul>
  </li>
  <li>java-design/CloseResource
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1479/">#1479</a>: CloseResource false positive on Statement</li>
    </ul>
  </li>
  <li>java-design/UseUtilityClass:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1467/">#1467</a>: UseUtilityClass can’t correctly check functions with multiple annotations</li>
    </ul>
  </li>
  <li>java-imports/UnusedImports:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1465/">#1465</a>: False Positve UnusedImports with javadoc @link</li>
    </ul>
  </li>
  <li>java-junit/TestClassWithoutTestCases:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1453/">#1453</a>: Test Class Without Test Cases gives false positive</li>
    </ul>
  </li>
  <li>java-optimizations/UseStringBufferForStringAppends:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1340/">#1340</a>: UseStringBufferForStringAppends False Positive with ternary operator</li>
    </ul>
  </li>
  <li>java-sunsecure/ArrayIsStoredDirectly:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1475/">#1475</a>: False positive of MethodReturnsInternalArray</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1476/">#1476</a>: False positive of ArrayIsStoredDirectly</li>
    </ul>
  </li>
  <li>java-unnecessary/UnnecessaryFinalModifier:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1464/">#1464</a>: UnnecessaryFinalModifier false positive on a @SafeVarargs method</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedFormalParameter:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1456/">#1456</a>: UnusedFormalParameter should ignore overriding methods</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedLocalVariable
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1484/">#1484</a>: UnusedLocalVariable - false positive - parenthesis</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedModifier
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1480/">#1480</a>: false positive on public modifier used with inner interface in enum</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1455/">#1455</a>: PMD doesn’t handle Java 8 explicit receiver parameters</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1458/">#1458</a>: Performance degradation scanning large XML files with XPath custom rules</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1461/">#1461</a>: Possible threading issue due to PR#75</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1470/">#1470</a>: Error with type-bound lambda</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1481/">#1481</a>: no problems found results in blank file instead of empty xml</li>
    </ul>
  </li>
</ul>

<p><strong>CLI Changes:</strong></p>

<ul>
  <li>CPD: If a complete filename is specified, the language dependent filename filter is not applied. This allows
to scan files, that are not using the standard file extension. If a directory is specified, the filename filter
is still applied and only those files with the correct file extension of the language are scanned.</li>
  <li>CPD: If no problems found, an empty report will be output instead of nothing. See also <a href="https://sourceforge.net/p/pmd/bugs/1481/">#1481</a></li>
  <li>New command line parameter for PMD: <code class="language-plaintext highlighter-rouge">-norulesetcompatibility</code> - this disables the ruleset factory
compatibility filter and fails, if e.g. an old rule name is used in the ruleset.
See also <a href="https://sourceforge.net/p/pmd/bugs/1360/">#1360</a>.
This option is also available for the ant task: <code class="language-plaintext highlighter-rouge">&lt;noRuleSetCompatibility&gt;true&lt;/noRuleSetCompatibility&gt;</code>.</li>
</ul>

<h2 id="04-december-2015---541">04-December-2015 - 5.4.1</h2>

<p><strong>Feature Request and Improvements:</strong></p>

<ul>
  <li>CPD: New command line parameter <code class="language-plaintext highlighter-rouge">--ignore-usings</code>: Ignore using directives in C# when comparing text.</li>
</ul>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li>java-comments/CommentRequired: New property <code class="language-plaintext highlighter-rouge">serialVersionUIDCommentRequired</code> which controls the comment requirements
for <em>serialVersionUID</em> fields. By default, no comment is required for this field.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/25">#25</a>: Added option to exclude C# using directives from CPD analysis</li>
  <li><a href="https://github.com/pmd/pmd/pull/72">#72</a>: Added capability in Java and JSP parser for tracking tokens.</li>
  <li><a href="https://github.com/pmd/pmd/pull/74">#74</a>: Fix rendering CommentDefaultAccessModifier description as code</li>
  <li><a href="https://github.com/pmd/pmd/pull/75">#75</a>: RuleSetFactory Performance Enhancement</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-comments/CommentDefaultAccessModifier
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1430/">#1430</a>: CommentDefaultAccessModifier triggers on field
annotated with @VisibleForTesting</li>
    </ul>
  </li>
  <li>java-comments/CommentRequired
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1434/">#1434</a>: CommentRequired raises violation on serialVersionUID field</li>
    </ul>
  </li>
  <li>java-design/UseNotifyAllInsteadOfNotify
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1438/">#1438</a>: UseNotifyAllInsteadOfNotify gives false positive</li>
    </ul>
  </li>
  <li>java-finalizers/AvoidCallingFinalize
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1440/">#1440</a>: NPE in AvoidCallingFinalize</li>
    </ul>
  </li>
  <li>java-imports/UnnecessaryFullyQualifiedName
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1436/">#1436</a>: UnnecessaryFullyQualifiedName false positive on clashing static imports with enums</li>
    </ul>
  </li>
  <li>java-junit/JUnitAssertionsShouldIncludeMessage
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1373/">#1373</a>: JUnitAssertionsShouldIncludeMessage is no longer compatible with TestNG</li>
    </ul>
  </li>
  <li>java-migrating/JUnit4TestShouldUseBeforeAnnotation
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1446/">#1446</a>: False positive with JUnit4TestShouldUseBeforeAnnotation when TestNG is used</li>
    </ul>
  </li>
  <li>java-naming/SuspiciousEqualsMethodName
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1431/">#1431</a>: SuspiciousEqualsMethodName false positive</li>
    </ul>
  </li>
  <li>java-optimizations/RedundantFieldInitializer
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1443/">#1443</a>: RedundantFieldInitializer: False positive for small floats</li>
    </ul>
  </li>
  <li>java-unnecessary/UselessQualifiedThis
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1422/">#1422</a>: UselessQualifiedThis: False positive with Java 8 Function</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedPrivateField
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1428/">#1428</a>: False positive in UnusedPrivateField when local variable
hides member variable</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1425/">#1425</a>: Invalid XML Characters in Output</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1429/">#1429</a>: Java - Parse Error: Cast in return expression</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1441/">#1441</a>: PMD: Update documentation how to compile after modularization</li>
    </ul>
  </li>
</ul>

<h2 id="04-october-2015---540">04-October-2015 - 5.4.0</h2>

<div style="border: 1px solid red; border-radius: 5px; border-left-width: 10px; padding: 5px 1em; background-color: lightyellow;">
<strong>Note</strong>: PMD 5.4.0 requires JDK 1.7 or above.
</div>

<p><strong>Summary:</strong></p>

<ul>
  <li>9 new rules</li>
  <li>4 features requests</li>
  <li>18 pull requests</li>
</ul>

<p><strong>Feature Request and Improvements:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1344/">#1344</a>: AbstractNaming should check reverse</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1361/">#1361</a>: ShortVariable and ShortMethodName configuration</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1414/">#1414</a>: Command line parameter to disable “failOnViolation” behavior
PMD and CPD Command Line Interfaces have a new optional parameter: <code class="language-plaintext highlighter-rouge">failOnViolation</code>. Executing PMD with the option
<code class="language-plaintext highlighter-rouge">-failOnViolation false</code> will perform the PMD checks but won’t fail the build and still exit with status 0.
This is useful if you only want to generate the report with violations but don’t want to fail your build.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1420/">#1420</a>: UnusedPrivateField: Ignore fields if using lombok</li>
</ul>

<p><strong>New Rules:</strong></p>

<ul>
  <li>
    <p>Java:</p>

    <ul>
      <li>
        <p>Basic: <strong>SimplifiedTernary</strong> (rulesets/java/basic.xml/SimplifiedTernary)<br />
Ternary operator with a boolean literal can be simplified with a boolean
expression.</p>
      </li>
      <li>
        <p>Clone: <strong>CloneMethodMustBePublic</strong> (rulesets/java/clone.xml/CloneMethodMustBePublic)<br />
The java manual says “By convention,
classes that implement the <code class="language-plaintext highlighter-rouge">Cloneable</code> interface should override <code class="language-plaintext highlighter-rouge">Object.clone</code> (which is protected)
with a public method.”</p>
      </li>
      <li>
        <p>Clone: <strong>CloneMethodReturnTypeMustMatchClassName</strong> (rulesets/java/clone.xml/CloneMethodReturnTypeMustMatchClassName)<br />
If a class implements <code class="language-plaintext highlighter-rouge">Cloneable</code>
the return type of the method <code class="language-plaintext highlighter-rouge">clone()</code> must be the class name.</p>
      </li>
      <li>
        <p>Comments: <strong>CommentDefaultAccessModifier</strong> (rulesets/java/comments.xml/CommentDefaultAccessModifier)<br />
In order to avoid mistakes with
forgotten access modifiers for methods, this rule ensures, that you explicitly mark the usage of the
default access modifier by placing a comment.</p>
      </li>
      <li>
        <p>Design: <strong>SingletonClassReturningNewInstance</strong> (rulesets/java/design.xml/SingletonClassReturningNewInstance)<br />
Verifies that the method called <code class="language-plaintext highlighter-rouge">getInstance</code> returns a cached instance and not always a fresh, new instance.</p>
      </li>
      <li>
        <p>Design: <strong>SingleMethodRule</strong> (rulesets/java/design.xml/SingleMethodSingletonRule)<br />
Verifies that there is only one method called
<code class="language-plaintext highlighter-rouge">getInstance</code>. If there are more methods that return the singleton, then it can easily happen, that these
are not the same instances - and thus no singleton.</p>
      </li>
      <li>
        <p>Unnecessary: <strong>UselessQualifiedThis</strong> (rulesets/java/unnecessary.xml/UselessQualifiedThis)<br />
Flags unnecessary qualified usages
of this, when <code class="language-plaintext highlighter-rouge">this</code> alone would be unique. E.g. use just <code class="language-plaintext highlighter-rouge">this</code> instead of <code class="language-plaintext highlighter-rouge">Foo.this</code>.</p>
      </li>
    </ul>
  </li>
  <li>
    <p>Maven POM: (The rules can be found in the <em>pmd-xml</em> module)</p>

    <ul>
      <li>
        <p>Basic: <strong>ProjectVersionAsDependencyVersion</strong> (rulesets/pom/basic.xml/ProjectVersionAsDependencyVersion)<br />
Checks the usage of <code class="language-plaintext highlighter-rouge">${project.version}</code> in Maven POM files.</p>
      </li>
      <li>
        <p>Basic: <strong>InvalidDependencyTypes</strong> (rulesets/pom/basic.xml/InvalidDependencyTypes)<br />
Verifies that only the default types (jar, war, …) for dependencies are used.</p>
      </li>
    </ul>
  </li>
</ul>

<p>Ruleset snippet to activate the new rules:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;rule ref="rulesets/java/basic.xml/SimplifiedTernary"/&gt;
&lt;rule ref="rulesets/java/clone.xml/CloneMethodReturnTypeMustMatchClassName"/&gt;
&lt;rule ref="rulesets/java/clone.xml/CloneMethodMustBePublic"/&gt;
&lt;rule ref="rulesets/java/comments.xml/CommentDefaultAccessModifier"/&gt;
&lt;rule ref="rulesets/java/design.xml/SingleMethodSingleton"/&gt;
&lt;rule ref="rulesets/java/design.xml/SingletonClassReturningNewInstance"/&gt;
&lt;rule ref="rulesets/java/unnecessary.xml/UselessQualifiedThis"/&gt;

&lt;rule ref="rulesets/pom/basic.xml/ProjectVersionAsDependencyVersion"/&gt;
&lt;rule ref="rulesets/pom/basic.xml/InvalidDependencyTypes"/&gt;
</code></pre></div></div>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li>
    <p>Java</p>

    <ul>
      <li>
        <p>Basic: <strong>CheckResultSet</strong> (rulesets/java/basic.xml/CheckResultSet)<br />
Do not require to check the result of a navigation method, if it is returned.</p>
      </li>
      <li>
        <p>JUnit: <strong>UseAssertTrueInsteadOfAssertEquals</strong> (rulesets/java/junit.xml/UseAssertTrueInsteadOfAssertEquals)<br />
This rule also flags assertEquals, that use Boolean.TRUE/FALSE constants.</p>
      </li>
      <li>
        <p>Naming: <strong>AbstractNaming</strong> (rulesets/java/naming.xml/AbstractNaming)<br />
By default, this rule flags now classes,
that are named “Abstract” but are not abstract. This behavior can be disabled by setting
the new property <code class="language-plaintext highlighter-rouge">strict</code> to false.</p>
      </li>
      <li>
        <p>Naming: <strong>ShortMethodName</strong> (rulesets/java/naming.xml/ShortMethodName)<br />
Additional property <code class="language-plaintext highlighter-rouge">minimum</code> to configure the minimum required length of a method name.</p>
      </li>
      <li>
        <p>Naming: <strong>ShortVariable</strong> (rulesets/java/naming.xml/ShortVariable)<br />
Additional property <code class="language-plaintext highlighter-rouge">minimum</code> to configure the minimum required length of a variable name.</p>
      </li>
      <li>
        <p>UnusedCode: <strong>UnusedPrivateField</strong> (rulesets/java/unusedcode.xml/UnusedPrivateField)<br />
This rule won’t trigger anymore if <a href="https://projectlombok.org">Lombok</a> is in use.
See <a href="https://sourceforge.net/p/pmd/bugs/1420/">#1420</a>.</p>
      </li>
    </ul>
  </li>
</ul>

<p><strong>Renamed Rules:</strong></p>

<ul>
  <li>Java
    <ul>
      <li>Design: <strong><del>UseSingleton</del></strong> - <strong>UseUtilityClass</strong> (rulesets/java/design.xml/UseUtilityClass)<br />
The rule “UseSingleton” <em>has been renamed</em> to “UseUtilityClass”.
See also bugs <a href="https://sourceforge.net/p/pmd/bugs/1059">#1059</a> and <a href="https://sourceforge.net/p/pmd/bugs/1339/">#1339</a>.</li>
    </ul>
  </li>
</ul>

<p><strong>Removed Rules:</strong></p>

<ul>
  <li>Java
    <ul>
      <li>
        <p>Basic: The following rules of ruleset “Basic” were marked as deprecated and are removed with this release now:<br />
<br />
EmptyCatchBlock, EmptyIfStatement, EmptyWhileStmt, EmptyTryBlock, EmptyFinallyBlock, EmptySwitchStatements, EmptySynchronizedBlock, EmptyStatementNotInLoop, EmptyInitializer, EmptyStatementBlock, EmptyStaticInitializer
<br /><br />
UnnecessaryConversionTemporary, UnnecessaryReturn, UnnecessaryFinalModifier, UselessOverridingMethod, UselessOperationOnImmutable, UnusedNullCheckInEquals, UselessParentheses
<br /><br />
These rules are still available in the rulesets “Empty” (rulesets/java/empty.xml) and
“Unnecessary” (rulesets/java/unnecessary.xml) respectively.</p>
      </li>
      <li>
        <p>Design: The rule “UncommentedEmptyMethod” has been renamed last release to “UncommentedEmptyMethodBody”. The
old rule name reference has been removed with this release now.</p>
      </li>
      <li>
        <p>Controversial: The rule “BooleanInversion” has been deprecated last release
and has been removed with this release completely.</p>
      </li>
    </ul>
  </li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/21">#21</a>: Added PMD Rules for Singleton pattern violations.</li>
  <li><a href="https://github.com/adangel/pmd/pull/23">#23</a>: Extended Objective-C grammar to accept Unicode characters in identifiers</li>
  <li><a href="https://github.com/pmd/pmd/pull/54">#54</a>: Add a new rulesets for Maven’s POM rules</li>
  <li><a href="https://github.com/pmd/pmd/pull/55">#55</a>: Fix run.sh for paths with spaces</li>
  <li><a href="https://github.com/pmd/pmd/pull/56">#56</a>: Adding support for WSDL rules</li>
  <li><a href="https://github.com/pmd/pmd/pull/57">#57</a>: Add default access modifier as comment rule</li>
  <li><a href="https://github.com/pmd/pmd/pull/58">#58</a>: Add rule for unnecessary literal boolean in ternary operators</li>
  <li><a href="https://github.com/pmd/pmd/pull/59">#59</a>: Add check to Boxed booleans in UseAssertTrueInsteadOfAssertEquals rule</li>
  <li><a href="https://github.com/pmd/pmd/pull/60">#60</a>: Add UselessQualifiedThisRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/61">#61</a>: Add CloneMethodReturnTypeMustMatchClassName rule</li>
  <li><a href="https://github.com/pmd/pmd/pull/62">#62</a>: Add CloneMethodMustBePublic rule</li>
  <li><a href="https://github.com/pmd/pmd/pull/63">#63</a>: Change CheckResultSet to allow for the result of the navigation methods to be returned</li>
  <li><a href="https://github.com/pmd/pmd/pull/65">#65</a>: Fix ClassCastException in UselessOverridingMethodRule.</li>
  <li><a href="https://github.com/pmd/pmd/pull/66">#66</a>: #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer</li>
  <li><a href="https://github.com/pmd/pmd/pull/67">#67</a>: Use Path instead of string to check file exclusions to fix windows-only bug</li>
  <li><a href="https://github.com/pmd/pmd/pull/68">#68</a>: #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer</li>
  <li><a href="https://github.com/pmd/pmd/pull/69">#69</a>: #1371 InsufficientStringBufferDeclaration not detected properly on StringBuffer</li>
  <li><a href="https://github.com/pmd/pmd/pull/70">#70</a>: Fix code example</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-unusedcode/UnusedPrivateMethod:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1412/">#1412</a>: UnusedPrivateMethod false positive: Issue #1403 not completely solved</li>
    </ul>
  </li>
</ul>

<p><strong>API Changes:</strong></p>

<ul>
  <li>
    <p>pmd requires now JDK 1.7 or above.</p>
  </li>
  <li>
    <p>pmd-core: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.symboltable.Scope</code>:</p>

    <p>The method <code class="language-plaintext highlighter-rouge">addNameOccurrence</code> returns now a Set of
NameDeclarations to which the given occurrence has been added. This is useful in case there are ambiguous declarations
of methods.</p>
  </li>
  <li>
    <p>pmd-core: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.symboltable.AbstractScope</code>:</p>

    <p>The method <code class="language-plaintext highlighter-rouge">findVariableHere</code> returns now
a Set of NameDeclarations which match the given occurrence.  This is useful in case there are ambiguous declarations
of methods.</p>
  </li>
</ul>

<h2 id="04-november-2016---538">04-November-2016 - 5.3.8</h2>

<p><strong>Summary</strong></p>

<ul>
  <li>1 feature requests</li>
  <li>6 pull requests</li>
  <li>17 bug fixes</li>
</ul>

<p><strong>Feature Requests and Improvements:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1360/">#1360</a>: [core] [java] Provide backwards compatibility for PMD configuration file</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/35">#35</a>: [javascript] Javascript tokenizer now ignores comment tokens.</li>
  <li><a href="https://github.com/pmd/pmd/pull/103">#103</a>: [java] Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
  <li><a href="https://github.com/pmd/pmd/pull/111">#111</a>: [java] Fix BooleanInstantiationRule for Java 8</li>
  <li><a href="https://github.com/pmd/pmd/pull/112">#112</a>: [java] Fix ClassCastException on CloneMethodMustImplementCloneable</li>
  <li><a href="https://github.com/pmd/pmd/pull/113">#113</a>: [java] Fix ClassCastException on SignatureDeclareThrowsException</li>
  <li><a href="https://github.com/pmd/pmd/pull/119">#119</a>: [plsql] Fix PMD issue 1531- endless loop followed by OOM while parsing (PL)SQL</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1501/">#1501</a>: [java] [apex] CyclomaticComplexity rule causes OOM when class reporting is disabled</li>
    </ul>
  </li>
  <li>java-basic/BooleanInstantiation
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1533/">#1533</a>: [java] BooleanInstantiation: ClassCastException with Annotation</li>
    </ul>
  </li>
  <li>java-comments
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1522/">#1522</a>: [java] CommentRequired: false positive</li>
    </ul>
  </li>
  <li>java-design/CloseResource
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1479/">#1479</a>: [java] CloseResource: false positive on Statement</li>
    </ul>
  </li>
  <li>java-imports/UnusedImports
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1529/">#1529</a>: [java] UnusedImports: The created rule violation has no class name</li>
    </ul>
  </li>
  <li>java-typeresolution/CloneMethodMustImplementCloneable
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1532/">#1532</a>: [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1534/">#1534</a>: [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8)</li>
    </ul>
  </li>
  <li>java-typeresolution/SignatureDeclareThrowsException
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1535/">#1535</a>: [java] SignatureDeclareThrowsException: ClassCastException with Annotation</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedLocalVariable
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1484/">#1484</a>: [java] UnusedLocalVariable: false positive - parenthesis</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedModifier
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1480/">#1480</a>: [java] UnusedModifier: false positive on public modifier used with inner interface in enum</li>
    </ul>
  </li>
  <li>plsql
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1520/">#1520</a>: [plsql] Missing PL/SQL language constructs in parser: Is Of Type, Using</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1527/">#1527</a>: [plsql] PRAGMA AUTONOMOUS_TRANSACTION gives processing errors</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1531/">#1531</a>: [plsql] OOM/Endless loop while parsing (PL)SQL</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1481/">#1481</a>: [core] CPD: no problems found results in blank file instead of empty xml</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1499/">#1499</a>: [core] CPD test break PMD 5.5.1 build on Windows</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1506/">#1506</a>: [core] When runing any RuleTst, start/end methods not called</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1508/">#1508</a>: [core] [java] PMD is leaking file handles</li>
    </ul>
  </li>
</ul>

<p><strong>API Changes:</strong></p>

<ul>
  <li>New command line parameter for PMD: <code class="language-plaintext highlighter-rouge">-norulesetcompatibility</code> - this disables the ruleset factory
compatibility filter and fails, if e.g. an old rule name is used in the ruleset.
See also <a href="https://sourceforge.net/p/pmd/bugs/1360/">#1360</a>.
This option is also available for the ant task: <code class="language-plaintext highlighter-rouge">&lt;noRuleSetCompatibility&gt;true&lt;/noRuleSetCompatibility&gt;</code>.</li>
  <li>CPD: If no problems found, an empty report will be output instead of nothing. See also <a href="https://sourceforge.net/p/pmd/bugs/1481/">#1481</a></li>
</ul>

<h2 id="30-april-2016---537">30-April-2016 - 5.3.7</h2>

<p><strong>New Supported Languages:</strong></p>

<ul>
  <li>CPD supports now Swift (see <a href="https://github.com/adangel/pmd/pull/33">PR#33</a>).</li>
</ul>

<p><strong>Feature Request and Improvements:</strong></p>

<ul>
  <li>A JSON-renderer for PMD which is compatible with CodeClimate. See <a href="https://github.com/pmd/pmd/pull/83">PR#83</a>.</li>
</ul>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li>java-design/UseVargs: public static void main method is ignored now and so are methods, that are annotated
with Override. See <a href="https://github.com/pmd/pmd/pull/79">PR#79</a>.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/27">#27</a>: Added support for Raw String Literals (C++11).</li>
  <li><a href="https://github.com/adangel/pmd/pull/29">#29</a>: Added support for files with UTF-8 BOM to JSP tokenizer.</li>
  <li><a href="https://github.com/adangel/pmd/pull/30">#30</a>: Removed file filter for files that are explicitly specified on the CPD command line using the ‘–files’ command line option.</li>
  <li><a href="https://github.com/adangel/pmd/pull/31">#31</a>: Added file encoding detection to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/32">#32</a>: Extended Objective-C grammar to accept UTF-8 escapes (\uXXXX) in string literals.</li>
  <li><a href="https://github.com/adangel/pmd/pull/33">#33</a>: Added support for Swift to CPD.</li>
  <li><a href="https://github.com/pmd/pmd/pull/79">#79</a>: do not flag public static void main(String[]) as UseVarargs; ignore @Override for UseVarargs</li>
  <li><a href="https://github.com/pmd/pmd/pull/80">#80</a>: Update mvn-plugin.md</li>
  <li><a href="https://github.com/pmd/pmd/pull/83">#83</a>: Adds new Code Climate-compliant JSON renderer</li>
  <li><a href="https://github.com/pmd/pmd/pull/85">#85</a>: #1340 UseStringBufferForStringAppends False Positive with Ternary Operator</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-basic/DoubleCheckedLocking:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1471/">#1471</a>: False positives for DoubleCheckedLocking</li>
    </ul>
  </li>
  <li>java-codesize/TooManyMethods:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1457/">#1457</a>: TooManyMethods counts inner class methods</li>
    </ul>
  </li>
  <li>java-controversial/AvoidUsingShortType:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1449/">#1449</a>: false positive when casting a variable to short</li>
    </ul>
  </li>
  <li>java-design/AccessorClassGeneration:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1452/">#1452</a>: ArrayIndexOutOfBoundsException with Annotations for AccessorClassGenerationRule</li>
    </ul>
  </li>
  <li>java-design/UseUtilityClass:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1467/">#1467</a>: UseUtilityClass can’t correctly check functions with multiple annotations</li>
    </ul>
  </li>
  <li>java-imports/UnusedImports:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1465/">#1465</a>: False Positve UnusedImports with javadoc @link</li>
    </ul>
  </li>
  <li>java-junit/TestClassWithoutTestCases:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1453/">#1453</a>: Test Class Without Test Cases gives false positive</li>
    </ul>
  </li>
  <li>java-optimizations/UseStringBufferForStringAppends:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1340/">#1340</a>: UseStringBufferForStringAppends False Positive with ternary operator</li>
    </ul>
  </li>
  <li>java-sunsecure/ArrayIsStoredDirectly:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1475/">#1475</a>: False positive of MethodReturnsInternalArray</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1476/">#1476</a>: False positive of ArrayIsStoredDirectly</li>
    </ul>
  </li>
  <li>java-unnecessary/UnnecessaryFinalModifier:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1464/">#1464</a>: UnnecessaryFinalModifier false positive on a @SafeVarargs method</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedFormalParameter:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1456/">#1456</a>: UnusedFormalParameter should ignore overriding methods</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1455/">#1455</a>: PMD doesn’t handle Java 8 explicit receiver parameters</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1458/">#1458</a>: Performance degradation scanning large XML files with XPath custom rules</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1461/">#1461</a>: Possible threading issue due to PR#75</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1470/">#1470</a>: Error with type-bound lambda</li>
    </ul>
  </li>
</ul>

<p><strong>CLI Changes:</strong></p>

<ul>
  <li>CPD: If a complete filename is specified, the language dependent filename filter is not applied. This allows
to scan files, that are not using the standard file extension. If a directory is specified, the filename filter
is still applied and only those files with the correct file extension of the language are scanned.</li>
</ul>

<h2 id="04-december-2015---536">04-December-2015 - 5.3.6</h2>

<p><strong>Feature Request and Improvements:</strong></p>

<ul>
  <li>CPD: New command line parameter <code class="language-plaintext highlighter-rouge">--ignore-usings</code>: Ignore using directives in C# when comparing text.</li>
</ul>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li>java-comments/CommentRequired: New property <code class="language-plaintext highlighter-rouge">serialVersionUIDCommentRequired</code> which controls the comment requirements
for <em>serialVersionUID</em> fields. By default, no comment is required for this field.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/25">#25</a>: Added option to exclude C# using directives from CPD analysis
    <ul>
      <li>Note: This also contains the fix from <a href="https://github.com/adangel/pmd/pull/23">#23</a></li>
    </ul>
  </li>
  <li><a href="https://github.com/pmd/pmd/pull/72">#72</a>: Added capability in Java and JSP parser for tracking tokens.</li>
  <li><a href="https://github.com/pmd/pmd/pull/75">#75</a>: RuleSetFactory Performance Enhancement</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-comments/CommentRequired
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1434/">#1434</a>: CommentRequired raises violation on serialVersionUID field</li>
    </ul>
  </li>
  <li>java-design/UseNotifyAllInsteadOfNotify
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1438/">#1438</a>: UseNotifyAllInsteadOfNotify gives false positive</li>
    </ul>
  </li>
  <li>java-finalizers/AvoidCallingFinalize
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1440/">#1440</a>: NPE in AvoidCallingFinalize</li>
    </ul>
  </li>
  <li>java-imports/UnnecessaryFullyQualifiedName
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1436/">#1436</a>: UnnecessaryFullyQualifiedName false positive on clashing static imports with enums</li>
    </ul>
  </li>
  <li>java-junit/JUnitAssertionsShouldIncludeMessage
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1373/">#1373</a>: JUnitAssertionsShouldIncludeMessage is no longer compatible with TestNG</li>
    </ul>
  </li>
  <li>java-migrating/JUnit4TestShouldUseBeforeAnnotation
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1446/">#1446</a>: False positive with JUnit4TestShouldUseBeforeAnnotation when TestNG is used</li>
    </ul>
  </li>
  <li>java-naming/SuspiciousEqualsMethodName
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1431/">#1431</a>: SuspiciousEqualsMethodName false positive</li>
    </ul>
  </li>
  <li>java-optimizations/RedundantFieldInitializer
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1443/">#1443</a>: RedundantFieldInitializer: False positive for small floats</li>
    </ul>
  </li>
  <li>java-unusedcode/UnusedPrivateField
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1428/">#1428</a>: False positive in UnusedPrivateField when local variable hides member variable</li>
    </ul>
  </li>
  <li>General
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1429/">#1429</a>: Java - Parse Error: Cast in return expression</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1425/">#1425</a>: Invalid XML Characters in Output</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1441/">#1441</a>: PMD: Update documentation how to compile after modularization</li>
    </ul>
  </li>
</ul>

<h2 id="04-october-2015---535">04-October-2015 - 5.3.5</h2>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li>java-design/CloseResource: New Property <em>closeAsDefaultTarget</em> which is <em>true</em> by default to stay
backwards compatible. If this property is <em>true</em>, the rule will make sure, that <code class="language-plaintext highlighter-rouge">close</code> itself is
always considered as a <em>closeTarget</em> - no matter whether it is configured with the <em>closeTargets</em> property
or not.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/71">#71</a>: #1410 Improve description of DefaultPackage rule</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>java-controversial/DefaultPackage:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1410/">#1410</a>: DefaultPackage triggers on field annotated with @VisibleForTesting</li>
    </ul>
  </li>
  <li>java-design/CloseResource:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1387/">#1387</a>: CloseResource has false positive for ResultSet</li>
    </ul>
  </li>
  <li>java-optimizations/RedundantFieldInitializer
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1418/">#1418</a>: RedundantFieldInitializer false positive with large long value</li>
    </ul>
  </li>
  <li>java-strings/InsufficientStringBufferDeclaration:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1409/">#1409</a>: NullPointerException in InsufficientStringBufferRule</li>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1413/">#1413</a>: False positive StringBuffer constructor with ?: int value</li>
    </ul>
  </li>
  <li>java-unnecessary/UselessParentheses:
    <ul>
      <li><a href="https://sourceforge.net/p/pmd/bugs/1407/">#1407</a>: UselessParentheses “&amp;” and “+” operator precedence</li>
    </ul>
  </li>
</ul>

<h2 id="18-september-2015---534">18-September-2015 - 5.3.4</h2>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1370/">#1370</a>: ConsecutiveAppendsShouldReuse not detected properly on StringBuffer</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1371/">#1371</a>: InsufficientStringBufferDeclaration not detected properly on StringBuffer</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1380/">#1380</a>: InsufficientStringBufferDeclaration false positive when literal string passed to a lookup service</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1384/">#1384</a>: NullPointerException in ConsecutiveLiteralAppendsRule</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1388/">#1388</a>: ConstructorCallsOverridableMethodRule doesn’t work with params?</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1392/">#1392</a>: SimplifyStartsWith false-negative</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1393/">#1393</a>: PMD hanging during DataflowAnomalyAnalysis</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1394/">#1394</a>: dogfood.xml - Unable to exclude rules [UncommentedEmptyMethod]</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1395/">#1395</a>: UnusedPrivateMethod false positive for array element method call</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1396/">#1396</a>: PrematureDeclaration lambda false positive</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1397/">#1397</a>: StringToString should ignore method references</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1398/">#1398</a>: False positive for GuardLogStatementJavaUtil with Log4j</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1399/">#1399</a>: False positive for VariableNamingConventions with annotation @interface</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1400/">#1400</a>: False positive with JUnit4TestShouldUseBeforeAnnotation</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1401/">#1401</a>: False positive for StringBuilder.append called with constructor</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1402/">#1402</a>: Windows-Only: File exclusions are not case insensitive</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1403/">#1403</a>: False positive UnusedPrivateMethod with JAVA8</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1404/">#1404</a>: Java8 ‘Unnecessary use of fully qualified name’ in Streams Collector</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1405/">#1405</a>: UnusedPrivateMethod false positive?</li>
</ul>

<h2 id="25-july-2015---533">25-July-2015 - 5.3.3</h2>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/55">#55</a>: Fix run.sh for paths with spaces</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1364/">#1364</a>: FieldDeclarationsShouldBeAtStartOfClass false positive using multiple annotations</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1365/">#1365</a>: Aggregated javadoc report is missing</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1366/">#1366</a>: UselessParentheses false positive on multiple equality operators</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1369/">#1369</a>: ConsecutiveLiteralAppends not detected properly on StringBuffer</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1372/">#1372</a>: False Negative for CloseResource rule.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1375/">#1375</a>: CloseResource not detected properly</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1376/">#1376</a>: CompareObjectsWithEquals fails for type annotated method parameter</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1379/">#1379</a>: PMD CLI: Cannot specify multiple properties</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1381/">#1381</a>: CPD Cannot use CSV/VS Renderers because they don’t support encoding property</li>
</ul>

<h2 id="22-may-2015---532">22-May-2015 - 5.3.2</h2>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1330/">#1330</a>: AvoidReassigningParameters does not work with varargs</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1335/">#1335</a>: GuardLogStatementJavaUtil should not apply to SLF4J Logger</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1342/">#1342</a>: UseConcurrentHashMap false positive (with documentation example)</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1343/">#1343</a>: MethodNamingConventions for overrided methods</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1345/">#1345</a>: UseCollectionIsEmpty throws NullPointerException</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1353/">#1353</a>: False positive “Only One Return” with lambda</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1354/">#1354</a>: Complex FieldDeclarationsShouldBeAtStartOfClass false positive with Spring annotations</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1355/">#1355</a>: NullPointerException in a java file having a single comment line</li>
</ul>

<h2 id="20-april-2015---531">20-April-2015 - 5.3.1</h2>

<p><strong>New/Modified/Deprecated Rules:</strong></p>

<ul>
  <li>Language Java, ruleset design.xml: The rule “UseSingleton” <em>has been renamed</em> to “UseUtilityClass”.
See also bugs <a href="https://sourceforge.net/p/pmd/bugs/1059">#1059</a> and <a href="https://sourceforge.net/p/pmd/bugs/1339/">#1339</a>.</li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/53">#53</a>: Fix some NullPointerExceptions</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1332/">#1332</a>: False Positive: UnusedPrivateMethod</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1333/">#1333</a>: Error while processing Java file with Lambda expressions</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1337/">#1337</a>: False positive “Avoid throwing raw exception types” when exception is not thrown</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1338/">#1338</a>: The pmd-java8 POM bears the wrong parent module version</li>
</ul>

<h2 id="april-1-2015---530">April 1, 2015 - 5.3.0</h2>

<p><strong>New Supported Languages:</strong></p>

<ul>
  <li>Matlab (CPD)</li>
  <li>Objective-C (CPD)</li>
  <li>Python (CPD)</li>
  <li>Scala (CPD)</li>
</ul>

<p><strong>Feature Requests and Improvements:</strong></p>

<ul>
  <li>XML: Line numbers for XML documents are more accurate. This is a further improvement of <a href="https://sourceforge.net/p/pmd/bugs/1054/">#1054</a>.</li>
  <li>CPD: New output format ‘csv_with_linecount_per_file’</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1320/">#1320</a>: Enhance SimplifyBooleanReturns checks</li>
  <li>PMD exits with status <code class="language-plaintext highlighter-rouge">4</code> if any violations have been found. This behavior has been introduced to ease PMD
integration into scripts or hooks, such as SVN hooks.</li>
</ul>

<p><strong>New/Modified/Deprecated Rules:</strong></p>

<p>The following rules have been
<span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #5CB85C; font-size: 75%;">enhanced</span>
:</p>

<ul>
  <li>Language Java, ruleset design.xml: The rule “SimplifyBooleanReturns” now also marks methods where the else case is omitted and just a return.
See also feature <a href="https://sourceforge.net/p/pmd/bugs/1320/">#1320</a>.</li>
</ul>

<p>The following rules are marked as
<span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">deprecated</span>
and will be removed with the next release of PMD.</p>

<ul>
  <li>
    <p>Language Java, ruleset basic.xml: The following rules have been <em>moved into the <code class="language-plaintext highlighter-rouge">empty.xml</code> ruleset</em>. You’ll need
to enable the “empty” ruleset explicitly from now on, if you want to have these rules executed:</p>

    <p>EmptyCatchBlock, EmptyIfStatement, EmptyWhileStmt, EmptyTryBlock, EmptyFinallyBlock, EmptySwitchStatements,
EmptySynchronizedBlock, EmptyStatementNotInLoop, EmptyInitializer, EmptyStatementBlock, EmptyStaticInitializer.</p>
  </li>
  <li>
    <p>Language Java, ruleset basic.xml: The following rules have been <em>moved into the <code class="language-plaintext highlighter-rouge">unnecessary.xml</code> ruleset</em>. You’ll need
to enable the “unnecessary” ruleset explicitly from now on, if you want to have these rules executed:</p>

    <p>UnnecessaryConversionTemporary, UnnecessaryReturn, UnnecessaryFinalModifier, UselessOverridingMethod,
UselessOperationOnImmutable, UnusedNullCheckInEquals, UselessParentheses.</p>
  </li>
  <li>
    <p>Language Java, ruleset design.xml: The rule “UncommentedEmptyMethod” <em>has been renamed</em> to “UncommentedEmptyMethodBody”.
See also bug <a href="https://sourceforge.net/p/pmd/bugs/1283/">#1283</a>.</p>
  </li>
  <li>
    <p>Language Java, ruleset controversial.xml: The rule “BooleanInversion” is deprecated and <em>will be removed</em> with
the next release. See <a href="https://sourceforge.net/p/pmd/bugs/1277/">#1277</a> for more details.</p>
  </li>
</ul>

<p><strong>Pull Requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/11">#11</a>: Added support for Python to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/12">#12</a>: Added support for Matlab to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/13">#13</a>: Added support for Objective-C to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/14">#14</a>: Added support for Scala to CPD.</li>
  <li><a href="https://github.com/adangel/pmd/pull/15">#15</a>: (pmd-cs) Fixed incorrect line numbers after mutiline comments and verbatim strings.</li>
  <li><a href="https://github.com/adangel/pmd/pull/16">#16</a>: Fixed several C++ lexical / tokenize errors.</li>
  <li><a href="https://github.com/adangel/pmd/pull/17">#17</a>: Fixed ‘–files’ command line option of CPD, so it also works for files and not only for directories.</li>
  <li><a href="https://github.com/adangel/pmd/pull/18">#18</a>: Created extra CSV output format <code class="language-plaintext highlighter-rouge">csv_with_linecount_per_file</code> which outputs the correct line count per file.</li>
  <li><a href="https://github.com/adangel/pmd/pull/19">#19</a>: Fixed exit status of PMD when error occurs</li>
  <li><a href="https://github.com/pmd/pmd/pull/48">#48</a>: Handle NoClassDefFoundError along ClassNotFoundException</li>
  <li><a href="https://github.com/pmd/pmd/pull/49">#49</a>: Fix some false positives in UnusedPrivateField</li>
  <li><a href="https://github.com/pmd/pmd/pull/50">#50</a>: Add missing assertions in JUnitAssertionsShouldIncludeMessage test</li>
  <li><a href="https://github.com/pmd/pmd/pull/51">#51</a>: [JUnit] Check assertion message present in assertEquals with delta</li>
  <li><a href="https://github.com/pmd/pmd/pull/52">#52</a>: Improves JDK8 support for default methods and static methods in interfaces</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/914/">#914</a>: False +ve from UnusedImports with wildcard static imports</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1197/">#1197</a>: JUnit4TestShouldUseTestAnnotation for private method</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1277/">#1277</a>: Delete BooleanInversion as it makes no sense</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1283/">#1283</a>: Rename UncommentedEmptyMethod to UncommentedEmptyMethodBody</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1296/">#1296</a>: PMD UnusedPrivateMethod invalid detection of ‘private void method(int,boolean,Integer…)’</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1298/">#1298</a>: Member variable int type with value 0xff000000 causes processing error</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1299/">#1299</a>: MethodReturnsInternalArray false positive</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1302/">#1302</a>: False Positive: UnusedPrivateField when accessed by inner class</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1303/">#1303</a>: OverrideBothEqualsAndHashcodeRule does not work on class implements resolvable interfaces</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1304/">#1304</a>: UseCollectionIsEmpty false positive comparing to 1</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1305/">#1305</a>: variable declaration inside switch causes ClassCastException</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1306/">#1306</a>: False positive on duplicate when using static imports</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1307/">#1307</a>: False positive: SingularField and lambda-expression</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1308/">#1308</a>: PMD runs endlessly on some generated files</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1312/">#1312</a>: Rule reference must not override rule name of referenced rule</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1313/">#1313</a>: Missing assertion message in assertEquals with delta not detected</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1316/">#1316</a>: Multi Rule Properties with delimiter not possible</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1317/">#1317</a>: RuntimeException when parsing class with multiple lambdas</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1319/">#1319</a>: PMD stops with NoClassDefFoundError (typeresolution)</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1321/">#1321</a>: CPD format XML fails with NullPointer</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1322/">#1322</a>: MethodReturnsInternalArray on private methods</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1323/">#1323</a>: False positive case of UseAssertTrueInsteadOfAssertEquals</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1324/">#1324</a>: MethodReturnsInternalArray false positive with clone()</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1325/">#1325</a>: Inner class declared within a method fails to parse (ClassCastException)</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1326/">#1326</a>: PMD 5.3.0-SNAPSHOT doesn’t compile under Windows</li>
</ul>

<p><strong>API Changes:</strong></p>

<ul>
  <li>
    <p><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.Match.iterator()</code> now returns an iterator of the new type <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.Mark</code> instead
of TokenEntry. A <code class="language-plaintext highlighter-rouge">Mark</code> contains all the informations about each single duplication, including the TokenEntry via <code class="language-plaintext highlighter-rouge">Mark.getToken()</code>.
This Mark is useful for reporting the correct line count for each duplication. Previously only one line count was available.
As for some languages CPD can be instructed to ignore comments, the line count could be different in the different files
for the same duplication.</p>
  </li>
  <li>
    <p>pmd-test: The utility class <code class="language-plaintext highlighter-rouge">StreamUtil</code> is deprecated. Just use Apache Commons IO Utils instead.</p>
  </li>
</ul>

<h2 id="december-21-2014---523">December 21, 2014 - 5.2.3:</h2>

<p><strong>Feature Requests and Improvements:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1288/">#1288</a>: MethodNamingConventions for native should be deactivated</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1293/">#1293</a>: Disable VariableNamingConventions for native methods</li>
</ul>

<p><strong>Modified Rules:</strong></p>

<ul>
  <li><a href="http://pmd.sourceforge.net/pmd-java/rules/java/design.html#UseVarargs">Java / Design / UseVarargs</a>: if <code class="language-plaintext highlighter-rouge">byte[]</code> is used as the last argument, it is ignored and no violation will be reported.</li>
  <li><a href="http://pmd.sourceforge.net/pmd-java/rules/java/naming.html#MethodNamingConventions">Java / Naming / MethodNamingConventions</a>: New property <code class="language-plaintext highlighter-rouge">checkNativeMethods</code></li>
  <li><a href="http://pmd.sourceforge.net/pmd-java/rules/java/naming.html#VariableNamingConventions">Java / Naming / VariableNamingConventions</a>: New property <code class="language-plaintext highlighter-rouge">checkNativeMethodParameters</code></li>
</ul>

<p><strong>Pull requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/45">#45</a>: #1290 RuleSetReferenceId does not process HTTP(S) correctly.</li>
  <li><a href="https://github.com/pmd/pmd/pull/46">#46</a>: Allow byte[] as no-vargars last argument</li>
  <li><a href="https://github.com/pmd/pmd/pull/47">#47</a>: Allow byte[] data and byte data[] as no-varargs last argument</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1252/">#1252</a>: net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file xxx.cpp</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1289/">#1289</a>: CommentRequired not ignored if javadoc {@inheritDoc} anon inner classes</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1290/">#1290</a>: RuleSetReferenceId does not process HTTP(S) correctly.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1294/">#1294</a>: False positive UnusedPrivateMethod with public inner enum from another class</li>
</ul>

<h2 id="december-3-2014---522">December 3, 2014 - 5.2.2:</h2>

<p><strong>New Parameters for CPD:</strong></p>

<p>For the language cpp, the following new parameters are supported:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">--no-skip-blocks</code>: Disables skipping of code blocks like a pre-processor. This is by default enabled.</li>
  <li><code class="language-plaintext highlighter-rouge">--skip-blocks-pattern</code>: Pattern to find the blocks to skip. Start and End pattern separated by “<code class="language-plaintext highlighter-rouge">|</code>”. Default value is “<code class="language-plaintext highlighter-rouge">#if 0|#endif</code>”.</li>
</ul>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1090/">#1090</a>: cpp parser exception with inline asm</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1128/">#1128</a>: CompareObjectsWithEquals False Positive comparing boolean (primitive) values</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1254/">#1254</a>: CPD run that worked in 5.1.2 fails in 5.1.3 with OOM</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1276/">#1276</a>: False positive in UnusedPrivateMethod with inner enum</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1280/">#1280</a>: False Positive in UnusedImports when import used in javadoc</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1281/">#1281</a>: UnusedPrivateMethod incorrectly flagged for methods nested private classes</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1282/">#1282</a>: False Positive with implicit String.valuesOf() (Java)</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1285/">#1285</a>: Prevent to modify the System environment</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1286/">#1286</a>: UnusedPrivateMethod returns false positives for varags and enums</li>
</ul>

<h2 id="november-3-2014---521">November 3, 2014 - 5.2.1:</h2>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/550/">#550</a>: False +: MissingBreakInSwitch</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1252/">#1252</a>: net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file xxx.cpp</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1253/">#1253</a>: Document default behaviour when CPD command line arguments “encoding” and “ignoreAnnotations” are not specified</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1255/">#1255</a>: UseUtilityClass false positive with Exceptions</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1256/">#1256</a>: PositionLiteralsFirstInComparisons false positive with Characters</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1258/">#1258</a>: Java 8 Lambda parse error on direct field access</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1259/">#1259</a>: CloseResource rule ignores conditionnals within finally blocks</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1261/">#1261</a>: False positive “Avoid unused private methods” with Generics</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1262/">#1262</a>: False positive for MissingBreakInSwitch</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1263/">#1263</a>: PMD reports CheckResultSet violation in completely unrelated source files.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1272/">#1272</a>: varargs in methods are causing IndexOutOfBoundException when trying to process files</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1273/">#1273</a>: CheckResultSet false positive in try-with-resources nested in if</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1274/">#1274</a>: ant integration broken with pmd-5.2.0</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1275/">#1275</a>: False positive: UnusedModifier rule for static inner class in enum</li>
</ul>

<h2 id="october-17-2014---520">October 17, 2014 - 5.2.0:</h2>

<p><strong>Modularization of the source code:</strong></p>

<p>The source code of pmd was undergoing a major restructuring. Each language is separated
out into its own module. This reduces the size of the artifacts significantly, if only
one language is needed. It also makes it easier, to add new languages as extensions.</p>

<p>Therefore, the maven coordinates needed to change. In order to just use pmd with java support, you’ll need
the following two dependencies:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;dependency&gt;
    &lt;groupId&gt;net.sourceforge.pmd&lt;/groupId&gt;
    &lt;artifactId&gt;pmd-core&lt;/artifactId&gt;
    &lt;version&gt;5.2.0&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;net.sourceforge.pmd&lt;/groupId&gt;
    &lt;artifactId&gt;pmd-java&lt;/artifactId&gt;
    &lt;version&gt;5.2.0&lt;/version&gt;
&lt;/dependency&gt;
</code></pre></div></div>

<p>The binary package still contains all languages and can be used as usual. Have a look at
<a href="http://search.maven.org/#search|ga|1|g%3Anet.sourceforge.pmd">the central repository</a> for available modules.</p>

<p><strong>New Languages</strong></p>

<ul>
  <li>CPD supports now <a href="https://golang.org/">Go</a>.</li>
</ul>

<p><strong>Pull requests:</strong></p>

<ul>
  <li><a href="https://github.com/adangel/pmd/pull/9/">#9</a>: New rule: NoUnsanitizedJSPExpressionRule</li>
  <li><a href="https://github.com/pmd/pmd/pull/44/">#44</a>: Add GoLang support to CPD</li>
</ul>

<p><strong>New/Modified Rules:</strong></p>

<ul>
  <li>JSP - Basic ruleset:
    <ul>
      <li>NoUnsanitizedJSPExpression: Using unsanitized JSP expression can lead to Cross Site Scripting (XSS) attacks</li>
    </ul>
  </li>
</ul>

<h2 id="august-31-2014---513">August 31, 2014 - 5.1.3:</h2>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1156/">#1156</a>: False failure with “Avoid unused private methods”</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1187/">#1187</a>: double variable with AvoidDecimalLiteralsInBigDecimalConstructor</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1228/">#1228</a>: UnusedPrivateMethod returns false positives</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1230/">#1230</a>: UseCollectionIsEmpty gets false positives</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1231/">#1231</a>: No Error Message on Missing Rule</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1233/">#1233</a>: UnusedPrivateMethod: False positive : method called on returned object.</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1234/">#1234</a>: Unused private methods still giving false positives in 5.1.3 snapshot</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1235/">#1235</a>: scope dependencies in POM file</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1239/">#1239</a>: StackOverflowError in AbstractTokenizer.parseString running CPD on &gt;1MB JS file</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1241/">#1241</a>: False+ AvoidProtectedMethodInFinalClassNotExtending</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1243/">#1243</a>: Useless Parentheses False Positive</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1245/">#1245</a>: False Positive for Law of Demeter</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1246/">#1246</a>: False positive from MissingBreakInSwitch</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1247/">#1247</a>: Not able to recognize JDK 8 Static Method References</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1249/">#1249</a>: Regression: UnusedPrivateMethod from 5.0.5 to 5.1.2</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1250/">#1250</a>: Method attribute missing for some violations</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1251/">#1251</a>: UnusedPrivateMethod false positives for boxing &amp; unboxing arguments</li>
</ul>

<p><strong>Feature Requests and Improvements:</strong></p>

<ul>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1232/">#1232</a>: Make ShortClassName configurable</li>
  <li><a href="https://sourceforge.net/p/pmd/bugs/1244/">#1244</a>: FieldDeclarationsShouldBeAtStartOfClass and anonymous classes</li>
</ul>

<p><strong>New/Modified Rules:</strong></p>

<ul>
  <li>FieldDeclarationsShouldBeAtStartOfClass (ruleset java-design) has a new property called <code class="language-plaintext highlighter-rouge">ignoreAnonymousClassDeclarations</code>:
Ignore Field Declarations, that are initialized with anonymous class declarations. This property is enabled by default.
See <a href="https://sourceforge.net/p/pmd/bugs/1244/">feature #1244</a>.</li>
  <li>ShortClassName (ruleset java-naming) has a new property called <code class="language-plaintext highlighter-rouge">minimum</code>: Number of characters that are required
as a minimum for a class name. By default, 5 characters are required - if the class name is shorter, a violation
will be reported. See <a href="https://sourceforge.net/p/pmd/bugs/1232/">feature #1232</a>.</li>
</ul>

<h2 id="july-20-2014---512">July 20, 2014 - 5.1.2:</h2>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1181/">bug #1181</a>: unused import false positive if used as parameter in javadoc only.</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1192/">bug #1192</a>: Ecmascript fails to parse this operator “ ^= “</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1198/">bug #1198</a>: ConfusingTernary does not ignore else if blocks even when property is set</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1200/">bug #1200</a>: setRuleSets method javadoc mistype commands instead commas</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1201/">bug #1201</a>: Error “Can’t find resource null” when ruleset contains spaces after comma</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1202/">bug #1202</a>: StackOverflowError in RuleSetReferenceId</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1205/">bug #1205</a>: Parse error on lambda with if</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1206/">bug #1206</a>: SummaryHTMLRenderer always shows suppressed warnings/violations</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1208/">bug #1208</a>: yahtml’s outputDir property does not work</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1209/">bug #1209</a>: XPath 2.0 following-sibling incorrectly includes context node</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1211/">bug #1211</a>: PMD is failing with NPE for rule UseIndexOfChar while analyzing Jdk 8 Lambda expression</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1214/">bug #1214</a>: UseCollectionIsEmpty misses some usage</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1215/">bug #1215</a>: AvoidInstantiatingObjectsInLoops matches the right side of a list iteration loop</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1216/">bug #1216</a>: AtLeastOneConstructor ignores classes with <em>any</em> methods</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1218/">bug #1218</a>: TooFewBranchesForASwitchStatement misprioritized</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1219/">bug #1219</a>: PrimarySuffix/@Image does not work in some cases in xpath 2.0</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1223/">bug #1223</a>: UnusedPrivateMethod: Java 8 method reference causing false positives</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1224/">bug #1224</a>: GuardDebugLogging broken in 5.1.1 - missing additive statement check in log statement</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1226/">bug #1226</a>: False Positive: UnusedPrivateMethod overloading with varargs</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1227/">bug #1227</a>: GuardLogStatementJavaUtil doesn’t catch log(Level.FINE, “msg” + “ msg”) calls</li>
</ul>

<p><strong>Feature Requests and Improvements:</strong></p>

<ul>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>

<p><strong>Pull requests:</strong></p>

<ul>
  <li><a href="https://github.com/pmd/pmd/pull/41">#41</a>: Update to use asm 5.0.2</li>
  <li><a href="https://github.com/pmd/pmd/pull/42">#42</a>: Add SLF4j Logger type to MoreThanOneLogger rule</li>
  <li><a href="https://github.com/pmd/pmd/pull/43">#43</a>: Standard and modified cyclomatic complexity</li>
</ul>

<p><strong>New Rules:</strong></p>

<ul>
  <li>Java - codesize ruleset:
    <ul>
      <li>StdCyclomaticComplexity: Like CyclomaticComplexityRule, but not including boolean operators</li>
      <li>ModifiedCyclomaticComplexity: Like StdCyclomaticComplexity, but switch statement plus all cases count as 1</li>
      <li>Thanks to Alan Hohn</li>
    </ul>
  </li>
</ul>

<h2 id="april-27-2014---511">April 27, 2014 - 5.1.1:</h2>

<p><strong>Bugfixes:</strong></p>

<ul>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1165/">bug 1165</a>: SimplifyConditional false positive</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1166/">bug 1166</a>: PLSQL XPath Rules Fail for XPath 1.0</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1167/">bug 1167</a>: Error while processing PLSQL file with BOM</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1168/">bug 1168</a>: Designer errors when trying to copy xml to clipboard</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1170/">bug 1170</a>: false positive with switch in loop</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1171/">bug 1171</a>: Specifying minimum priority from command line gives NPE</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1173/">bug 1173</a>: Java 8 support: method references</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1175/">bug 1175</a>: false positive for StringBuilder.append called 2 consecutive times</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1176/">bug 1176</a>: ShortVariable false positive with for-each loops</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1177/">bug 1177</a>: Incorrect StringBuffer warning when that class is not used</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1178/">bug 1178</a>: LexicalError while parsing Java code aborts CPD run</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1180/">bug 1180</a>: False Positive for ConsecutiveAppendsShouldReuse on different variable names</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1185/">bug 1185</a>: UnusedModifier throws NPE when parsing enum with a nested static interface</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1188/">bug 1188</a>: False positive in UnusedPrivateField</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1191/">bug 1191</a>: Ecmascript fails to parse “void(0)”</li>
  <li>Document that PMD requires Java 1.6, see <a href="https://sourceforge.net/p/pmd/discussion/188192/thread/6e86840c/">discussion</a>.</li>
  <li></li>
  <li></li>
  <li></li>
</ul>

<p><strong>CPD Changes:</strong></p>

<ul>
  <li>Command Line
    <ul>
      <li>Added option “–skip-lexical-errors” to skip files, which can’t be tokenized
due to invalid characters instead of aborting CPD. See also <a href="https://sourceforge.net/p/pmd/bugs/1178/">bug 1178</a>.</li>
    </ul>
  </li>
  <li>Ant
    <ul>
      <li>New optional parameter “skipDuplicateFiles”: Ignore multiple copies of files of the same name and length in
comparison; defaults to “false”.
This was already a command line option, but now also available in in CPD’s ant task.</li>
      <li>New optional parameter “skipLexicalErros”: Skip files which can’t be tokenized due to invalid characters
instead of aborting CPD; defaults to “false”.</li>
    </ul>
  </li>
</ul>

<h2 id="february-11-2014---510">February 11, 2014 - 5.1.0:</h2>

<p><strong>New/Updated Languages:</strong></p>

<ul>
  <li>Java 1.8 support added.</li>
  <li>PLSQL support added; thanks to Stuart Turton. See also http://pldoc.sourceforge.net/</li>
  <li>Apache Velocity support added; thanks to Andrey Utis. See also http://velocity.apache.org</li>
</ul>

<p><strong>New/Updated Rulesets and Rules:</strong></p>

<ul>
  <li>EcmaScript
    <ul>
      <li>Controversial ruleset, featuring AvoidWithStatement</li>
      <li>UseBaseWithParseInt</li>
    </ul>
  </li>
  <li>Java
    <ul>
      <li>GuardLogStatement
        <ul>
          <li>replace xpath implementation of GuardDebugLogging by GuardLogStatement (better perf)</li>
        </ul>
      </li>
      <li>CommentRequired
        <ul>
          <li>basic rule to check for existence for formal (javadoc) comments.</li>
        </ul>
      </li>
      <li>AvoidProtectedMethodInFinalClassNotExtending
        <ul>
          <li>rule to avoid protected methods in final classes that don’t extend anything other than Object.</li>
        </ul>
      </li>
      <li>ConsecutiveAppendsShouldReuse
        <ul>
          <li>rule to encourage to reuse StringBuilder.append returned object for consecutive calls.</li>
        </ul>
      </li>
      <li>PositionLiteralsFirstInCaseInsensitiveComparisons
        <ul>
          <li>rule similar to PositionLiteralsFirstInComparisons, but for case insensitive comparisons (equalsIgnoreCase).
Thanks to Larry Diamond</li>
        </ul>
      </li>
      <li>ConfusingTernary
        <ul>
          <li>new property “ignoreElseIf” to suppress this rule in case of if-else-if-else usage.
See <a href="http://sourceforge.net/p/pmd/bugs/1161/">feature 1161</a>: Confusing Ternary should skip else if statements (or have a property to do so)</li>
        </ul>
      </li>
      <li>FieldDeclarationsShouldBeAtStartOfClass
        <ul>
          <li>new property “ignoreEnumDeclarations” which is enabled by default. This relaxes the rule, so
that enums can be declared before fields and the rule is not triggered.</li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

<p><strong>Bugfixes:</strong></p>

<p><a href="http://sourceforge.net/p/pmd/bugs/milestone/PMD-5.1.0/">http://sourceforge.net/p/pmd/bugs/milestone/PMD-5.1.0/</a></p>

<ul>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/881">bug  881</a>: private final without setter is flagged</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1059">bug 1059</a>: Change rule name “Use Singleton” should be “Use Utility class”</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1106">bug 1106</a>: PMD 5.0.4 fails with NPE on parsing java enum with inner class instance creation</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1045">bug 1045</a>: //NOPMD not working (or not implemented) with ECMAscript</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1054">bug 1054</a>: XML Rules ever report a line -1 and not the line/column where the error occurs</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1115">bug 1115</a>: commentRequiredRule in pmd 5.1 is not working properly</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1120">bug 1120</a>: equalsnull false positive</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1121">bug 1121</a>: NullPointerException when invoking XPathCLI</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1123">bug 1123</a>: failure in help examples</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1124">bug 1124</a>: PMD.run() multithreading issue</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1125">bug 1125</a>: Missing Static Method In Non Instantiatable Class</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1126">bug 1126</a>: False positive with FieldDeclarationsShouldBeAtStartOfClass for static enums</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1130">bug 1130</a>: CloseResource doesn’t recognize custom close method</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1131">bug 1131</a>: CloseResource should complain if code between declaration of resource and try</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1134">bug 1134</a>: UseStringBufferLength: false positives</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1135">bug 1135</a>: CheckResultSet ignores results set declared outside of try/catch</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1136">bug 1136</a>: ECMAScript: NullPointerException in getLeft() and getRight()</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1140">bug 1140</a>: public EcmascriptNode getBody(int index)</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1141">bug 1141</a>: ECMAScript: getFinallyBlock() is buggy.</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1142">bug 1142</a>: ECMAScript: getCatchClause() is buggy.</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1144">bug 1144</a>: CPD encoding argument has no effect</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1146">bug 1146</a>: UseArrayListInsteadOfVector false positive when using own Vector class</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1147">bug 1147</a>: EmptyMethodInAbstractClassShouldBeAbstract false positives</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1150">bug 1150</a>: “EmptyExpression” for valid statements!</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1154">bug 1154</a>: Call super onPause when there is no super</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1155">bug 1155</a>: maven pmd plugin does not like empty rule sets</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1159">bug 1159</a>: false positive UnusedFormalParameter readObject(ObjectInputStream) if not used</li>
  <li>Fixed <a href="https://sourceforge.net/p/pmd/bugs/1164">bug 1164</a>: Violations are not suppressed with @java.lang.SuppressWarnings(“all”)</li>
</ul>

<p><strong>CPD Changes:</strong></p>
<ul>
  <li>Command Line
    <ul>
      <li>Added non-recursive option “–non-recursive” to not scan sub-directories</li>
      <li>Added option “–exclude” to exclude specific files from being scanned (thanks to Delmas for patch #272)</li>
    </ul>
  </li>
  <li>CPD is now thread-safe, so that multiple instances of CPD can run concurrently without stepping
  on each other (eg: multi-module Maven projects.). Thanks to David Golpira.</li>
</ul>

<p><strong>Miscellaneous:</strong></p>

<ul>
  <li>Upgrade to javacc 5.0 (see patch #1109 Patch to build with Javacc 5.0)</li>
  <li>DBURI as DataSource possible - directly scan plsql code stored within the database</li>
</ul>

<p><strong>API Changes</strong></p>

<ul>
  <li>Deprecated APIs:
    <ul>
      <li>net.sourceforge.pmd.lang.ecmascript.ast.ASTFunctionNode: getBody(int index) deprecated, use getBody() instead</li>
      <li>net.sourceforge.pmd.lang.ecmascript.ast.ASTTryStatement: isCatch() and isFinally() deprecated, use hasCatch() and hasBody() instead</li>
    </ul>
  </li>
  <li>Generalize Symbol Table treatement
    <ul>
      <li>Added net.sourceforge.pmd.lang.symboltable.ScopedNode</li>
      <li>Added net.sourceforge.pmd.lang.symboltable.Scope</li>
      <li>Added net.sourceforge.pmd.lang.symboltable.NameDeclaration</li>
      <li>Added net.sourceforge.pmd.lang.symboltable.NameOccurrence</li>
      <li>Added net.sourceforge.pmd.lang.symboltable.AbstractScope</li>
      <li>Added net.sourceforge.pmd.lang.symboltable.AbstractNameDeclaration</li>
    </ul>
  </li>
</ul>

<h2 id="august-11-2013---505">August 11, 2013 - 5.0.5:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug  991: AvoidSynchronizedAtMethodLevel for static methods
Fixed bug 1084: NPE at UselessStringValueOfRule.java:36
Fixed bug 1091: file extension for fortran seems to be wrong in cpdgui tools
Fixed bug 1092: Wrong Attribute "excludemarker" in Ant Task Documentation
Fixed bug 1095: AvoidFinalLocalVariable false positive
Fixed bug 1099: UseArraysAsList false positives
Fixed bug 1102: False positive: shift operator parenthesis
Fixed bug 1104: IdempotentOperation false positive
Fixed bug 1107: PMD 5.0.4 couldn't parse call of parent outer java class method from inner class
Fixed bug 1069: Eclipse plugin does not accept project-local config
Fixed bug 1111: False positive: Useless parentheses
Fixed bug 1114: CPD - Tokenizer not initialized with requested properties
Fixed bug 1118: ClassCastException in pmd.lang.ecmascript.ast.ASTElementGet
</code></pre></div></div>

<h2 id="may-1-2013---504">May 1, 2013 - 5.0.4:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug  254: False+ : UnusedImport with Javadoc @throws
Fixed bug  794: False positive on PreserveStackTrace with anonymous inner
Fixed bug 1063: False+: ArrayIsStoredDirectly
Fixed bug 1080: net.sourceforge.pmd.cpd.CPDTest test failing
Fixed bug 1081: Regression: CPD skipping all files when using relative paths
Fixed bug 1082: CPD performance issue on larger projects
Fixed bug 1085: NullPointerException by at net.sourceforge.pmd.lang.java.rule.design.GodClassRule.visit(GodClassRule.java:313)
Fixed bug 1086: Unsupported Element and Attribute in Ant Task Example
Fixed bug 1087: PreserveStackTrace (still) ignores initCause()
Fixed bug 1089: When changing priority in a custom ruleset, violations reported twice
</code></pre></div></div>

<h2 id="april-5-2013---503">April 5, 2013 - 5.0.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug  938: False positive on LooseCoupling for overriding methods
Fixed bug  940: False positive on UnsynchronizedStaticDateFormatter
Fixed bug  942: CheckResultSet False Positive and Negative
Fixed bug  943: PreserveStackTrace false positive if a StringBuffer exists
Fixed bug  945: PMD generates RuleSets it cannot read.
Fixed bug  958: Intermittent NullPointerException while loading XPath node attributes
Fixed bug  968: Issues with JUnit4 @Test annotation with expected exception (Thanks to Yiannis Paschalidis)
Fixed bug  975: false positive in ClassCastExceptionWithToArray
Fixed bug  976: UselessStringValueOf wrong when appending character arrays
Fixed bug  977: MisplacedNullCheck makes false positives
Fixed bug  984: Cyclomatic complexity should treat constructors like methods
Fixed bug  985: Suppressed methods shouldn't affect avg CyclomaticComplexity
Fixed bug  992: Class java.beans.Statement triggered in CloseResource rule
Fixed bug  997: Rule NonThreadSafeSingleton gives analysis problem
Fixed bug  999: Law of Demeter: False positives and negatives
Fixed bug 1002: False +: FinalFieldCouldBeStatic on inner class
Fixed bug 1005: False + for ConstructorCallsOverridableMethod - overloaded methods
Fixed bug 1027: PMD Ant: java.lang.ClassCastException
Fixed bug 1032: ImmutableField Rule: Private field in inner class gives false positive
Fixed bug 1064: Exception running PrematureDeclaration
Fixed bug 1068: CPD fails on broken symbolic links
Fixed bug 1073: Hard coded violation messages CommentSize
Fixed bug 1074: rule priority doesn't work on group definitions
Fixed bug 1076: Report.treeIterator() does not return all violations
Fixed bug 1077: Missing JavaDocs for Xref-Test Files
Fixed bug 1078: Package statement introduces false positive UnnecessaryFullyQualifiedName violation
Merged pull request #14: fix Nullpointer Exception when using -l jsp
</code></pre></div></div>

<h2 id="february-3-2013---502">February 3, 2013 - 5.0.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug  878: False positive: UnusedFormalParameter for abstract methods
Fixed bug  913: SignatureDeclareThrowsException is raised twice
Fixed bug  947: CloseResource rule fails if field is marked with annotation
Fixed bug 1004: targetjdk isn't attribute of PMD task
Fixed bug 1007: Parse Exception with annotation
Fixed bug 1011: CloseResource Rule ignores Constructors
Fixed bug 1012: False positive: Useless parentheses.
Fixed bug 1020: Parsing Error
Fixed bug 1026: PMD doesn't handle 'value =' in SuppressWarnings annotation
Fixed bug 1028: False-positive: Compare objects with equals for Enums
Fixed bug 1030: CPD Java.lang.IndexOutOfBoundsException: Index:
Fixed bug 1037: Facing a showstopper issue in PMD Report Class (report listeners)
Fixed bug 1039: pmd-nicerhtml.xsl is packaged in wrong location
Fixed bug 1043: node.getEndLine() always returns 0 (ECMAscript)
Fixed bug 1044: Unknown option: -excludemarker
Fixed bug 1046: ant task CPDTask doesn't accept ecmascript
Fixed bug 1047: False Positive in 'for' loops for LocalVariableCouldBeFinal in 5.0.1
Fixed bug 1048: CommentContent Rule, String Index out of range Exception
Fixed bug 1049: Errors in "How to write a rule"
Fixed bug 1055: Please add a colon in the ant output after line,column for Oracle JDeveloper IDE usage
Fixed bug 1056: "Error while processing" while running on xml file with DOCTYPE reference
Fixed bug 1060: GodClassRule &gt;&gt;&gt; wrong method
</code></pre></div></div>

<h2 id="november-28-2012---501">November 28, 2012 - 5.0.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug  820: False+ AvoidReassigningParameters
Fixed bug 1008: pmd-5.0.0: ImmutableField false positive on self-inc/dec
Fixed bug 1009: pmd-5.0.0: False + UselessParentheses
Fixed bug 1003: newline characters stripped from CPD data in PMD 5.0.0
Fixed bug 1001: InsufficientStringBufferDeclaration fails to parse hex
Fixed bug  522: InefficientStringBuffering bug false +
Fixed bug  953: String.InefficientStringBuffering false +
Fixed bug  981: Unable to parse
Fixed bug 1010: pmd: parsing of generic method call with super fails
Fixed bug  996: pmd-4.2.6: MissingBreakInSwitch fails to report violation
Fixed bug  993: Invalid NPath calculation in return statement. Thanks to Prabhjot Singh for the patch.
Fixed bug 1023: c/c++ \ as a continuation character not supported
Fixed bug 1033: False+ : SingularField
Fixed bug 1025: Regression of Crash in PMDTask due to multithreading (Eclipse and Java 1.5)
Fixed bug 1017: Type resolution very slow for big project. Thanks to Roman for the patch.
Fixed bug 1036: Documentation: default threshold values removed from v5.0
Fixed bug 1035: UseObjectForClearerAPI has misspelled message
Fixed bug 1031: false DontImportJavaLang
Fixed bug 1034: UseConcurrentHashMap flags calls to methods that return Map
Fixed bug 1006: Problem with implementation of getPackageNameImage method
Fixed bug 1014: AvoidLiteralsInIfCondition must NOT consider null
Fixed bug 1013: jnlp link for CPD is wrong

PMD Command Line Changes:
  Improved command line interface (CLI) parsing using JCommander.
  Note: this breaks compatibility, but should be easy to fix.
  With "-d" you specify nowtThe source files / source directory to be scanned.
  With "-f" you select the report format (like text, html, ...)
  With "-R" you select the rulesets to be used.
  Example: pmd -d c:\data\pmd\pmd\test-data\Unused1.java -f xml -R rulesets/java/unusedcode.xml

Improved JSP parser to be less strict with not valid XML documents (like HTML). Thanks to Victor Bucutea.
Fixed bgastviewer not working. Thanks to Victor Bucutea.
Improved CPD: Support in CPD for IgnoreAnnotations and SuppressWarnings("CPD-START"). Thanks to Matthew Short.
Fixed C# support for CPD - thanks to TIOBE Software.

New Ecmascript rules:

    Basic ruleset: AvoidTrailingComma
</code></pre></div></div>

<h2 id="may-1-2012---500">May, 1, 2012 - 5.0.0:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 3515487: Inconsistent reference to ruleset file in documentation
Fixed bug 3470274: Using Label for lines in XMLRenderer
Fixed bug 3175710: NPE in InsufficientStringBufferDeclaration

CPD:
- Exit with status code 4 when CPD detects code duplication (Patch ID: 3497021)
</code></pre></div></div>

<h2 id="january-31-2012---50-alpha">January 31, 2012 - 5.0-alpha:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>This version of PMD breaks API compatibility with prior versions of PMD, as well
as RuleSet XML compatibility. Also the maven coordinates (groupId) have been changed.
The decision to break compatibility, allows PMD
internals and code organization to be improved to better handle additional
languages.  This opportunity was used to remove depreciated APIs, and beat up
any code which has thumbed its nose at the developers over the years. ;)

The following is relatively complete list of the major changes (this may not be
100% accurate, see actual source code when in doubt):

Fixed bug (no number) - Fixed UseStringBufferLengthRule only worked once per class
All StringBuffer-related rules now also catch StringBuilder-related issues in the same way

    API Change - Unification of treatment of languages within PMD core:
       Added - net.sourceforge.pmd.lang.Language (now an 'enum')
       Added - net.sourceforge.pmd.lang.LanguageVersion
       Added - net.sourceforge.pmd.lang.LanguageVersionDiscoverer
       Added - net.sourceforge.pmd.lang.LanguageVersionHandler
       Added - net.sourceforge.pmd.lang.XPathHandler
       Added - net.sourceforge.pmd.lang.ast.xpath.AbstractASTXPathHandler
       Added - net.sourceforge.pmd.lang.xpath.Initializer
       Added - net.sourceforge.pmd.lang.ast.AbstractTokenManager
       Added - net.sourceforge.pmd.lang.ast.CharStream
       Added - net.sourceforge.pmd.lang.ast.JavaCharStream
       Added - net.sourceforge.pmd.lang.ast.SimpleCharStream
       Added - net.sourceforge.pmd.lang.ast.TokenMgrError
       Added - net.sourceforge.pmd.lang.rule.stat.StatisticalRule
       Added - net.sourceforge.pmd.lang.rule.stat.StatisticalRuleHelper
       Added - net.sourceforge.pmd.lang.java.rule.AbstractStatisticalJavaRule
       Added - net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory
       Added - net.sourceforge.pmd.lang.rule.RuleViolationFactory
       Added - net.sourceforge.pmd.lang.java.rule.JavaRuleViolationFactory
       Added - net.sourceforge.pmd.lang.jsp.rule.JspRuleViolationFactory
       Renamed - net.sourceforge.pmd.AbstractRule to net.sourceforge.pmd.lang.rule.AbstractRule
       Renamed - net.sourceforge.pmd.AbstractJavaRule to net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
       Renamed - net.sourceforge.pmd.AbstractRuleChainVisitor to net.sourceforge.pmd.lang.rule.AbstractRuleChainVisitor
       Renamed - net.sourceforge.pmd.RuleChainVisitor to net.sourceforge.pmd.lang.rule.RuleChainVisitor
       Renamed - net.sourceforge.pmd.SourceFileSelector to net.sourceforge.pmd.lang.rule.LanguageFilenameFilter
       Renamed - net.sourceforge.pmd.rule.XPathRule to net.sourceforge.pmd.lang.rule.XPathRule
       Renamed - net.sourceforge.pmd.jsp.rule.AbstractJspRule to net.sourceforge.pmd.lang.jsp.rule.AbstractJspRule
       Renamed - net.sourceforge.pmd.ast.CompilationUnit to net.sourceforge.pmd.lang.ast.RootNode
       Renamed - net.sourceforge.pmd.ast.JavaRuleChainVisitor to net.sourceforge.pmd.lang.java.rule.JavaRuleChainVisitor
       Renamed - net.sourceforge.pmd.jsp.ast.JspRuleChainVisitor to net.sourceforge.pmd.lang.jsp.rule.JspRuleChainVisitor
       Renamed - net.sourceforge.pmd.parser.Parser to net.sourceforge.pmd.lang.Parser
       Renamed - net.sourceforge.pmd.parser.TokenManager to net.sourceforge.pmd.lang.TokenManager
       Renamed - net.sourceforge.pmd.parser.* into net.sourceforge.pmd.lang.{Language}
       Renamed - net.sourceforge.pmd.sourcetypehandlers.SourceTypeHandler to net.sourceforge.pmd.lang.LanguageVersionHandler
       Renamed - net.sourceforge.pmd.sourcetypehandlers.VisitorStarter to net.sourceforge.pmd.lang.VisitorStarter
       Renamed - net.sourceforge.pmd.sourcetypehandlers.* into net.sourceforge.pmd.lang.{Language}
       Renamed - net.sourceforge.pmd.stat.StatisticalRule to net.sourceforge.pmd.lang.rule.StatisticalRuleHelper
       Renamed - net.sourceforge.pmd.jaxen.TypeOfFunction to net.sourceforge.pmd.lang.java.xpath.TypeOfFunction
       Renamed - net.sourceforge.pmd.jaxen.MatchesFunction to net.sourceforge.pmd.lang.xpath.MatchesFunction
       Renamed - net.sourceforge.pmd.jaxen.Attribute to net.sourceforge.pmd.lang.ast.xpath.Attribute
       Renamed - net.sourceforge.pmd.jaxen.AttributeAxisIterator to net.sourceforge.pmd.lang.ast.xpath.AttributeAxisIterator
       Renamed - net.sourceforge.pmd.jaxen.DocumentNavigator to net.sourceforge.pmd.lang.ast.xpath.DocumentNavigator
       Renamed - net.sourceforge.pmd.jaxen.NodeIterator to net.sourceforge.pmd.lang.ast.xpath.NodeIterator
       Renamed - net.sourceforge.pmd.ast.* into net.sourceforge.pmd.lang.java.ast.*
       Renamed - net.sourceforge.pmd.rules.* into net.sourceforge.pmd.lang.java.rule.* and updated to follow conventions
       Renamed - net.sourceforge.pmd.jsp.ast.* into net.sourceforge.pmd.lang.jsp.ast.*
       Renamed - net.sourceforge.pmd.jsp.rules.* into net.sourceforge.pmd.lang.jsp.ast.rule.* and updated to follow conventions
       Deleted - net.sourceforge.pmd.cpd.cppast.* into net.sourceforge.pmd.lang.cpp.ast.*
       Deleted - net.sourceforge.pmd.CommonAbstractRule
       Deleted - net.sourceforge.pmd.SourceFileConstants
       Deleted - net.sourceforge.pmd.SourceType
       Deleted - net.sourceforge.pmd.SourceTypeDiscoverer
       Deleted - net.sourceforge.pmd.SourceTypeToRuleLanguageMapper
       Deleted - net.sourceforge.pmd.TargetJDK1_3
       Deleted - net.sourceforge.pmd.TargetJDK1_4
       Deleted - net.sourceforge.pmd.TargetJDK1_5
       Deleted - net.sourceforge.pmd.TargetJDK1_6
       Deleted - net.sourceforge.pmd.TargetJDK1_7
       Deleted - net.sourceforge.pmd.TargetJDKVersion
       Deleted - net.sourceforge.pmd.cpd.SourceFileOrDirectoryFilter
       Deleted - net.sourceforge.pmd.sourcetypehandlers.SourceTypeHandlerBroker
       Deleted - net.sourceforge.pmd.ast.JavaCharStream
       Deleted - net.sourceforge.pmd.ast.CharStream
       Deleted - net.sourceforge.pmd.ast.TokenMgrError
       Deleted - net.sourceforge.pmd.jsp.ast.JspCharStream
       Deleted - net.sourceforge.pmd.jsp.ast.TokenMgrError

    API Change - Generalize RuleViolation treatment
       Renamed - net.sourceforge.pmd.IRuleViolation to net.sourceforge.pmd.RuleViolation
       Renamed - net.sourceforge.pmd.RuleViolation to net.sourceforge.pmd.lang.rule.AbstractRuleViolation
       Added - net.sourceforge.pmd.RuleViolationComparator
       Added - net.sourceforge.pmd.lang.java.rule.JavaRuleViolation
       Added - net.sourceforge.pmd.lang.jsp.rule.JspRuleViolation

    API Change - Generalize DFA treatment
       Renamed - net.sourceforge.pmd.dfa.IDataFlowNode to net.sourceforge.pmd.lang.dfa.DataFlowNode
       Renamed - net.sourceforge.pmd.dfa.DataFlowNode to net.sourceforge.pmd.lang.dfa.AbstractDataFlowNode
       Renamed - net.sourceforge.pmd.dfa.Linker to net.sourceforge.pmd.lang.dfa.Linker
       Renamed - net.sourceforge.pmd.dfa.LinkerException to net.sourceforge.pmd.lang.dfa.LinkerException
       Renamed - net.sourceforge.pmd.dfa.NodeType to net.sourceforge.pmd.lang.dfa.NodeType
       Renamed - net.sourceforge.pmd.dfa.StackObject to net.sourceforge.pmd.lang.dfa.StackObject
       Renamed - net.sourceforge.pmd.dfa.SequenceChecker to net.sourceforge.pmd.lang.dfa.SequenceChecker
       Renamed - net.sourceforge.pmd.dfa.SequenceException to net.sourceforge.pmd.lang.dfa.SequenceException
       Renamed - net.sourceforge.pmd.dfa.StartOrEndDataFlowNode to net.sourceforge.pmd.lang.dfa.StartOrEndDataFlowNode
       Renamed - net.sourceforge.pmd.dfa.Structure to net.sourceforge.pmd.lang.dfa.Structure
       Renamed - net.sourceforge.pmd.dfa.variableaccess.VariableAccess to net.sourceforge.pmd.lang.dfa.VariableAccess
       Renamed - net.sourceforge.pmd.dfa.variableaccess.VariableAccessException to net.sourceforge.pmd.lang.dfa.VariableAccessException
       Renamed - net.sourceforge.pmd.dfa.pathfinder.* to net.sourceforge.pmd.lang.dfa.pathfinder.*
       Renamed - net.sourceforge.pmd.dfa.report.* to net.sourceforge.pmd.lang.dfa.report.*
       Renamed - net.sourceforge.pmd.dfa.DaaRuleViolation to net.sourceforge.pmd.lang.java.dfa.DaaRuleViolation
       Renamed - net.sourceforge.pmd.dfa.DataFlowFacade to net.sourceforge.pmd.lang.java.dfa.DataFlowFacade
       Renamed - net.sourceforge.pmd.dfa.StatementAndBraceFinder to net.sourceforge.pmd.lang.java.dfa.StatementAndBraceFinder
       Renamed - net.sourceforge.pmd.dfa.variableaccess.VariableAccessVisitor to net.sourceforge.pmd.lang.java.dfa.VariableAccessVisitor
       Added - net.sourceforge.pmd.lang.java.dfa.JavaDataFlowNode
       Added - net.sourceforge.pmd.lang.DataFlowHandler

   API Change - Generalize Symbol Table treatement
       Deleted - net.sourceforge.pmd.symboltable.JspSymbolFacade
       Deleted - net.sourceforge.pmd.symboltable.JspScopeAndDeclarationFinder
       Renamed - net.sourceforge.pmd.symboltable.* to net.sourceforge.pmd.lang.java.symboltable.*

   API Change - Generalize Type Resolution treatment
       Renamed - net.sourceforge.pmd.typeresolution.* to net.sourceforge.pmd.lang.java.typeresolution.*

    API Change - Generalize Property Descriptor treatment
       Renamed - net.sourceforge.pmd.properties.* to net.sourceforge.pmd.lang.rule.properties.*
       Renamed - net.sourceforge.pmd.properties.AbstractPMDProperty to net.sourceforge.pmd.lang.rule.properties.AbstractProperty
       Changed - net.sourceforge.pmd.properties.PropertyDescriptor to use Generics, and other changes
       Added - net.sourceforge.pmd.lang.rule.properties.* new types and other API changes

    API Change - Generalize AST treatment
       Added - net.sourceforge.pmd.lang.ast.Node (interface extracted from old Node/SimpleNode)
       Added - net.sourceforge.pmd.lang.ast.AbstractNode
       Added - net.sourceforge.pmd.ast.DummyJavaNode
       Added - net.sourceforge.pmd.jsp.ast.AbstractJspNode
       Added - net.sourceforge.pmd.jsp.ast.JspNode
       Renamed - net.sourceforge.pmd.ast.SimpleJavaNode to net.sourceforge.pmd.ast.AbstractJavaNode
       Renamed - net.sourceforge.pmd.ast.SimpleJavaTypeNode to net.sourceforge.pmd.ast.AbstractJavaTypeNode
       Renamed - net.sourceforge.pmd.ast.SimpleJavaAccessNode to net.sourceforge.pmd.ast.AbstractJavaAccessNode
       Renamed - net.sourceforge.pmd.ast.SimpleJavaAccessTypeNode to net.sourceforge.pmd.ast.AbstractJavaAccessTypeNode
       Deleted - net.sourceforge.pmd.ast.Node
       Deleted - net.sourceforge.pmd.ast.SimpleNode
       Deleted - net.sourceforge.pmd.ast.AccessNodeInterface
       Deleted - net.sourceforge.pmd.jsp.ast.Node
       Deleted - net.sourceforge.pmd.jsp.ast.SimpleNode

    API Change - General code reorganization/cleanup
       Renamed - net.sourceforge.pmd.AbstractDelegateRule to net.sourceforge.pmd.lang.rule.AbstractDelegateRule
       Renamed - net.sourceforge.pmd.MockRule to net.sourceforge.pmd.lang.rule.MockRule
       Renamed - net.sourceforge.pmd.RuleReference to net.sourceforge.pmd.lang.rule.RuleReference
       Renamed - net.sourceforge.pmd.ScopedLogHandlersManager to net.sourceforge.pmd.util.log.ScopedLogHandlersManager
       Renamed - net.sourceforge.pmd.util.AntLogHandler to net.sourceforge.pmd.util.log.AntLogHandler
       Renamed - net.sourceforge.pmd.util.ConsoleLogHandler to net.sourceforge.pmd.util.log.ConsoleLogHandler
       Renamed - net.sourceforge.pmd.util.PmdLogFormatter to net.sourceforge.pmd.util.log.PmdLogFormatter

   API Change - Changes to Rule/RuleSet/RuleSets
      Removed - boolean Rule.include()
      Removed - void Rule.setInclude(boolean)
      Removed - String Rule.getRulePriorityName()
      Removed - String Rule.getExample()
      Removed - Rule.LOWEST_PRIORITY
      Removed - Rule.PRIORITIES
       Removed - Properties Rule.getProperties()
       Removed - Rule.addProperties(Properties)
       Removed - boolean Rule.hasProperty(String)
       Removed - RuleSet.applies(Language,Language)
       Removed - RuleSet.getLanguage()
       Removed - RuleSet.setLanguage(Language)
       Removed - RuleSets.applies(Language,Language)
      Changed - void Rule.setPriority(int) to void Rule.setPriority(RulePriority)
      Changed - int Rule.getPriority() to void RulePriority Rule.getPriority()
       Changed - XXX Rule.getXXXProperty(String) to &lt;T&gt; Rule.getProperty(PropertyDescriptor&lt;T&gt;)
       Changed - XXX Rule.getXXXProperty(PropertyDescriptor) to &lt;T&gt; Rule.getProperty(PropertyDescriptor&lt;T&gt;)
       Changed - Rule.addProperty(String, String) to Rule.setProperty(PropertyDescriptor&lt;T&gt;, T)
       Changed - Rule.setProperty(PropertyDescriptor, Object) to Rule.setProperty(PropertyDescriptor&lt;T&gt;, T)
       Changed - Rule.setProperty(PropertyDescriptor, Object[]) to Rule.setProperty(PropertyDescriptor&lt;T&gt;, T)
       Changed - Rule.propertyValuesByDescriptor() to Rule.getPropertiesByPropertyDescriptor()
       Changed - PropertyDescriptor Rule.propertyDescriptorFor(String) to PropertyDescriptor Rule.getPropertyDescriptor(String)
       Changed - boolean RuleSet.usesDFA() to boolean RuleSet.usesDFA(Language)
       Changed - boolean RuleSet.usesTypeResolution() to boolean RuleSet.usesTypeResolution(Language)
      Added - Rule.setLanguage(Language)
      Added - Language Rule.getLanguage()
      Added - Rule.setMinimumLanguageVersion(LanguageVersion)
      Added - LanguageVersion Rule.getMinimumLanguageVersion()
      Added - Rule.setMaximumLanguageVersion(LanguageVersion)
      Added - LanguageVersion Rule.getMaximumLanguageVersion()
      Added - Rule.setDeprecated(boolean)
      Added - boolean Rule.isDeprecated()
      Added - String Rule.dysfunctionReason();
       Added - Rule.definePropertyDescriptor(PropertyDescriptor)
       Added - List&lt;PropertyDescriptor&gt; Rule.getPropertyDescriptors()
       Added - RuleSet.applies(Rule,LanguageVersion)

   API Change - Changes to PMD class
      Renamed - PMD.EXCLUDE_MARKER to PMD.SUPPRESS_MARKER
      Removed - PMD.processFile(InputStream, RuleSet, RuleContext)
      Removed - PMD.processFile(InputStream, String, RuleSet, RuleContext)
      Removed - PMD.processFile(Reader, RuleSet, RuleContext)
      Removed - PMD.processFile(Reader, RuleSets, RuleContext, LanguageVersion)
      Moved - PMD.getExcludeMarker() to Configuration.getSuppressMarker()
      Moved - PMD.setExcludeMarker(String) to Configuration.getSuppressMarker(String)
      Moved - PMD.getClassLoader() to Configuration.getClassLoader()
      Moved - PMD.setClassLoader(ClassLoader) to Configuration.getClassLoader(ClassLoader)
      Moved - PMD.setDefaultLanguageVersion(LanguageVersion) to Configuration.setDefaultLanguageVersion(LanguageVersion)
      Moved - PMD.setDefaultLanguageVersions(List&lt;LanguageVersion&gt;) to Configuration.setDefaultLanguageVersions(List&lt;LanguageVersion&gt;)
      Moved - PMD.createClasspathClassLoader(String) to Configuration.createClasspathClassLoader(String)

   API Change - Changes to Node interface
      Renamed - Node.findChildrenOfType(Class) as Node.findDescendantsOfType(Class)
      Renamed - Node.getFirstChildOfType(Class) as Node.getFirstDescendantOfType(Class)
      Renamed - Node.containsChildOfType(Class) as Node.hasDescendantOfType(Class)
      Renamed - Node.getAsXml() as Node.getAsDocument()
      Added - Node.findChildrenOfType(Class), non recursive version
      Added - Node.getFirstChildOfType(Class), non recursive version

   API Change - Remove deprecated APIs
      Removed - AccessNode.setXXX() methods, use AccessNode.setXXX(boolean) instead.
      Removed - PMDException.getReason()
      Removed - RuleSetFactory.createRuleSet(String,ClassLoader), use RuleSetFactory.setClassLoader(ClassLoader) and RuleSetFactory.createRuleSets(String) instead.
      Removed - net.sourceforge.pmd.cpd.FileFinder use net.sourceforge.pmd.util.FileFinder instead.

   API Change - RuleSetFactory
        Added - RuleSetFactory.setClassLoader(ClassLoader)
        Added - RuleSetFactory.createRuleSets(List&lt;RuleSetReferenceId&gt;)
        Added - RuleSetFactory.createRuleSet(RuleSetReferenceId)
        Added - RuleSetFactory.setClassLoader(ClassLoader)
        Added - RuleSetReferenceId class to handle parsing of RuleSet strings, see RuleSetReferenceId.parse(String)
      Renamed - RuleSetFactory.createSingleRuleSet(String) to RuleSetFactory.createRuleSet(String);
      Removed - RuleSetFactory.createRuleSets(String, ClassLoader), use RuleSetFactory.createRuleSets(String) instead.
      Removed - RuleSetFactory.createSingleRuleSet(String, ClassLoader), use RuleSetFactory.createSingleRuleSet(String) instead.
      Removed - RuleSetFactory.createRuleSet(InputStream, ClassLoader), use RuleSetFactory.createRuleSet(RuleSetReferenceId) instead.
      Removed - ExternalRuleID, use RuleSetReferenceId instead
      Removed - SimpleRuleSetNameMapper, use RuleSetReferenceId instead

   API Change - Changes to Renderer class, and Renderer implementations
        Added - Renderer.getName()
        Added - Renderer.setName(String)
        Added - Renderer.getDescription()
        Added - Renderer.setDescription(String)
        Added - Renderer.getPropertyDefinitions()
        Added - Renderer.isShowSuppressedViolations()
        Added - AbstractAccumulatingRenderer
      Removed - Renderer.render(Report)
      Removed - Renderer.render(Report, Writer)
      Renamed - Renderer.showSuppressedViolations(boolean) to Renderer.setShowSuppressedViolations(boolean)
      Renamed - PapariTextRenderer to TextColorRenderer
      Renamed - OntheFlyRenderer to AbstractIncrementingRenderer

PMD command line changes:

   Removed -lineprefix use -property linePrefix {value} instead
   Removed -linkprefix use -property linkPrefix {value} instead
   Removed -xslt use -property xsltFilename {value} instead
   Removed -nojsp now obsolete
   Removed -targetjdk use -version {name} {version} instead
   Added -version {name} {version} to set language version to use for a given language
   Added -property {name} {value} as generic way to pass properties to Renderers
   Added -showsuppressed as a means to show suppressed rule violations (consistent with Ant task behavior)
   Renamed 'nicehtml' report to 'xslt'
   Renamed 'papari' report to 'textcolor'
   Renamed -excludemarker option to -suppressmarker
   Renamed -cpus option to -threads

Ant changes:

   Removed - &lt;formatter&gt; 'linkPrefix' attribute, use &lt;param name="linkPrefix"&gt; instead
   Removed - &lt;formatter&gt; 'linePrefix' attribute, use &lt;param name="linePrefix"&gt; instead
   Changed - &lt;formatter&gt; is optional - if not specified, falls back to "text" and console output.
   Removed - &lt;pmd&gt; 'targetJDK' attribute to &lt;version&gt;lang version&lt;/version&gt; instead
     Added - &lt;param name="name" value="value"/&gt; as generic way to pass properties to Renderers on &lt;formatter&gt;
   Renamed - &lt;pmd&gt; 'excludeMarker' attribute to 'suppressMarker'
   Renamed - &lt;pmd&gt; 'cpus' attribute to 'threads'

Maven changes:
   The new maven coordinates are: net.sourceforge.pmd:pmd, e.g.
   &lt;dependency&gt;
     &lt;groupId&gt;net.sourceforge.pmd&lt;/groupId&gt;
     &lt;artifactId&gt;pmd&lt;/artifactId&gt;
     &lt;version&gt;5.0&lt;/version&gt;
   &lt;/dependency&gt;

New features:

New Language 'ecmascript' added, for writing XPathRule and Java Rules against ECMAScript/JavaScript documents (must be standalone, not embedded in HTML).  Many thanks to Rhino!
New Language 'xml' added, for writing XPathRules against XML documents
New Language 'xsl' added, as a derivative from XML.
Rules can now define a 'violationSuppressRegex' property to universally suppress violations with messages matching the given regular expression
Rules can now define a 'violationSuppressXPath' property to universally suppress violations on nodes which match the given relative XPath expression
Rules are now directly associated with a corresponding Language, and a can also be associated with a specific Language Version range if desired.
Rules can now be flagged with deprecated='true' in the RuleSet XML to allow the PMD Project to indicate a Rule (1) is scheduled for removal, (2) has been removed, or (3) has been renamed/moved.
XPathRules can now query using XPath 2.0 with 'version=2.0"', or XPath 2.0 in XPath 1.0 compatibility mode using 'version="1.0 compatibility"'.  Many thanks to Saxon!
Rules can now use property values in messages, for example ${propertyName} will expand to the value of the 'propertyName' property on the Rule.
Rules can now use violation specific values in messages, specifically ${variableName}, ${methodName}, ${className}, ${packageName}.
New XPath function 'getCommentOn' can be used to search for strings in comments - Thanks to Andy Throgmorton

CPD:
Add .hxx and .hpp as valid file extension for CPD - Thanks to Ryan Pavlik
Add options to to the CPD command line task - Thanks to Cd-Man
Add C# support for CPD - thanks to Florian Bauer
Fix small bug in Rule Designer UI
Performance enhacement when parsing Javadoc (Patch ID: 3217201), thanks to Cd-Man
Rework the XMLRenderer to use proper XML API and strictly uses the system value for encoding (Fix bug: 1435751)

Other changes:
Rule property API upgrades:
  All numeric property descriptors can specify upper &amp; lower limits
  Newly functional Method &amp; Type descriptors allow rule developers to incorporate/watch for individual methods or types
  Better initialization error detection
  Deprecated old string-keyed property API, will leave some methods behind for XPath rules however
'41' and '42' shortcuts for rulesets added
The default Java version processed by PMD is now uniformly Java 1.5.
RuleViolations in Reports now uses List internally, and RuleViolationComparator is no longer broken
TokenManager errors now include a file name whenever possible for every AST in PMD
Added file encoding option to CPD GUI, which already existed for the command line and Ant
AssignmentInOperand enhanced to catch assignment in 'for' condition, as well as use of increment/decrement operators.  Customization properties added to allow assignment in if/while/for, or use of increment/decrement.
Fix false positive on CastExpressions for UselessParentheses
Fix false positive where StringBuffer.setLength(0) was using default constructor size of 16, instead of actual constructor size.
Fix false negative for non-primitive types for VariableNamingConventions, also expanded scope to local and method/constructors, and enhanced customization options to choose between members/locals/parameters (all checked by default)
Fix false negative for UseArraysAsList when the array was passed as method parameter - thanks to Andy Throgmorton
Improve TooManyMethods rule - thanks to a patch from Riku Nykanen
Improve DoNotCallSystemExit - thanks to a patch from Steven Christou
Correct -benchmark reporting of Rule visits via the RuleChain
Creating an Empty Code Ruleset and moved the following rules from Basic ruleset:
        * Empty Code Rules
        * EmptyCatchBlock
        * EmptyIfStmt
        * EmptyWhileStmt
        * EmptyTryBlock
        * EmptyFinallyBlock
        * EmptySwitchStatements
        * EmptySynchronizedBlock
        * EmptyStatementNotInLoop
        * EmptyInitializer
        * EmptyStatementBlock
        * EmptyStaticInitializer
    Basic rulesets still includes a reference to those rules.
Creating a unnecessary Code Ruleset and moved the following rules from Basic ruleset:
        * UnnecessaryConversionTemporary
        * UnnecessaryReturn
        * UnnecessaryFinalModifier
        * UselessOverridingMethod
        * UselessOperationOnImmutable
        * UnusedNullCheckInEquals
        * UselessParentheses
    Basic rulesets still includes a reference to those rules.

Fixed bug 2920057 - Fixed False + on CloseResource
Fixed bug 1808110 - Fixed performance issues on PreserveStackTrace
Fixed bug 2832322 - cpd.xml file tag path attribute should be entity-encoded
Fixed bug 2826119 - False +: DoubleCheckedLocking warning with volatile field
Fixed bug 2835074 - False -: DoubleCheckedLocking with reversed null check
Fixed bug 1932242 - EmptyMethodInAbstractClassShouldBeAbstract false +
Fixed bug 1928009 - Error using migration ruleset in PMD 4.2
Fixed bug 1808110 - PreserveStackTrace
Fixed bug 1988829 - Violation reported without source file name (actually a fix to ConsecutiveLiteralAppends)
Fixed bug 1989814 - false +: ConsecutiveLiteralAppends
Fixed bug 1977230 - false positive: UselessOverridingMethod
Fixed bug 1998185 - BeanMembersShouldSerialize vs @SuppressWarnings("serial")
Fixed bug 2002722 - false + in UseStringBufferForStringAppends
Fixed bug 2056318 - False positive for AvoidInstantiatingObjectsInLoops
Fixed bug 1977438 - False positive for UselessStringValueOf
Fixed bug 2050064 - False + SuspiciousOctalEscape with backslash literal
Fixed bug 1556594 - Wonky detection of NullAssignment
Fixed bug 1481051 - false + UnusedNullCheckInEquals (and other false positives too)
Fixed bug 1943204 - Ant task: &lt;ruleset&gt; path should be relative to Ant basedir
Fixed patch 2075906 - Add toString() to the rule UnnecessaryWrapperObjectCreation
Fixed bug 2315623 - @SuppressWarnings("PMD.UseSingleton") has no effect
Fixed bug 2230809 - False +: ClassWithOnlyPrivateConstructorsShouldBeFinal
Fixed bug 2338341 - ArrayIndexOutOfBoundsException in CPD (on Ruby)
Fixed bug 2315599 - False +: UseSingleton with class containing constructor
Fixed bug 1955852 - false positives for UnusedPrivateMethod &amp; UnusedLocalVariable
Fixed bug 2404700 - UseSingleton should not act on enums
Fixed bug - JUnitTestsShouldIncludeAssert now detects Junit 4 Assert.assert...  constructs
Fixed bug 1609038 - Xslt report generators break if path contains "java"
Fixed bug 2142986 - UselessOverridingMethod doesn't consider annotations
Fixed bug 2027626 - False + : AvoidFinalLocalVariable
Fixed bug 2606609 - False "UnusedImports" positive in package-info.java
Fixed bug 2645268 - ClassCastException in UselessOperationOnImmutable.getDeclaration
Fixed bug 2724653 - AvoidThreadGroup reports false positives
Fixed bug 2904832 - Type resolution not working for ASTType when using an inner class
Fixed bug 1435751 - XML format does not support UTF-8
Fixed bug 3303811 - Deadlink on "Similar projects" page
Fixed bug 3017616 - Updated documentation regarding Netbeans plugin - thanks to Jesse Glick
Fixed bug 3427563 - Deprecated class (android.util.config) - thanks to Lukas Reschke for the patch

ruleset.dtd and ruleset_xml_schema.xsd added to jar file in rulesets directory
bin and java14/bin scripts:
    retroweaver version was not correct in java14/bin scripts
    support for extra languages in cpd.sh
    standard unix scripts can be used with cygwin
Upgrading UselessOperationOnImmutable to detect more use cases, especially on String and fix false positives
AvoidDuplicateLiteralRule now has 'skipAnnotations' boolean property
Fixed false positive in UnusedImports: javadoc comments are parsed to check @see and other tags
Fixed parsing bug: constant fields in annotation classes
Bug fix: NPE in MoreThanOneLogger
UnnecessaryParentheses now checks all expressions, not just return statements
UnusedFormalParameter now reports violations on the parameter node, not the method/constructor node
Updates to RuleChain to honor RuleSet exclude-pattern
Optimizations and false positive fixes in PreserveStackTrace
@SuppressWarnings("all") disables all warnings
SingularField now checks for multiple fields in the same declaration
Java grammar enhanced to include AnnotationMethodDeclaration as parent node of method related children of AnnotationTypeMemberDeclaration
JavaCC generated artifacts updated to JavaCC 4.1.
Dependencies updates: asm updated to 3.2
Ant requirement is now 1.7.0 or higher for compilation
    JUnit testing jar is packaged on 1.7.0+ only in ant binary distributions
    Note that the ant task still works with 1.6.0 and higher
All comment types are now stored in ASTCompilationUnit, not just formal ones
Fixed false negative in UselessOverridingMethod
Fixed handling of escape characters in UseIndexOfChar and AppendCharacterWithChar
Fixed ClassCastException on generic method in BeanMembersShouldSerialize
Fixed ClassCastException in symbol table code
Support for Java 1.4 runtime dropped, PMD now requires Java 5 or higher.  PMD can still process Java 1.4 source files.
Support for Java 1.7
Text renderer is now silent if there's no violation instead of displaying "No problems found!"
RuleSet short names now require a language prefix, 'basic' is now 'java-basic', and 'rulesets/basic.xml' is now 'rulesets/java/basic.xml'
The JSP RuleSets are now in the 'jsp' language, and are 'jsp-basic', 'jsp-basic-jsf', 'rulesets/jsp/basic.xml' and 'rulesets/jsp/basic-jsp.xml'
Enhanced logging in the ClassTypeResolver to provide more detailed messaging.
AvoidUsingHardCodedIP modified to not use InetAddress.getByName(String), instead does better pattern analysis.
The JSP/JSF parser can now parse Unicode input.
The JSP/JSP parser can now handle &lt;script&gt;...&lt;/script&gt; tags.  The AST HtmlScript node contains the content.
Added Ecmascript as a supported language for CPD.
The RuleSet XML Schema namespace is now: http://pmd.sourceforge.net/ruleset/2.0.0
The RuleSet XML Schema is located in the source at: etc/ruleset_2_0_0.xsd
The RuleSet DTD is located in the source at: etc/ruleset_2_0_0.dtd
Improved include/exclude pattern matching performance for ends-with type patterns.
Modify (and hopefully fixed) CPD algorithm thanks to a patch from Juan Jesús García de Soria.
Fixed character reference in xml report - thanks to Seko
Enhanced SuspiciousEqualsMethodName rule - thanks to Andy Throgmorton
Add a script to launch CPDGUI on Unix system - thanks to Tom Wheeler

New Java rules:

    Basic ruleset: ExtendsObject,CheckSkipResult,AvoidBranchingStatementAsLastInLoop,DontCallThreadRun,DontUseFloatTypeForLoopIndices
    Controversial ruleset: AvoidLiteralsInIfCondition, AvoidPrefixingMethodParameters, OneDeclarationPerLine, UseConcurrentHashMap
    Coupling ruleset: LoosePackageCoupling,LawofDemeter
    Design ruleset: LogicInversion,UseVarargs,FieldDeclarationsShouldBeAtStartOfClass,GodClass
    Empty ruleset: EmptyInitializer,EmptyStatementBlock
    Import ruleset: UnnecessaryFullyQualifiedName
    Optimization ruleset: RedundantFieldInitializer
    Naming ruleset: ShortClassName, GenericsNaming
    StrictException ruleset: AvoidThrowingNewInstanceOfSameException, AvoidCatchingGenericException, AvoidLosingExceptionInformation
    Unnecessary ruleset: UselessParentheses
    JUnit ruleset: JUnitTestContainsTooManyAsserts, UseAssertTrueInsteadOfAssertEquals
    Logging with Jakarta Commons ruleset: GuardDebugLogging

New Java ruleset:
    android.xml: new rules specific to the Android platform

New JSP rules:
    Basic ruleset: NoInlineScript

New ECMAScript rules:
    Basic ruleset: AssignmentInOperand,ConsistentReturn,InnaccurateNumericLiteral,ScopeForInVariable,UnreachableCode,EqualComparison,GlobalVariable
    Braces ruleset: ForLoopsMustUseBraces,IfStmtsMustUseBraces,IfElseStmtsMustUseBraces,WhileLoopsMustUseBraces
    Unnecessary ruleset: UnnecessaryParentheses,UnnecessaryBlock

New XML rules:
    Basic ruleset: MistypedCDATASection
</code></pre></div></div>

<h2 id="november-4-2011---43">November 4, 2011 - 4.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Add support for Java 7 grammer - thanks to Dinesh Bolkensteyn and SonarSource
Add options --ignore-literals and --ignore-identifiers to the CPD command line task, thanks to Cd-Man
Fixed character reference in xml report - thanks to Seko
Add C# support for CPD - thanks to Florian Bauer
Fix small bug in Rule Designer UI
Improve TooManyMethods rule - thanks to a patch from Riku Nykanen
Improve DoNotCallSystemExit - thanks to a patch from Steven Christou
Fix false negative for UseArraysAsList when the array was passed as method parameter - thanks to Andy Throgmorton
Enhanced SuspiciousEqualsMethodName rule - thanks to Andy Throgmorton
Add a script to launch CPDGUI on Unix system - thanks to Tom Wheeler

New Rule:
    Basic ruleset: DontCallThreadRun - thanks to Andy Throgmorton
    Logging with Jakarta Commons ruleset: GuardDebugLogging
</code></pre></div></div>

<h2 id="september-14-2011---426">September 14, 2011 - 4.2.6:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 2920057 - False + : CloseRessource whith an external getter
Fixed bug 1808110 - Fixed performance issue on PreserveStackTrace
Fixed bug 2832322 -  cpd.xml file tag path attribute should be entity-encoded
Fixed bug 2590258 - NPE with nicerhtml output
Fixed bug 2317099 - False + in SimplifyCondition
Fixed bug 2606609 - False "UnusedImports" positive in package-info.java
Fixed bug 2645268 - ClassCastException in UselessOperationOnImmutable.getDeclaration
Fixed bug 2724653 - AvoidThreadGroup reports false positives
Fixed bug 2835074 - False -: DoubleCheckedLocking with reversed null check
Fixed bug 2826119 - False +: DoubleCheckedLocking warning with volatile field
Fixed bug 2904832 - Type resolution not working for ASTType when using an inner class

Modify (and hopefully fixed) CPD algorithm thanks to a patch from Juan Jesús García de Soria.
Correct -benchmark reporting of Rule visits via the RuleChain
Fix issue with Type Resolution incorrectly handling of Classes with same name as a java.lang Class.
The JSP/JSF parser can now parse Unicode input.
The JSP/JSP parser can now handle &lt;script&gt;...&lt;/script&gt; tags.  The AST HtmlScript node contains the content.
Added Ecmascript as a supported language for CPD.
Improved include/exclude pattern matching performance for ends-with type patterns.

Dependencies updates: asm updated to 3.2

Android ruleset: CallSuperLast rule now also checks for finish() redefinitions

New rule:
    Android: DoNotHardCodeSDCard
    Controversial : AvoidLiteralsInIfCondition (patch 2591627), UseConcurrentHashMap
    StrictExceptions : AvoidCatchingGenericException, AvoidLosingExceptionInformation
    Naming : GenericsNaming
    JSP: NoInlineScript
</code></pre></div></div>

<h2 id="february-08-2009---425">February 08, 2009 - 4.2.5:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Enhanced logging in the ClassTypeResolver to provide more detailed messaging.
Fixed bug 2315623 - @SuppressWarnings("PMD.UseSingleton") has no effect
Fixed bug 2230809 - False +: ClassWithOnlyPrivateConstructorsShouldBeFinal
Fixed bug 2338341 - ArrayIndexOutOfBoundsException in CPD (on Ruby)
Fixed bug 2315599 - False +: UseSingleton with class containing constructor
Fixed bug 1955852 - false positives for UnusedPrivateMethod &amp; UnusedLocalVariable
Fixed bug 2404700 - UseSingleton should not act on enums
Fixed bug 2225474 - VariableNamingConventions does not work with nonprimitives
Fixed bug 1609038 - Xslt report generators break if path contains "java"
Fixed bug - JUnitTestsShouldIncludeAssert now detects Junit 4 Assert.assert...  constructs
Fixed bug 2142986 - UselessOverridingMethod doesn't consider annotations
Fixed bug 2027626 - False + : AvoidFinalLocalVariable

New rule:
    StrictExceptions : AvoidThrowingNewInstanceOfSameException
New ruleset:
    android.xml: new rules specific to the Android platform
</code></pre></div></div>

<h2 id="october-12-2008---424">October 12, 2008 - 4.2.4:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 1481051 - false + UnusedNullCheckInEquals (and other false positives too)
Fixed bug 1943204 - Ant task: &lt;ruleset&gt; path should be relative to Ant basedir
Fixed bug 2139720 - Exception in PMD Rule Designer for inline comments in source
Fixed patch 2075906 - Add toString() to the rule UnnecessaryWrapperObjectCreation
Fixed ClassCastException on generic method in BeanMembersShouldSerialize
Fixed ClassCastException in symbol table code
</code></pre></div></div>

<h2 id="august-31-2008---423">August 31, 2008 - 4.2.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>JavaCC generated artifacts updated to JavaCC 4.1d1.
Java grammar enhanced to include AnnotationMethodDeclaration as parent node of method related children of AnnotationTypeMemberDeclaration
Fixes for exclude-pattern
Updates to RuleChain to honor RuleSet exclude-pattern
Upgrading UselessOperationOnImmutable to detect more use cases, especially on String and fix false positives
Fixed bug 1988829 - Violation reported without source file name (actually a fix to ConsecutiveLiteralAppends)
Fixed bug 1989814 - false +: ConsecutiveLiteralAppends
Fixed bug 1977230 - false positive: UselessOverridingMethod
Fixed bug 1998185 - BeanMembersShouldSerialize vs @SuppressWarnings("serial")
Fixed bug 2002722 - false + in UseStringBufferForStringAppends
Fixed bug 2056318 - False positive for AvoidInstantiatingObjectsInLoops
Fixed bug 1977438 - False positive for UselessStringValueOf
Fixed bug 2050064 - False + SuspiciousOctalEscape with backslash literal
Fixed bug 1556594 - Wonky detection of NullAssignment
Optimizations and false positive fixes in PreserveStackTrace
@SuppressWarnings("all") disables all warnings
All comment types are now stored in ASTCompilationUnit, not just formal ones
Fixed false negative in UselessOverridingMethod
Fixed handling of escape characters in UseIndexOfChar and AppendCharacterWithChar

New rule:
    Basic ruleset:  EmptyInitializer
</code></pre></div></div>

<h2 id="may-20-2008---422">May 20, 2008 - 4.2.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed false positive in UnusedImports: javadoc comments are parsed to check @see and other tags
Fixed parsing bug: constant fields in annotation classes
Bug fix: NPE in MoreThanOneLogger
UnnecessaryParentheses now checks all expressions, not just return statements
</code></pre></div></div>

<h2 id="april-11-2008---421">April 11, 2008 - 4.2.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>'41' and '42' shortcuts for rulesets added
Fixed bug 1928009 - Error using migration ruleset in PMD 4.2
Fixed bug 1932242 - EmptyMethodInAbstractClassShouldBeAbstract false +
Fixed bug 1808110 - PreserveStackTrace

AvoidDuplicateLiteralRule now has 'skipAnnotations' boolean property
ruleset.dtd and ruleset_xml_schema.xsd added to jar file in rulesets directory
Update RuleSetWriter to handle non-Apache TRAX implementations, add an option to not use XML Namespaces
Added file encoding option to CPD GUI, which already existed for the command line and Ant
bin and java14/bin scripts:
    retroweaver version was not correct in java14/bin scripts
    support for extra languages in cpd.sh
    standard unix scripts can be used with cygwin
</code></pre></div></div>

<h2 id="march-25-2008---42">March 25, 2008 - 4.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 1920155 - CheckResultSet: Does not pass for loop conditionals
</code></pre></div></div>

<h2 id="march-21-2008---42rc2">March 21, 2008 - 4.2rc2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 1912831 - False + UnusedPrivateMethod with varargs
Fixed bug 1913536 - Rule Designer does not recognize JSP(XML)
Add -auxclasspath option for specifying Type Resolution classpath from command line and auxclasspath nested element for ant task.
Fixed formatting problems in loggers.

Ant task upgrade:
    Added a new attribute 'maxRuleCount' to indicate whether or not to fail the build if PMD finds that much violations.
</code></pre></div></div>

<h2 id="march-07-2008---42rc1">March 07, 2008 - 4.2rc1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 1866198 - PMD should not register global Logger
Fixed bug 1843273 - False - on SimplifyBooleanReturns
Fixed bug 1848888 - Fixed false positive in UseEqualsToCompareStrings
Fixed bug 1874313 - Documentation bugs
Fixed bug 1855409 - False + in EmptyMethodInAbstractClassShouldBeAbstract
Fixed bug 1888967 - Updated xpath query to detect more "empty" methods.
Fixed bug 1891399 - Check for JUnit4 test method fails
Fixed bug 1894821 - False - for Test Class without Test Cases
Fixed bug 1882457 - PositionLiteralsFirstInComparisons rule not working OK
Fixed bug 1842505 - XML output incorrect for inner classes
Fixed bug 1808158 - Constructor args could also be final
Fixed bug 1902351 - AvoidReassigningParameters not identify parent field
Fixed other false positives in EmptyMethodInAbstractClassShouldBeAbstract
Fixed other issues in SimplifyBooleanReturns
Modified AvoidReassigningParameter to also check constructor arguments for reassignement

New rules:
    Basic ruleset: AvoidMultipleUnaryOperators
    Controversial ruleset: DoNotCallGarbageCollectionExplicitly,UseObjectForClearerAPI
    Design ruleset : ReturnEmptyArrayRatherThanNull,TooFewBranchesForASwitchStatement,AbstractClassWithoutAnyMethod
    Codesize : TooManyMethods
    StrictExceptions : DoNotThrowExceptionInFinally
    Strings : AvoidStringBufferField

Rule upgrade:
    CyclomaticComplexity now can be configured to display only class average complexity or method complexity, or both.

Designer upgrade:
    A new panel for symbols and a tooltips on AST node that displays line, column and access node attributes (private,
    static, abstract,...)

1.7 added as a valid option for targetjdk.
New elements under &lt;ruleset&gt;: &lt;exclude-pattern&gt; to match files exclude from processing, with &lt;include-pattern&gt; to override.
Rules can now be written which produce violations based upon aggregate file processing (i.e. cross/multiple file violations).
PMD Rule Designer can now shows Symbol Table contents for the selected AST node.
PMD Rule Designer shows position info in tooltip for AST nodes and highlights matching code for selected AST node in code window.
CPD Ant task will report to System.out when 'outputFile' not given.
RuleSetWriter class can be used to Serialize a RuleSet to XML in a standard fashion.  Recommend PMD IDE plugins standardize their behavior.
retroweaver updated to version 2.0.5.
</code></pre></div></div>

<h2 id="november-17-2007---41">November 17, 2007 - 4.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed annotation bug: ClassCastException when a formal parameter had multiple annotations
Added a Visual Studio renderer for CPD; just use "--format vs".
Dependencies updates: asm to 3.1, retroweaver to 2.0.2, junit to 4.4
new ant target ("regress") to test regression bugs only
</code></pre></div></div>

<h2 id="november-01-2007---41rc1">November 01, 2007 - 4.1rc1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Basic ruleset: AvoidUsingHardCodedIP,CheckResultSet
    Controversial ruleset: AvoidFinalLocalVariable,AvoidUsingShortType,AvoidUsingVolatile,AvoidUsingNativeCode,AvoidAccessibilityAlteration
    Design ruleset: ClassWithOnlyPrivateConstructorsShouldBeFinal,EmptyMethodInAbstractClassShouldBeAbstract
    Imports ruleset: TooManyStaticImports
    J2ee ruleset: DoNotCallSystemExit, StaticEJBFieldShouldBeFinal,DoNotUseThreads
    Strings ruleset: UseEqualsToCompareStrings

Fixed bug 674394  - fixed false positive in DuplicateImports for disambiguation import
Fixed bug 631681  - fixed false positive in UnusedPrivateField when field is accessed by outer class
Fixed bug 985989  - fixed false negative in ConstructorCallsOverridableMethod for inner static classes
Fixed bug 1409944 - fixed false positive in SingularField for lock objects
Fixed bug 1472195 - fixed false positives in PositionLiteralsFirstInComparisons when the string is used as a parameter
Fixed bug 1522517 - fixed false positive in UselessOverridingMethod for clone method
Fixed bug 1744065 - fixed false positive in BooleanInstantiation when a custom Boolean is used
Fixed bug 1765613 - fixed NullPointerException in CloneMethodMustImplementCloneable when checking enum
Fixed bug 1740480 - fixed false positive in ImmutableField when the assignment is inside an 'if'
Fixed bug 1702782 - fixed false positive in UselessOperationOnImmutable when an Immutable on which an operation is performed is compareTo'd
Fixed bugs 1764288/1744069/1744071 - When using Type Resolution all junit test cases will notice if you're using an extended TestCase
Fixed bug 1793215 - pmd-nicerhtml.xsl does not display line numbers
Fixes bug 1796928 - fixed false positive in AvoidThrowingRawExceptionTypes, when a Type name is the same as a RawException.
Fixed bug 1811506 - False - : UnusedFormalParameter (property "checkall" needs to be set)
Fixed false negative in UnnecessaryCaseChange

The Java 1.5 source code parser is now the default for testcode used in PMD's unit tests.
Added TypeResolution to the XPath rule. Use typeof function to determine if a node is of a particular type
Adding a GenericLiteralChecker, a generic rule that require a regex as property. It will log a violation if a Literal is matched by the regex. See the new rule AvoidUsingHardCodedIP for an example.
Adding support for multiple line span String in CPD's AbstractTokenizer, this may change, for the better, CPD's Ruby parsing.
This release adds 'nicehtml', with the plan for the next major release to make nicehtml-&gt;html, and html-&gt;oldhtml. This feature uses an XSLT transformation, default stylesheet maybe override with '-xslt filename'.
New CPD command line feature : Using more than one directory for sources. You can now have several '--files' on the command line.
SingularField greatly improved to generate very few false positives (none?). Moved from controversial to design. Two options added to restore old behaviour (mostly).
Jaxen updated to 1.1.1, now Literal[@Image='""'] works in XPath expressions.
</code></pre></div></div>

<h2 id="july-20-2007---40">July 20, 2007 - 4.0</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 1697397 - fixed false positives in ClassCastExceptionWithToArray
Fixed bug 1728789 - removed redundant rule AvoidNonConstructorMethodsWithClassName; MethodWithSameNameAsEnclosingClass is faster and does the same thing.
</code></pre></div></div>

<h2 id="july-12-2007---40rc2">July 12, 2007 - 4.0rc2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Typeresolution ruleset: SignatureDeclareThrowsException - re-implementation using the new Type Resolution facility (old rule is still available)
Fixed bug 1698550 - CloneMethodMustImplementCloneable now accepts a clone method that throws CloneNotSupportedException in a final class
Fixed bug 1680568 - The new typeresolution SignatureDeclareThrowsException rule now ignores setUp and tearDown in JUnit 4 tests and tests that do not directly extend TestCase
The new typeresolution SignatureDeclareThrowsException rule can now ignore JUnit classes completely by setting the IgnoreJUnitCompletely property
Fixed false positive in UselessOperationOnImmutable
PMD now defaults to using a Java 1.5 source code parser.
</code></pre></div></div>

<h2 id="june-22-2007---40rc1">June 22, 2007 - 4.0rc1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Strict exception ruleset: DoNotExtendJavaLangError
    Basic JSP ruleset: JspEncoding
    J2EE ruleset: MDBAndSessionBeanNamingConvention, RemoteSessionInterfaceNamingConvention, LocalInterfaceSessionNamingConvention, LocalHomeNamingConvention, RemoteInterfaceNamingConvention
    Optimizations ruleset: AddEmptyString
    Naming: BooleanGetMethodName
New rulesets:
    Migrating To JUnit4: Rules that help move from JUnit 3 to JUnit 4
Fixed bug 1670717 - 'Copy xml to clipboard' menu command now works again in the Designer
Fixed bug 1618858 - PMD no longer raises an exception on XPath like '//ConditionalExpression//ConditionalExpression'
Fixed bug 1626232 - Commons logging rules (ProperLogger and UseCorrectExceptionLogging) now catch more cases
Fixed bugs 1626201 &amp; 1633683 - BrokenNullCheck now catches more cases
Fixed bug 1626715 - UseAssertSameInsteadOfAssertTrue now correctly checks classes which contain the null constant
Fixed bug 1531216 - ImmutableField. NameOccurrence.isSelfAssignment now recognizes this.x++ as a self assignment
Fixed bug 1634078 - StringToString now recognizes toString on a String Array, rather than an element.
Fixed bug 1631646 - UselessOperationOnImmutable doesn't throw on variable.method().variable.
Fixed bug 1627830 - UseLocaleWithCaseConversions now works with compound string operations
Fixed bug 1613807 - DontImportJavaLang rule allows import to Thread inner classes
Fixed bug 1637573 - The PMD Ant task no longer closes System.out if toConsole is set
Fixed bug 1451251 - A new UnusedImports rule, using typeresolution, finds unused import on demand rules
Fixed bug 1613793 - MissingSerialVersionUID rule now doesn't fire on abstract classes
Fixed bug 1666646 - ImmutableField rule doesn't report against volatile variables
Fixed bug 1693924 - Type resolution now works for implicit imports
Fixed bug 1705716 - Annotation declarations now trigger a new scope level in the symbol table.
Fixed bug 1743938 - False +: InsufficientStringBufferDeclaration with multiply
Fixed bug 1657957 - UseStringBufferForStringAppends now catches self-assignments
Applied patch 1612455 - RFE 1411022 CompareObjectsWithEquals now catches the case where comparison is against new Object
Implemented RFE 1562230 - Added migration rule to check for instantiation of Short/Byte/Long
Implemented RFE 1627581 - SuppressWarnings("unused") now suppresses all warnings in unusedcode.xml
XPath rules are now chained together for an extra speedup in processing
PMD now requires JDK 1.5 to be compiled. Java 1.4 support is provided using Retroweaver
- PMD will still analyze code from earlier JDKs
- to run pmd with 1.4, use the files from the java14 directory (weaved pmd jar and support files)
TypeResolution now looks at some ASTName nodes.
Memory footprint reduced: most renderers now use less memory by generating reports on the fly.
Ant task now takes advantage of multithreading code and on the fly renderers
Ant task now logs more debug info when using -verbose
PMD command line now has -benchmark: output a benchmark report upon completion; default to System.err
</code></pre></div></div>

<h2 id="december-19-2006---39">December 19, 2006 - 3.9:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Basic ruleset: BigIntegerInstantiation, AvoidUsingOctalValues
    Codesize ruleset: NPathComplexity, NcssTypeCount, NcssMethodCount, NcssConstructorCount
    Design ruleset: UseCollectionIsEmpty
    Strings ruleset: StringBufferInstantiationWithChar
    Typeresolution ruleset: Loose Coupling - This is a re-implementation using the new Type Resolution facility
Fixed bug 1610730 - MisplacedNullCheck now catches more cases
Fixed bug 1570915 - AvoidRethrowingException no longer reports a false positive for certain nested exceptions.
Fixed bug 1571324 - UselessStringValueOf no longer reports a false positive for additive expressions.
Fixed bug 1573795 - PreserveStackTrace doesn't throw CastClassException on exception with 0 args
Fixed bug 1573591 - NonThreadSafeSingleton doesn't throw NPE when using this keyword
Fixed bug 1371753 - UnnecessaryLocalBeforeReturn is now less aggressive in its reporting.
Fixed bug 1566547 - Annotations with an empty MemberValueArrayInitializer are now parsed properly.
Fixed bugs 1060761 / 1433119 &amp; RFE 1196954 - CloseResource now takes an optional parameter to identify closure methods
Fixed bug 1579615 - OverrideBothEqualsAndHashcode no longer throws an Exception on equals methods that don't have Object as a parameter type.
Fixed bug 1580859 - AvoidDecimalLiteralsInBigDecimalConstructor now catches more cases.
Fixed bug 1581123 - False +: UnnecessaryWrapperObjectCreation.
Fixed bug 1592710 - VariableNamingConventions no longer reports false positives on certain enum declarations.
Fixed bug 1593292 - The CPD GUI now works with the 'by extension' option selected.
Fixed bug 1560944 - CPD now skips symlinks.
Fixed bug 1570824 - HTML reports generated on Windows no longer contain double backslashes.  This caused problems when viewing those reports with Apache.
Fixed bug 1031966 - Re-Implemented CloneMethodMustImplementCloneable as a typeresolution rule. This rule can now detect super classes/interfaces which are cloneable
Fixed bug 1571309 - Optional command line options may be used either before or after the mandatory arguments
Applied patch 1551189 - SingularField false + for initialization blocks
Applied patch 1573981 - false + in CloneMethodMustImplementCloneable
Applied patch 1574988 - false + in OverrideBothEqualsAndHashcode
Applied patch 1583167 - Better test code management. Internal JUnits can now be written in XML's
Applied patch 1613674 - Support classpaths with spaces in pmd.bat
Applied patch 1615519 - controversial/DefaultPackage XPath rule is wrong
Applied patch 1615546 - Added option to command line to write directly to a file
Implemented RFE 1566313 - Command Line now takes minimumpriority attribute to filter out rulesets
PMD now requires JDK 1.4 to run
- PMD will still analyze code from earlier JDKs
- PMD now uses the built-in JDK 1.4 regex utils vs Jakarta ORO
- PMD now uses the JDK javax.xml APIs rather than being hardcoded to use Xerces and Xalan
SummaryHTML Report changes from Brent Fisher - now contains linePrefix to support source output from javadoc using "linksource"
Fixed CSVRenderer - had flipped line and priority columns
Fixed bug in Ant task - CSV reports were being output as text.
Fixed false negatives in UseArraysAsList.
Fixed several JDK 1.5 parsing bugs.
Fixed several rules (exceptions on jdk 1.5 and jdk 1.6 source code).
Fixed array handling in AvoidReassigningParameters and UnusedFormalParameter.
Fixed bug in UselessOverridingMethod: false + when adding synchronization.
Fixed false positives in LocalVariableCouldBeFinal.
Fixed false positives in MethodArgumentCouldBeFinal.
Modified annotation suppression to use @SuppressWarning("PMD") to suppress all warnings and @SuppressWarning("PMD.UnusedLocalVariable") to suppress a particular rule's warnings.
Rules can now call RuleContext.getSourceType() if they need to make different checks on JDK 1.4 and 1.5 code.
CloseResource rule now checks code without java.sql import.
ArrayIsStoredDirectly rule now checks Constructors
undo/redo added to text areas in Designer.
Better 'create rule XML' panel in Designer.
use of entrySet to iterate over Maps.
1.6 added as a valid option for targetjdk.
PMD now allows rules to use Type Resolution. This was referenced in patch 1257259.
Renderers use less memory when generating reports.
New DynamicXPathRule class to speed up XPath based rules by providing a base type for the XPath expression.
Multithreaded processing on multi core or multi cpu systems.
Performance Refactoring, XPath rules re-written as Java:
    AssignmentInOperand
    AvoidDollarSigns
    DontImportJavaLang
    DontImportSun
    MoreThanOneLogger
    SuspiciousHashcodeMethodName
    UselessStringValueOf
</code></pre></div></div>

<h2 id="october-4-2006---38">October 4, 2006 - 3.8:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Basic ruleset: BrokenNullCheck
    Strict exceptions ruleset: AvoidRethrowingException
    Optimizations ruleset: UnnecessaryWrapperObjectCreation
    Strings ruleset: UselessStringValueOf
Fixed bug 1498910 - AssignmentInOperand no longer has a typo in the message.
Fixed bug 1498960 - DontImportJavaLang no longer reports static imports of java.lang members.
Fixed bug 1417106 - MissingBreakInSwitch no longer flags stmts where every case has either a return or a throw.
Fixed bug 1412529 - UncommentedEmptyConstructor no longer flags private constructors.
Fixed bug 1462189 - InsufficientStringBufferDeclaration now resets when it reaches setLength the same way it does at a Constructor
Fixed bug 1497815 - InsufficientStringBufferDeclaration rule now takes the length of the constructor into account, and adds the length of the initial string to its initial length
Fixed bug 1504842 - ExceptionSignatureDeclaration no longer flags methods starting with 'test'.
Fixed bug 1516728 - UselessOverridingMethod no longer raises an NPE on methods that use generics.
Fixed bug 1522054 - BooleanInstantiation now detects instantiations inside method calls.
Fixed bug 1522056 - UseStringBufferForStringAppends now flags appends which occur in static initializers and constructors
Fixed bug 1526530 - SingularField now finds fields which are hidden at the method or static level
Fixed bug 1529805 - UnusedModifier no longer throws NPEs on JDK 1.5 enums.
Fixed bug 1531593 - UnnecessaryConversionTemporary no longer reports false positives when toString() is invoked inside the call to 'new Long/Integer/etc()'.
Fixed bug 1512871 - Improved C++ tokenizer error messages - now they include the filename.
Fixed bug 1531152 - CloneThrowsCloneNotSupportedException now reports the proper line number.
Fixed bug 1531236 - IdempotentOperations reports fewer false positives.
Fixed bug 1544564 - LooseCoupling rule now checks for ArrayLists
Fixed bug 1544565 - NonThreadSafeSingleton now finds if's with compound statements
Fixed bug 1561784 - AbstractOptimizationRule no longer throws ClassCastExceptions on certain postfix expressions.
Fixed a bug in AvoidProtectedFieldInFinalClass - it no longer reports false positives for protected fields in inner classes.
Fixed a bug in the C++ grammar - the tokenizer now properly recognizes macro definitions which are followed by a multiline comment.
Modified C++ tokenizer to use the JavaCC STATIC option; this results in about a 30% speedup in tokenizing.
Implemented RFE 1501850 - UnusedFormalParameter now catches cases where a parameter is assigned to but not used.
Applied patch 1481024 (implementing RFE 1490181)- NOPMD messages can now be reported with a user specified msg, e.g., //NOPMD - this is expected
Added JSP support to the copy/paste detector.
Placed JSF/JSP ruleset names in rulesets/jsprulesets.properties
Added the image to the ASTEnumConstant nodes.
Added new XSLT stylesheet for CPD XML-&gt;HTML from Max Tardiveau.
Refactored UseIndexOfChar to extract common functionality into AbstractPoorMethodCall.
Improved CPD GUI and Designer look/functionality; thanks to Brian Remedios for the changes!
Rewrote the NOPMD mechanism to collect NOPMD markers as the source file is tokenized.  This eliminates an entire scan of each source file.
Applied patch from Jason Bennett to enhance CyclomaticComplexity rule to account for conditional or/and nodes, do stmts, and catch blocks.
Applied patch from Xavier Le Vourch to reduce false postives from CloneMethodMustImplementCloneable.
Updated Jaxen library to beta 10.
Performance Refactoring, XPath rules re-written as Java:
    BooleanInstantiation
    UselessOperationOnImmutable
    OverrideBothEqualsAndHashcode
    UnnecessaryReturn
    UseStringBufferForStringAppends
    SingularField
    NonThreadSafeSingleton
</code></pre></div></div>

<h2 id="june-1-2006---37">June 1, 2006 - 3.7:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Basic-JSP ruleset: DuplicateJspImport
    Design ruleset: PreserveStackTrace
    J2EE ruleset: UseProperClassLoader
Implemented RFE 1462019 - Add JSPs to Ant Task
Implemented RFE 1462020 - Add JSPs to Designer
Fixed bug 1461426 InsufficientStringBufferDeclaration does not consider paths
Fixed bug 1462184 False +: InsufficientStringBufferDeclaration - wrong size
Fixed bug 1465574 - UnusedPrivateMethod no longer reports false positives when a private method is called from a method with a parameter of the same name.
Fixed bug 1114003 - UnusedPrivateMethod no longer reports false positives when two methods have the same name and number of arguments but different types.  The fix causes PMD to miss a few valid cases, but, c'est la vie.
Fixed bug 1472843 - UnusedPrivateMethod no longer reports false positives when a private method is only called from a method that contains a variable with the same name as that method.
Fixed bug 1461442 - UseAssertSameInsteadOfAssertTrue now ignores comparisons to null; UseAssertNullInsteadOfAssertTrue will report those.
Fixed bug 1474778 - UnnecessaryCaseChange no longer flags usages of toUpperCase(Locale).
Fixed bug 1423429 - ImmutableField no longer reports false positives on variables which can be set via an anonymous inner class that is created in the constructor.
Fixed major bug in CPD; it was not picking up files other than .java or .jsp.
Fixed a bug in CallSuperInConstructor; it now checks inner classes/enums more carefully.
Fixed a bug in VariableNamingConventions; it was not setting the warning message properly.
Fixed bug in C/C++ parser; a '$' is now allowed in an identifier.  This is useful in VMS.
Fixed a symbol table bug; PMD no longer crashes on enumeration declarations in the same scope containing the same field name
Fixed a bug in ASTVariableDeclaratorId that triggered a ClassCastException if a annotation was used on a parameter.
Added RuleViolation.getBeginColumn()/getEndColumn()
Added an optional 'showSuppressed' item to the Ant task; this is false by default and toggles whether or not suppressed items are shown in the report.
Added an IRuleViolation interface and modified various code classes (include Renderer implementations and Report) to use it.
Modified JJTree grammar to use conditional node descriptors for various expression nodes and to use node suppression for ASTModifier nodes; this replaces a bunch of DiscardableNodeCleaner hackery.  It also fixed bug 1445026.
Modified C/CPP grammar to only build the lexical analyzer; we're not using the parser for CPD, just the token manager.  This reduces the PMD jar file size by about 50 KB.
</code></pre></div></div>

<h2 id="march-29-2006---36">March 29, 2006 - 3.6:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Basic ruleset: AvoidThreadGroup
    Design ruleset: UnsynchronizedStaticDateFormatter
    Strings ruleset: InefficientEmptyStringCheck, InsufficientStringBufferDeclaration
    JUnit ruleset: SimplifyBooleanAssertion
    Basic-JSF ruleset: DontNestJsfInJstlIteration
    Basic-JSP ruleset: NoLongScripts, NoScriptlets, NoInlineStyleInformation, NoClassAttribute, NoJspForward, IframeMissingSrcAttribute, NoHtmlComments
Fixed bug 1414985 - ConsecutiveLiteralAppends now checks for intervening references between appends.
Fixed bug 1418424 - ConsecutiveLiteralAppends no longer flags appends in separate methods.
Fixed bug 1416167 - AppendCharacterWithChar now catches cases involving escaped characters.
Fixed bug 1421409 - Ant task now has setter to allow minimumPriority attribute to be used.
Fixed bug 1416164 - InefficientStringBuffering no longer reports false positives on the three argument version of StringBuffer.append().
Fixed bug 1415326 - JUnitTestsShouldContainAsserts no longer errors out on JDK 1.5 generics.
Fixed bug 1415333 - CyclomaticComplexity no longer errors out on JDK 1.5 enums.
Fixed bug 1415663 - PMD no longer fails to parse abstract classes declared in a method.
Fixed bug 1433439 - UseIndexOfChar no longer reports false positives on case like indexOf('a' + getFoo()).
Fixed bug 1435218 - LoggerIsNotStaticFinal no longer reports false positives for local variables.
Fixed bug 1413745 - ArrayIsStoredDirectly no longer reports false positives for array deferences.
Fixed bug 1435751 - Added encoding type of UTF-8 to the CPD XML file.
Fixed bug 1441539 - ConsecutiveLiteralAppends no longer flags appends() involving method calls.
Fixed bug 1339470 - PMD no longer fails to parse certain non-static initializers.
Fixed bug 1425772 - PMD no longer fails with errors in ASTFieldDeclaration when parsing some JDK 1.5 code.
Fixed bugs 1448123 and 1449175 - AvoidFieldNameMatchingTypeName, SingularField, TooManyFields, and AvoidFieldNameMatchingMethodName no longer error out on enumerations.
Fixed bug 1444654 - migrating_to_14 and migrating_to_15 no longer refer to rule tests.
Fixed bug 1445231 - TestClassWithoutTestCases: no longer flags abstract classes.
Fixed bug 1445765 - PMD no longer uses huge amounts of memory.  However, you need to use RuleViolation.getBeginLine(); RuleViolation.getNode() is no more.
Fixed bug 1447295 - UseNotifyAllInsteadOfNotify no longer flags notify() methods that have a parameter.
Fixed bug 1455965 - MethodReturnsInternalArray no longer flags variations on 'return new Object[] {}'.
Implemented RFE 1415487 - Added a rulesets/releases/35.xml ruleset (and similar rulesets for previous releases) contains rules new to PMD v3.5
Wouter Zelle fixed a false positive in NonThreadSafeSingleton.
Wouter Zelle fixed a false positive in InefficientStringBuffering.
The CPD Ant task now supports an optional 'language' attribute.
Removed some ill-advised casts from the parsers.
Fixed bug in CallSuperInConstructor; it no longer flag classes without extends clauses.
Fixed release packaging; now entire xslt/ directory contents are included.
Added more XSLT from Dave Corley - you can use them to filter PMD reports by priority level.
You can now access the name of a MemberValuePair node using getImage().
PositionLiteralsFirstInComparisons was rewritten in XPath.
Added a getVersionString method to the TargetJDKVersion interface.
Added an option '--targetjdk' argument to the Benchmark utility.
Applied a patch from Wouter Zelle to clean up the Ant Formatter class, fix a TextRenderer bug, and make toConsole cleaner.
Rewrote AvoidCallingFinalize in Java; fixed bug and runs much faster, too.
Uploaded ruleset schema to http://pmd.sf.net/ruleset_xml_schema.xsd
UseIndexOfChar now catches cases involving lastIndexOf.
Rules are now run in the order in which they're listed in a ruleset file.  Internally, they're now stored in a List vs a Set, and RuleSet.getRules() now returns a Collection.
Upgraded to JUnit version 3.8.2.
</code></pre></div></div>

<h2 id="jan-25-2006---35">Jan 25, 2006 - 3.5:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
 Basic ruleset: UselessOperationOnImmutable, MisplacedNullCheck, UnusedNullCheckInEquals
 Migration ruleset: IntegerInstantiation
 JUnit ruleset: UseAssertNullInsteadOfAssertTrue
 Strings ruleset: AppendCharacterWithChar, ConsecutiveLiteralAppends, UseIndexOfChar
 Design ruleset: AvoidConstantsInterface
 Optimizations ruleset: UseArraysAsList, AvoidArrayLoops
 Controversial ruleset: BooleanInversion
Fixed bug 1371980 - InefficientStringBuffering no longer flags StringBuffer methods other than append().
Fixed bug 1277373 - InefficientStringBuffering now catches more cases.
Fixed bug 1376760 - InefficientStringBuffering no longer throws a NullPointerException when processing certain expressions.
Fixed bug 1371757 - Misleading example in AvoidSynchronizedAtMethodLevel
Fixed bug 1373510 - UseAssertSameInsteadOfAssertTrue no longer has a typo in its message, and its message is more clear.
Fixed bug 1375290 - @SuppressWarnings annotations are now implemented correctly; they accept one blank argument to suppress all warnings.
Fixed bug 1376756 - UselessOverridingMethod no longer throws an exception on overloaded methods.
Fixed bug 1378358 - StringInstantiation no longer throws ClassCastExceptions on certain allocation patterns.
Fixed bug 1371741 - UncommentedEmptyConstructor no longer flags constructors that consist of a this() or a super() invocation.
Fixed bug 1277373 - InefficientStringBuffering no longer flags concatenations that involve a static final String.
Fixed bug 1379701 - CompareObjectsWithEquals no longer flags comparisons of array elements.
Fixed bug 1380969 - UnusedPrivateMethod no longer flags private static methods that are only invoked in a static context from a field declaration.
Fixed bug 1384594 - Added a 'prefix' property for BeanMembersShouldSerializeRule
Fixed bug 1394808 - Fewer missed hits for AppendCharacterWithChar and InefficientStringBuffering, thanks to Allan Caplan for catching these
Fixed bug 1400754 - A NPE is no longer thrown on certain JDK 1.5 enum usages.
Partially fixed bug 1371753 - UnnecessaryLocalBeforeReturn message now reflects the fact that that rule flags all types
Fixed a bug in UseStringBufferLength; it no longers fails with an exception on expressions like StringBuffer.toString.equals(x)
Fixed a bug in CPD's C/C++ parser so that it no longer fails on multi-line literals; thx to Tom Judge for the nice patch.
CPD now recognizes '--language c' and '--language cpp' as both mapping to the C/C++ parser.
Modified renderers to support disabling printing of suppressed warnings.  Introduced a new AbstractRenderer class that all Renderers can extends to get the current behavior - that is, suppressed violations are printed.
Implemented RFE 1375435 - you can now embed regular expressions inside XPath rules, i.e., //ClassOrInterfaceDeclaration[matches(@Image, 'F?o')].
Added current CLASSPATH to pmd.bat.
UnusedFormalParameter now catches unused constructor parameters, and its warning message now reflects whether it caught a method or a constructor param.
Rebuilt JavaCC parser with JavaCC 4.0.
Added jakarta-oro-2.0.8.jar as a new dependency to support regular expression in XPath rules.
Ant task now supports a 'minimumPriority' attribute; only rules with this priority or higher will be run.
Renamed Ant task 'printToConsole' attribute to 'toConsole' and it can only be used inside a formatter element.
Added David Corley's Javascript report, more details are here: http://tomcopeland.blogs.com/juniordeveloper/2005/12/demo_of_some_ni.html
</code></pre></div></div>

<h2 id="november-30-2005---34">November 30, 2005 - 3.4:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
 Basic ruleset: ClassCastExceptionWithToArray, AvoidDecimalLiteralsInBigDecimalConstructor
 Design ruleset: NonThreadSafeSingleton, UncommentedEmptyMethod, UncommentedEmptyConstructor
 Controversial ruleset: DefaultPackage
 Naming ruleset: MisleadingVariableName
 Migration ruleset: ReplaceVectorWithList, ReplaceHashtableWithMap, ReplaceEnumerationWithIterator, AvoidEnumAsIdentifier, AvoidAssertAsIdentifier
 Strings ruleset: UseStringBufferLength
Fixed bug 1292745 - Removed unused source file ExceptionTypeChecking.java
Fixed bug 1292609 - The JDK 1.3 parser now correctly handles certain 'assert' usages.  Also added a 'JDK 1.3' menu item to the Designer.
Fixed bug 1292689 - Corrected description for UnnecessaryLocalBeforeReturn
Fixed bug 1293157 - UnusedPrivateMethod no longer reports false positives for private methods which are only invoked from static initializers.
Fixed bug 1293277 - Messages that used 'pluginname' had duplicated messages.
Fixed bug 1291353 - ASTMethodDeclaration isPublic/isAbstract methods always return true.  The syntactical modifier - i.e., whether or not 'public' was used in the source code in the method declaration - is available via 'isSyntacticallyPublic' and 'isSyntacticallyAbstract'
Fixed bug 1296544 - TooManyFields no longer checks the wrong property value.
Fixed bug 1304739 - StringInstantiation no longer crashes on certain String constructor usages.
Fixed bug 1306180 - AvoidConcatenatingNonLiteralsInStringBuffer no longer reports false positives on certain StringBuffer usages.
Fixed bug 1309235 - TooManyFields no longer includes static finals towards its count.
Fixed bug 1312720 - DefaultPackage no longer flags interface fields.
Fixed bug 1312754 - pmd.bat now handles command line arguments better in WinXP.
Fixed bug 1312723 - Added isSyntacticallyPublic() behavior to ASTFieldDeclaration nodes.
Fixed bug 1313216 - Designer was not displaying 'final' attribute for ASTLocalVariableDeclaration nodes.
Fixed bug 1314086 - Added logging-jakarta-commons as a short name for rulesets/logging-jakarta-commons.xml to SimpleRuleSetNameMapper.
Fixed bug 1351498 - Improved UnnecessaryCaseChange warning message.
Fixed bug 1351706 - CompareObjectsWithEquals now catches more cases.
Fixed bug 1277373 (and 1347286) - InefficientStringBuffering now flags fewer false positives.
Fixed bug 1363447 - MissingBreakInSwitch no longer reports false positives for switch statements where each switch label has a return statement.
Fixed bug 1363458 - MissingStaticMethodInNonInstantiatableClass no longer reports cases where there are public static fields.
Fixed bug 1364816 - ImmutableField no longer reports false positives for fields assigned in an anonymous inner class in a constructor.
Implemented RFE 1311309 (and 1119854) - Suppressed RuleViolation counts are now included in the reports.
Implemented RFE 1220371 - Rule violation suppression via annotations.  Per the JLS, @SuppressWarnings can be placed before the following nodes: TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE.
Implemented RFE 1275547 - OverrideBothEqualsAndHashcode now skips Comparator implementations.
Applied patch 1306999 - Renamed CloseConnection to CloseResource and added support for checking Statement and ResultSet objects.
Applied patch 1344754 - EmptyCatchBlock now skips catch blocks that contain comments.  This is also requested in RFE 1347884.
Renamed AvoidConcatenatingNonLiteralsInStringBuffer to InefficientStringBuffering; new name is a bit more concise.
Modified LongVariable; now it has a property which can be used to override the minimum reporting value.
Improved CPD XML report.
CPD no longer skips header files when checking C/C++ code.
Reworked CPD command line arguments; old-style arguments will still work for one more version, though.
Lots of documentation improvements.
</code></pre></div></div>

<h2 id="september-15-2005---33">September 15, 2005 - 3.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules:
    Design: PositionLiteralsFirstInComparisons,  UnnecessaryLocalBeforeReturn
    Logging-jakarta-commons: ProperLogger
    Basic: UselessOverridingMethod
    Naming: PackageCase, NoPackage
    Strings: UnnecessaryCaseChange
Implemented RFE 1220171 - rule definitions can now contain a link to an external URL for more information on that rule - for example, a link to the rule's web page.  Thanks to Wouter Zelle for designing and implementing this!
Implemented RFE 1230685 - The text report now includes parsing errors even if no rule violations are reported
Implemented RFE 787860 - UseSingleton now accounts for JUnit test suite declarations.
Implemented RFE 1097090 - The Report object now contains the elapsed time for running PMD.  This shows up in the XML report as an elapsedTime attribute in the pmd element in the format '2m 5s' or '1h 5h 35s' or '25s' .
Implemented RFE 1246338 - CPD now handles SCCS directories and NTFS junction points.
Fixed bug 1226858 - JUnitAssertionsShouldIncludeMessage now checks calls to assertFalse.
Fixed bug 1227001 - AvoidCallingFinalize no longer flags calls to finalize() within finalizers.
Fixed bug 1229755 - Fixed typo in ArrayIsStoredDirectly description.
Fixed bug 1229749 - Improved error message when an external rule is not found.
Fixed bug 1224849 - JUnitTestsShouldContainAsserts no longer skips method declarations which include explicit throws clauses.
Fixed bug 1225492 - ConstructorCallsOverridableMethod now reports the correct method name.  dvholten's examples in RFE 1235562 also helped with this a great deal.
Fixed bug 1228589 - DoubleCheckedLocking and ExceptionSignatureDeclaration no longer throw ClassCastExceptions on method declarations that declare generic return types.
Fixed bug 1235299 - NullAssignment no longer flags null equality comparisons in ternary expressions.
Fixed bug 1235300 - NullAssignment no longer flags assignments to final fields.
Fixed bug 1240201 - The UnnecessaryParentheses message is no longer restricted to return statements.
Fixed bug 1242290 - The JDK 1.5 parser no longer chokes on nested enumerations with a constructor.
Fixed bug 1242544 - SimplifyConditional no longer flags null checks that precede an instanceof involving an array dereference.
Fixed bug 1242946 - ArrayIsStoredDirectly no longer reports false positives for equality expression comparisons.  As a bonus, its message now includes the variable name :-)
Fixed bug 1232648 - MethodReturnsInternalArray no longer reports false positives on return statement expressions that involve method invocations on an internal array.
Fixed bug 1244428 - MissingStaticMethodInNonInstantiatableClass no longer reports warnings for nested classes.  Some inner class cases will be missed, but false positives will be eliminated as well.
Fixed bug 1244443 - EqualsNull now catches more cases.
Fixed bug 1250949 - The JDK 1.5 parser no longer chokes on annotated parameters and annotated local variables.
Fixed bug 1245139 - TooManyFields no longer throws a ClassCastException when processing anonymous classes.
Fixed bug 1251256 - ImmutableField no longer skips assignments in try blocks on methods (which led to false positives).
Fixed bug 1250949 - The JDK 1.5 parser no longer chokes on AnnotationTypeMemberDeclaration with a default value.
Fixed bug 1245367 - ImmutableField no longer triggers on assignments in loops in constructors.
Fixed bug 1251269 - AvoidConcatenatingNonLiteralsInStringBuffer no longer triggers on StringBuffer constructors like 'new StringBuffer(1 + getFoo());'
Fixed bug 1244570 - AvoidConcatenatingNonLiteralsInStringBuffer no longer triggers on certain AST patterns involving local variable declarations inside Statement nodes.
Fixed bug 695344 - StringInstantiation no longer triggers on the String(byte[]) constructor.
Fixed bug 1114754 - UnusedPrivateMethod reports fewer false positives.
Fixed bug 1290718 - Command line parameter documentation is now correct for targetjdk options.
Applied patch 1228834 - XPath rules can now use properties to customize rules.  Thanks to Wouter Zelle for another great piece of work!
Fixed a bug in RuleSetFactory that missed some override cases; thx to Wouter Zelle for the report and a fix.
Fixed a bug in the grammar that didn't allow constructors to have type parameters, which couldn't parse some JDK 1.5 constructs.
Fixed a bug in ImportFromSamePackage; now it catches the case where a class has an on-demand import for the same package it is in.
Fixed a bug in CompareObjectsWithEquals; now it catches some local variable cases.
Fixed a bug in CouplingBetweenObjects; it no longer triggers an exception (which is a bug in the symbol table layer) by calling getEnclosingClassScope() when the node in question isn't enclosed by one.
Moved AvoidCallingFinalize from the design ruleset to the finalize ruleset and then deleted redundant ExplicitCallToFinalize rule from the finalize ruleset.
Deleted redundant ExceptionTypeChecking rule from the strictexception ruleset; use AvoidInstanceofChecksInCatchClause in the design ruleset instead.
Added some new XSLT scripts that create nifty HTML output; thanks to Wouter Zelle for the code.
Improved UseCorrectExceptionLogging; thx to Wouter Zelle for the new XPath.
Improved warning message from UnusedPrivateMethod.
Improved EmptyIfStmt; now it catches the case where an IfStatement is followed by an EmptyStatement node.
The Ant task now accepts the short names of rulesets (e.g., unusedcode for rulesets/unusedcode.xml).
Removed unnecessary '.html' suffix from displayed filenames when the linkPrefix attribute is used with the HTML renderer.
Added an optional 'description' attribute to the 'property' element in the ruleset XML files.
Added a simplified SimpleNode.addViolation() method to reduce duplicated rule violation creation code.
Moved from jaxen-1.0-fcs.jar/saxpath-1.0-fcs.jar to jaxen-1.1-beta-7.jar.  This yielded a 20% speed increase in the basic ruleset!
</code></pre></div></div>

<h2 id="june-21-2005---32">June 21, 2005 - 3.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: UseCorrectExceptionLogging (logging-jakarta-commons ruleset), AvoidPrintStackTrace (logging-java ruleset), CompareObjectsWithEquals (design ruleset)
Fixed bug 1201577 - PMD now correctly parses method declarations that return generic types.
Fixed bug 1205709 - PMD no longer takes a long time to report certain parsing errors.
Fixed bug 1052356 - ImmutableField no longer triggers on fields which are assigned to in a constructor's try statement.
Fixed bug 1215854 - Package/class/method names are now filled in whenever possible, and the XML report includes all three.
Fixed bug 1209719 - MethodArgumentCouldBeFinal no longer triggers on arguments which are modified using postfix or prefix expressions.  A bug in AvoidReassigningParameters was also fixed under the same bug id.
Fixed bug 1188386 - MethodReturnsInternalArray no longer flags returning a local array declaration.
Fixed bug 1172137 - PMD no longer locks up when generating a control flow graph for if statements with labelled breaks.
Fixed bug 1221094 - JUnitTestsShouldContainAsserts no longer flags static methods.
Fixed bug 1217028 - pmd.bat now correctly passes parameters to PMD.
Implemented RFE 1188604 - AvoidThrowingCertainExceptionTypes has been split into AvoidThrowingRawExceptionTypes and AvoidThrowingNullPointerException.
Implemented RFE 1188369 - UnnecessaryBooleanAssertion now checks for things like 'assertTrue(!foo)'.  These should be changed to 'assertFalse(foo)' for clarity.
Implemented RFE 1199622 - UnusedFormalParameter now defaults to only checking private methods unless a 'checkall' property is set.
Implemented RFE 1220314 - the symbol table now includes some rudimentary type information.
Break and continue statement labels (if present) are placed in the image field.
Fixed bug which caused MissingSerialVersionUID to trigger on all interfaces that implemented other interfaces.
Modified NullAssignmentRule to catch null assignments in ternary expressions.
Added two new node types - ASTCatchStatement and ASTFinallyStatement.
Modified rule XML definition; it no longer includes a symboltable attribute since the symbol table layer is now run for all files analyzed.
Harden equality of AbstractRule and RuleSet objects (needed for the Eclipse plugin features)
Change RuleSet.getRuleByName. Now return null instead of throwing a RuntimeException when the rule is not found
Add .project and .classpath to the module so that it can be checkout as an Eclipse project
</code></pre></div></div>

<h2 id="may-10-2005---31">May 10, 2005 - 3.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: SimplifyStartsWith, UnnecessaryParentheses, CollapsibleIfStatements, UseAssertEqualsInsteadOfAssertTrue,  UseAssertSameInsteadOfAssertTrue, UseStringBufferForStringAppends, SimplifyConditional, SingularField
Fixed bug 1170535 - LongVariable now report variables longer than 17 characters, not 12.
Fixed bug 1182755 - SystemPrintln no longer overreports problems.
Fixed bug 1188372 - AtLeastOneConstructor no longer fires on interfaces.
Fixed bug 1190508 - UnnecessaryBooleanAssertion no longer fires on nested boolean literals.
Fixed bug 1190461 - UnusedLocal no longer misses usages which are on the RHS of a right bit shift operator.
Fixed bug 1188371 - AvoidInstantiatingObjectsInLoops no longer fires on instantiations in loops when the 'new' keyword is preceded by a 'return' or a 'throw'.
Fixed bug 1190526 - TooManyFields now accepts a property setting correctly, and default lower bound is 15 vs 10.
Fixed bug 1196238 - UnusedImports no longer reports false positives for various JDK 1.5 java.lang subpackages.
Fixed bug 1169731 - UnusedImports no longer reports false positives on types used inside generics.  This bug also resulted in a bug in ForLoopShouldBeWhileLoop being fixed, thanks Wim!
Fixed bug 1187325 - UnusedImports no longer reports a false positive on imports which are used inside an Annotation.
Fixed bug 1189720 - PMD no longer fails to parse generics that use 'member selectors'.
Fixed bug 1170109 - The Ant task now supports an optional 'targetjdk' attribute that accepts values of '1.3', '1.4', or '1.5'.
Fixed bug 1183032 - The XMLRenderer no longer throws a SimpleDateFormat exception when run with JDK 1.3.
Fixed bug 1097256 - The XMLRenderer now supports optional encoding of UTF8 characters using the 'net.sourceforge.pmd.supportUTF8' environment variable.
Fixed bug 1198832 - AbstractClassWithoutAbstractMethod no longer flags classes which implement interfaces since these can partially implement the interface and thus don't need to explicitly declare abstract methods.
Implemented RFE 1193979 - BooleanInstantiation now catches cases like Boolean.valueOf(true)
Implemented RFE 1171095 - LabeledStatement nodes now contain the image of the label.
Implemented RFE 1176401 - UnusedFormalParameter now flags public methods.
Implemented RFE 994338 - The msg produced by ConstructorCallsOverridableMethod now includes the offending method name.
Modified command line parameters; removed -jdk15 and -jdk13 parameters and added a -'targetjdk [1.3|1.4|1.5]' parameter.
Modified CSVRenderer to include more columns.
Optimized rules: FinalFieldCouldBeStatic (115 seconds to 7 seconds), SuspiciousConstantFieldName (48 seconds to 14 seconds), UnusedModifer (49 seconds to 4 seconds)
</code></pre></div></div>

<h2 id="march-23-2005---30">March 23, 2005 - 3.0:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: MissingSerialVersionUID, UnnecessaryFinalModifier, AbstractClassDoesNotContainAbstractMethod, MissingStaticMethodInNonInstantiatableClass, AvoidSynchronizedAtMethodLevel, AvoidCallingFinalize, UseNotifyAllInsteadOfNotify, MissingBreakInSwitch, AvoidInstanceofChecksInCatchClause, AvoidFieldNameMatchingTypeName, AvoidFieldNameMatchingMethodName, AvoidNonConstructorMethodsWithClassName, TestClassWithoutTestCases, TooManyFields, CallSuperInConstructor, UnnecessaryBooleanAssertion, UseArrayListInsteadOfVector
Implemented RFE 1058039 - PMD's command line interface now accepts abbreviated names for the standard rulesets; for example 'java net.sourceforge.pmd.PMD /my/source/code/ text basic,unusedcode' would run the rulesets/basic.xml and the rulesets/unusedcode.xml rulesets on the source in /my/source/code and produce a text report.
Implemented RFE 1119851 - PMD's Ant task now supports an 'excludeMarker' attribute.
Fixed bug 994400 - False +: ConstructorCallsOverridableMethodRule, thanks to ereissner for reporting it
Fixed bug 1146116 - JUnitTestsShouldIncludeAssert no longer crashes on inner Interface
Fixed bug 1114625 - UnusedPrivateField no longer throws an NPE on standalone postfix expressions which are prefixed with 'this'.
Fixed bug 1114020 - The Ant task now reports a complete stack trace when run with the -verbose flag.
Fixed bug 1117983 - MethodArgumentCouldBeFinal no longer reports false positives on try..catch blocks.
Fixed bug 797742 - PMD now parses JDK 1.5 source code.  Note that it's not perfect yet; more testing/bug reports are welcome!
Fixed a bug - the StatisticalRule no longer 'merges' data points when using the 'topscore' property.
Fixed a bug - the PMD Ant task's failOnRuleViolation attribute no longer causes a BuildException in the case when no rule violations occur.
Modified the XSLT to add a summary section.
Added Ruby support to CPD.
Optimized various rules and wrote a benchmarking application; results are here - http://infoether.com/~tom/pmd_timing.txt
</code></pre></div></div>

<h2 id="february-1-2005---23">February 1, 2005 - 2.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 1113927 - ExceptionAsFlowControl no longer throws NPEs on code where a throw statement exists without a try statement wrapping it.
Fixed bug 1113981 - AvoidConcatenatingNonLiteralsInStringBuffer no longer throws NPEs on code where an append appears as a child of an ExplicitConstructorInvocation node.
Fixed bug 1114039 - AvoidInstantiatingObjectsInLoops's message no longer contains a spelling error.
Fixed bug 1114029 - The 'optimization' rules no longer throw NPEs at various points.
Fixed bug 1114251 - The 'sunsecure' rules no longer throw NPEs at various points.
</code></pre></div></div>

<h2 id="january-31-2005---22">January 31, 2005 - 2.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: LocalVariableCouldBeFinal, MethodArgumentCouldBeFinal, AvoidInstantiatingObjectsInLoops, ArrayIsStoredDirectly, MethodReturnsInternalArray, AssignmentToNonFinalStatic, AvoidConcatenatingNonLiteralsInStringBuffer
Fixed bug 1088459 - JUnitTestsShouldContainAsserts no longer throws ClassCastException on interface, native, and abstract method declarations.
Fixed bug 1100059 - The Ant task now generates a small empty-ish report if there are no violations.
Implemented RFE 1086168 - PMD XML reports now contain a version and timestamp attribute in the &lt;pmd&gt; element.
Implemented RFE 1031950 - The PMD Ant task now supports nested ruleset tags
Fixed a bug in the rule override logic; it no longer requires the "class" attribute of a rule be listed in the overrides section.
Added 'ignoreLiterals' and 'ignoreIdentifiers' boolean options to the CPD task.
Cleaned up a good bit of the symbol table code; thanks much to Harald Gurres for the patch.
CPD now contains a generic copy/paste checker for programs in any language
</code></pre></div></div>

<h2 id="december-15-2004---21">December 15, 2004 - 2.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: AvoidProtectedFieldInFinalClass, SystemPrintln
Fixed bug 1050173 - ImmutableFieldRule no longer reports false positives for static fields.
Fixed bug 1050286 - ImmutableFieldRule no longer reports false positives for classes which have multiple constructors only a subset of which set certain fields.
Fixed bug 1055346 - ImmutableFieldRule no longer reports false positive on preinc/predecrement/postfix expressions.
Fixed bug 1041739 - EmptyStatementNotInLoop no longer reports false positives for nested class declarations in methods.
Fixed bug 1039963 - CPD no longer fails to parse C++ files with multi-line macros.
Fixed bug 1053663 - SuspiciousConstantFieldName no longer reports false positives for interface members.
Fixed bug 1055930 - CouplingBetweenObjectsRule no longer throws a NPE on interfaces
Fixed a possible NPE in dfa.report.ReportTree.
Implemented RFE 1058033 - Renamed run.[sh|bat] to pmd.[sh|bat].
Implemented RFE 1058042 - XML output is more readable now.
Applied patch 1051956 - Rulesets that reference rules using "ref" can now override various properties.
Applied patch 1070733 - CPD's Java checker now has an option to ignore both literals and identifiers - this can help find large duplicate code blocks, but can also result in false positives.
YAHTMLRenderer no longer has dependence on Ant packages.
Modified the AST to correctly include PostfixExpression nodes.  Previously a statement like "x++;" was embedded in the parent StatementExpression node.
Moved BooleanInstantiation from the design ruleset to the basic ruleset.
Updated Xerces libraries to v2.6.2.
Many rule names had the word "Rule" tacked on to the end.  Various folks thought this was a bad idea, so here are the new names of those rules which were renamed:
- basic.xml: UnnecessaryConversionTemporary, OverrideBothEqualsAndHashcode, DoubleCheckedLocking
- braces.xml: WhileLoopsMustUseBraces, IfElseStmtsMustUseBraces, ForLoopsMustUseBraces
- clone.xml: ProperCloneImplementation
- codesize.xml: CyclomaticComplexity, ExcessivePublicCount
- controversial.xml: UnnecessaryConstructor, AssignmentInOperand, DontImportSun, SuspiciousOctalEscape
- coupling.xml: CouplingBetweenObjects, ExcessiveImports, LooseCoupling
- design.xml: UseSingleton, SimplifyBooleanReturns, AvoidReassigningParameters, ConstructorCallsOverridableMethod, AccessorClassGeneration, CloseConnection, OptimizableToArrayCall, IdempotentOperations. ImmutableField
- junit.xml: JUnitAssertionsShouldIncludeMessage, JUnitTestsShouldIncludeAssert
- logging-java.xml: MoreThanOneLogger, LoggerIsNotStaticFinal
- naming.xml: ShortMethodName, VariableNamingConventions, ClassNamingConventions, AbstractNaming
- strictexception.xml: ExceptionAsFlowControl, AvoidCatchingNPE, AvoidThrowingCertainExceptionTypes
Continued working on JDK 1.5 compatibility - added support for static import statements, varargs, and the new for loop syntax
- still TODO: generics and annotations (note that autoboxing shouldn't require a grammar change)
- Good article on features: http://java.sun.com/developer/technicalArticles/releases/j2se15/
</code></pre></div></div>

<h2 id="october-19-2004---20">October 19, 2004 - 2.0:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: InstantiationToGetClass, IdempotentOperationsRule, SuspiciousEqualsMethodName, SimpleDateFormatNeedsLocale, JUnitTestsShouldContainAssertsRule, SuspiciousConstantFieldName, ImmutableFieldRule, MoreThanOneLoggerRule, LoggerIsNotStaticFinalRule, UseLocaleWithCaseConversions
Applied patch in RFE 992576 - Enhancements to VariableNamingConventionsRule
Implemented RFE 995910 - The HTML report can now include links to HTMLlized source code - for example, the HTML generated by JXR.
Implemented RFE 665824 - PMD now ignores rule violations in lines containing the string 'NOPMD'.
Fixed bug in SimplifyBooleanExpressions - now it catches more cases.
Fixed bugs in AvoidDuplicateLiterals - now it ignores small duplicate literals, its message is more helpful, and it catches more cases.
Fixed bug 997893 - UnusedPrivateField now detects assignments to members of private fields as a usage.
Fixed bug 1020199 - UnusedLocalVariable no longer flags arrays as unused if an assignment is made to an array slot.
Fixed bug 1027133 - Now ExceptionSignatureDeclaration skips certain JUnit framework methods.
Fixed bug 1008548 - The 'favorites' ruleset no longer contains a broken reference.
Fixed bug 1045583 - UnusedModifier now correctly handles anonymous inner classes within interface field declarations.
Partially fixed bug 998122 - CloseConnectionRule now checks for imports of java.sql before reporting a rule violation.
Applied patch 1001694 - Now PMD can process zip/jar files of source code.
Applied patch 1032927 - The XML report now includes the rule priority.
Added data flow analysis facade from Raik Schroeder.
Added two new optional attributes to rule definitions - symboltable and dfa.  These allow the symbol table and DFA facades to be configured on a rule-by-rule basis.  Note that if your rule needs the symbol table; you'll need to add symboltable="true" to your rule definition.  FWIW, this also results in about a 5% speedup for rules that don't need either layer.
Added a "logging" ruleset - thanks to Miguel Griffa for the code!
Enhanced the ASTViewer - and renamed it 'Designer' - to display data flows.
Moved development environment to Maven 1.0.
Moved development environment to Ant 1.6.2.  This is nice because using the new JUnit task attribute "forkmode='perBatch'" cuts test runtime from 90 seconds to 7 seconds.  Sweet.
MethodWithSameNameAsEnclosingClass now reports a more helpful line number.
</code></pre></div></div>

<h2 id="july-14-2004---19">July 14, 2004 - 1.9:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: CloneMethodMustImplementCloneable, CloneThrowsCloneNotSupportedException, EqualsNull, ConfusingTernary
Created new "clone" ruleset and moved ProperCloneImplementationRule over from the design ruleset.
Moved LooseCoupling from design.xml to coupling.xml.
Some minor performance optimizations - removed some unnecessary casts from the grammar, simplified some XPath rules.
Postfix expressions (i.e., x++) are now available in the grammar.  To access them, search for StatementExpressions with an image of "++" or "--" - i.e., in XPath, //StatementExpression[@Image="++"].  This is an odd hack and hopefully will get cleared up later.
Ant task and CLI now used BufferedInputStreams.
Converted AtLeastOneConstructor rule from Java code to XPath.
Implemented RFE 743460: The XML report now contains the ruleset name.
Implemented RFE 958714: Private field and local variables that are assigned but not used are now flagged as unused.
Fixed bug 962782 - BeanMembersShouldSerializeRule no longer reports set/is as being a violation.
Fixed bug 977022 - UnusedModifier no longer reports false positives for modifiers of nested classes in interfaces
Fixed bug 976643 - IfElseStmtsMustUseBracesRule no longer reports false positives for certain if..else constructs.
Fixed bug 985961 - UseSingletonRule now fires on classes which contain static fields
Fixed bug 977031 - FinalizeDoesNotCallSuperFinalize no longer reports a false positive when a finalizer contains a call to super.finalize in a try {} finally {} block.
</code></pre></div></div>

<h2 id="may-19-2004---18">May 19, 2004 - 1.8:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: ExceptionAsFlowControlRule, BadComparisonRule, AvoidThrowingCertainExceptionTypesRule, AvoidCatchingNPERule, OptimizableToArrayCallRule
Major grammar changes - lots of new node types added, many superfluous nodes removed from the runtime AST.  Bug 786611 - http://sourceforge.net/tracker/index.php?func=detail&amp;aid=786611&amp;group_id=56262&amp;atid=479921 - explains it a bit more.
Fixed bug 786611 - Expressions are no longer over-expanded in the AST
Fixed bug 874284 - The AST now contains tokens for bitwise or expressions - i.e., "|"
</code></pre></div></div>

<h2 id="april-22-2004---17">April 22, 2004 - 1.7:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Moved development environment to Maven 1.0-RC2.
Fixed bug 925840 - Messages were no longer getting variable names plugged in correctly
Fixed bug 919308 - XMLRenderer was still messed up; 'twas missing a quotation mark.
Fixed bug 923410 - PMD now uses the default platform character set encoding; optionally, you can pass in a character encoding to use.
Implemented RFE 925839 - Added some more detail to the UseSingletonRule.
Added an optional 'failuresPropertyName' attribute to the Ant task.
Refactored away duplicate copies of XPath rule definitions in regress/, yay!
Removed manifest from jar file; it was only there for the Main-class attribute, and it's not very useful now since PMD has several dependencies.
Began working on JDK 1.5 compatibility - added support for EnumDeclaration nodes.
</code></pre></div></div>

<h2 id="march-15-2004---16">March 15, 2004 - 1.6:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 895661 - XML reports containing error elements no longer have malformed XML.
Fixed a bug in UnconditionalIfStatement - it no longer flags things like "if (x==true)".
Applied Steve Hawkins' improvements to CPD:
- Various optimizations; now it runs about 4 times faster!
- fixed "single match per file" bug
- tweaked source code slicing
- CSV renderer
Added two new renderers - SummaryHTMLRenderer and PapariTextRenderer.
Moved development environment to Ant 1.6 and JavaCC 3.2.
</code></pre></div></div>

<h2 id="february-2-2004---15">February 2, 2004 - 1.5:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: DontImportSunRule, EmptyFinalizer, EmptyStaticInitializer, AvoidDollarSigns, FinalizeOnlyCallsSuperFinalize, FinalizeOverloaded, FinalizeDoesNotCallSuperFinalize, MethodWithSameNameAsEnclosingClass, ExplicitCallToFinalize, NonStaticInitializer, DefaultLabelNotLastInSwitchStmt, NonCaseLabelInSwitchStatement, SuspiciousHashcodeMethodName, EmptyStatementNotInLoop, SuspiciousOctalEscapeRule
FinalizeShouldBeProtected moved from design.xml to finalizers.xml.
Added isTrue() to ASTBooleanLiteral.
Added UnaryExpression to the AST.
Added isPackagePrivate() to AccessNode.
</code></pre></div></div>

<h2 id="january-7-2004---14">January 7, 2004 - 1.4:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>New rules: AbstractNamingRule, ProperCloneImplementationRule
Fixed bug 840926 - AvoidReassigningParametersRule no longer reports a false positive when assigning a value to an array slot when the array is passed as a parameter to a method
Fixed bug 760520 - RuleSetFactory is less strict about whitespace in ruleset.xml files.
Fixed bug 826805 - JumbledIncrementorRule no longer reports a false positive when a outer loop incrementor is used as an array index
Fixed bug 845343 - AvoidDuplicateLiterals now picks up cases when a duplicate literal appears in field declarations.
Fixed bug 853409 - VariableNamingConventionsRule no longer requires that non-static final fields be capitalized
Fixed a bug in OverrideBothEqualsAndHashcodeRule; it no longer reports a false positive when equals() is passed the fully qualified name of Object.
Implemented RFE 845348 - UnnecessaryReturn yields more useful line numbers now
Added a ruleset DTD and a ruleset XML Schema.
Added 'ExplicitExtends' and 'ExplicitImplements' attributes to UnmodifiedClassDeclaration nodes.
</code></pre></div></div>

<h2 id="october-23-2003---13">October 23, 2003 - 1.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Relicensed under a BSD-style license.
Fixed bug 822245 - VariableNamingConventionsRule now handles interface fields correctly.
Added new rules: EmptySynchronizedBlock, UnnecessaryReturn
ASTType now has an getDimensions() method.
</code></pre></div></div>

<h2 id="october-06-2003---122">October 06, 2003 - 1.2.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rule: CloseConnectionRule
Fixed bug 782246 - FinalFieldCouldBeStatic no longer flags fields in interfaces.
Fixed bug 782235 - "ant -version" now prints more details when a file errors out.
Fixed bug 779874 - LooseCouplingRule no longer triggers on ArrayList
Fixed bug 781393 - VariableNameDeclaration no longer throws ClassCastExpression since ASTLocalVariableDeclaration now subclasses AccessNode
Fixed bug 797243 - CPD XML report can no longer contain ]]&gt; (CDEnd)
Fixed bug 690196 - PMD now handles both JDK 1.3 and 1.4 code - i.e., usage of "assert" as an identifier.
Fixed bug 805092 - VariableNamingConventionsRule no longer flags serialVersionUID as a violation
Fixed bug - Specifying a non-existing rule format on the command line no longer results in a ClassNotFoundException.
XPath rules may now include pluggable parameters.  This feature is very limited.  For now.
Tweaked CPD time display field
Made CPD text fields uneditable
Added more error checking to CPD GUI input
Added "dialog cancelled" check to CPD "Save" function
Added Boris Gruschko's AST viewer.
Added Jeff Epstein's TextPad integration.
ASTType now has an isArray() method.
</code></pre></div></div>

<h2 id="august-1-2003---121">August 1, 2003 - 1.2.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 781077 - line number "-1" no longer appears for nodes with siblings.
</code></pre></div></div>

<h2 id="july-30-2003---12">July 30, 2003 - 1.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: VariableNamingConventionsRule, MethodNamingConventionsRule, ClassNamingConventionsRule, AvoidCatchingThrowable, ExceptionSignatureDeclaration, ExceptionTypeChecking, BooleanInstantiation
Fixed bug 583047 - ASTName column numbers are now correct
Fixed bug 761048 - Symbol table now creates a scope level for anonymous inner classes
Fixed bug 763529 - AccessorClassGenerationRule no longer crashes when given a final inner class
Fixed bug 771943 - AtLeastOneConstructorRule and UnnecessaryConstructorRule no longer reports false positives on inner classes.
Applied patch from Chris Webster to fix another UnnecessaryConstructorRule problem.
Added ability to accept a comma-delimited string of files and directories on the command line.
Added a CSVRenderer.
Added a "-shortfilenames" argument to the PMD command line interface.
Modified grammer to provide information on whether an initializer block is static.
ASTViewer now shows node images and modifiers
ASTViewer now saves last edited text to ~/.pmd_astviewer
Moved the PMD Swing UI into a separate module - pmd-swingui.
Updated license.txt to point to new location.
</code></pre></div></div>

<h2 id="june-19-2003---11">June 19, 2003 - 1.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: FinalizeShouldBeProtected, FinalFieldCouldBeStatic, BeanMembersShouldSerializeRule
Removed "verbose" attribute from PMD and CPD Ant tasks; now they use built in logging so you can do a "ant -verbose cpd" or "ant -verbose pmd".  Thanks to Philippe T'Seyen for the code.
Added "excludes" feature to rulesets; thanks to Gael Marziou for the suggestion.
Removed "LinkedList" from LooseCouplingRule checks; thx to Randall Schulz for the suggestion.
CPD now processes PHP code.
Added VBHTMLRenderer; thanks to Vladimir Bossicard for the code.
Added "Save" item to CPD GUI; thanks to mcclain looney for the patch.
Fixed bug 732592 - Ant task now accepts a nested classpath element.
Fixed bug 744915 - UseSingletonRule no longer fires on abstract classes, thanks to Pablo Casado for the bug report.
Fixed bugs 735396 and 735399 - false positives from ConstructorCallsOverridableMethodRule
Fixed bug 752809 - UnusedPrivateMethodRule now catches unused private static methods, thanks to Conrad Roche for the bug report.
</code></pre></div></div>

<h2 id="april-17-2003---105">April 17, 2003 - 1.05:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: ReturnFromFinallyBlock, SimplifyBooleanExpressions
Added a new Ant task for CPD; thanks to Andy Glover for the code.
Added ability to specify a class name as a renderer on the command line or in the formatter "type" attribute of the Ant task.
Brian Ewins completely rewrote CPD using a portion of the Burrows-Wheeler Transform - it's much, much, much faster now.
Rebuilt parser with JavaCC 3.0; made several parser optimizations.
The Ant task now accepts a &lt;classpath&gt; element to aid in loading custom rulesets.  Thanks to Luke Francl for the suggestion.
Fixed several bugs in UnnecessaryConstructorRule; thanks to Adam Nemeth for the reports and fixes.
All test-data classes have been inlined into their respective JUnit tests.
</code></pre></div></div>

<h2 id="march-21-2003---104">March 21, 2003 - 1.04</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: ConstructorCallsOverridableMethodRule, AtLeastOneConstructorRule, JUnitAssertionsShouldIncludeMessageRule, DoubleCheckedLockingRule, ExcessivePublicCountRule, AccessorClassGenerationRule
The Ant task has been updated; if you set "verbose=true" full stacktraces are printed.  Thx to Paul Roebuck for the suggestion.
Moved JUnit rules into their own package - "net.sourceforge.pmd.rules.junit".
Incorporated new ResourceLoader; thanks to Dave Fuller
Incorporated new XPath-based rule definitions; thanks to Dan Sheppard for the excellent work.
Fixed bug 697187 - Problem with nested ifs
Fixed bug 699287 - Grammar bug; good catch by David Whitmore
</code></pre></div></div>

<h2 id="february-11-2003---103">February 11, 2003 - 1.03</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: CyclomaticComplexityRule, AssignmentInOperandRule
Added numbering to the HTMLRenderer; thx to Luke Francl for the code.
Added an optional Ant task attribute 'failOnRuleViolation'.  This stops the build if any rule violations are found.
Added an XSLT script for processing the PMD XML report; thx to Mats for the code.
The Ant task now determines whether the formatter toFile attribute is absolute or relative and routes the report appropriately.
Moved several rules into a new "controversial" ruleset.
Fixed bug 672742 - grammar typo was hosing up ASTConstructorDeclaration which was hosing up UseSingletonRule
Fixed bug 674393 - OnlyOneReturn rule no longer counts returns that are inside anonymous inner classes as being inside the containing method.  Thx to C. Lamont Gilbert for the bug report.
Fixed bug 674420 - AvoidReassigningParametersRule no longer counts parameter field reassignment as a violation.  Thx to C. Lamont Gilbert for the bug report.
Fixed bug 673662 - The Ant task's "failOnError" attribute works again.  Changed the semantics of this attribute, though, so it fails the build if errors occurred.  A new attribute 'failOnRuleViolation' serves the purpose of stopping the build if rule violations are found.
Fixed bug 676340 - Symbol table now creates new scope level when it encounters a switch statement.  See the bug for code details; generally, this bug would have triggered runtime exceptions on certain blocks of code.
Fixed bug 683465 - JavaCC parser no longer has ability to throw java.lang.Error; now it only throws java.lang.RuntimeExceptions.  Thx to Gunnlaugur Thor Briem for a good discussion on this topic.
Fixed bug in OverrideBothEqualsAndHashcodeRule - it no longer bails out with a NullPtrException on interfaces that declare a method signature "equals(Object)".  Thx to Don Leckie for catching that.
</code></pre></div></div>

<h2 id="january-22-2003---102">January 22, 2003 - 1.02:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: ImportFromSamePackageRule, SwitchDensityRule, NullAssignmentRule, UnusedModifierRule, ForLoopShouldBeWhileLoopRule
Updated LooseCouplingRule to check for usage of Vector; thx to Vladimir for the good catch.
Updated AvoidDuplicateLiteralsRule to report the line number of the first occurrence of the duplicate String.
Modified Ant task to use a formatter element; this lets you render a report in several formats without having to rerun PMD.
Added a new Ant task attribute - shortFilenames.
Modified Ant task to ignore whitespace in the ruleset attribute
Added rule priority settings.
Added alternate row colorization to HTML renderer.
Fixed bug 650623 - the Ant task now uses relative directories for the report file
Fixed bug 656944 - PMD no longer prints errors to System.out, instead it just rethrows any exceptions
Fixed bug 660069 - this was a symbol table bug; thanks to mcclain looney for the report.
Fixed bug 668119 - OverrideBothEqualsAndHashcodeRule now checks the signature on equals(); thanks to mcclain looney for the report.
</code></pre></div></div>

<h2 id="november-07-2002---101">November 07 2002 - 1.01:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Fixed bug 633879: EmptyFinallyBlockRule now handles multiple catch blocks followed by a finally block.
Fixed bug 633892: StringToStringRule false positive exposed problem in symbol table usage to declaration code.
Fixed bug 617971: Statistical rules no longer produce tons of false positives due to accumulated results.
Fixed bug 633209: OnlyOneReturn rule no longer requires the return stmt to be the last statement.
Enhanced EmptyCatchBlockRule to flag multiple consecutive empty catch blocks.
Renamed AvoidStringLiteralsRule to AvoidDuplicateLiteralsRule.
Modified Ant task to truncate file paths to make the HTML output neater.
</code></pre></div></div>

<h2 id="november-04-2002---10">November 04 2002 - 1.0:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: StringToStringRule, AvoidReassigningParametersRule, UnnecessaryConstructorRule, AvoidStringLiteralsRule
Fixed bug 631010: AvoidDeeplyNestedIfStmtsRule works correctly with if..else stmts now
Fixed bug 631605: OnlyOneReturn handles line spillover now.
Moved AvoidDeeplyNestedIfStmts from the braces ruleset to the design ruleset.
Moved several rules from the design ruleset to the codesize ruleset.
Added a new "favorites" ruleset.
</code></pre></div></div>

<h2 id="october-04-2002---10rc3">October 04 2002 - 1.0rc3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: OnlyOneReturnRule, JumbledIncrementerRule, AvoidDeeplyNestedIfStmtsRule
PMD is now built and tested with JUnit 3.8.1 and Ant 1.5.
Added support for IntelliJ's IDEAJ.
Fixed bug 610018 - StringInstantiationRule now allows for String(byte[], int, int) usage.
Fixed bug 610693 - UnusedPrivateInstanceVariable handles parameter shadowing better.
Fixed bug 616535 - Command line interface input checking is better now.
Fixed bug 616615 - Command line interface allows the text renderer to be used now
Fixed a bug - the statistics rules now handle interfaces better.
</code></pre></div></div>

<h2 id="september-12-2002---10rc2">September 12 2002 - 1.0rc2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: JUnitSpellingRule, JUnitStaticSuiteRule, StringInstantiationRule
Added new rulesets - junit, strings.
Added a printToConsole attribute to the Ant task so that you can see the report right there in the Ant output.
Fixed bug in PMD GUI - rules are now saved correctly.
Fixed bug 597916 - CPD line counts are accurate now.
</code></pre></div></div>

<h2 id="september-09-2002---10rc1">September 09 2002 - 1.0rc1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: UnusedImportsRule, EmptySwitchStmtRule, SwitchStmtsShouldHaveDefaultRule, IfStmtsMustUseBracesRule
Fixed bug 597813 - Rule properties are now parsed correctly
Fixed bug 597905 - UseSingletonRule now resets its state correctly
Moved several rules into a new ruleset - braces.
Improved CPD by removing import statements and package statements from the token set.
Added Metrics API to the Report.
Updated PMD GUI.
</code></pre></div></div>

<h2 id="august-16-2002---09">August 16 2002 - 0.9:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: LongParameterListRule, SimplifyBooleanReturnsRule
Enhanced statistics rules to support various ways of triggering rule violations
Added rule customization via XML parameters
Enhanced CopyAndPasteDetector; added a GUI
Fixed bug 592060 - UnusedPrivateInstanceVariable handles explicitly referenced statics correctly
Fixed bug 593849 - UnusedPrivateInstanceVariable handles nested classes better
</code></pre></div></div>

<h2 id="july-30-2002---08">July 30 2002 - 0.8:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rule: UnusedFormalParameterRule
Fixed bug 588083 - ForLoopsNeedBraces rule correctly handles a variety of for statement formats
Added prototype of the copy and paste detector
</code></pre></div></div>

<h2 id="july-25-2002---07">July 25 2002 - 0.7:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: UnusedPrivateMethodRule, WhileLoopsMustUseBracesRule, ForLoopsMustUseBracesRule, LooseCouplingRule
Fixed bug 583482 - EmptyCatchBlock and EmptyFinallyBlock no longer report an incorrect line number.
</code></pre></div></div>

<h2 id="july-18-2002---06">July 18 2002 - 0.6:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: ExcessiveClassLength, ExcessiveMethodLength
DuplicateImportsRule now reports the correct line number.
Fixed bug 582639 - Rule violations are now reported on the proper line
Fixed bug 582509 - Removed unneeded throws clause
Fixed bug 583009 - Now rulesets.properties is in the jar file
</code></pre></div></div>

<h2 id="july-15-2002---05">July 15 2002 - 0.5:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: DontImportJavaLangRule, DuplicateImportsRule
Added new ruleset: rulesets/imports.xml
Changed sorting of RuleViolations to group Files together.
Changed XML Renderer to improved format.
Created DVSL Stylesheet for the new format.
Moved the Cougaar rules out of the PMD core.
Fixed bug 580093 - OverrideBothEqualsAndHashcodeRule reports a more correct line number.
Fixed bug 581853 - UnusedLocalVariableRule now handles anonymous inner classes correctly.
Fixed bug 580278 - this was a side effect of bug 581853.
Fixed bug 580123 - UnusedPrivateInstanceVariable now checks for instance variable usage in inner classes.
</code></pre></div></div>

<h2 id="july-10-2002---04">July 10 2002 - 0.4:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: OverrideBothEqualsAndHashcodeRule, EmptyTryBlock, EmptyFinallyBlock
Reports are now sorted by line number
RuleSets can now reference rules in other RuleSets
Fixed bug 579718 - made 'ruleset not found' error message clearer.
</code></pre></div></div>

<h2 id="july-03-2002---03">July 03 2002 - 0.3:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: UseSingletonRule, ShortVariableRule, LongVariableRule, ShortMethodNameRule
Moved rules into RuleSets which are defined in XML files in the ruleset directory
Ant task:
-Added a 'failonerror' attribute
-Changed 'rulesettype' to 'rulesetfiles'
-Removed 'text' report format; only 'html' and 'xml' are available now
</code></pre></div></div>

<h2 id="june-27-2002---02">June 27 2002 - 0.2:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Added new rules: IfElseStmtsMustUseBracesRule, EmptyWhileStmtRule
Modified command line interface to accept a rule set
Fixed bug in EmptyCatchBlockRule
Fixed typo in UnnecessaryConversionTemporaryRule
Moved Ant task to the net.sourceforge.pmd.ant package
Added new HTML report format
</code></pre></div></div>

<h2 id="june-25-2002---01">June 25 2002 - 0.1:</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Initial release
</code></pre></div></div>


    <div class="tags">
        
    </div>



</div>

<hr class="shaded"/>

<footer>
            <div class="row">
                <div class="col-lg-12 footer">
               &copy;2021 PMD Open Source Project. All rights reserved. <br />
 Site last generated: Nov 27, 2021 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
                </div>
            </div>
</footer>


        </div>
        <!-- /.row -->
    </div>
    <!-- /.container -->
</div>
</div>
</body>

</html>