forked from phoedos/pmd
6493 lines
498 KiB
HTML
6493 lines
498 KiB
HTML
<!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="These are the detailed release notes for PMD 7.">
|
||
<meta name="keywords" content=" changelog, release notes">
|
||
<title>Detailed Release Notes for PMD 7 | PMD Source Code Analyzer</title>
|
||
|
||
|
||
<link rel="stylesheet" type="text/css" href="assets/fontawesome-free-5.15.4-web/css/all.min.css">
|
||
<link rel="stylesheet" type="text/css" href="assets/bootstrap-4.5.2-dist/css/bootstrap.min.css">
|
||
|
||
<link rel="stylesheet" type="text/css" href="css/syntax.css">
|
||
<link rel="stylesheet" type="text/css" href="css/modern-business.css">
|
||
<link rel="stylesheet" type="text/css" href="css/customstyles.css">
|
||
<link rel="stylesheet" type="text/css" href="css/theme-green.css">
|
||
<link rel="stylesheet" type="text/css" href="css/pmd-customstyles.css">
|
||
|
||
<link rel="shortcut icon" href="images/logo/favicon.ico" type="image/x-icon">
|
||
<link rel="icon" href="images/logo/favicon.ico" type="image/x-icon">
|
||
|
||
<link rel="alternate" type="application/rss+xml" title="" href="feed.xml">
|
||
|
||
</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-expand-lg fixed-top navbar-dark">
|
||
<div class="container topnavlinks">
|
||
<a class="navbar-brand fas fa-home fa-lg" href="index.html"> <span class="projectTitle"> PMD Source Code Analyzer Project</span></a>
|
||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||
<span class="navbar-toggler-icon"></span>
|
||
</button>
|
||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||
<ul class="navbar-nav mr-auto mt-2 mt-lg-0"></ul>
|
||
<ul class="navbar-nav">
|
||
<!-- toggle sidebar button -->
|
||
<li class="nav-item"><a id="tg-sb-link" class="nav-link" href="#"><i id="tg-sb-icon" class="fas fa-toggle-on"></i> Nav</a></li>
|
||
<!-- entries without drop-downs appear here -->
|
||
|
||
|
||
|
||
<li class="nav-item"><a class="nav-link" href="https://github.com/pmd/pmd/releases/latest" target="_blank">Download</a></li>
|
||
|
||
|
||
|
||
<li class="nav-item"><a class="nav-link" 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.-->
|
||
|
||
</ul>
|
||
<form class="form-inline my-2 my-lg-0">
|
||
<input class="form-control mr-sm-2" type="search" placeholder="search..." id="search-input">
|
||
<ul id="results-container"></ul>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<!-- Page Content -->
|
||
<div class="container-toc-wrapper">
|
||
<div class="container">
|
||
<div class="col-lg-12"> </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 7.4.0-SNAPSHOT</li>
|
||
<div class="sidebarTitleDate">Release date: 26-July-2024</div>
|
||
|
||
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">About</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="index.html">Home</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_release_notes.html">Release notes</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="active"><a href="pmd_release_notes_pmd7.html">Release notes (PMD 7)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_about_help.html">Getting help</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_about_release_policies.html">Release policies</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_about_support_lifecycle.html">Support lifecycle</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">User Documentation</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_migrating_to_pmd7.html">Migration Guide for PMD 7</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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><a href="pmd_userdocs_3rdpartyrulesets.html">3rd party rulesets</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_rule_guidelines.html">Rule guidelines</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_testing.html">Testing your rules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_ast_dump.html">Creating (XML) dump of the AST</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_bld.html">bld PMD Extension</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="#">HTML Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_html.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_html_bestpractices.html">Best Practices</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="#">JavaScript 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="#">Kotlin Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_kotlin.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_kotlin_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_kotlin_errorprone.html">Error Prone</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_visualforce.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_visualforce_security.html">Security</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Scala Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_scala.html">Index</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Swift Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_swift.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_swift_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_swift_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Velocity Template Language (VTL) Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity_design.html">Design</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">WSDL Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_wsdl.html">Index</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_bestpractices.html">Best Practices</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_index.html">Overview</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_configuration.html">Language configuration</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_apex.html">Apex</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_cpp.html">C/C++</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_cs.html">C#</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_coco.html">Coco</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_dart.html">Dart</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_fortran.html">Fortran</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_gherkin.html">Gherkin</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_go.html">Go</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_html.html">HTML</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_java.html">Java</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_js_ts.html">JavaScript / TypeScript</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_jsp.html">JSP</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_julia.html">Julia</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_kotlin.html">Kotlin</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_lua.html">Lua</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_matlab.html">Matlab</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_modelica.html">Modelica</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_objectivec.html">Objective-C</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_perl.html">Perl</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_php.html">PHP</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_plsql.html">PLSQL</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_python.html">Python</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_ruby.html">Ruby</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_scala.html">Scala</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_swift.html">Swift</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_tsql.html">T-SQL</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_visualforce.html">Visualforce</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_velocity.html">Velocity Template Language (VTL)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_xml.html">XML and XML dialects</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_javacc.html">Adding a new language (JavaCC)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_major_adding_new_language_antlr.html">Adding a new language (ANTLR)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_major_adding_new_cpd_language.html">Adding a new CPD language</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Experimental features</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="tag_experimental.html">List of experimental Features</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_logo.html">Logo</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_faq.html">FAQ</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="license.html">License</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_credits.html">Credits</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_release_notes_old.html">Old release notes</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_decisions.html">Decisions</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>
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<!-- Content Column -->
|
||
<div class="col-md-9" id="tg-sb-content">
|
||
<header>
|
||
<div class="row">
|
||
<div class="col-lg-12">
|
||
<a href="./" role="button"
|
||
><i class="fa fa-home fa-lg"></i
|
||
></a>
|
||
» Detailed Release Notes for PMD 7
|
||
<a
|
||
target="_blank"
|
||
href="https://github.com/pmd/pmd/blob/master/docs/pages/release_notes_pmd7.md"
|
||
class="float-right"
|
||
role="button"
|
||
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
|
||
>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<hr />
|
||
</header>
|
||
|
||
|
||
<div class="post-header">
|
||
<h1 class="post-title-main">Detailed Release Notes for PMD 7</h1>
|
||
</div>
|
||
|
||
<div class="post-content" data-github-edit-url="https://github.com/pmd/pmd/blob/master/docs/pages/release_notes_pmd7.md">
|
||
|
||
|
||
<div class="summary">These are the detailed release notes for PMD 7.</div>
|
||
|
||
<details id="inline-toc-details">
|
||
<summary>Table of Contents</summary>
|
||
<div id="inline-toc"><!-- empty, move TOC here when screen size too small --></div>
|
||
</details>
|
||
|
||
<h2 id="-major-features-and-enhancements">🚀 Major Features and Enhancements</h2>
|
||
|
||
<h3 id="new-official-logo">New official logo</h3>
|
||
|
||
<p>Many of you probably have already seen the new logo, but now it’s time to actually ship it. The new logo
|
||
was long ago decided (see <a href="https://github.com/pmd/pmd/issues/1663">#1663</a>).</p>
|
||
|
||
<p>We decided it’s time to have a modernized logo and get rid of the gun. This allows to include
|
||
the logo anywhere without offense.</p>
|
||
|
||
<p>The official logo is also without a tagline (such as “Code Quality Matters!”) as the tagline created some
|
||
controversies. Without a tagline, we are not limited in the direction of future development of PMD.</p>
|
||
|
||
<p><img src="images/logo/pmd-logo-300px.png" alt="New PMD Logo" /></p>
|
||
|
||
<p>The new logo is available from the <a href="pmd_projectdocs_logo.html">Logo Project Page</a>.</p>
|
||
|
||
<h3 id="revamped-java">Revamped Java</h3>
|
||
|
||
<p>The Java grammar has been refactored substantially in order to make it easier to maintain and more correct
|
||
regarding the Java Language Specification. It supports now also the edge-cases where PMD 6 was failing
|
||
(e.g. annotations were not supported everywhere). Changing the grammar entails a changed AST and therefore changed
|
||
rules. The PMD built-in rules have all been upgraded and many bugs have been fixed on the way.
|
||
Unfortunately, if you are using custom rules, you will most probably need to accommodate these changes yourself.</p>
|
||
|
||
<p>The type resolution framework has been rewritten from scratch and should now cover the entire Java spec correctly.
|
||
The same is true for the symbol table.
|
||
PMD 6 on the other hand has always had problems with advanced type inference, e.g. with lambdas and call chains.
|
||
Since it was built on the core reflection API, it also was prone to linkage errors and classloader leaks for instance.
|
||
PMD 7 does not need to load classes, and does not have these problems.</p>
|
||
|
||
<p>The AST exposes much more semantic information now. For instance, you can jump from a method call to
|
||
the declaration of the method being called, or from a field access to the field declaration. These
|
||
improvements allow interesting rules to be written that need precise knowledge of the types
|
||
in the program, for instance to detect <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a>
|
||
or <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#usediamondoperator"><code class="language-plaintext highlighter-rouge">UseDiamondOperator</code></a>.
|
||
These are just a small preview of the new rules we will be adding in the PMD 7 release cycle.</p>
|
||
|
||
<p>Overall, the changes to the parser, AST, type resolution and symbol table code has made PMD for
|
||
Java <strong>significantly faster</strong>. On average, we have seen ~2-3X faster analysis, but as usual, this may change
|
||
depending on your workload, configuration and ruleset.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/oowekyala">Clément Fournier</a> (@oowekyala),
|
||
<a href="https://github.com/adangel">Andreas Dangel</a> (@adangel),
|
||
<a href="https://github.com/jsotuyod">Juan Martín Sotuyo Dodero</a> (@jsotuyod)</p>
|
||
|
||
<div class="alert alert-info" role="alert">
|
||
<p><i class="fas fa-info-circle"></i> <b>Note:</b>
|
||
The full detailed documentation of the changes to the Java AST are available in the
|
||
<a href="pmd_userdocs_migrating_to_pmd7.html#java-ast">Migration Guide for PMD 7</a></p>
|
||
</div>
|
||
|
||
<h3 id="revamped-command-line-interface">Revamped Command Line Interface</h3>
|
||
|
||
<p>PMD now ships with a unified Command Line Interface for both Linux/Unix and Windows. Instead of having a collection
|
||
of scripts for the different utilities shipped with PMD, a single script <code class="language-plaintext highlighter-rouge">pmd</code> (<code class="language-plaintext highlighter-rouge">pmd.bat</code> for Windows) can now
|
||
launch all utilities using subcommands, e.g. <code class="language-plaintext highlighter-rouge">pmd check</code>, <code class="language-plaintext highlighter-rouge">pmd designer</code>. All commands and options are thoroughly
|
||
documented in the help, with full color support where available. Moreover, efforts were made to provide consistency
|
||
in the usage of all PMD utilities.</p>
|
||
|
||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>Usage: pmd <span class="o">[</span><span class="nt">-hV</span><span class="o">]</span> <span class="o">[</span>COMMAND]
|
||
<span class="nt">-h</span>, <span class="nt">--help</span> Show this <span class="nb">help </span>message and exit.
|
||
<span class="nt">-V</span>, <span class="nt">--version</span> Print version information and exit.
|
||
Commands:
|
||
check The PMD standard <span class="nb">source </span>code analyzer
|
||
cpd Copy/Paste Detector - find duplicate code
|
||
designer The PMD visual rule designer
|
||
cpd-gui GUI <span class="k">for </span>the Copy/Paste Detector
|
||
Warning: May not support the full CPD feature <span class="nb">set
|
||
</span>ast-dump Experimental: dumps the AST of parsing <span class="nb">source </span>code
|
||
Exit Codes:
|
||
0 Successful analysis, no violations found
|
||
1 An unexpected error occurred during execution
|
||
2 Usage error, please refer to the <span class="nb">command help
|
||
</span>4 Successful analysis, at least 1 violation found
|
||
</code></pre></div></div>
|
||
|
||
<p>For instance, where you previously would have run</p>
|
||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>run.sh pmd <span class="nt">-d</span> src <span class="nt">-R</span> ruleset.xml
|
||
</code></pre></div></div>
|
||
<p>you should now use</p>
|
||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pmd check <span class="nt">-d</span> src <span class="nt">-R</span> ruleset.xml
|
||
</code></pre></div></div>
|
||
<p>or even better, omit using <code class="language-plaintext highlighter-rouge">-d</code> / <code class="language-plaintext highlighter-rouge">--dir</code> and simply pass the sources at the end of the parameter list</p>
|
||
|
||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pmd check <span class="nt">-R</span> ruleset.xml src
|
||
</code></pre></div></div>
|
||
|
||
<p>Multiple source directories can be passed, such as:</p>
|
||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pmd check <span class="nt">-R</span> ruleset.xml src/main/java src/test/java
|
||
</code></pre></div></div>
|
||
|
||
<p>And the exact same applies to CPD:</p>
|
||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pmd cpd <span class="nt">--minimum-tokens</span> 100 src/main/java
|
||
</code></pre></div></div>
|
||
|
||
<p>Additionally, the CLI for the <code class="language-plaintext highlighter-rouge">check</code> command has been enhanced with a progress bar, which interactively displays the
|
||
current progress of the analysis.</p>
|
||
|
||
<p><img src="images/userdocs/pmd-demo.gif" alt="Demo" /></p>
|
||
|
||
<p>This can be disabled with the <code class="language-plaintext highlighter-rouge">--no-progress</code> flag.</p>
|
||
|
||
<p>Finally, we now provide a completion script for Bash/Zsh to further help daily usage.
|
||
To use it, edit your <code class="language-plaintext highlighter-rouge">~/.bashrc</code> / <code class="language-plaintext highlighter-rouge">~/.zshrc</code> file and add the following line:</p>
|
||
|
||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source <(pmd generate-completion)
|
||
</code></pre></div></div>
|
||
|
||
<p>Contributors: <a href="https://github.com/jsotuyod">Juan Martín Sotuyo Dodero</a> (@jsotuyod)</p>
|
||
|
||
<h3 id="full-antlr-support">Full Antlr support</h3>
|
||
|
||
<p>PMD 6 only supported JavaCC based grammars, but with <a href="https://www.antlr.org/">Antlr</a> parsers
|
||
can be generated as well. Languages backed by an Antlr grammar are now fully supported. This means, it’s now
|
||
possible not only to use Antlr grammars for CPD, but we can actually build full-fledged PMD rules for them as well.
|
||
Both the traditional Java visitor rules, and the simpler XPath rules are available to users. This allows
|
||
to leverage existing grammars.</p>
|
||
|
||
<p>We expect this to enable both our dev team and external contributors to largely extend PMD usage for more languages.</p>
|
||
|
||
<p>Two languages (Swift and Kotlin) already use this new possibility.</p>
|
||
|
||
<p>See the documentation page <a href="pmd_devdocs_major_adding_new_language_antlr.html">Adding a new language with ANTLR</a>
|
||
for instructions on how to use this new feature.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/lsoncini">Lucas Soncini</a> (@lsoncini),
|
||
<a href="https://github.com/matifraga">Matías Fraga</a> (@matifraga),
|
||
<a href="https://github.com/tomidelucca">Tomás De Lucca</a> (@tomidelucca)</p>
|
||
|
||
<h3 id="updated-pmd-designer">Updated PMD Designer</h3>
|
||
|
||
<p>This PMD release ships a new version of the pmd-designer. The designer artifact has been
|
||
renamed from “pmd-ui” to “pmd-designer”. While the designer still works with Java 8, the
|
||
recommended Java Runtime is Java 11 (or later) with OpenJFX 17 (or later).</p>
|
||
|
||
<p>For the detailed changes, see</p>
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd-designer/releases/tag/7.0.0">PMD Designer Changelog (7.0.0)</a>.</li>
|
||
<li><a href="https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc4">PMD Designer Changelog (7.0.0-rc4)</a>.</li>
|
||
<li><a href="https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc1">PMD Designer Changelog (7.0.0-rc1)</a>.</li>
|
||
</ul>
|
||
|
||
<h3 id="new-cpd-report-format-cpdhtml-v2xslt">New CPD report format cpdhtml-v2.xslt</h3>
|
||
|
||
<p>Thanks to @mohan-chinnappan-n a new CPD report format has been added which features a data table.
|
||
It uses an XSLT stylesheet to convert CPD’s XML format into HTML.</p>
|
||
|
||
<p>See <a href="report-examples/cpdhtml-v2.html">the example report</a>.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/mohan-chinnappan-n">Mohan Chinnappan</a> (@mohan-chinnappan-n)</p>
|
||
|
||
<h2 id="-language-related-changes">🎉 Language Related Changes</h2>
|
||
|
||
<h3 id="new-cpd-support-for-apache-velocity-template-language-vtl">New: CPD support for Apache Velocity Template Language (VTL)</h3>
|
||
|
||
<p>PMD supported Apache Velocity for a very long time, but the CPD integration never got finished.
|
||
This is now done and CPD supports Apache Velocity Template language for detecting copy and paste.
|
||
It is shipped in the module <code class="language-plaintext highlighter-rouge">pmd-velocity</code>.</p>
|
||
|
||
<h3 id="new-cpd-support-for-coco">New: CPD support for Coco</h3>
|
||
|
||
<p>Thanks to a contribution, CPD now supports Coco, a modern programming language
|
||
designed specifically for building event-driven software. It is shipped in the new
|
||
module <code class="language-plaintext highlighter-rouge">pmd-coco</code>.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</p>
|
||
|
||
<h3 id="new-cpd-support-for-julia">New: CPD support for Julia</h3>
|
||
|
||
<p>Thanks to a contribution, CPD now supports the Julia language. It is shipped
|
||
in the new module <code class="language-plaintext highlighter-rouge">pmd-julia</code>.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</p>
|
||
|
||
<h3 id="new-cpd-support-for-typescript">New: CPD support for TypeScript</h3>
|
||
|
||
<p>Thanks to a contribution, CPD now supports the TypeScript language. It is shipped
|
||
with the rest of the JavaScript support in the module <code class="language-plaintext highlighter-rouge">pmd-javascript</code>.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/pguyot">Paul Guyot</a> (@pguyot)</p>
|
||
|
||
<h3 id="new-java-21-and-22-support">New: Java 21 and 22 Support</h3>
|
||
|
||
<p>This release of PMD brings support for Java 21 and 22. There are the following new standard language features,
|
||
that are supported now:</p>
|
||
|
||
<ul>
|
||
<li><a href="https://openjdk.org/jeps/456">JEP 456: Unnamed Variables & Patterns</a> (Java 22)</li>
|
||
<li><a href="https://openjdk.org/jeps/440">JEP 440: Record Patterns</a> (Java 21)</li>
|
||
<li><a href="https://openjdk.org/jeps/441">JEP 441: Pattern Matching for switch</a> (Java 21)</li>
|
||
</ul>
|
||
|
||
<p>PMD also supports the following preview language features:</p>
|
||
|
||
<ul>
|
||
<li><a href="https://openjdk.org/jeps/447">JEP 447: Statements before super(…) (Preview)</a> (Java 22)</li>
|
||
<li><a href="https://openjdk.org/jeps/459">JEP 459: String Templates (Second Preview)</a> (Java 21 and 22)</li>
|
||
<li><a href="https://openjdk.org/jeps/463">JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview)</a> (Java 21 and 22)</li>
|
||
</ul>
|
||
|
||
<p>In order to analyze a project with PMD that uses these preview 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">22-preview</code>:</p>
|
||
|
||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export PMD_JAVA_OPTS=--enable-preview
|
||
pmd check --use-version java-22-preview ...
|
||
</code></pre></div></div>
|
||
|
||
<p>Note: Support for Java 19 and Java 20 preview language features have been removed. The versions “19-preview” and
|
||
“20-preview” are no longer available.</p>
|
||
|
||
<h3 id="new-kotlin-support">New: Kotlin support</h3>
|
||
|
||
<p>PMD now supports Kotlin as an additional language for analyzing source code. It is based on
|
||
the official kotlin Antlr grammar for Kotlin 1.8. Java-based rules and XPath-based rules are supported.</p>
|
||
|
||
<p>We are shipping the following rules:</p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_bestpractices.html#functionnametooshort"><code class="language-plaintext highlighter-rouge">FunctionNameTooShort</code></a> finds functions with a too
|
||
short name.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode"><code class="language-plaintext highlighter-rouge">OverrideBothEqualsAndHashcode</code></a> finds classes with only
|
||
either <code class="language-plaintext highlighter-rouge">equals</code> or <code class="language-plaintext highlighter-rouge">hashCode</code> overridden, but not both. This leads to unexpected behavior once instances
|
||
of such classes are used in collections (Lists, HashMaps, …).</li>
|
||
</ul>
|
||
|
||
<p>Contributors: <a href="https://github.com/jborgers">Jeroen Borgers</a> (@jborgers),
|
||
<a href="https://github.com/stokpop">Peter Paul Bakker</a> (@stokpop)</p>
|
||
|
||
<h3 id="new-swift-support">New: Swift support</h3>
|
||
|
||
<p>Given the full Antlr support, PMD now fully supports Swift for creating rules. Previously only CPD was supported.</p>
|
||
|
||
<p>Note: There is only limited support for newer Swift language features in the parser, e.g. Swift 5.9 (Macro Expansions)
|
||
are supported, but other features are not.</p>
|
||
|
||
<p>We are pleased to announce we are shipping a number of rules starting with PMD 7.</p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcecast"><code class="language-plaintext highlighter-rouge">ForceCast</code></a> flags all force casts, making sure you are
|
||
defensively considering all types. Having the application crash shouldn’t be an option.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcetry"><code class="language-plaintext highlighter-rouge">ForceTry</code></a> flags all force tries, making sure you are
|
||
defensively handling exceptions. Having the application crash shouldn’t be an option.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder"><code class="language-plaintext highlighter-rouge">ProhibitedInterfaceBuilder</code></a> flags any usage of interface
|
||
builder. Interface builder files are prone to merge conflicts, and are impossible to code review, so larger
|
||
teams usually try to avoid it or reduce its usage.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#unavailablefunction"><code class="language-plaintext highlighter-rouge">UnavailableFunction</code></a> flags any function throwing
|
||
a <code class="language-plaintext highlighter-rouge">fatalError</code> not marked as <code class="language-plaintext highlighter-rouge">@available(*, unavailable)</code> to ensure no calls are actually performed in
|
||
the codebase.</li>
|
||
</ul>
|
||
|
||
<p>Contributors: <a href="https://github.com/lsoncini">Lucas Soncini</a> (@lsoncini),
|
||
<a href="https://github.com/matifraga">Matías Fraga</a> (@matifraga),
|
||
<a href="https://github.com/tomidelucca">Tomás De Lucca</a> (@tomidelucca)</p>
|
||
|
||
<h3 id="changed-apex-support-replaced-jorje-with-fully-open-source-front-end">Changed: Apex Support: Replaced Jorje with fully open source front-end</h3>
|
||
|
||
<p>When PMD added Apex support with version 5.5.0, it utilized the Apex Jorje library to parse Apex source
|
||
and generate an AST. This library is however a binary-blob provided as part of the
|
||
<a href="https://github.com/forcedotcom/salesforcedx-vscode">Salesforce Extensions for VS Code</a>, and it is closed-source.</p>
|
||
|
||
<p>This causes problems, if binary blobs are not allowed by e.g. a company-wide policy. In that case, the Jorje
|
||
library prevented that PMD Apex could be used at all.</p>
|
||
|
||
<p>Also having access to the source code, enhancements and modifications are easier to do.</p>
|
||
|
||
<p>Under the hood, we use two open source libraries instead:</p>
|
||
|
||
<ul>
|
||
<li><a href="https://github.com/apex-dev-tools/apex-parser">apex-parser</a> originally by
|
||
<a href="https://github.com/nawforce">Kevin Jones</a> (@nawforce).
|
||
This project provides the grammar for a ANTLR based parser.</li>
|
||
<li><a href="https://github.com/google/summit-ast">Summit-AST</a> by <a href="https://github.com/google">Google</a> (@google)
|
||
This project translates the ANTLR parse tree into an AST, that is similar to the AST Jorje provided.
|
||
Note: This is not an official Google product.</li>
|
||
</ul>
|
||
|
||
<p>Although the parsers is completely switched, there are only little known changes to the AST.
|
||
These are documented in the <a href="pmd_userdocs_migrating_to_pmd7.html#apex-ast">Migration Guide for PMD 7: Apex AST</a>.
|
||
With the new Apex parser, the new language constructs like
|
||
<a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_enforce_usermode.htm">User Mode Database Operations</a>
|
||
and the new <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_NullCoalescingOperator.htm">Null Coalescing Operator <code class="language-plaintext highlighter-rouge">??</code></a>
|
||
can be parsed now. PMD should be able to parse Apex code up to version 60.0 (Spring ‘24).</p>
|
||
|
||
<p>See <a href="https://github.com/pmd/pmd/issues/3766">#3766</a> for details.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google),
|
||
<a href="https://github.com/eklimo">Edward Klimoshenko</a> (@eklimo)</p>
|
||
|
||
<h3 id="changed-cpp-can-now-ignore-identifiers-in-sequences-cpd">Changed: CPP can now ignore identifiers in sequences (CPD)</h3>
|
||
|
||
<ul>
|
||
<li>New command line option for CPD: <code class="language-plaintext highlighter-rouge">--ignore-sequences</code>.</li>
|
||
<li>This option is used for CPP only: with the already existing option <code class="language-plaintext highlighter-rouge">--ignore-literal-sequences</code>, only
|
||
literals were ignored. The new option additionally ignores identifiers as well in sequences.</li>
|
||
<li>See <a href="https://github.com/pmd/pmd/pull/4470">PR #4470</a> for details.</li>
|
||
</ul>
|
||
|
||
<h3 id="changed-groovy-support-cpd">Changed: Groovy Support (CPD)</h3>
|
||
|
||
<ul>
|
||
<li>We now support parsing all Groovy features from Groovy 3 and 4.</li>
|
||
<li>We now support <a href="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.</li>
|
||
<li>See <a href="https://github.com/pmd/pmd/pull/4726">PR #4726</a> for details.</li>
|
||
</ul>
|
||
|
||
<h3 id="changed-html-support">Changed: HTML support</h3>
|
||
|
||
<p>Support for HTML was introduced in PMD 6.55.0 as an experimental feature. With PMD 7.0.0 this
|
||
is now considered stable.</p>
|
||
|
||
<h3 id="changed-javascript-support">Changed: JavaScript support</h3>
|
||
|
||
<p>The JS specific parser options have been removed. The parser now always retains comments and uses version ES6.
|
||
The language module registers a couple of different versions. The latest version, which supports ES6 and also some
|
||
new constructs (see <a href="https://github.com/mozilla/rhino">Rhino</a>), is the default. This should be fine for most
|
||
use cases.</p>
|
||
|
||
<h3 id="changed-language-versions">Changed: Language versions</h3>
|
||
|
||
<p>We revisited the versions that were defined by each language module. Now many more versions are defined for each
|
||
language. In general, you can expect that PMD can parse all these different versions. There might be situations
|
||
where this fails and this can be considered a bug. Usually the latest version is selected as the default
|
||
language version.</p>
|
||
|
||
<p>The language versions can be used to mark rules to be useful only for a specific language version via
|
||
the <code class="language-plaintext highlighter-rouge">minimumLanguageVersion</code> and <code class="language-plaintext highlighter-rouge">maximumLanguageVersion</code> attributes. While this feature is currently only used by
|
||
the Java module, listing all possible versions enables other languages as well to use this feature.</p>
|
||
|
||
<p>Related issue: <a href="https://github.com/pmd/pmd/issues/4120">[core] Explicitly name all language versions (#4120)</a></p>
|
||
|
||
<h3 id="changed-rule-properties">Changed: Rule properties</h3>
|
||
|
||
<ul>
|
||
<li>The old deprecated classes like <code class="language-plaintext highlighter-rouge">IntProperty</code> and <code class="language-plaintext highlighter-rouge">StringProperty</code> have been removed. Please use
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties.</li>
|
||
<li>All properties which accept multiple values now use a comma (<code class="language-plaintext highlighter-rouge">,</code>) as a delimiter. The previous default was a
|
||
pipe character (<code class="language-plaintext highlighter-rouge">|</code>). The delimiter is not configurable anymore. If needed, the comma can be escaped
|
||
with a backslash.</li>
|
||
<li>The <code class="language-plaintext highlighter-rouge">min</code> and <code class="language-plaintext highlighter-rouge">max</code> attributes in property definitions in the XML are now optional and can appear separately
|
||
or be omitted.</li>
|
||
</ul>
|
||
|
||
<h3 id="changed-velocity-template-language-vtl">Changed: Velocity Template Language (VTL)</h3>
|
||
|
||
<p>The module was named just “vm” which was not a good name. Its module name, language id and
|
||
package names have been renamed to “velocity”.</p>
|
||
|
||
<p>If you import rules, you also need to adjust the paths, e.g.</p>
|
||
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">category/vm/...</code> ➡️ <code class="language-plaintext highlighter-rouge">category/velocity/...</code></li>
|
||
</ul>
|
||
|
||
<h3 id="changed-visualforce">Changed: Visualforce</h3>
|
||
|
||
<p>There was an inconsistency between the naming of the maven module and the language id. The language id
|
||
used the abbreviation “vf”, while the maven module used the longer name “visualforce”. This has been
|
||
solved by renaming the language module to its full name “visualforce”. The java packages have
|
||
been renamed as well.</p>
|
||
|
||
<p>If you import rules, you also need to adjust the paths, e.g.</p>
|
||
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">category/vf/security.xml</code> ➡️ <code class="language-plaintext highlighter-rouge">category/visualforce/security.xml</code></li>
|
||
</ul>
|
||
|
||
<h2 id="-new-and-changed-rules">🌟 New and changed rules</h2>
|
||
|
||
<h3 id="new-rules">New Rules</h3>
|
||
|
||
<p><strong>Apex</strong></p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithhighcostinloop"><code class="language-plaintext highlighter-rouge">OperationWithHighCostInLoop</code></a> finds Schema class methods called in a loop, which is a
|
||
potential performance issue.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#unusedmethod"><code class="language-plaintext highlighter-rouge">UnusedMethod</code></a> finds unused methods in your code.</li>
|
||
</ul>
|
||
|
||
<p><strong>Java</strong></p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a> reports boxing and unboxing conversions that may be made implicit.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#useexplicittypes"><code class="language-plaintext highlighter-rouge">UseExplicitTypes</code></a> reports usages of <code class="language-plaintext highlighter-rouge">var</code> keyword, which was introduced with Java 10.</li>
|
||
</ul>
|
||
|
||
<p><strong>Kotlin</strong></p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_bestpractices.html#functionnametooshort"><code class="language-plaintext highlighter-rouge">FunctionNameTooShort</code></a> finds functions with a too short name.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode"><code class="language-plaintext highlighter-rouge">OverrideBothEqualsAndHashcode</code></a> finds classes with only
|
||
either <code class="language-plaintext highlighter-rouge">equals</code> or <code class="language-plaintext highlighter-rouge">hashCode</code> overridden, but not both. This leads to unexpected behavior once instances
|
||
of such classes are used in collections (Lists, HashMaps, …).</li>
|
||
</ul>
|
||
|
||
<p><strong>Swift</strong></p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcecast"><code class="language-plaintext highlighter-rouge">ForceCast</code></a> flags all force casts, making sure you are
|
||
defensively considering all types. Having the application crash shouldn’t be an option.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcetry"><code class="language-plaintext highlighter-rouge">ForceTry</code></a> flags all force tries, making sure you are
|
||
defensively handling exceptions. Having the application crash shouldn’t be an option.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder"><code class="language-plaintext highlighter-rouge">ProhibitedInterfaceBuilder</code></a> flags any usage of interface
|
||
builder. Interface builder files are prone to merge conflicts, and are impossible to code review, so larger
|
||
teams usually try to avoid it or reduce its usage.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#unavailablefunction"><code class="language-plaintext highlighter-rouge">UnavailableFunction</code></a> flags any function throwing
|
||
a <code class="language-plaintext highlighter-rouge">fatalError</code> not marked as <code class="language-plaintext highlighter-rouge">@available(*, unavailable)</code> to ensure no calls are actually performed in
|
||
the codebase.</li>
|
||
</ul>
|
||
|
||
<p><strong>XML</strong></p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_xml_bestpractices.html#missingencoding"><code class="language-plaintext highlighter-rouge">MissingEncoding</code></a> finds XML files without explicit encoding.</li>
|
||
</ul>
|
||
|
||
<h3 id="changed-rules">Changed Rules</h3>
|
||
|
||
<p><strong>General changes</strong></p>
|
||
|
||
<ul>
|
||
<li>All statistical rules (like ExcessiveClassLength, ExcessiveParameterList) have been simplified and unified.
|
||
The properties <code class="language-plaintext highlighter-rouge">topscore</code> and <code class="language-plaintext highlighter-rouge">sigma</code> have been removed. The property <code class="language-plaintext highlighter-rouge">minimum</code> is still there, however the type is not
|
||
a decimal number anymore but has been changed to an integer. This affects rules in the languages Apex, Java, PLSQL
|
||
and Velocity Template Language (velocity):
|
||
<ul>
|
||
<li>Apex: <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#excessiveclasslength"><code class="language-plaintext highlighter-rouge">ExcessiveClassLength</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#excessiveparameterlist"><code class="language-plaintext highlighter-rouge">ExcessiveParameterList</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#excessivepubliccount"><code class="language-plaintext highlighter-rouge">ExcessivePublicCount</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#ncssconstructorcount"><code class="language-plaintext highlighter-rouge">NcssConstructorCount</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#ncssmethodcount"><code class="language-plaintext highlighter-rouge">NcssMethodCount</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#ncsstypecount"><code class="language-plaintext highlighter-rouge">NcssTypeCount</code></a></li>
|
||
<li>Java: <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#excessiveimports"><code class="language-plaintext highlighter-rouge">ExcessiveImports</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#excessiveparameterlist"><code class="language-plaintext highlighter-rouge">ExcessiveParameterList</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#excessivepubliccount"><code class="language-plaintext highlighter-rouge">ExcessivePublicCount</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#switchdensity"><code class="language-plaintext highlighter-rouge">SwitchDensity</code></a></li>
|
||
<li>PLSQL: <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#excessivemethodlength"><code class="language-plaintext highlighter-rouge">ExcessiveMethodLength</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#excessiveobjectlength"><code class="language-plaintext highlighter-rouge">ExcessiveObjectLength</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#excessivepackagebodylength"><code class="language-plaintext highlighter-rouge">ExcessivePackageBodyLength</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#excessivepackagespecificationlength"><code class="language-plaintext highlighter-rouge">ExcessivePackageSpecificationLength</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#excessiveparameterlist"><code class="language-plaintext highlighter-rouge">ExcessiveParameterList</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#excessivetypelength"><code class="language-plaintext highlighter-rouge">ExcessiveTypeLength</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#ncssmethodcount"><code class="language-plaintext highlighter-rouge">NcssMethodCount</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#ncssobjectcount"><code class="language-plaintext highlighter-rouge">NcssObjectCount</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_plsql_design.html#npathcomplexity"><code class="language-plaintext highlighter-rouge">NPathComplexity</code></a></li>
|
||
<li>Velocity: <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_velocity_design.html#excessivetemplatelength"><code class="language-plaintext highlighter-rouge">ExcessiveTemplateLength</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>The general property <code class="language-plaintext highlighter-rouge">violationSuppressXPath</code> which is available for all rules to
|
||
<a href="pmd_userdocs_suppressing_warnings.html">suppress warnings</a> now uses XPath version 3.1 by default.
|
||
This version of the XPath language is mostly identical to XPath 2.0. In PMD 6, XPath 1.0 has been used.
|
||
If you upgrade from PMD 6, you need to verify your <code class="language-plaintext highlighter-rouge">violationSuppressXPath</code> properties.</li>
|
||
</ul>
|
||
|
||
<p><strong>Apex General changes</strong></p>
|
||
|
||
<ul>
|
||
<li>The properties <code class="language-plaintext highlighter-rouge">cc_categories</code>, <code class="language-plaintext highlighter-rouge">cc_remediation_points_multiplier</code>, <code class="language-plaintext highlighter-rouge">cc_block_highlighting</code> have been removed
|
||
from all rules. These properties have been deprecated since PMD 6.13.0.
|
||
See <a href="https://github.com/pmd/pmd/issues/1648">issue #1648</a> for more details.</li>
|
||
</ul>
|
||
|
||
<p><strong>Apex Codestyle</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#methodnamingconventions"><code class="language-plaintext highlighter-rouge">MethodNamingConventions</code></a>: The deprecated rule property <code class="language-plaintext highlighter-rouge">skipTestMethodUnderscores</code> has
|
||
been removed. It was actually deprecated since PMD 6.15.0, but was not mentioned in the release notes
|
||
back then. Use the property <code class="language-plaintext highlighter-rouge">testPattern</code> instead to configure valid names for test methods.</li>
|
||
</ul>
|
||
|
||
<p><strong>Java General changes</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>Violations reported on methods or classes previously reported the line range of the entire method
|
||
or class. With PMD 7.0.0, the reported location is now just the identifier of the method or class.
|
||
This affects various rules, e.g. <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cognitivecomplexity"><code class="language-plaintext highlighter-rouge">CognitiveComplexity</code></a>.</p>
|
||
|
||
<p>The report location is controlled by the overrides of the method <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#getReportLocation()"><code>Node#getReportLocation</code></a>
|
||
in different node types.</p>
|
||
|
||
<p>See <a href="https://github.com/pmd/pmd/issues/4439">issue #4439</a> and <a href="https://github.com/pmd/pmd/issues/730">issue #730</a>
|
||
for more details.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Java Best Practices</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#arrayisstoreddirectly"><code class="language-plaintext highlighter-rouge">ArrayIsStoredDirectly</code></a>: Violations are now reported on the assignment and not
|
||
anymore on the formal parameter. The reported line numbers will probably move.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#avoidreassigningloopvariables"><code class="language-plaintext highlighter-rouge">AvoidReassigningLoopVariables</code></a>: This rule might not report anymore all
|
||
reassignments of the control variable in for-loops when the property <code class="language-plaintext highlighter-rouge">forReassign</code> is set to <code class="language-plaintext highlighter-rouge">skip</code>.
|
||
See <a href="https://github.com/pmd/pmd/issues/4500">issue #4500</a> for more details.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#loosecoupling"><code class="language-plaintext highlighter-rouge">LooseCoupling</code></a>: The rule has a new property to allow some types to be coupled
|
||
to (<code class="language-plaintext highlighter-rouge">allowedTypes</code>).</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#unusedlocalvariable"><code class="language-plaintext highlighter-rouge">UnusedLocalVariable</code></a>: This rule has some important false-negatives fixed
|
||
and finds many more cases now. For details see issues <a href="https://github.com/pmd/pmd/issues/2130">#2130</a>,
|
||
<a href="https://github.com/pmd/pmd/issues/4516">#4516</a>, and <a href="https://github.com/pmd/pmd/issues/4517">#4517</a>.</li>
|
||
</ul>
|
||
|
||
<p><strong>Java Codestyle</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#methodnamingconventions"><code class="language-plaintext highlighter-rouge">MethodNamingConventions</code></a>: The property <code class="language-plaintext highlighter-rouge">checkNativeMethods</code> has been removed. The
|
||
property was deprecated since PMD 6.3.0. Use the property <code class="language-plaintext highlighter-rouge">nativePattern</code> to control whether native methods
|
||
should be considered or not.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#shortvariable"><code class="language-plaintext highlighter-rouge">ShortVariable</code></a>: This rule now also reports short enum constant names.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#usediamondoperator"><code class="language-plaintext highlighter-rouge">UseDiamondOperator</code></a>: The property <code class="language-plaintext highlighter-rouge">java7Compatibility</code> has been removed. The rule now
|
||
handles Java 7 properly without a property.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname"><code class="language-plaintext highlighter-rouge">UnnecessaryFullyQualifiedName</code></a>: The rule has two new properties,
|
||
to selectively disable reporting on static field and method qualifiers. The rule also has been improved
|
||
to be more precise.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#uselessparentheses"><code class="language-plaintext highlighter-rouge">UselessParentheses</code></a>: The rule has two new properties which control how strict
|
||
the rule should be applied. With <code class="language-plaintext highlighter-rouge">ignoreClarifying</code> (default: true) parentheses that are strictly speaking
|
||
not necessary are allowed, if they separate expressions of different precedence.
|
||
The other property <code class="language-plaintext highlighter-rouge">ignoreBalancing</code> (default: true) is similar, in that it allows parentheses that help
|
||
reading and understanding the expressions.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a>: The rule has a new property to allow empty blocks when
|
||
they contain a comment (<code class="language-plaintext highlighter-rouge">allowCommentedBlocks</code>).</li>
|
||
</ul>
|
||
|
||
<p><strong>Java Design</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cyclomaticcomplexity"><code class="language-plaintext highlighter-rouge">CyclomaticComplexity</code></a>: The property <code class="language-plaintext highlighter-rouge">reportLevel</code> has been removed. The property was
|
||
deprecated since PMD 6.0.0. The report level can now be configured separated for classes and methods using
|
||
<code class="language-plaintext highlighter-rouge">classReportLevel</code> and <code class="language-plaintext highlighter-rouge">methodReportLevel</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#immutablefield"><code class="language-plaintext highlighter-rouge">ImmutableField</code></a>: The property <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> has been removed. The property was
|
||
deprecated since PMD 6.52.0.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#lawofdemeter"><code class="language-plaintext highlighter-rouge">LawOfDemeter</code></a>: The rule has a new property <code class="language-plaintext highlighter-rouge">trustRadius</code>. This defines the maximum degree
|
||
of trusted data. The default of 1 is the most restrictive.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#npathcomplexity"><code class="language-plaintext highlighter-rouge">NPathComplexity</code></a>: The property <code class="language-plaintext highlighter-rouge">minimum</code> has been removed. It was deprecated since PMD 6.0.0.
|
||
Use the property <code class="language-plaintext highlighter-rouge">reportLevel</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#singularfield"><code class="language-plaintext highlighter-rouge">SingularField</code></a>: The properties <code class="language-plaintext highlighter-rouge">checkInnerClasses</code> and <code class="language-plaintext highlighter-rouge">disallowNotAssignment</code> have been removed.
|
||
The rule is now more precise and will check these cases properly.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#useutilityclass"><code class="language-plaintext highlighter-rouge">UseUtilityClass</code></a>: The property <code class="language-plaintext highlighter-rouge">ignoredAnnotations</code> has been removed.</li>
|
||
</ul>
|
||
|
||
<p><strong>Java Documentation</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_documentation.html#commentcontent"><code class="language-plaintext highlighter-rouge">CommentContent</code></a>: The properties <code class="language-plaintext highlighter-rouge">caseSensitive</code> and <code class="language-plaintext highlighter-rouge">disallowedTerms</code> are removed. The
|
||
new property <code class="language-plaintext highlighter-rouge">forbiddenRegex</code> can be used now to define the disallowed terms with a single regular
|
||
expression.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_documentation.html#commentrequired"><code class="language-plaintext highlighter-rouge">CommentRequired</code></a>:
|
||
<ul>
|
||
<li>Overridden methods are now detected even without the <code class="language-plaintext highlighter-rouge">@Override</code>
|
||
annotation. This is relevant for the property <code class="language-plaintext highlighter-rouge">methodWithOverrideCommentRequirement</code>.
|
||
See also <a href="https://github.com/pmd/pmd/pull/3757">pull request #3757</a>.</li>
|
||
<li>Elements in annotation types are now detected as well. This might lead to an increased number of violations
|
||
for missing public method comments.</li>
|
||
<li>The deprecated property <code class="language-plaintext highlighter-rouge">headerCommentRequirement</code> has been removed. Use the property <code class="language-plaintext highlighter-rouge">classCommentRequirement</code>
|
||
instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_documentation.html#commentsize"><code class="language-plaintext highlighter-rouge">CommentSize</code></a>: When determining the line-length of a comment, the leading comment
|
||
prefix markers (e.g. <code class="language-plaintext highlighter-rouge">*</code> or <code class="language-plaintext highlighter-rouge">//</code>) are ignored and don’t add up to the line-length.
|
||
See also <a href="https://github.com/pmd/pmd/pull/4369">pull request #4369</a>.</li>
|
||
</ul>
|
||
|
||
<p><strong>Java Error Prone</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#avoidduplicateliterals"><code class="language-plaintext highlighter-rouge">AvoidDuplicateLiterals</code></a>: The property <code class="language-plaintext highlighter-rouge">exceptionfile</code> has been removed. The property was
|
||
deprecated since PMD 6.10.0. Use the property <code class="language-plaintext highlighter-rouge">exceptionList</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#dontimportsun"><code class="language-plaintext highlighter-rouge">DontImportSun</code></a>: <code class="language-plaintext highlighter-rouge">sun.misc.Signal</code> is not special-cased anymore.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#emptycatchblock"><code class="language-plaintext highlighter-rouge">EmptyCatchBlock</code></a>: <code class="language-plaintext highlighter-rouge">CloneNotSupportedException</code> and <code class="language-plaintext highlighter-rouge">InterruptedException</code> are not
|
||
special-cased anymore. Rename the exception parameter to <code class="language-plaintext highlighter-rouge">ignored</code> to ignore them.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#implicitswitchfallthrough"><code class="language-plaintext highlighter-rouge">ImplicitSwitchFallThrough</code></a>: Violations are now reported on the case statements
|
||
rather than on the switch statements. This is more accurate but might result in more violations now.</li>
|
||
<li><a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#nonserializableclass"><code class="language-plaintext highlighter-rouge">NonSerializableClass</code></a>: The deprecated property <code class="language-plaintext highlighter-rouge">prefix</code> has been removed
|
||
without replacement. In a serializable class all fields have to be serializable regardless of the name.</li>
|
||
</ul>
|
||
|
||
<h3 id="deprecated-rules">Deprecated Rules</h3>
|
||
|
||
<p>In PMD 7.0.0, there are no deprecated rules.</p>
|
||
|
||
<h3 id="removed-rules">Removed Rules</h3>
|
||
|
||
<p>The following previously deprecated rules have been finally removed:</p>
|
||
|
||
<p><strong>Apex</strong></p>
|
||
|
||
<ul>
|
||
<li>performance.xml/AvoidSoqlInLoops <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop"><code class="language-plaintext highlighter-rouge">OperationWithLimitsInLoop</code></a></li>
|
||
<li>performance.xml/AvoidSoslInLoops <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop"><code class="language-plaintext highlighter-rouge">OperationWithLimitsInLoop</code></a></li>
|
||
<li>performance.xml/AvoidDmlStatementsInLoops <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop"><code class="language-plaintext highlighter-rouge">OperationWithLimitsInLoop</code></a></li>
|
||
<li>codestyle.xml/VariableNamingConventions <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a>, <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a>,
|
||
or <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#propertynamingconventions"><code class="language-plaintext highlighter-rouge">PropertyNamingConventions</code></a></li>
|
||
<li>security.xml/ApexCSRF <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_errorprone.html#apexcsrf"><code class="language-plaintext highlighter-rouge">ApexCSRF</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>Java</strong></p>
|
||
|
||
<ul>
|
||
<li>codestyle.xml/AbstractNaming <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#classnamingconventions"><code class="language-plaintext highlighter-rouge">ClassNamingConventions</code></a></li>
|
||
<li>codestyle.xml/AvoidFinalLocalVariable <span style="font-size: small;">(deleted)</span> ➡️ not replaced</li>
|
||
<li>codestyle.xml/AvoidPrefixingMethodParameters <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a></li>
|
||
<li>performance.xml/AvoidUsingShortType <span style="font-size: small;">(deleted)</span> ➡️ not replaced</li>
|
||
<li>errorprone.xml/BadComparison <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#comparisonwithnan"><code class="language-plaintext highlighter-rouge">ComparisonWithNaN</code></a></li>
|
||
<li>errorprone.xml/BeanMembersShouldSerialize <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#nonserializableclass"><code class="language-plaintext highlighter-rouge">NonSerializableClass</code></a></li>
|
||
<li>performance.xml/BooleanInstantiation <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a>
|
||
and <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a></li>
|
||
<li>performance.xml/ByteInstantiation <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a>
|
||
and <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a></li>
|
||
<li>errorprone.xml/CloneThrowsCloneNotSupportedException <span style="font-size: small;">(deleted)</span> ➡️ not replaced</li>
|
||
<li>errorprone.xml/DataflowAnomalyAnalysis <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#unusedassignment"><code class="language-plaintext highlighter-rouge">UnusedAssignment</code></a></li>
|
||
<li>codestyle.xml/DefaultPackage <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier"><code class="language-plaintext highlighter-rouge">CommentDefaultAccessModifier</code></a></li>
|
||
<li>errorprone.xml/DoNotCallSystemExit <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#donotterminatevm"><code class="language-plaintext highlighter-rouge">DoNotTerminateVM</code></a></li>
|
||
<li>codestyle.xml/DontImportJavaLang <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a></li>
|
||
<li>codestyle.xml/DuplicateImports <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a></li>
|
||
<li>errorprone.xml/EmptyFinallyBlock <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptyIfStmt <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptyInitializer <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptyStatementBlock <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptyStatementNotInLoop <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessarysemicolon"><code class="language-plaintext highlighter-rouge">UnnecessarySemicolon</code></a></li>
|
||
<li>errorprone.xml/EmptySwitchStatements <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptySynchronizedBlock <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptyTryBlock <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>errorprone.xml/EmptyWhileStmt <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement"><code class="language-plaintext highlighter-rouge">EmptyControlStatement</code></a></li>
|
||
<li>design.xml/ExcessiveClassLength <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount"><code class="language-plaintext highlighter-rouge">NcssCount</code></a></li>
|
||
<li>design.xml/ExcessiveMethodLength <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount"><code class="language-plaintext highlighter-rouge">NcssCount</code></a></li>
|
||
<li>codestyle.xml/ForLoopsMustUseBraces <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#controlstatementbraces"><code class="language-plaintext highlighter-rouge">ControlStatementBraces</code></a></li>
|
||
<li>codestyle.xml/IfElseStmtsMustUseBraces <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#controlstatementbraces"><code class="language-plaintext highlighter-rouge">ControlStatementBraces</code></a></li>
|
||
<li>codestyle.xml/IfStmtsMustUseBraces <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#controlstatementbraces"><code class="language-plaintext highlighter-rouge">ControlStatementBraces</code></a></li>
|
||
<li>errorprone.xml/ImportFromSamePackage <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a></li>
|
||
<li>performance.xml/IntegerInstantiation <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a>
|
||
and <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a></li>
|
||
<li>errorprone.xml/InvalidSlf4jMessageFormat <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#invalidlogmessageformat"><code class="language-plaintext highlighter-rouge">InvalidLogMessageFormat</code></a></li>
|
||
<li>errorprone.xml/LoggerIsNotStaticFinal <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#properlogger"><code class="language-plaintext highlighter-rouge">ProperLogger</code></a></li>
|
||
<li>performance.xml/LongInstantiation <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a>
|
||
and <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a></li>
|
||
<li>codestyle.xml/MIsLeadingVariableName <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a>,
|
||
or <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a></li>
|
||
<li>errorprone.xml/MissingBreakInSwitch <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#implicitswitchfallthrough"><code class="language-plaintext highlighter-rouge">ImplicitSwitchFallThrough</code></a></li>
|
||
<li>design.xml/ModifiedCyclomaticComplexity <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cyclomaticcomplexity"><code class="language-plaintext highlighter-rouge">CyclomaticComplexity</code></a></li>
|
||
<li>design.xml/NcssConstructorCount <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount"><code class="language-plaintext highlighter-rouge">NcssCount</code></a></li>
|
||
<li>design.xml/NcssMethodCount <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount"><code class="language-plaintext highlighter-rouge">NcssCount</code></a></li>
|
||
<li>design.xml/NcssTypeCount <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount"><code class="language-plaintext highlighter-rouge">NcssCount</code></a></li>
|
||
<li>bestpractices.xml/PositionLiteralsFirstInCaseInsensitiveComparisons <span style="font-size: small;">(deleted)</span> ➡️
|
||
use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#literalsfirstincomparisons"><code class="language-plaintext highlighter-rouge">LiteralsFirstInComparisons</code></a></li>
|
||
<li>bestpractices.xml/PositionLiteralsFirstInComparisons <span style="font-size: small;">(deleted)</span> ➡️
|
||
use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#literalsfirstincomparisons"><code class="language-plaintext highlighter-rouge">LiteralsFirstInComparisons</code></a></li>
|
||
<li>errorprone.xml/ReturnEmptyArrayRatherThanNull <span style="font-size: small;">(deleted)</span> ➡️
|
||
use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#returnemptycollectionratherthannull"><code class="language-plaintext highlighter-rouge">ReturnEmptyCollectionRatherThanNull</code></a></li>
|
||
<li>performance.xml/ShortInstantiation <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a>
|
||
and <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation"><code class="language-plaintext highlighter-rouge">PrimitiveWrapperInstantiation</code></a></li>
|
||
<li>design.xml/SimplifyBooleanAssertion <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a></li>
|
||
<li>performance.xml/SimplifyStartsWith <span style="font-size: small;">(deleted)</span> ➡️ not replaced</li>
|
||
<li>design.xml/StdCyclomaticComplexity <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cyclomaticcomplexity"><code class="language-plaintext highlighter-rouge">CyclomaticComplexity</code></a></li>
|
||
<li>codestyle.xml/SuspiciousConstantFieldName <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a></li>
|
||
<li>performance.xml/UnnecessaryWrapperObjectCreation <span style="font-size: small;">(deleted)</span> ➡️ use the new rule <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing"><code class="language-plaintext highlighter-rouge">UnnecessaryBoxing</code></a></li>
|
||
<li>multithreading.xml/UnsynchronizedStaticDateFormatter <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_multithreading.html#unsynchronizedstaticformatter"><code class="language-plaintext highlighter-rouge">UnsynchronizedStaticFormatter</code></a></li>
|
||
<li>bestpractices.xml/UnusedImports <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport"><code class="language-plaintext highlighter-rouge">UnnecessaryImport</code></a></li>
|
||
<li>bestpractices.xml/UseAssertEqualsInsteadOfAssertTrue <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a></li>
|
||
<li>bestpractices.xml/UseAssertNullInsteadOfAssertEquals <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a></li>
|
||
<li>bestpractices.xml/UseAssertSameInsteadOfAssertEquals <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a></li>
|
||
<li>bestpractices.xml/UseAssertTrueInsteadOfAssertEquals <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion"><code class="language-plaintext highlighter-rouge">SimplifiableTestAssertion</code></a></li>
|
||
<li>codestyle.xml/VariableNamingConventions <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#fieldnamingconventions"><code class="language-plaintext highlighter-rouge">FieldNamingConventions</code></a>,
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#formalparameternamingconventions"><code class="language-plaintext highlighter-rouge">FormalParameterNamingConventions</code></a>, or <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#localvariablenamingconventions"><code class="language-plaintext highlighter-rouge">LocalVariableNamingConventions</code></a></li>
|
||
<li>codestyle.xml/WhileLoopsMustUseBraces <span style="font-size: small;">(deleted)</span> ➡️ use <a href="https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#controlstatementbraces"><code class="language-plaintext highlighter-rouge">ControlStatementBraces</code></a></li>
|
||
</ul>
|
||
|
||
<h3 id="removed-rulesets">Removed rulesets</h3>
|
||
|
||
<p>The following previously deprecated rulesets have been removed. These were the left-over rulesets from PMD 5.
|
||
The rules have been moved into categories with PMD 6.</p>
|
||
|
||
<ul>
|
||
<li>rulesets/apex/apexunit.xml</li>
|
||
<li>rulesets/apex/braces.xml</li>
|
||
<li>rulesets/apex/complexity.xml</li>
|
||
<li>rulesets/apex/empty.xml</li>
|
||
<li>rulesets/apex/metrics.xml</li>
|
||
<li>rulesets/apex/performance.xml</li>
|
||
<li>rulesets/apex/ruleset.xml</li>
|
||
<li>rulesets/apex/securty.xml</li>
|
||
<li>rulesets/apex/style.xml</li>
|
||
<li>rulesets/java/android.xml</li>
|
||
<li>rulesets/java/basic.xml</li>
|
||
<li>rulesets/java/clone.xml</li>
|
||
<li>rulesets/java/codesize.xml</li>
|
||
<li>rulesets/java/comments.xml</li>
|
||
<li>rulesets/java/controversial.xml</li>
|
||
<li>rulesets/java/coupling.xml</li>
|
||
<li>rulesets/java/design.xml</li>
|
||
<li>rulesets/java/empty.xml</li>
|
||
<li>rulesets/java/finalizers.xml</li>
|
||
<li>rulesets/java/imports.xml</li>
|
||
<li>rulesets/java/j2ee.xml</li>
|
||
<li>rulesets/java/javabeans.xml</li>
|
||
<li>rulesets/java/junit.xml</li>
|
||
<li>rulesets/java/logging-jakarta-commons.xml</li>
|
||
<li>rulesets/java/logging-java.xml</li>
|
||
<li>rulesets/java/metrics.xml</li>
|
||
<li>rulesets/java/migrating.xml</li>
|
||
<li>rulesets/java/migrating_to_13.xml</li>
|
||
<li>rulesets/java/migrating_to_14.xml</li>
|
||
<li>rulesets/java/migrating_to_15.xml</li>
|
||
<li>rulesets/java/migrating_to_junit4.xml</li>
|
||
<li>rulesets/java/naming.xml</li>
|
||
<li>rulesets/java/optimizations.xml</li>
|
||
<li>rulesets/java/strictexception.xml</li>
|
||
<li>rulesets/java/strings.xml</li>
|
||
<li>rulesets/java/sunsecure.xml</li>
|
||
<li>rulesets/java/typeresolution.xml</li>
|
||
<li>rulesets/java/unnecessary.xml</li>
|
||
<li>rulesets/java/unusedcode.xml</li>
|
||
<li>rulesets/ecmascript/basic.xml</li>
|
||
<li>rulesets/ecmascript/braces.xml</li>
|
||
<li>rulesets/ecmascript/controversial.xml</li>
|
||
<li>rulesets/ecmascript/unnecessary.xml</li>
|
||
<li>rulesets/jsp/basic.xml</li>
|
||
<li>rulesets/jsp/basic-jsf.xml</li>
|
||
<li>rulesets/plsql/codesize.xml</li>
|
||
<li>rulesets/plsql/dates.xml</li>
|
||
<li>rulesets/plsql/strictsyntax.xml</li>
|
||
<li>rulesets/plsql/TomKytesDespair.xml</li>
|
||
<li>rulesets/vf/security.xml</li>
|
||
<li>rulesets/vm/basic.xml</li>
|
||
<li>rulesets/pom/basic.xml</li>
|
||
<li>rulesets/xml/basic.xml</li>
|
||
<li>rulesets/xsl/xpath.xml</li>
|
||
<li>rulesets/releases/*</li>
|
||
</ul>
|
||
|
||
<h2 id="-compatibility-and-migration-notes">💥 Compatibility and Migration Notes</h2>
|
||
|
||
<div class="alert alert-info" role="alert">
|
||
<p><i class="fas fa-info-circle"></i> <b>Note:</b>
|
||
The full detailed documentation of the changes are available in the
|
||
<a href="pmd_userdocs_migrating_to_pmd7.html">Migration Guide for PMD 7</a></p>
|
||
</div>
|
||
|
||
<h3 id="for-endusers">For endusers</h3>
|
||
|
||
<ul>
|
||
<li>PMD 7 requires Java 8 or above to execute.</li>
|
||
<li>CLI changed: Custom scripts need to be updated (<code class="language-plaintext highlighter-rouge">run.sh pmd ...</code> ➡️ <code class="language-plaintext highlighter-rouge">pmd check ...</code>, <code class="language-plaintext highlighter-rouge">run.sh cpd ...</code> ➡️ <code class="language-plaintext highlighter-rouge">pmd cpd ...</code>).</li>
|
||
<li>Java module revamped: Custom rules need to be updated.</li>
|
||
<li>Removed rules: Custom rulesets need to be reviewed. See above for a list of new and removed rules.</li>
|
||
<li>XPath 1.0 and 2.0 support is removed, <code class="language-plaintext highlighter-rouge">violationSuppressXPath</code> now requires XPath 3.1: Custom rulesets need
|
||
to be reviewed.</li>
|
||
<li>Custom rules using rulechains: Need to override <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#buildTargetSelector()"><code>AbstractRule#buildTargetSelector</code></a>
|
||
using <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleTargetSelector.html#forTypes(java.lang.Class,java.lang.Class...)"><code>RuleTargetSelector#forTypes</code></a>.</li>
|
||
<li>
|
||
<p>The asset filenames of PMD on <a href="https://github.com/pmd/pmd/releases">GitHub Releases</a> are
|
||
now <code class="language-plaintext highlighter-rouge">pmd-dist-<version>-bin.zip</code>, <code class="language-plaintext highlighter-rouge">pmd-dist-<version>-src.zip</code> and <code class="language-plaintext highlighter-rouge">pmd-dist-<version>-doc.zip</code>.
|
||
Keep that in mind, if you have an automated download script.</p>
|
||
|
||
<p>The structure inside the ZIP files stay the same, e.g. we still provide inside the binary distribution
|
||
ZIP file the base directory <code class="language-plaintext highlighter-rouge">pmd-bin-<version></code>.</p>
|
||
</li>
|
||
<li>For maven-pmd-plugin usage, see <a href="pmd_userdocs_tools_maven.html#using-pmd-7-with-maven-pmd-plugin">Using PMD 7 with maven-pmd-plugin</a>.</li>
|
||
<li>For gradle users, at least gradle 8.6 is required for PMD 7.</li>
|
||
</ul>
|
||
|
||
<h3 id="for-integrators">For integrators</h3>
|
||
|
||
<ul>
|
||
<li>PMD 7 is a major release where many things have been moved or rewritten.</li>
|
||
<li>All integrators will require some level of change to adapt to the change in the API.</li>
|
||
<li>For more details look at the deprecations notes of the past PMD 6 releases. These are collected below
|
||
under <a href="#api-changes">API Changes</a>.</li>
|
||
<li>The PMD Ant tasks, which were previously in the module <code class="language-plaintext highlighter-rouge">pmd-core</code> has been moved into its own module <code class="language-plaintext highlighter-rouge">pmd-ant</code>,
|
||
which needs to be added explicitly now as an additional dependency.</li>
|
||
<li>The CLI classes have also been moved out of <code class="language-plaintext highlighter-rouge">pmd-core</code> into its own module <code class="language-plaintext highlighter-rouge">pmd-cli</code>. The old entry point, the
|
||
main class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> is gone.</li>
|
||
</ul>
|
||
|
||
<h2 id="-api">🚨 API</h2>
|
||
|
||
<p>The API of PMD has been growing over the years and needed some cleanup. The goal is, to
|
||
have a clear separation between a well-defined API and the implementation, which is internal.
|
||
This should help us in future development.</p>
|
||
|
||
<p>This however entails some incompatibilities and deprecations.</p>
|
||
|
||
<p>See <a href="pmd_projectdocs_decisions_adr_3.html">ADR 3 - API evolution principles</a> and
|
||
<a href="#api-changes">API changes</a> below.</p>
|
||
|
||
<h3 id="small-changes-and-cleanups">Small Changes and cleanups</h3>
|
||
|
||
<ul>
|
||
<li>
|
||
<p><a href="https://github.com/pmd/pmd/issues/1648">#1648</a>: [apex,vf] Remove CodeClimate dependency - <a href="https://github.com/rsoesemann">Robert Sösemann</a>
|
||
Properties “cc_categories”, “cc_remediation_points_multiplier”, “cc_block_highlighting” can no longer be overridden in rulesets.
|
||
They were deprecated without replacement.</p>
|
||
</li>
|
||
<li>
|
||
<p>The old GUI applications accessible through <code class="language-plaintext highlighter-rouge">run.sh designerold</code> and <code class="language-plaintext highlighter-rouge">run.sh bgastviewer</code>
|
||
(and corresponding Batch scripts) have been removed from the PMD distribution. Please use the newer rule designer
|
||
with <code class="language-plaintext highlighter-rouge">pmd designer</code>. The corresponding classes in packages <code class="language-plaintext highlighter-rouge">java.net.sourceforge.pmd.util.viewer</code> and
|
||
<code class="language-plaintext highlighter-rouge">java.net.sourceforge.pmd.util.designer</code> have all been removed.</p>
|
||
</li>
|
||
<li>
|
||
<p>All API related to XPath support has been moved to the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.xpath</code></a>.
|
||
This includes API that was previously dispersed over <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang</code>, <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ast.xpath</code>,
|
||
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.rule.xpath</code>, <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.rule</code>, and various language-specific packages
|
||
(which were made internal).</p>
|
||
</li>
|
||
<li>
|
||
<p>The implementation of the Ant integration has been moved from the module <code class="language-plaintext highlighter-rouge">pmd-core</code> to a new module <code class="language-plaintext highlighter-rouge">pmd-ant</code>.
|
||
This involves classes in package <a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/package-summary.html#"><code>net.sourceforge.pmd.ant</code></a>. The ant CPDTask class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.CPDTask</code>
|
||
has been moved into the same package <a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/package-summary.html#"><code>net.sourceforge.pmd.ant</code></a>. You’ll need to update your taskdef entries in your
|
||
build.xml files with the FQCN <a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/CPDTask.html#"><code>net.sourceforge.pmd.ant.CPDTask</code></a> if you use it anywhere.</p>
|
||
</li>
|
||
<li>
|
||
<p>Utility classes in <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a>, that have previously marked as <code class="language-plaintext highlighter-rouge">@InternalApi</code> have been finally
|
||
moved to an internal sub package and are now longer available.
|
||
This includes ClasspathClassLoader, FileFinder, FileUtil, and IOUtil.</p>
|
||
</li>
|
||
<li>The following utility classes in <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a> are now considered public API:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/AssertionUtil.html#"><code>AssertionUtil</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/CollectionUtil.html#"><code>CollectionUtil</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/ContextedAssertionError.html#"><code>ContextedAssertionError</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/ContextedStackOverflowError.html#"><code>ContextedStackOverflowError</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/GraphUtil.html#"><code>GraphUtil</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/IteratorUtil.html#"><code>IteratorUtil</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/StringUtil.html#"><code>StringUtil</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>Moved the two classes <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/AntlrCpdLexer.html#"><code>AntlrCpdLexer</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/JavaccCpdLexer.html#"><code>JavaccCpdLexer</code></a> from
|
||
<code class="language-plaintext highlighter-rouge">internal</code> package into package <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/package-summary.html#"><code>net.sourceforge.pmd.cpd.impl</code></a>. These two classes are part of the API and
|
||
are base classes for CPD language implementations. Since 7.0.0-rc2.
|
||
Note: These two classes have been previously called “AntlrTokenizer” and “JavaCCTokenizer”.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">AntlrBaseRule</code> is gone in favor of <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractVisitorRule.html#"><code>AbstractVisitorRule</code></a>. Since 7.0.0-rc2.</li>
|
||
<li>The classes <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.kotlin.ast.KotlinInnerNode</code> and
|
||
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.swift.ast.SwiftInnerNode</code> are package-private now. Since 7.0.0-rc2.</li>
|
||
</ul>
|
||
|
||
<h3 id="xpath-31-support">XPath 3.1 support</h3>
|
||
|
||
<p>Support for XPath versions 1.0, 1.0-compatibility, 2.0 was removed. The default
|
||
(and only) supported XPath version is now XPath 3.1. This version of the XPath language is mostly identical to
|
||
XPath 2.0.</p>
|
||
|
||
<p>Notable changes:</p>
|
||
<ul>
|
||
<li>The deprecated support for sequence-valued attributes is removed. Sequence-valued properties are still supported.</li>
|
||
<li>Refer to <a href="https://www.saxonica.com/html/documentation/expressions/xpath31new.html">the Saxonica documentation</a> for
|
||
an introduction to new features in XPath 3.1.</li>
|
||
</ul>
|
||
|
||
<h3 id="node-stream-api-for-ast-traversal">Node stream API for AST traversal</h3>
|
||
|
||
<p>This version includes a powerful API to navigate trees, similar in usage to the Java 8 Stream API:</p>
|
||
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">node</span><span class="o">.</span><span class="na">descendants</span><span class="o">(</span><span class="nc">ASTMethodCall</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
|
||
<span class="o">.</span><span class="na">filter</span><span class="o">(</span><span class="n">m</span> <span class="o">-></span> <span class="s">"toString"</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">m</span><span class="o">.</span><span class="na">getMethodName</span><span class="o">()))</span>
|
||
<span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">m</span> <span class="o">-></span> <span class="n">m</span><span class="o">.</span><span class="na">getQualifier</span><span class="o">())</span>
|
||
<span class="o">.</span><span class="na">filter</span><span class="o">(</span><span class="n">q</span> <span class="o">-></span> <span class="nc">TypeTestUtil</span><span class="o">.</span><span class="na">isA</span><span class="o">(</span><span class="nc">String</span><span class="o">.</span><span class="na">class</span><span class="o">,</span> <span class="n">q</span><span class="o">))</span>
|
||
<span class="o">.</span><span class="na">foreach</span><span class="o">(</span><span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">::</span><span class="n">println</span><span class="o">);</span>
|
||
</code></pre></div></div>
|
||
|
||
<p>A pipeline like shown here traverses the tree lazily, which is more efficient than traversing eagerly to put all
|
||
descendants in a list. It is also much easier to change than the old imperative way.</p>
|
||
|
||
<p>To make this API as accessible as possible, the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface has been fitted with new
|
||
methods producing node streams. Those methods replace previous tree traversal methods like <code class="language-plaintext highlighter-rouge">Node#findDescendantsOfType</code>.
|
||
In all cases, they should be more efficient and more convenient.</p>
|
||
|
||
<p>See <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/NodeStream.html#"><code>NodeStream</code></a> for more details.</p>
|
||
|
||
<p>Contributors: <a href="https://github.com/oowekyala">Clément Fournier</a> (@oowekyala)</p>
|
||
|
||
<h3 id="metrics-framework">Metrics framework</h3>
|
||
|
||
<p>The metrics framework has been made simpler and more general.</p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>The metric interface takes an additional type parameter, representing the result type of the metric. This is
|
||
usually <code class="language-plaintext highlighter-rouge">Integer</code> or <code class="language-plaintext highlighter-rouge">Double</code>. It avoids widening the result to a <code class="language-plaintext highlighter-rouge">double</code> just to narrow it down.</p>
|
||
|
||
<p>This makes it so, that <code class="language-plaintext highlighter-rouge">Double.NaN</code> is not an appropriate sentinel value to represent “not supported” anymore.
|
||
Instead, <code class="language-plaintext highlighter-rouge">computeFor</code> may return <code class="language-plaintext highlighter-rouge">null</code> in that case (or a garbage value). The value <code class="language-plaintext highlighter-rouge">null</code> may have caused
|
||
problems with the narrowing casts, which through unboxing, might have thrown an NPE. But when we deprecated
|
||
the language-specific metrics façades to replace them with the generic <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/MetricsUtil.html#"><code>MetricsUtil</code></a>,
|
||
we took care of making
|
||
the new methods throw an exception if the metric cannot be computed on the parameter. This forces you to guard
|
||
calls to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/MetricsUtil.html#computeMetric(net.sourceforge.pmd.lang.metrics.Metric,N)"><code>MetricsUtil#computeMetric</code></a> (and other overloads)
|
||
with something like <code class="language-plaintext highlighter-rouge">if (metric.supports(node))</code>. If you’re following
|
||
this pattern, then you won’t observe the undefined behavior.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code class="language-plaintext highlighter-rouge">MetricKey</code> interface is not so useful and has been merged into the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a>
|
||
interface and removed. So the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a> interface has the new method
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#displayName()"><code>displayName</code></a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>The framework is not tied to at most 2 node types per language anymore. Previously those were nodes for
|
||
classes and for methods/constructors. Instead, many metrics support more node types. For example, NCSS can
|
||
be computed on any code block.</p>
|
||
|
||
<p>For that reason, keeping around a hard distinction between “class metrics” and “operation metrics” is not
|
||
useful. So in the Java framework for example, we removed the interfaces <code class="language-plaintext highlighter-rouge">JavaClassMetric</code>, <code class="language-plaintext highlighter-rouge">JavaOperationMetric</code>,
|
||
abstract classes for those, <code class="language-plaintext highlighter-rouge">JavaClassMetricKey</code>, and <code class="language-plaintext highlighter-rouge">JavaOperationMetricKey</code>. Metric constants are now all
|
||
inside the <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/metrics/JavaMetrics.html#"><code>JavaMetrics</code></a> utility class. The same was done in the Apex framework.</p>
|
||
|
||
<p>We don’t really need abstract classes for metrics now. So <code class="language-plaintext highlighter-rouge">AbstractMetric</code> is also removed from pmd-core.
|
||
There is a factory method on the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a> interface to create a metric easily.</p>
|
||
</li>
|
||
<li>
|
||
<p>This makes it so, that <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/LanguageMetricsProvider.html#"><code>LanguageMetricsProvider</code></a> does not need type parameters.
|
||
It can just return a <code class="language-plaintext highlighter-rouge">Set<Metric<?, ?>></code> to list available metrics.</p>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/metrics/Signature.html#"><code>Signature</code></a>s, their implementations, and the interface <code class="language-plaintext highlighter-rouge">SignedNode</code> have been
|
||
removed. Node streams allow replacing their usages very easily.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<h3 id="testing-framework">Testing framework</h3>
|
||
|
||
<ul>
|
||
<li>PMD 7 has been upgraded to use JUnit 5 only. That means, that JUnit4 related classes have been removed, namely
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.testframework.PMDTestRunner</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.testframework.RuleTestRunner</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.testframework.TestDescriptor</code></li>
|
||
</ul>
|
||
</li>
|
||
<li>Rule tests, that use <a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/SimpleAggregatorTst.html#"><code>SimpleAggregatorTst</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/PmdRuleTst.html#"><code>PmdRuleTst</code></a> work as before without change, but use
|
||
now JUnit5 under the hood. If you added additional JUnit4 tests to your rule test classes, then you’ll
|
||
need to upgrade them to use JUnit5.</li>
|
||
</ul>
|
||
|
||
<h3 id="language-lifecycle-and-language-properties">Language Lifecycle and Language Properties</h3>
|
||
|
||
<ul>
|
||
<li>Language modules now provide a proper lifecycle and can store global information. This enables the implementation
|
||
of multifile analysis.</li>
|
||
<li>Language modules can define <a href="pmd_languages_configuration.html">custom language properties</a>
|
||
which can be set via environment variables. This allows to add and use language specific configuration options
|
||
without the need to change pmd-core.</li>
|
||
</ul>
|
||
|
||
<p>The documentation page has been updated:
|
||
<a href="pmd_devdocs_major_adding_new_language_javacc.html">Adding a new language with JavaCC</a>
|
||
and <a href="pmd_devdocs_major_adding_new_language_antlr.html">Adding a new language with ANTLR</a></p>
|
||
|
||
<p>Related issue: <a href="https://github.com/pmd/pmd/issues/3782">[core] Language lifecycle (#3782)</a></p>
|
||
|
||
<h3 id="rule-properties">Rule properties</h3>
|
||
|
||
<ul>
|
||
<li>The old deprecated classes like <code class="language-plaintext highlighter-rouge">IntProperty</code> and <code class="language-plaintext highlighter-rouge">StringProperty</code> have been removed. Please use
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties.</li>
|
||
<li>All properties which accept multiple values now use a comma (<code class="language-plaintext highlighter-rouge">,</code>) as a delimiter. The previous default was a
|
||
pipe character (<code class="language-plaintext highlighter-rouge">|</code>). The delimiter is not configurable anymore. If needed, the comma can be escaped
|
||
with a backslash.</li>
|
||
<li>The <code class="language-plaintext highlighter-rouge">min</code> and <code class="language-plaintext highlighter-rouge">max</code> attributes in property definitions in the XML are now optional and can appear separately
|
||
or be omitted.</li>
|
||
</ul>
|
||
|
||
<h3 id="new-programmatic-api-for-cpd">New Programmatic API for CPD</h3>
|
||
|
||
<p>This release introduces a new programmatic API to replace the old class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#"><code>CPD</code></a>. The new API uses a similar model to
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#"><code>PmdAnalysis</code></a> and is called <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdAnalysis.html#"><code>CpdAnalysis</code></a>. Programmatic execution of CPD should now be
|
||
done with a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#"><code>CPDConfiguration</code></a> and a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdAnalysis.html#"><code>CpdAnalysis</code></a>, for instance:</p>
|
||
|
||
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">CPDConfiguration</span> <span class="n">config</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">CPDConfiguration</span><span class="o">();</span>
|
||
<span class="n">config</span><span class="o">.</span><span class="na">setMinimumTileSize</span><span class="o">(</span><span class="mi">100</span><span class="o">);</span>
|
||
<span class="n">config</span><span class="o">.</span><span class="na">setOnlyRecognizeLanguage</span><span class="o">(</span><span class="n">config</span><span class="o">.</span><span class="na">getLanguageRegistry</span><span class="o">().</span><span class="na">getLanguageById</span><span class="o">(</span><span class="s">"java"</span><span class="o">));</span>
|
||
<span class="n">config</span><span class="o">.</span><span class="na">setSourceEncoding</span><span class="o">(</span><span class="nc">StandardCharsets</span><span class="o">.</span><span class="na">UTF_8</span><span class="o">);</span>
|
||
<span class="n">config</span><span class="o">.</span><span class="na">addInputPath</span><span class="o">(</span><span class="nc">Path</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="s">"src/main/java"</span><span class="o">)</span>
|
||
|
||
<span class="n">config</span><span class="o">.</span><span class="na">setIgnoreAnnotations</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
|
||
<span class="n">config</span><span class="o">.</span><span class="na">setIgnoreLiterals</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
|
||
|
||
<span class="n">config</span><span class="o">.</span><span class="na">setRendererName</span><span class="o">(</span><span class="s">"text"</span><span class="o">);</span>
|
||
|
||
<span class="k">try</span> <span class="o">(</span><span class="nc">CpdAnalysis</span> <span class="n">cpd</span> <span class="o">=</span> <span class="nc">CpdAnalysis</span><span class="o">.</span><span class="na">create</span><span class="o">(</span><span class="n">config</span><span class="o">))</span> <span class="o">{</span>
|
||
<span class="c1">// note: don't use `config` once a CpdAnalysis has been created.</span>
|
||
<span class="c1">// optional: add more files</span>
|
||
<span class="n">cpd</span><span class="o">.</span><span class="na">files</span><span class="o">().</span><span class="na">addFile</span><span class="o">(</span><span class="nc">Paths</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">"src"</span><span class="o">,</span> <span class="s">"main"</span><span class="o">,</span> <span class="s">"more-java"</span><span class="o">,</span> <span class="s">"ExtraSource.java"</span><span class="o">));</span>
|
||
|
||
<span class="n">cpd</span><span class="o">.</span><span class="na">performAnalysis</span><span class="o">();</span>
|
||
<span class="o">}</span>
|
||
</code></pre></div></div>
|
||
|
||
<p>CPD can of course still be called via command line or using the module <code class="language-plaintext highlighter-rouge">pmd-cli</code>. But for tight integration
|
||
this new programmatic API is recommended.</p>
|
||
|
||
<p>See <a href="https://github.com/pmd/pmd/pull/4397">PR #4397</a> for details.</p>
|
||
|
||
<h3 id="api-changes">API changes</h3>
|
||
|
||
<h4 id="700">7.0.0</h4>
|
||
|
||
<p>These are the changes between 7.0.0-rc4 and final 7.0.0.</p>
|
||
|
||
<p><strong>pmd-java</strong></p>
|
||
|
||
<ul>
|
||
<li>Support for Java 20 preview language features have been removed. The version “20-preview” is no longer available.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#"><code>ASTPattern</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#"><code>ASTRecordPattern</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#"><code>ASTTypePattern</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnnamedPattern.html#"><code>ASTUnnamedPattern</code></a>
|
||
<ul>
|
||
<li>method <code class="language-plaintext highlighter-rouge">getParenthesisDepth()</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplateFragment.html#"><code>ASTTemplateFragment</code></a>: To get the content of the template, use now
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplateFragment.html#getContent()"><code>getContent</code></a> or <code class="language-plaintext highlighter-rouge">@Content</code> instead of <code class="language-plaintext highlighter-rouge">getImage()</code>/<code class="language-plaintext highlighter-rouge">@Image</code>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnnamedPattern.html#"><code>ASTUnnamedPattern</code></a> is not experimental anymore. The language feature
|
||
has been standardized with Java 22.</li>
|
||
</ul>
|
||
|
||
<p><strong>New API</strong></p>
|
||
|
||
<p>The API around <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/treeexport/TreeRenderer.html#"><code>TreeRenderer</code></a> has been declared as stable. It was previously
|
||
experimental. It can be used via the CLI subcommand <code class="language-plaintext highlighter-rouge">ast-dump</code> or programmatically, as described
|
||
on <a href="pmd_userdocs_extending_ast_dump.html">Creating XML dump of the AST</a>.</p>
|
||
|
||
<p><strong>General AST Changes to avoid <code class="language-plaintext highlighter-rouge">@Image</code></strong></p>
|
||
|
||
<p>See <a href="pmd_userdocs_migrating_to_pmd7.html#general-ast-changes-to-avoid-image">General AST Changes to avoid @Image</a>
|
||
in the migration guide for details.</p>
|
||
|
||
<p><strong>XPath Rules</strong></p>
|
||
|
||
<ul>
|
||
<li>The property <code class="language-plaintext highlighter-rouge">version</code> was already deprecated and has finally been removed. Please don’t define the version
|
||
property anymore in your custom XPath rules. By default, the latest XPath version will be used, which
|
||
is XPath 3.1.</li>
|
||
</ul>
|
||
|
||
<p><strong>Moved classes/consolidated packages</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li>Many types have been moved from the base package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd</code> into subpackage <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/package-summary.html#"><code>net.sourceforge.pmd.lang.rule</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/Rule.html#"><code>Rule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RulePriority.html#"><code>RulePriority</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#"><code>RuleSet</code></a></li>
|
||
<li><code class="language-plaintext highlighter-rouge">RuleSetFactory</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>RuleSetLoader</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoadException.html#"><code>RuleSetLoadException</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetWriter.html#"><code>RuleSetWriter</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>Many types have been moved from the base package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd</code> into subpackage <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/package-summary.html#"><code>net.sourceforge.pmd.reporting</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#"><code>Report</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleContext.html#"><code>RuleContext</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#"><code>RuleViolation</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/ViolationSuppressor.html#"><code>ViolationSuppressor</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/XPathRule.html#"><code>XPathRule</code></a> has been moved into subpackage <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.xpath</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-html
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.html.ast.HtmlCpdLexer</code> moved into package <code class="language-plaintext highlighter-rouge">cpd</code>: <a href="https://docs.pmd-code.org/apidocs/pmd-html/7.0.0/net/sourceforge/pmd/lang/html/cpd/HtmlCpdLexer.html#"><code>HtmlCpdLexer</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-lang-test: All types have been moved under the new base package <a href="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/package-summary.html#"><code>net.sourceforge.pmd.lang.test</code></a>:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/AbstractMetricTestRule.html#"><code>AbstractMetricTestRule</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.test.AbstractMetricTestRule</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/BaseTextComparisonTest.html#"><code>BaseTextComparisonTest</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.test.BaseTextComparisonTest</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/cpd/CpdTextComparisonTest.html#"><code>CpdTextComparisonTest</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.test.CpdTextComparisonTest</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/ast/BaseTreeDumpTest.html#"><code>BaseTreeDumpTest</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest</code>)</li>
|
||
<li>And many other types have been moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ast.test</code> to <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.test</code>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-scala
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/cpd/ScalaCpdLexer.html#"><code>ScalaCpdLexer</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.scala.cpd.ScalaCpdLexer</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/cpd/ScalaTokenAdapter.html#"><code>ScalaTokenAdapter</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.scala.cpd.ScalaTokenAdapter</code>)</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-test
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/lang/rule/AbstractRuleSetFactoryTest.html#"><code>AbstractRuleSetFactoryTest</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.rule.AbstractRuleSetFactoryTest</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/AbstractAntTestHelper.html#"><code>AbstractAntTestHelper</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.ant.AbstractAntTestHelper</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/AbstractLanguageVersionTest.html#"><code>AbstractLanguageVersionTest</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.AbstractLanguageVersionTest</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/PmdRuleTst.html#"><code>PmdRuleTst</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.testframework.PmdRuleTst</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/RuleTst.html#"><code>RuleTst</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.testframework.RuleTst</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/SimpleAggregatorTst.html#"><code>SimpleAggregatorTst</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.testframework.SimpleAggregatorTst</code>)</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-xml
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.0.0/net/sourceforge/pmd/lang/xml/pom/PomLanguageModule.html#"><code>PomLanguageModule</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.pom.PomLanguageModule</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.0.0/net/sourceforge/pmd/lang/xml/wsdl/WsdlLanguageModule.html#"><code>WsdlLanguageModule</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.wsdl.WsdlLanguageModule</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.0.0/net/sourceforge/pmd/lang/xml/xsl/XslLanguageModule.html#"><code>XslLanguageModule</code></a> (moved from <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.xsl.XslLanguageModule</code>)</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-visualforce
|
||
<ul>
|
||
<li>The package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vf</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/package-summary.html#"><code>net.sourceforge.pmd.lang.visualforce</code></a>.</li>
|
||
<li>The language id of visualforce has been changed to <code class="language-plaintext highlighter-rouge">visualforce</code> (it was previously just “vf”)</li>
|
||
<li>The ruleset changed: <code class="language-plaintext highlighter-rouge">category/vf/security.xml</code> ➡️ <code class="language-plaintext highlighter-rouge">category/visualforce/security.xml</code></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-velocity (renamed from pmd-vm)
|
||
<ul>
|
||
<li>The package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vm</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/package-summary.html#"><code>net.sourceforge.pmd.lang.velocity</code></a>.</li>
|
||
<li>The language id of the Velocity module has been changed to <code class="language-plaintext highlighter-rouge">velocity</code> (it was previously just “vm”)</li>
|
||
<li>The rulesets changed: <code class="language-plaintext highlighter-rouge">category/vm/...</code> ➡️ <code class="language-plaintext highlighter-rouge">category/velocity/...</code></li>
|
||
<li>Many classes used the prefix <code class="language-plaintext highlighter-rouge">Vm</code>, e.g. <code class="language-plaintext highlighter-rouge">VmLanguageModule</code>. This has been changed to be <code class="language-plaintext highlighter-rouge">Vtl</code>:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/VtlLanguageModule.html#"><code>VtlLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlParser.html#"><code>VtlParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/cpd/VtlCpdLexer.html#"><code>VtlCpdLexer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/rule/AbstractVtlRule.html#"><code>AbstractVtlRule</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Internalized classes and interfaces and methods</strong></p>
|
||
|
||
<p>The following classes/methods have been marked as @<!-- -->InternalApi before and are now moved into a <code class="language-plaintext highlighter-rouge">internal</code>
|
||
package or made (package) private and are <em>not accessible</em> anymore.</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.AbstractAnalysisCache</code> (moved to internal, now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.AnalysisCache</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.AnalysisCacheListener</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.AnalysisResult</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.CachedRuleMapper</code> (moved to internal, now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.CachedRuleViolation</code> (moved to internal, now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.ChecksumAware</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.FileAnalysisCache</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cache.NoopAnalysisCache</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.ResourceLoader</code> (moved to internal)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/Tokens.html#"><code>net.sourceforge.pmd.cpd.Tokens</code></a>
|
||
<ul>
|
||
<li>Constructor is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageProcessor.AnalysisTask.html#"><code>net.sourceforge.pmd.lang.LanguageProcessor.AnalysisTask</code></a>
|
||
<ul>
|
||
<li>Constructor is now package private.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">withFiles(java.util.List)</code> is now package private. Note: it was not previously marked with @<!-- -->InternalApi.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleTargetSelector.html#"><code>net.sourceforge.pmd.lang.rule.RuleTargetSelector</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">isRuleChain()</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/AbstractAccumulatingRenderer.html#"><code>net.sourceforge.pmd.renderers.AbstractAccumulatingRenderer</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/AbstractAccumulatingRenderer.html#renderFileReport(net.sourceforge.pmd.reporting.Report)"><code>renderFileReport</code></a> - this method is now final
|
||
and can’t be overridden anymore.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#"><code>net.sourceforge.pmd.reporting.Report</code></a>
|
||
<ul>
|
||
<li>Constructor as well as the methods <code class="language-plaintext highlighter-rouge">addRuleViolation</code>, <code class="language-plaintext highlighter-rouge">addConfigError</code>, <code class="language-plaintext highlighter-rouge">addError</code> are now private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleContext.html#"><code>net.sourceforge.pmd.reporting.RuleContext</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getRule()</code> is now package private.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">create(FileAnalysisListener listener, Rule rule)</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.rules.RuleFactory</code>: moved into subpackage <code class="language-plaintext highlighter-rouge">lang.rule</code> and made package private.
|
||
It has now been hidden completely from public API.</li>
|
||
<li>Many types have been moved from into subpackage <code class="language-plaintext highlighter-rouge">lang.rule.internal</code>.
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSetReference</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSetReferenceId</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.RuleSets</code></li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.rule.ParametricRuleViolation</code> is now package private and moved to <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.reporting.ParametricRuleViolation</code>.
|
||
The only public API is <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#"><code>RuleViolation</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#"><code>net.sourceforge.pmd.lang.rule.RuleSet</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">applies(Rule,LanguageVersion)</code> is now package private.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">applies(TextFile)</code> has been removed.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">applies(FileId)</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>net.sourceforge.pmd.lang.rule.RuleSetLoader</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">loadRuleSetsWithoutException(java.util.List)</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoadException.html#"><code>net.sourceforge.pmd.lang.rule.RuleSetLoadException</code></a>
|
||
<ul>
|
||
<li>All constructors are package private now.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/LexException.html#"><code>net.sourceforge.pmd.lang.ast.LexException</code></a> - the constructor <code class="language-plaintext highlighter-rouge">LexException(boolean, String, int, int, String, char)</code> is now package private.
|
||
It is only used by JavaCC-generated token managers.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>net.sourceforge.pmd.PMDConfiguration</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">setAnalysisCache(AnalysisCache)</code> is now package private. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setAnalysisCacheLocation(java.lang.String)"><code>setAnalysisCacheLocation</code></a> instead.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getAnalysisCache()</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#"><code>net.sourceforge.pmd.lang.document.FileCollector</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">newCollector(LanguageVersionDiscoverer, PmdReporter)</code> is now package private.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">newCollector(PmdReporter)</code> is now package private.</li>
|
||
<li>In order to create a FileCollector, use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#files()"><code>files</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/Attribute.html#"><code>net.sourceforge.pmd.lang.rule.xpath.Attribute</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">replacementIfDeprecated()</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertyTypeId</code> - moved in subpackage <code class="language-plaintext highlighter-rouge">internal</code>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>net.sourceforge.pmd.properties.PropertyDescriptor</code></a> - method <code class="language-plaintext highlighter-rouge">getTypeId()</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-doc
|
||
<ul>
|
||
<li>The whole maven module <code class="language-plaintext highlighter-rouge">pmd-doc</code> is now considered internal API even though it was not declared so before.
|
||
It’s used to generate the rule documentation for the built-in rules.</li>
|
||
<li>All the classes have been moved into package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.doc.internal</code>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-ant
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/Formatter.html#"><code>net.sourceforge.pmd.ant.Formatter</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getRenderer()</code> has been removed.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">start(String)</code> is private now.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">end(Report)</code> has been removed.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">isNoOutputSupplied()</code> is now package private.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">newListener(Project)</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/PMDTask.html#"><code>net.sourceforge.pmd.ant.PMDTask</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getRelativizeRoots()</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.ant.ReportException</code> is now package private. Note: It was not marked with @<!-- -->InternalApi before.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-apex
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>net.sourceforge.pmd.lang.apex.ast.ApexNode</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getNode()</code> has been removed. It was only deprecated before and not marked with @<!-- -->InternalApi.
|
||
However, it gave access to the wrapped Jorje node and was thus internal API.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.ast.AbstractApexNode</code>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getNode()</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/multifile/ApexMultifileAnalysis.html#"><code>net.sourceforge.pmd.lang.apex.multifile.ApexMultifileAnalysis</code></a>
|
||
<ul>
|
||
<li>Constructor is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.rule.design.AbstractNcssCountRule</code> (now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.rule.AbstractApexUnitTestRule</code> (moved to package <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.apex.rule.bestpractices</code>, now package private)</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.rule.AbstractIgnoredAnnotationRule</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.types.ast.LazyTypeResolver</code> (moved to internal)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/JMethodSig.html#"><code>net.sourceforge.pmd.lang.java.types.JMethodSig</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">internalApi()</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/TypeOps.html#"><code>net.sourceforge.pmd.lang.java.types.TypeOps</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">isSameTypeInInference(JTypeMirror,JTypeMirror)</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-jsp
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspParser.html#"><code>net.sourceforge.pmd.lang.jsp.ast.JspParser</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getTokenBehavior()</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-modelica
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/InternalApiBridge.html#"><code>net.sourceforge.pmd.lang.modelica.ast.InternalApiBridge</code></a> renamed from <code class="language-plaintext highlighter-rouge">InternalModelicaNodeApi</code>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/resolver/InternalApiBridge.html#"><code>net.sourceforge.pmd.lang.modelica.resolver.InternalApiBridge</code></a> renamed from <code class="language-plaintext highlighter-rouge">InternalModelicaResolverApi</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.resolver.ModelicaSymbolFacade</code> has been removed.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.resolver.ResolutionContext</code> (moved to internal)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.resolver.ResolutionState</code> (moved to internal). Note: it was not previously marked with @<!-- -->InternalApi.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.resolver.Watchdog</code> (moved to internal). Note: it was not previously marked with @<!-- -->InternalApi.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-plsql
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.plsql.rule.design.AbstractNcssCountRule</code> is now package private.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-scala
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/ScalaLanguageModule.html#"><code>net.sourceforge.pmd.lang.scala.ScalaLanguageModule</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">dialectOf(LanguageVersion)</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Removed classes and members (previously deprecated)</strong></p>
|
||
|
||
<p>The annotation <code class="language-plaintext highlighter-rouge">@DeprecatedUntil700</code> has been removed.</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLanguageProperties.html#"><code>CpdLanguageProperties</code></a>. The field <code class="language-plaintext highlighter-rouge">DEFAULT_SKIP_BLOCKS_PATTERN</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/antlr4/BaseAntlrNode.html#"><code>BaseAntlrNode</code></a> - method <code class="language-plaintext highlighter-rouge">joinTokenText()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> - many methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">getNthParent(int)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors()"><code>ancestors</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.ancestors().get(n-1)</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">getFirstParentOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors(java.lang.Class)"><code>ancestors</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.ancestors(parentType).first()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">getParentsOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors(java.lang.Class)"><code>ancestors</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.ancestors(parentType).toList()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">findChildrenOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#children(java.lang.Class)"><code>children</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.children(childType).toList()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">findDescendantsOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.descendants(targetType).toList()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">findDescendantsOfType(Class,boolean)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.descendants(targetType).crossFindBoundaries(b).toList()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">getFirstChildOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#firstChild(java.lang.Class)"><code>firstChild</code></a> instead</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getFirstDescendantOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.descendants(targetType).first()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">hasDescendantOfType(Class)</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.descendants(targetType).nonEmpty()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">findChildNodesWithXPath(String)</code> - Use the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/NodeStream.html#"><code>NodeStream</code></a> API instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/GenericNode.html#"><code>GenericNode</code></a> - method <code class="language-plaintext highlighter-rouge">getNthParent(int)</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors()"><code>ancestors</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">node.ancestors().get(n-1)</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#"><code>FileCollector</code></a> - method <code class="language-plaintext highlighter-rouge">addZipFile(java.nio.file.Path)</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)"><code>addZipFileWithContent</code></a> instead</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#"><code>TextDocument</code></a> - method <code class="language-plaintext highlighter-rouge">readOnlyString(CharSequence,String,LanguageVersion)</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#readOnlyString(java.lang.CharSequence,net.sourceforge.pmd.lang.document.FileId,net.sourceforge.pmd.lang.LanguageVersion)"><code>readOnlyString</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> - method <code class="language-plaintext highlighter-rouge">dataSourceCompat(DataSource,PMDConfiguration)</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> directly, e.g. <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#forPath(java.nio.file.Path,java.nio.charset.Charset,net.sourceforge.pmd.lang.LanguageVersion)"><code>forPath</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/XPathVersion.html#"><code>XPathVersion</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">XPATH_1_0</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">XPATH_1_0_COMPATIBILITY</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">XPATH_2_0</code></li>
|
||
<li>Only XPath version 3.1 is now supported. This version of the XPath language is mostly identical to
|
||
XPath 2.0. XPath rules by default use now <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/XPathVersion.html#XPATH_3_1"><code>XPATH_3_1</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.rule.AbstractDelegateRule</code> removed. It has been merged with <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>RuleReference</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#"><code>AbstractRule</code></a> - the following methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">deepCopyValuesTo(AbstractRule)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#deepCopy()"><code>deepCopy</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">addRuleChainVisit(Class)</code> - override <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#buildTargetSelector()"><code>buildTargetSelector</code></a> in order to register nodes for rule chain visits.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">addViolation(...)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleContext.html#addViolation(net.sourceforge.pmd.lang.ast.Node)"><code>addViolation</code></a> instead, e.g. via <code class="language-plaintext highlighter-rouge">asCtx(data).addViolation(...)</code>.
|
||
Note: These methods were only marked as deprecated in javadoc.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">addViolationWithMessage(...)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleContext.html#addViolationWithMessage(net.sourceforge.pmd.lang.ast.Node,java.lang.String)"><code>addViolationWithMessage</code></a> instead, e.g. via
|
||
<code class="language-plaintext highlighter-rouge">asCtx(data).addViolationWithMessage(...)</code>. Note: These methods were only marked as deprecated in javadoc.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>RuleReference</code></a> - the following methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">setRuleSetReference(RuleSetReference)</code> - without replacement. Just construct new <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>RuleReference</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">hasOverriddenProperty(PropertyDescriptor)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#isPropertyOverridden(net.sourceforge.pmd.properties.PropertyDescriptor)"><code>isPropertyOverridden</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/XPathRule.html#"><code>XPathRule</code></a>
|
||
<ul>
|
||
<li>The constant <code class="language-plaintext highlighter-rouge">XPATH_DESCRIPTOR</code> has been made private and is not accessible anymore.</li>
|
||
<li>The default constructor has been made package-private and is not accessible anymore.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#"><code>Language</code></a> - method <code class="language-plaintext highlighter-rouge">getTerseName()</code> removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#getId()"><code>getId</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageModuleBase.html#"><code>LanguageModuleBase</code></a> - method <code class="language-plaintext highlighter-rouge">getTerseName()</code> removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageModuleBase.html#getId()"><code>getId</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#"><code>LanguageRegistry</code></a> - the following methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">getLanguage(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#getLanguageByFullName(java.lang.String)"><code>getLanguageByFullName</code></a>
|
||
via <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#PMD"><code>PMD</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#CPD"><code>CPD</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">findLanguageByTerseName(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#getLanguageById(java.lang.String)"><code>getLanguageById</code></a>
|
||
via <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#PMD"><code>PMD</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#CPD"><code>CPD</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">findByExtension(String)</code> - removed without replacement.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionDiscoverer.html#"><code>LanguageVersionDiscoverer</code></a> - method <code class="language-plaintext highlighter-rouge">getLanguagesForFile(java.io.File)</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionDiscoverer.html#getLanguagesForFile(java.lang.String)"><code>getLanguagesForFile</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#"><code>AbstractPropertySource</code></a>
|
||
<ul>
|
||
<li>field <code class="language-plaintext highlighter-rouge">propertyDescriptors</code> has been made private and is not accessible anymore.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertyDescriptors()"><code>getPropertyDescriptors</code></a> instead.</li>
|
||
<li>field <code class="language-plaintext highlighter-rouge">propertyValuesByDescriptor</code> has been made private and is not accessible anymore.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertiesByPropertyDescriptor()"><code>getPropertiesByPropertyDescriptor</code></a>
|
||
or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getOverriddenPropertiesByPropertyDescriptor()"><code>getOverriddenPropertiesByPropertyDescriptor</code></a> instead.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">copyPropertyDescriptors()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertyDescriptors()"><code>getPropertyDescriptors</code></a> instead.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">copyPropertyValues()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertiesByPropertyDescriptor()"><code>getPropertiesByPropertyDescriptor</code></a>
|
||
or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getOverriddenPropertiesByPropertyDescriptor()"><code>getOverriddenPropertiesByPropertyDescriptor</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Reportable.html#"><code>Reportable</code></a> - the following methods have been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Reportable.html#getReportLocation()"><code>getReportLocation</code></a> instead
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">getBeginLine()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">getBeginColumn()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">getEndLine()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">getEndColumn()</code></li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.datasource.DataSource</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.datasource.FileDataSource</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.datasource.ReaderDataSource</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.datasource.ZipDataSource</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/CollectionUtil.html#"><code>CollectionUtil</code></a>
|
||
<ul>
|
||
<li>method <code class="language-plaintext highlighter-rouge">invertedMapFrom(...)</code> has been removed.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">mapFrom(...)</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#"><code>AbstractConfiguration</code></a> - the following methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">setIgnoreFilePath(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setIgnoreFilePath(java.nio.file.Path)"><code>setIgnoreFilePath</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">setInputFilePath(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setInputFilePath(java.nio.file.Path)"><code>setInputFilePath</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">setInputPaths(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setInputPathList(java.util.List)"><code>setInputPathList</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#addInputPath(java.nio.file.Path)"><code>addInputPath</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">setInputUri(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setInputUri(java.net.URI)"><code>setInputUri</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a> - the following methods have been removed
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">prependClasspath(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#prependAuxClasspath(java.lang.String)"><code>prependAuxClasspath</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getRuleSets()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSetPaths()"><code>getRuleSetPaths</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">setRuleSets(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.util.List)"><code>setRuleSets</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#addRuleSet(java.lang.String)"><code>addRuleSet</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">setReportFile(String)</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.nio.file.Path)"><code>setReportFile</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getReportFile()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()"><code>getReportFilePath</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#"><code>Report</code></a> - method <code class="language-plaintext highlighter-rouge">merge(Report)</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#union(net.sourceforge.pmd.reporting.Report)"><code>union</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>RuleSetLoader</code></a> - method <code class="language-plaintext highlighter-rouge">toFactory()</code> has been made package private and is not accessible anymore.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#"><code>RuleViolation</code></a> - the following methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">getPackageName()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#PACKAGE_NAME"><code>PACKAGE_NAME</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getAdditionalInfo().get(PACKAGE_NAME)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getClassName()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#CLASS_NAME"><code>CLASS_NAME</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getAdditionalInfo().get(CLASS_NAME)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getMethodName()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#METHOD_NAME"><code>METHOD_NAME</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getAdditionalInfo().get(METHOD_NAME)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getVariableName()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#VARIABLE_NAME"><code>VARIABLE_NAME</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getAdditionalInfo().get(VARIABLE_NAME)</code>.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-apex
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTApexFile.html#"><code>ASTApexFile</code></a>
|
||
<ul>
|
||
<li>
|
||
<p><code class="language-plaintext highlighter-rouge">#getApexVersion()</code>: In PMD 6, this method has been deprecated but was defined in the class <code class="language-plaintext highlighter-rouge">ApexRootNode</code>.
|
||
The version returned is always “Version.CURRENT”, as the apex compiler integration
|
||
doesn’t use additional information which Apex version actually is used. Therefore, this method can’t be
|
||
used to determine the Apex version of the project that is being analyzed.</p>
|
||
|
||
<p>If the current version is needed, then <code class="language-plaintext highlighter-rouge">Node.getTextDocument().getLanguageVersion()</code> can be used. This
|
||
is the version that has been selected via CLI <code class="language-plaintext highlighter-rouge">--use-version</code> parameter.</p>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a>
|
||
<ul>
|
||
<li>method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">getNode()</code> has been removed. The underlying node is only available in AST nodes, but not in rule implementations.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a> - method <code class="language-plaintext highlighter-rouge">getNode()</code> is now package private.
|
||
AST nodes still have access to the underlying Jorje node via the protected property <code class="language-plaintext highlighter-rouge">node</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.ast.ApexParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexVisitor.html#"><code>ApexVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexVisitorBase.html#"><code>ApexVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.ast.ApexParserVisitorAdapter</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTAssignmentExpression.html#"><code>ASTAssignmentExpression</code></a> - method <code class="language-plaintext highlighter-rouge">getOperator()</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTAssignmentExpression.html#getOp()"><code>getOp</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTBinaryExpression.html#"><code>ASTBinaryExpression</code></a> - method <code class="language-plaintext highlighter-rouge">getOperator()</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTBinaryExpression.html#getOp()"><code>getOp</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTBooleanExpression.html#"><code>ASTBooleanExpression</code></a> - method <code class="language-plaintext highlighter-rouge">getOperator()</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTBooleanExpression.html#getOp()"><code>getOp</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTPostfixExpression.html#"><code>ASTPostfixExpression</code></a> - method <code class="language-plaintext highlighter-rouge">getOperator()</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTPostfixExpression.html#getOp()"><code>getOp</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTPrefixExpression.html#"><code>ASTPrefixExpression</code></a> - method <code class="language-plaintext highlighter-rouge">getOperator()</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTPrefixExpression.html#getOp()"><code>getOp</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.rule.security.Helper</code> removed. This was actually internal API.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/AbstractPackageNameModuleDirective.html#"><code>AbstractPackageNameModuleDirective</code></a> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/AbstractPackageNameModuleDirective.html#getPackageName()"><code>getPackageName</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">AbstractTypeDeclaration</code> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.
|
||
Use <code class="language-plaintext highlighter-rouge">getSimpleName()</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotation.html#"><code>ASTAnnotation</code></a> - method <code class="language-plaintext highlighter-rouge">getAnnotationName()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassType.html#"><code>ASTClassType</code></a>
|
||
<ul>
|
||
<li>constructor <code class="language-plaintext highlighter-rouge">ASTClassType(java.lang.String)</code> has been removed.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">isReferenceToClassSameCompilationUnit()</code> has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> - method <code class="language-plaintext highlighter-rouge">getVariableName()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTLiteral.html#"><code>ASTLiteral</code></a> - the following methods have been removed:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">isStringLiteral()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTStringLiteral</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isCharLiteral()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTCharLiteral</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isNullLiteral()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTNullLiteral</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isBooleanLiteral()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTBooleanLiteral</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isNumericLiteral()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTNumericLiteral</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isIntLiteral()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isIntLiteral()"><code>isIntLiteral</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isLongLiteral()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isLongLiteral()"><code>isLongLiteral</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isFloatLiteral()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isFloatLiteral()"><code>isFloatLiteral</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isDoubleLiteral()</code> - use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isDoubleLiteral()"><code>isDoubleLiteral</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#"><code>ASTMethodDeclaration</code></a> - methods <code class="language-plaintext highlighter-rouge">getImage()</code> and <code class="language-plaintext highlighter-rouge">getMethodName()</code> have been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getName()"><code>getName</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodReference.html#"><code>ASTMethodReference</code></a> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTModuleName.html#"><code>ASTModuleName</code></a> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTPrimitiveType.html#"><code>ASTPrimitiveType</code></a> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTType.html#"><code>ASTType</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">getTypeImage()</code> has been removed.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">getArrayDepth()</code> has been removed. It’s only available for arrays: <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTArrayType.html#getArrayDepth()"><code>getArrayDepth</code></a>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isPrimitiveType()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTPrimitiveType</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isArrayType()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTArrayType</code> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isClassOrInterfaceType()</code> - use <code class="language-plaintext highlighter-rouge">node instanceof ASTClassType</code> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypeDeclaration.html#"><code>ASTTypeDeclaration</code></a> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnaryExpression.html#"><code>ASTUnaryExpression</code></a> - method <code class="language-plaintext highlighter-rouge">isPrefix()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnaryExpression.html#getOperator()"><code>getOperator</code></a><code class="language-plaintext highlighter-rouge">.isPrefix()</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#"><code>ASTVariableId</code></a> - methods <code class="language-plaintext highlighter-rouge">getImage()</code> and <code class="language-plaintext highlighter-rouge">getVariableName()</code> have been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#getName()"><code>getName</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaComment.html#"><code>JavaComment</code></a> - method <code class="language-plaintext highlighter-rouge">getImage()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaComment.html#getText()"><code>getText</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaNode.html#"><code>JavaNode</code></a> - method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast.JavaParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaVisitor.html#"><code>JavaVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaVisitorBase.html#"><code>JavaVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast.JavaParserVisitorAdapter</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#"><code>ModifierOwner</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">isFinal()</code> - This is still available in various subtypes, where it makes sense, e.g. <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#isFinal()"><code>isFinal</code></a>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isAbstract()</code> - This is still available in subtypes, e.g. <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypeDeclaration.html#isAbstract()"><code>isAbstract</code></a>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isStrictfp()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasModifiers(STRICTFP)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isSynchronized()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasModifiers(SYNCHRONIZED)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isNative()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasModifiers(NATIVE)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isStatic()</code> - This is still available in subtypes, e.g. <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#isStatic()"><code>isStatic</code></a>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isVolatile()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasModifiers(VOLATILE)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isTransient()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasModifiers(TRANSIENT)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isPrivate()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getVisibility() == Visibility.V_PRIVATE</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isPublic()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getVisibility() == Visibility.V_PUBLIC</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isProtected()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getVisibility() == Visibility.V_PROTECTED</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isPackagePrivate()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">getVisibility() == Visibility.V_PACKAGE</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isSyntacticallyAbstract()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasExplicitModifiers(ABSTRACT)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isSyntacticallyPublic()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasExplicitModifiers(PUBLIC)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isSyntacticallyStatic()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasExplicitModifiers(STATIC)</code>.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">isSyntacticallyFinal()</code> - Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. <code class="language-plaintext highlighter-rouge">hasExplicitModifiers(FINAL)</code>.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a> - method <code class="language-plaintext highlighter-rouge">getType()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#getTypeMirror()"><code>getTypeMirror</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-javascript
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/AbstractEcmascriptNode.html#"><code>AbstractEcmascriptNode</code></a> - method <code class="language-plaintext highlighter-rouge">getNode()</code> has been removed.
|
||
AST nodes still have access to the underlying Rhino node via the protected property <code class="language-plaintext highlighter-rouge">node</code>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.html#"><code>ASTFunctionNode</code></a> - method <code class="language-plaintext highlighter-rouge">getBody(int)</code> removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.html#getBody()"><code>getBody</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>
|
||
<ul>
|
||
<li>method <code class="language-plaintext highlighter-rouge">isCatch()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.html#hasCatch()"><code>hasCatch</code></a> instead.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">isFinally()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.html#hasFinally()"><code>hasFinally</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.html#"><code>EcmascriptNode</code></a>
|
||
<ul>
|
||
<li>method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li>method <code class="language-plaintext highlighter-rouge">getNode()</code> has been removed. The underlying node is only available in AST nodes, but not in rule implementations.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptVisitor.html#"><code>EcmascriptVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptVisitorBase.html#"><code>EcmascriptVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitorAdapter</code></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-jsp
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.jsp.ast.JspParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspVisitor.html#"><code>JspVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspVisitorBase.html#"><code>JspVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.jsp.ast.JspParserVisitorAdapter</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> - method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-modelica
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.ast.ModelicaParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/ModelicaVisitor.html#"><code>ModelicaVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/ModelicaVisitorBase.html#"><code>ModelicaVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.ast.ModelicaParserVisitorAdapter</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/ModelicaNode.html#"><code>ModelicaNode</code></a> - method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.rule.AmbiguousResolutionRule</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/rule/bestpractices/AmbiguousResolutionRule.html#"><code>AmbiguousResolutionRule</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.modelica.rule.ConnectUsingNonConnector</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/rule/bestpractices/ConnectUsingNonConnectorRule.html#"><code>ConnectUsingNonConnectorRule</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-plsql
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PlsqlVisitor.html#"><code>PlsqlVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PlsqlVisitorBase.html#"><code>PlsqlVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PLSQLNode.html#"><code>PLSQLNode</code></a> - method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-scala
|
||
<ul>
|
||
<li>The maven module <code class="language-plaintext highlighter-rouge">pmd-scala</code> has been removed. Use <code class="language-plaintext highlighter-rouge">pmd-scala_2.13</code> or <code class="language-plaintext highlighter-rouge">pmd-scala_2.12</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/ast/ScalaNode.html#"><code>ScalaNode</code></a>
|
||
<ul>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">accept()</code> has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li>Method <code class="language-plaintext highlighter-rouge">getNode()</code> has been removed. The underlying node is only available in AST nodes, but not in rule implementations.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code class="language-plaintext highlighter-rouge">AbstractScalaNode</code> - method <code class="language-plaintext highlighter-rouge">getNode()</code> has been removed. AST nodes still have access
|
||
to the underlying Scala node via the protected property <code class="language-plaintext highlighter-rouge">node</code>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-visualforce
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfNode.html#"><code>VfNode</code></a> - method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vf.ast.VfParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfVisitor.html#"><code>VfVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfVisitorBase.html#"><code>VfVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vf.ast.VfParserVisitorAdapter</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/DataType.html#"><code>DataType</code></a> - method <code class="language-plaintext highlighter-rouge">fromBasicType(BasicType)</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/DataType.html#fromTypeName(java.lang.String)"><code>fromTypeName</code></a> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-velocity (previously pmd-vm)
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a> - method <code class="language-plaintext highlighter-rouge">jjtAccept()</code> has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vm.ast.VmParserVisitor</code>
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlVisitor.html#"><code>VtlVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlVisitorBase.html#"><code>VtlVisitorBase</code></a> instead.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.vm.ast.VmParserVisitorAdapter</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Removed classes, interfaces and methods (not previously deprecated)</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-apex
|
||
<ul>
|
||
<li>The method <code class="language-plaintext highlighter-rouge">isSynthetic()</code> in <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTMethod.html#"><code>ASTMethod</code></a> has been removed.
|
||
With the switch from Jorje to Summit AST as underlying parser, no synthetic methods are generated by the
|
||
parser anymore. This also means, that there is no XPath attribute <code class="language-plaintext highlighter-rouge">@Synthetic</code> anymore.</li>
|
||
<li>The constant <code class="language-plaintext highlighter-rouge">STATIC_INITIALIZER_METHOD_NAME</code> in <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.html#"><code>FieldDeclarationsShouldBeAtStartRule</code></a>
|
||
has been removed. It was used to filter out synthetic methods, but these are not generated anymore with the
|
||
new parser.</li>
|
||
<li>The method <code class="language-plaintext highlighter-rouge">getContext()</code> in <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.html#"><code>ASTReferenceExpression</code></a> has been removed.
|
||
It was not used and always returned <code class="language-plaintext highlighter-rouge">null</code>.</li>
|
||
<li>The method <code class="language-plaintext highlighter-rouge">getNamespace()</code> in all AST nodes (defined in <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a>) has
|
||
been removed, as it was never fully implemented. It always returned an empty string.</li>
|
||
<li>The method <code class="language-plaintext highlighter-rouge">getNameSpace()</code> in <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexQualifiedName.html#"><code>ApexQualifiedName</code></a> has been removed.</li>
|
||
<li>The class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.apex.ast.ASTBridgeMethodCreator</code> has been removed. This was a node that has
|
||
been generated by the old Jorje parser only.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-apex-jorje
|
||
<ul>
|
||
<li>With the switch from Jorje to Summit AST, this maven module is no longer needed and has been removed.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.util.Predicate</code> has been removed. It was marked as Experimental before. Use
|
||
<code class="language-plaintext highlighter-rouge">java.util.function.Predicate</code> instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li>The interface <code class="language-plaintext highlighter-rouge">FinalizableNode</code> (introduced in 7.0.0-rc1) has been removed.
|
||
Its method <code class="language-plaintext highlighter-rouge">isFinal()</code> has been moved down to the
|
||
nodes where needed, e.g. <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#isFinal()"><code>ASTLocalVariableDeclaration#isFinal</code></a>.</li>
|
||
<li>The method <code class="language-plaintext highlighter-rouge">isPackagePrivate()</code> in <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassDeclaration.html#"><code>ASTClassDeclaration</code></a> (formerly ASTClassOrInterfaceDeclaration)
|
||
has been removed.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasVisibility(net.sourceforge.pmd.lang.java.ast.ModifierOwner.Visibility)"><code>hasVisibility</code></a> instead,
|
||
which can correctly differentiate between local and package private classes.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Renamed classes, interfaces, methods</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/log/MessageReporter.html#"><code>MessageReporter</code></a> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/log/PmdReporter.html#"><code>PmdReporter</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/TokenMgrError.html#"><code>TokenMgrError</code></a> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/LexException.html#"><code>LexException</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/Tokenizer.html#"><code>Tokenizer</code></a> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLexer.html#"><code>CpdLexer</code></a>. Along with this rename,
|
||
all the implementations have been renamed as well (<code class="language-plaintext highlighter-rouge">Tokenizer</code> -> <code class="language-plaintext highlighter-rouge">CpdLexer</code>), e.g. “CppCpdLexer”, “JavaCpdLexer”.
|
||
This affects all language modules.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/AnyTokenizer.html#"><code>AnyTokenizer</code></a> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li>The interface <code class="language-plaintext highlighter-rouge">AccessNode</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#"><code>ModifierOwner</code></a>. This is only relevant
|
||
for Java rules, which use that type directly e.g. through downcasting.
|
||
Or when using the XPath function <code class="language-plaintext highlighter-rouge">pmd-java:nodeIs()</code>.</li>
|
||
<li>The node <code class="language-plaintext highlighter-rouge">ASTClassOrInterfaceType</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassType.html#"><code>ASTClassType</code></a>. XPath rules
|
||
need to be adjusted.</li>
|
||
<li>The node <code class="language-plaintext highlighter-rouge">ASTClassOrInterfaceDeclaration</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassDeclaration.html#"><code>ASTClassDeclaration</code></a>.
|
||
XPath rules need to be adjusted.</li>
|
||
<li>The interface <code class="language-plaintext highlighter-rouge">ASTAnyTypeDeclaration</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypeDeclaration.html#"><code>ASTTypeDeclaration</code></a>.
|
||
This is only relevant for Java rules, which use that type directly, e.g. through downcasting.
|
||
Or when using the XPath function <code class="language-plaintext highlighter-rouge">pmd-java:nodeIs()</code>.</li>
|
||
<li>The interface <code class="language-plaintext highlighter-rouge">ASTMethodOrConstructorDeclaration</code> has been renamed to
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTExecutableDeclaration.html#"><code>ASTExecutableDeclaration</code></a>. This is only relevant for Java rules, which use that type
|
||
directly, e.g. through downcasting. Or when using the XPath function <code class="language-plaintext highlighter-rouge">pmd-java:nodeIs()</code>.</li>
|
||
<li>The node <code class="language-plaintext highlighter-rouge">ASTVariableDeclaratorId</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#"><code>ASTVariableId</code></a>. XPath rules
|
||
need to be adjusted.</li>
|
||
<li>The node <code class="language-plaintext highlighter-rouge">ASTClassOrInterfaceBody</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassBody.html#"><code>ASTClassBody</code></a>. XPath rules
|
||
need to be adjusted.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-scala
|
||
<ul>
|
||
<li>The interface <code class="language-plaintext highlighter-rouge">ScalaParserVisitor</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/ast/ScalaVisitor.html#"><code>ScalaVisitor</code></a> in order
|
||
to align the naming scheme for the different language modules.</li>
|
||
<li>The class <code class="language-plaintext highlighter-rouge">ScalaParserVisitorAdapter</code> has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/ast/ScalaVisitorBase.html#"><code>ScalaVisitorBase</code></a> in order
|
||
to align the naming scheme for the different language modules.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>New API</strong></p>
|
||
|
||
<p>These were annotated with <code class="language-plaintext highlighter-rouge">@Experimental</code>, but can now be considered stable.</p>
|
||
|
||
<ul>
|
||
<li>pmd-apex
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTCommentContainer.html#"><code>ASTCommentContainer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/multifile/ApexMultifileAnalysis.html#"><code>ApexMultifileAnalysis</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(java.util.function.Predicate)"><code>CPDReport#filterMatches</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrToken.html#getKind()"><code>AntlrToken#getKind</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/javacc/AbstractJjtreeNode.html#"><code>AbstractJjtreeNode</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/TokenDocument.html#"><code>TokenDocument</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/AstInfo.html#getSuppressionComments()"><code>AstInfo#getSuppressionComments</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/AstInfo.html#withSuppressMap(java.util.Map)"><code>AstInfo#withSuppressMap</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/GenericToken.html#getKind()"><code>GenericToken#getKind</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)"><code>FileCollector#addZipFileWithContent</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/package-summary.html#"><code>net.sourceforge.pmd.lang.document</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getLanguageMetricsProvider()"><code>LanguageVersionHandler#getLanguageMetricsProvider</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDesignerBindings()"><code>LanguageVersionHandler#getDesignerBindings</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/PlainTextLanguage.html#"><code>PlainTextLanguage</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#getXmlConstraint()"><code>PropertyConstraint#getXmlConstraint</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#toOptionalConstraint()"><code>PropertyConstraint#toOptionalConstraint</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#fromPredicate(java.util.function.Predicate,java.lang.String)"><code>PropertyConstraint#fromPredicate</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#fromPredicate(java.util.function.Predicate,java.lang.String,java.util.Map)"><code>PropertyConstraint#fromPredicate</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/AbstractRenderer.html#setReportFile(java.lang.String)"><code>AbstractRenderer#setReportFile</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/Renderer.html#setReportFile(java.lang.String)"><code>Renderer#setReportFile</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/designerbindings/DesignerBindings.html#"><code>DesignerBindings</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/designerbindings/DesignerBindings.TreeIconId.html#"><code>DesignerBindings.TreeIconId</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/designerbindings/RelatedNodesSelector.html#"><code>RelatedNodesSelector</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#filterViolations(java.util.function.Predicate)"><code>Report#filterViolations</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#union(net.sourceforge.pmd.Report)"><code>Report#union</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-groovy
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-groovy/7.0.0/net/sourceforge/pmd/lang/groovy/ast/impl/antlr4/GroovyToken.html#getKind()"><code>GroovyToken#getKind</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-html
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-html/7.0.0/net/sourceforge/pmd/lang/html/package-summary.html#"><code>net.sourceforge.pmd.lang.html</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTExpression.html#getConversionContext()"><code>ASTExpression#getConversionContext</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaRulechainRule.html#<init>(java.lang.Class,java.lang.Class...)"><code>AbstractJavaRulechainRule#<init></code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/symbols/table/JSymbolTable.html#"><code>JSymbolTable</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/symbols/JElementSymbol.html#"><code>JElementSymbol</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/symbols/package-summary.html#"><code>net.sourceforge.pmd.lang.java.symbols</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/ast/ExprContext.html#"><code>ExprContext</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/JIntersectionType.html#getInducedClassType()"><code>JIntersectionType#getInducedClassType</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/JTypeMirror.html#streamMethods(java.util.function.Predicate)"><code>JTypeMirror#streamMethods</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/JTypeMirror.html#streamDeclaredMethods(java.util.function.Predicate)"><code>JTypeMirror#streamDeclaredMethods</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/JTypeMirror.html#getConstructors()"><code>JTypeMirror#getConstructors</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-kotlin
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-kotlin/7.0.0/net/sourceforge/pmd/lang/kotlin/KotlinLanguageModule.html#"><code>KotlinLanguageModule</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-test-schema
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test-schema/7.0.0/net/sourceforge/pmd/test/schema/TestSchemaParser.html#"><code>TestSchemaParser</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Removed functionality</strong></p>
|
||
|
||
<ul>
|
||
<li>The CLI parameter <code class="language-plaintext highlighter-rouge">--no-ruleset-compatibility</code> has been removed. It was only used to allow loading
|
||
some rulesets originally written for PMD 5 also in PMD 6 without fixing the rulesets.</li>
|
||
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactoryCompatibility.html#"><code>RuleSetFactoryCompatibility</code></a> has been removed without replacement.
|
||
The different ways to enable/disable this filter in <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a>
|
||
(Property “RuleSetFactoryCompatibilityEnabled”) and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/PMDTask.html#"><code>PMDTask</code></a> (Property “noRuleSetCompatibility”) have been removed as well.</li>
|
||
<li><code class="language-plaintext highlighter-rouge">textcolor</code> renderer (<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/TextColorRenderer.html#"><code>TextColorRenderer</code></a>) now renders always in color.
|
||
The property <code class="language-plaintext highlighter-rouge">color</code> has been removed. The possibility to override this with the system property <code class="language-plaintext highlighter-rouge">pmd.color</code>
|
||
has been removed as well. If you don’t want colors, use <code class="language-plaintext highlighter-rouge">text</code> renderer (<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/TextRenderer.html#"><code>TextRenderer</code></a>).</li>
|
||
</ul>
|
||
|
||
<h4 id="700-rc4">7.0.0-rc4</h4>
|
||
|
||
<p><strong>pmd-java</strong></p>
|
||
|
||
<ul>
|
||
<li>Support for Java 19 preview language features have been removed. The version “19-preview” is no longer available.</li>
|
||
</ul>
|
||
|
||
<p><strong>Rule properties</strong></p>
|
||
|
||
<ul>
|
||
<li>The old deprecated classes like <code class="language-plaintext highlighter-rouge">IntProperty</code> and <code class="language-plaintext highlighter-rouge">StringProperty</code> have been removed. Please use
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties.</li>
|
||
<li>All properties which accept multiple values now use a comma (<code class="language-plaintext highlighter-rouge">,</code>) as a delimiter. The previous default was a
|
||
pipe character (<code class="language-plaintext highlighter-rouge">|</code>). The delimiter is not configurable anymore. If needed, the comma can be escaped
|
||
with a backslash.</li>
|
||
<li>The <code class="language-plaintext highlighter-rouge">min</code> and <code class="language-plaintext highlighter-rouge">max</code> attributes in property definitions in the XML are now optional and can appear separately
|
||
or be omitted.</li>
|
||
</ul>
|
||
|
||
<p><strong>New Programmatic API for CPD</strong></p>
|
||
|
||
<p>See <a href="pmd_release_notes_pmd7.html#new-programmatic-api-for-cpd">Detailed Release Notes for PMD 7</a>
|
||
and <a href="https://github.com/pmd/pmd/pull/4397">PR #4397</a> for details.</p>
|
||
|
||
<p><strong>Removed classes and methods</strong></p>
|
||
|
||
<p>The following previously deprecated classes have been removed:</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.AbstractTokenizer</code> ➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a> instead (previously known as AnyTokenizer)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.CPD</code> ➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-cli/7.0.0/net/sourceforge/pmd/cli/PmdCli.html#"><code>PmdCli</code></a> from <code class="language-plaintext highlighter-rouge">pmd-cli</code> module for CLI support or use
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdAnalysis.html#"><code>CpdAnalysis</code></a> for programmatic API</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.GridBagHelper</code> (now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.TokenEntry.State</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.document.CpdCompat</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.BooleanMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.BooleanProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.CharacterMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.CharacterProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.DoubleMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.DoubleProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.EnumeratedMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.EnumeratedProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.EnumeratedPropertyDescriptor</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.FileProperty</code> (note: without replacement)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.FloatMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.FloatProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.IntegerMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.IntegerProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.LongMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.LongProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.MultiValuePropertyDescriptor</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.NumericPropertyDescriptor</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertyDescriptorField</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.RegexProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.SingleValuePropertyDescriptor</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.StringMultiProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.StringProperty</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.ValueParser</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.ValueParserConstants</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.MultiNumericPropertyBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.MultiPackagedPropertyBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.MultiValuePropertyBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.PropertyDescriptorBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.PropertyDescriptorBuilderConversionWrapper</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.PropertyDescriptorExternalBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.SingleNumericPropertyBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.SinglePackagedPropertyBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.builders.SingleValuePropertyBuilder</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.modules.EnumeratedPropertyModule</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.modules.NumericPropertyModule</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>The following previously deprecated methods have been removed:</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertyBuilder.GenericCollectionPropertyBuilder#delim(char)</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertySource#setProperty(...)</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.internal.PropertyTypeId#factoryFor(...)</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.internal.PropertyTypeId#typeIdFor(...)</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.PropertyDescriptor</code>: removed methods errorFor, type, isMultiValue,
|
||
uiOrder, compareTo, isDefinedExternally, valueFrom, asDelimitedString</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>The following methods have been removed:</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#"><code>CPDConfiguration</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">#sourceCodeFor(File)</code>, <code class="language-plaintext highlighter-rouge">#postConstruct()</code>, <code class="language-plaintext highlighter-rouge">#tokenizer()</code>, <code class="language-plaintext highlighter-rouge">#filenameFilter()</code> removed</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/Mark.html#"><code>Mark</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">#getSourceSlice()</code>, <code class="language-plaintext highlighter-rouge">#setLineCount(int)</code>, <code class="language-plaintext highlighter-rouge">#getLineCount()</code>, <code class="language-plaintext highlighter-rouge">#setSourceCode(SourceCode)</code> removed</li>
|
||
<li><code class="language-plaintext highlighter-rouge">#getBeginColumn()</code>, <code class="language-plaintext highlighter-rouge">#getBeginLine()</code>, <code class="language-plaintext highlighter-rouge">#getEndLine()</code>, <code class="language-plaintext highlighter-rouge">#getEndColumn()</code> removed
|
||
➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/Mark.html#getLocation()"><code>getLocation</code></a> instead</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/Match.html#"><code>Match</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">#LABEL_COMPARATOR</code> removed</li>
|
||
<li><code class="language-plaintext highlighter-rouge">#setMarkSet(...)</code>, <code class="language-plaintext highlighter-rouge">#setLabel(...)</code>, <code class="language-plaintext highlighter-rouge">#getLabel()</code>, <code class="language-plaintext highlighter-rouge">#addTokenEntry(...)</code> removed</li>
|
||
<li><code class="language-plaintext highlighter-rouge">#getSourceCodeSlice()</code> removed
|
||
➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#getSourceCodeSlice(net.sourceforge.pmd.cpd.Mark)"><code>CPDReport#getSourceCodeSlice</code></a> instead</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/TokenEntry.html#"><code>TokenEntry</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">#getEOF()</code>, <code class="language-plaintext highlighter-rouge">#clearImages()</code>, <code class="language-plaintext highlighter-rouge">#getIdentifier()</code>, <code class="language-plaintext highlighter-rouge">#getIndex()</code>, <code class="language-plaintext highlighter-rouge">#setHashCode(int)</code> removed</li>
|
||
<li><code class="language-plaintext highlighter-rouge">#EOF</code> removed ➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/TokenEntry.html#isEof()"><code>isEof</code></a> instead</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Parser.ParserTask.html#"><code>Parser.ParserTask</code></a>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">#getFileDisplayName()</code> removed ➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Parser.ParserTask.html#getFileId()"><code>getFileId</code></a> instead
|
||
(<code class="language-plaintext highlighter-rouge">getFileId().getAbsolutePath()</code>)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>The following classes have been removed:</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.AbstractLanguage</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.AnyLanguage</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.Language</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.LanguageFactory</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.MatchAlgorithm</code> (now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.MatchCollector</code> (now package private)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.SourceCode</code> (and all inner classes like <code class="language-plaintext highlighter-rouge">FileCodeLoader</code>, …)</li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.token.TokenFilter</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Moved packages</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/NumericConstraints.html#"><code>NumericConstraints</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.constraints.NumericConstraints</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#"><code>PropertyConstraint</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.constraints.PropertyConstraint</code>)
|
||
<ul>
|
||
<li>not experimental anymore</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/ReportException.html#"><code>ReportException</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd</code>, moved to module <code class="language-plaintext highlighter-rouge">pmd-ant</code>)
|
||
<ul>
|
||
<li>it is now a RuntimeException</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReportRenderer.html#"><code>CPDReportRenderer</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.renderer</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/AntlrTokenFilter.html#"><code>AntlrTokenFilter</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.token</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/BaseTokenFilter.html#"><code>BaseTokenFilter</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.token.internal</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/JavaCCTokenFilter.html#"><code>JavaCCTokenFilter</code></a> (old package: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cpd.token</code>)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Changed types and other changes</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a> is now a class (was an interface)
|
||
and it is not comparable anymore.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setSourceEncoding(java.nio.charset.Charset)"><code>AbstractConfiguration#setSourceEncoding</code></a>
|
||
<ul>
|
||
<li>previously this method took a simple String for the encoding.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#"><code>CPDConfiguration</code></a>
|
||
<ul>
|
||
<li>many getters and setters have been moved to the parent class <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#"><code>AbstractConfiguration</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDListener.html#addedFile(int)"><code>CPDListener#addedFile</code></a>
|
||
<ul>
|
||
<li>no <code class="language-plaintext highlighter-rouge">File</code> parameter anymore</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#getNumberOfTokensPerFile()"><code>CPDReport#getNumberOfTokensPerFile</code></a> returns a <code class="language-plaintext highlighter-rouge">Map</code> of <code class="language-plaintext highlighter-rouge">FileId,Integer</code> instead of <code class="language-plaintext highlighter-rouge">String</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(java.util.function.Predicate)"><code>CPDReport#filterMatches</code></a> now takes a <code class="language-plaintext highlighter-rouge">java.util.function.Predicate</code>
|
||
as parameter</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLexer.html#"><code>CpdLexer</code></a>
|
||
<ul>
|
||
<li>Note: CpdLexer was previously named Tokenizer.</li>
|
||
<li>constants are now <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a> instead of <code class="language-plaintext highlighter-rouge">String</code>,
|
||
to be used as language properties</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLexer.html#tokenize(net.sourceforge.pmd.lang.document.TextDocument,net.sourceforge.pmd.cpd.TokenFactory)"><code>tokenize</code></a>
|
||
changed parameters. Now takes a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#"><code>TextDocument</code></a> and a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/TokenFactory.html#"><code>TokenFactory</code></a>
|
||
(instead of <code class="language-plaintext highlighter-rouge">SourceCode</code> and <code class="language-plaintext highlighter-rouge">Tokens</code>).</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#"><code>Language</code></a>
|
||
<ul>
|
||
<li>method <code class="language-plaintext highlighter-rouge">#createProcessor(LanguagePropertyBundle)</code> moved to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/PmdCapableLanguage.html#"><code>PmdCapableLanguage</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/StringUtil.html#linesWithTrimIndent(net.sourceforge.pmd.lang.document.Chars)"><code>StringUtil#linesWithTrimIndent</code></a> now takes a <code class="language-plaintext highlighter-rouge">Chars</code>
|
||
instead of a <code class="language-plaintext highlighter-rouge">String</code>.</li>
|
||
</ul>
|
||
</li>
|
||
<li>All language modules (like pmd-apex, pmd-cpp, …)
|
||
<ul>
|
||
<li>consistent package naming: <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.<langId>.cpd</code></li>
|
||
<li>adapted to use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdCapableLanguage.html#"><code>CpdCapableLanguage</code></a></li>
|
||
<li>consistent static method <code class="language-plaintext highlighter-rouge">#getInstance()</code></li>
|
||
<li>removed constants like <code class="language-plaintext highlighter-rouge">ID</code>, <code class="language-plaintext highlighter-rouge">TERSE_NAME</code> or <code class="language-plaintext highlighter-rouge">NAME</code>. Use <code class="language-plaintext highlighter-rouge">getInstance().getName()</code> etc. instead</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal APIs</strong></p>
|
||
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.properties.internal.PropertyTypeId</code></li>
|
||
</ul>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/Language.html#getTerseName()"><code>Language#getTerseName</code></a> ➡️ use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#getId()"><code>getId</code></a> instead</p>
|
||
</li>
|
||
<li>
|
||
<p>The method <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#getParenthesisDepth()"><code>ASTPattern#getParenthesisDepth</code></a> has been deprecated and will be removed.
|
||
It was introduced for supporting parenthesized patterns, but that was removed with Java 21. It is only used when
|
||
parsing code as java-19-preview.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>To support the Java preview language features “String Templates” and “Unnamed Patterns and Variables”, the following
|
||
AST nodes have been introduced as experimental:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplateExpression.html#"><code>ASTTemplateExpression</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplate.html#"><code>ASTTemplate</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplateFragment.html#"><code>ASTTemplateFragment</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnnamedPattern.html#"><code>ASTUnnamedPattern</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>The AST nodes for supporting “Record Patterns” and “Pattern Matching for switch” are not experimental anymore:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#"><code>ASTRecordPattern</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTPatternList.html#"><code>ASTPatternList</code></a> (Note: it was renamed from <code class="language-plaintext highlighter-rouge">ASTComponentPatternList</code>)</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTGuard.html#"><code>ASTGuard</code></a> (Note: it was renamed from <code class="language-plaintext highlighter-rouge">ASTSwitchGuard</code>)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="700-rc3">7.0.0-rc3</h4>
|
||
|
||
<p><strong>PMD Distribution</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>The asset filenames of PMD on <a href="https://github.com/pmd/pmd/releases">GitHub Releases</a> are
|
||
now <code class="language-plaintext highlighter-rouge">pmd-dist-<version>-bin.zip</code>, <code class="language-plaintext highlighter-rouge">pmd-dist-<version>-src.zip</code> and <code class="language-plaintext highlighter-rouge">pmd-dist-<version>-doc.zip</code>.
|
||
Keep that in mind, if you have an automated download script.</p>
|
||
|
||
<p>The structure inside the ZIP files stay the same, e.g. we still provide inside the binary distribution
|
||
ZIP file the base directory <code class="language-plaintext highlighter-rouge">pmd-bin-<version></code>.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>The CLI option <code class="language-plaintext highlighter-rouge">--stress</code> (or <code class="language-plaintext highlighter-rouge">-stress</code>) has been removed without replacement.</li>
|
||
<li>The CLI option <code class="language-plaintext highlighter-rouge">--minimum-priority</code> was changed with 7.0.0-rc1 to only take the following values:
|
||
High, Medium High, Medium, Medium Low, Low. With 7.0.0-rc2 compatibility has been restored, so that the equivalent
|
||
integer values (1 to 5) are supported as well.</li>
|
||
</ul>
|
||
|
||
<p><strong>pmd-core</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>Replaced <code class="language-plaintext highlighter-rouge">RuleViolation::getFilename</code> with new <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getFileId()"><code>RuleViolation#getFileId</code></a>, that returns a
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileId.html#"><code>FileId</code></a>. This is an identifier for a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a>
|
||
and could represent a path name. This allows to have a separate display name, e.g. renderers use
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/FileNameRenderer.html#"><code>FileNameRenderer</code></a> to either display the full path name or a relative path name
|
||
(see <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/Renderer.html#setFileNameRenderer(net.sourceforge.pmd.reporting.FileNameRenderer)"><code>Renderer#setFileNameRenderer</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/ConfigurableFileNameRenderer.html#"><code>ConfigurableFileNameRenderer</code></a>). Many places where we used a simple String for
|
||
a path-like name before have been adapted to use the new <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileId.html#"><code>FileId</code></a>.</p>
|
||
|
||
<p>See <a href="https://github.com/pmd/pmd/pull/4425">PR #4425</a> for details.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="700-rc2">7.0.0-rc2</h4>
|
||
|
||
<p><strong>Removed classes and methods</strong></p>
|
||
|
||
<p>The following previously deprecated classes have been removed:</p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.PMD</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cli.PMDCommandLineInterface</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cli.PMDParameters</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.cli.PmdParametersParseResult</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>The CLI option <code class="language-plaintext highlighter-rouge">--minimum-priority</code> was changed with 7.0.0-rc1 to only take the following values:
|
||
High, Medium High, Medium, Medium Low, Low. With 7.0.0-rc2 compatibility has been restored, so that the equivalent
|
||
integer values (1 to 5) are supported as well.</li>
|
||
</ul>
|
||
|
||
<h4 id="700-rc1">7.0.0-rc1</h4>
|
||
|
||
<p><strong>CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>The CLI option <code class="language-plaintext highlighter-rouge">--stress</code> (or <code class="language-plaintext highlighter-rouge">-stress</code>) has been removed without replacement.</li>
|
||
<li>The CLI option <code class="language-plaintext highlighter-rouge">--minimum-priority</code> now takes one of the following values instead of an integer:
|
||
High, Medium High, Medium, Medium Low, Low.</li>
|
||
</ul>
|
||
|
||
<h4 id="6550">6.55.0</h4>
|
||
|
||
<p><strong>Go</strong></p>
|
||
|
||
<ul>
|
||
<li>The LanguageModule of Go, that only supports CPD execution, has been deprecated. This language
|
||
is 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 class has been deprecated and will be removed with PMD 7.0.0:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-go/6.55.0/net/sourceforge/pmd/lang/go/GoLanguageModule.html#"><code>GoLanguageModule</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Java</strong></p>
|
||
<ul>
|
||
<li>Support for Java 18 preview language features have been removed. The version “18-preview” is no longer available.</li>
|
||
<li>The experimental class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast.ASTGuardedPattern</code> has been removed.</li>
|
||
</ul>
|
||
|
||
<h4 id="6540">6.54.0</h4>
|
||
|
||
<p><strong>PMD CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>PMD now supports a new <code class="language-plaintext highlighter-rouge">--relativize-paths-with</code> flag (or short <code class="language-plaintext highlighter-rouge">-z</code>), which replaces <code class="language-plaintext highlighter-rouge">--short-names</code>.
|
||
It serves the same purpose: Shortening the pathnames in the reports. However, with the new flag it’s possible
|
||
to explicitly define one or more pathnames that should be used as the base when creating relative paths.
|
||
The old flag <code class="language-plaintext highlighter-rouge">--short-names</code> is deprecated.</li>
|
||
</ul>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexRootNode.html#getApexVersion()"><code>ApexRootNode#getApexVersion()</code></a> has been deprecated for removal. The version returned is
|
||
always <code class="language-plaintext highlighter-rouge">Version.CURRENT</code>, as the apex compiler integration doesn’t use additional information which Apex version
|
||
actually is used. Therefore, this method can’t be used to determine the Apex version of the project
|
||
that is being analyzed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setEncoding(java.lang.String)"><code>CPDConfiguration#setEncoding</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getEncoding()"><code>CPDConfiguration#getEncoding</code></a>. Use the methods
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#getSourceEncoding()"><code>getSourceEncoding</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setSourceEncoding(java.nio.charset.Charset)"><code>setSourceEncoding</code></a> instead. Both are available
|
||
for <code class="language-plaintext highlighter-rouge">CPDConfiguration</code> which extends <code class="language-plaintext highlighter-rouge">AbstractConfiguration</code>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCLITest.html#"><code>BaseCLITest</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCPDCLITest.html#"><code>BaseCPDCLITest</code></a> have been deprecated for removal without
|
||
replacement. CLI tests should be done in pmd-core only (and in PMD7 in pmd-cli). Individual language modules
|
||
shouldn’t need to test the CLI integration logic again. Instead, the individual language modules should test their
|
||
functionality as unit tests.</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.LanguageConverter.html#"><code>CPDConfiguration.LanguageConverter</code></a></p>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFile(java.nio.file.Path)"><code>FileCollector#addZipFile</code></a> has been deprecated. It is replaced
|
||
by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)"><code>FileCollector#addZipFileWithContent</code></a> which directly adds the
|
||
content of the zip file for analysis.</p>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setReportShortNames(boolean)"><code>PMDConfiguration#setReportShortNames</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isReportShortNames()"><code>PMDConfiguration#isReportShortNames</code></a> have been deprecated for removal.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#addRelativizeRoot(java.nio.file.Path)"><code>AbstractConfiguration#addRelativizeRoot</code></a> instead.</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal APIs</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/CSVWriter.html#"><code>CSVWriter</code></a></li>
|
||
<li>Some fields in <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/ant/AbstractAntTestHelper.html"><code>AbstractAntTestHelper</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>CPDReport has a new method which limited mutation of a given report:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(net.sourceforge.pmd.util.Predicate)"><code>filterMatches</code></a> creates a new CPD report
|
||
with some matches removed with a given predicate based filter.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="6530">6.53.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<p>These classes / APIs have been deprecated and will be removed with PMD 7.0.0.</p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/design/ExcessiveLengthRule.html#"><code>ExcessiveLengthRule</code></a> (Java)</li>
|
||
</ul>
|
||
|
||
<h4 id="6520">6.52.0</h4>
|
||
|
||
<p><strong>PMD CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>PMD now supports a new <code class="language-plaintext highlighter-rouge">--use-version</code> flag, which receives a language-version pair (such as <code class="language-plaintext highlighter-rouge">java-8</code> or <code class="language-plaintext highlighter-rouge">apex-54</code>).
|
||
This supersedes the usage of <code class="language-plaintext highlighter-rouge">-language</code> / <code class="language-plaintext highlighter-rouge">-l</code> and <code class="language-plaintext highlighter-rouge">-version</code> / <code class="language-plaintext highlighter-rouge">-v</code>, allowing for multiple versions to be set in a single run.
|
||
PMD 7 will completely remove support for <code class="language-plaintext highlighter-rouge">-language</code> and <code class="language-plaintext highlighter-rouge">-version</code> in favor of this new flag.</p>
|
||
</li>
|
||
<li>
|
||
<p>Support for <code class="language-plaintext highlighter-rouge">-V</code> is being deprecated in favor of <code class="language-plaintext highlighter-rouge">--verbose</code> in preparation for PMD 7.
|
||
In PMD 7, <code class="language-plaintext highlighter-rouge">-v</code> will enable verbose mode and <code class="language-plaintext highlighter-rouge">-V</code> will show the PMD version for consistency with most Unix/Linux tools.</p>
|
||
</li>
|
||
<li>
|
||
<p>Support for <code class="language-plaintext highlighter-rouge">-min</code> is being deprecated in favor of <code class="language-plaintext highlighter-rouge">--minimum-priority</code> for consistency with most Unix/Linux tools, where <code class="language-plaintext highlighter-rouge">-min</code> would be equivalent to <code class="language-plaintext highlighter-rouge">-m -i -n</code>.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>CPD CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>CPD now supports using <code class="language-plaintext highlighter-rouge">-d</code> or <code class="language-plaintext highlighter-rouge">--dir</code> as an alias to <code class="language-plaintext highlighter-rouge">--files</code>, in favor of consistency with PMD.
|
||
PMD 7 will remove support for <code class="language-plaintext highlighter-rouge">--files</code> in favor of these new flags.</li>
|
||
</ul>
|
||
|
||
<p><strong>Linux run.sh parameters</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>Using <code class="language-plaintext highlighter-rouge">run.sh cpdgui</code> will now warn about it being deprecated. Use <code class="language-plaintext highlighter-rouge">run.sh cpd-gui</code> instead.</p>
|
||
</li>
|
||
<li>
|
||
<p>The old designer (<code class="language-plaintext highlighter-rouge">run.sh designerold</code>) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: <code class="language-plaintext highlighter-rouge">run.sh designer</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>The old visual AST viewer (<code class="language-plaintext highlighter-rouge">run.sh bgastviewer</code>) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: <code class="language-plaintext highlighter-rouge">run.sh designer</code> for a visual tool, or use <code class="language-plaintext highlighter-rouge">run.sh ast-dump</code> for a text-based alternative.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li>The following core APIs have been marked as deprecated for removal in PMD 7:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> and <code class="language-plaintext highlighter-rouge">PMD.StatusCode</code> - PMD 7 will ship with a revamped CLI split from pmd-core. To programmatically launch analysis you can use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#"><code>PmdAnalysis</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getAllInputPaths()"><code>PMDConfiguration#getAllInputPaths</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPathList()"><code>PMDConfiguration#getInputPathList</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(java.util.List)"><code>PMDConfiguration#setInputPaths</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPathList(java.util.List)"><code>PMDConfiguration#setInputPathList</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(java.lang.String)"><code>PMDConfiguration#addInputPath</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(java.nio.file.Path)"><code>PMDConfiguration#addInputPath</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputFilePath()"><code>PMDConfiguration#getInputFilePath</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getInputFile()"><code>PMDConfiguration#getInputFile</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFilePath()"><code>PMDConfiguration#getIgnoreFilePath</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFile()"><code>PMDConfiguration#getIgnoreFile</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(java.lang.String)"><code>PMDConfiguration#setInputFilePath</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(java.nio.file.Path)"><code>PMDConfiguration#setInputFilePath</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(java.lang.String)"><code>PMDConfiguration#setIgnoreFilePath</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(java.nio.file.Path)"><code>PMDConfiguration#setIgnoreFilePath</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputUri()"><code>PMDConfiguration#getInputUri</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getUri()"><code>PMDConfiguration#getUri</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(java.lang.String)"><code>PMDConfiguration#setInputUri</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(java.net.URI)"><code>PMDConfiguration#setInputUri</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFile()"><code>PMDConfiguration#getReportFile</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()"><code>PMDConfiguration#getReportFilePath</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.lang.String)"><code>PMDConfiguration#setReportFile</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.nio.file.Path)"><code>PMDConfiguration#setReportFile</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isStressTest()"><code>PMDConfiguration#isStressTest</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setStressTest(boolean)"><code>PMDConfiguration#setStressTest</code></a> - Will be removed with no replacement.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isBenchmark()"><code>PMDConfiguration#isBenchmark</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setBenchmark(boolean)"><code>PMDConfiguration#setBenchmark</code></a> - Will be removed with no replacement, the CLI will still support it.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#"><code>CPD</code></a> and <code class="language-plaintext highlighter-rouge">CPD.StatusCode</code> - PMD 7 will ship with a revamped CLI split from pmd-core. An alternative to programmatically launch CPD analysis will be added in due time.</li>
|
||
</ul>
|
||
</li>
|
||
<li>In order to reduce the dependency on Apex Jorje classes, the method <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/DataType.html#fromBasicType(apex.jorje.semantic.symbol.type.BasicType)"><code>DataType#fromBasicType</code></a>
|
||
has been deprecated. The equivalent method <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/DataType.html#fromTypeName(java.lang.String)"><code>fromTypeName</code></a> should be used instead.</li>
|
||
</ul>
|
||
|
||
<h4 id="6510">6.51.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6500">6.50.0</h4>
|
||
|
||
<p><strong>CPD CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>CPD now supports the <code class="language-plaintext highlighter-rouge">--ignore-literal-sequences</code> argument when analyzing Lua code.</li>
|
||
</ul>
|
||
|
||
<h4 id="6490">6.49.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li>In order to reduce the dependency on Apex Jorje classes, the following methods have been deprecated.
|
||
These methods all leaked internal Jorje enums. These enums have been replaced now by enums the
|
||
PMD’s AST package.
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ASTAssignmentExpression.html#getOperator()"><code>ASTAssignmentExpression#getOperator</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ASTBinaryExpression.html#getOperator()"><code>ASTBinaryExpression#getOperator</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ASTBooleanExpression.html#getOperator()"><code>ASTBooleanExpression#getOperator</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ASTPostfixExpression.html#getOperator()"><code>ASTPostfixExpression#getOperator</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ASTPrefixExpression.html#getOperator()"><code>ASTPrefixExpression#getOperator</code></a></li>
|
||
</ul>
|
||
|
||
<p>All these classes have now a new <code class="language-plaintext highlighter-rouge">getOp()</code> method. Existing code should be refactored to use this method instead.
|
||
It returns the new enums, like <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/AssignmentOperator.html#"><code>AssignmentOperator</code></a>, and avoids
|
||
the dependency to Jorje.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="6480">6.48.0</h4>
|
||
|
||
<p><strong>CPD CLI</strong></p>
|
||
|
||
<ul>
|
||
<li>CPD has a new CLI option <code class="language-plaintext highlighter-rouge">--debug</code>. This option has the same behavior as in PMD. It enables more verbose
|
||
logging output.</li>
|
||
</ul>
|
||
|
||
<p><strong>Rule Test Framework</strong></p>
|
||
|
||
<ul>
|
||
<li>The module “pmd-test”, which contains support classes to write rule tests, now <strong>requires Java 8</strong>. If you depend on
|
||
this module for testing your own custom rules, you’ll need to make sure to use at least Java 8.</li>
|
||
<li>The new module “pmd-test-schema” contains now the XSD schema and the code to parse the rule test XML files. The
|
||
schema has been extracted in order to easily share it with other tools like the Rule Designer or IDE plugins.</li>
|
||
<li>Test schema changes:
|
||
<ul>
|
||
<li>The attribute <code class="language-plaintext highlighter-rouge">isRegressionTest</code> of <code class="language-plaintext highlighter-rouge">test-code</code> is deprecated. The new
|
||
attribute <code class="language-plaintext highlighter-rouge">disabled</code> should be used instead for defining whether a rule test should be skipped or not.</li>
|
||
<li>The attributes <code class="language-plaintext highlighter-rouge">reinitializeRule</code> and <code class="language-plaintext highlighter-rouge">useAuxClasspath</code> of <code class="language-plaintext highlighter-rouge">test-code</code> are deprecated and assumed true.
|
||
They will not be replaced.</li>
|
||
<li>The new attribute <code class="language-plaintext highlighter-rouge">focused</code> of <code class="language-plaintext highlighter-rouge">test-code</code> allows disabling all tests except the focused one temporarily.</li>
|
||
</ul>
|
||
</li>
|
||
<li>More information about the rule test framework can be found in the documentation:
|
||
<a href="pmd_userdocs_extending_testing.html">Testing your rules</a></li>
|
||
</ul>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li>The experimental Java AST class <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.java.ast.ASTGuardedPattern</code> has been deprecated and
|
||
will be removed. It was introduced for Java 17 and Java 18 Preview as part of pattern matching for switch,
|
||
but it is no longer supported with Java 19 Preview.</li>
|
||
<li>The interface <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/renderer/CPDRenderer.html#"><code>CPDRenderer</code></a> is deprecated. For custom CPD renderers
|
||
the new interface <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReportRenderer.html#"><code>CPDReportRenderer</code></a> should be used.</li>
|
||
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/testframework/TestDescriptor.html#"><code>TestDescriptor</code></a> is deprecated, replaced with <a href="https://docs.pmd-code.org/apidocs/pmd-test-schema/7.0.0/net/sourceforge/pmd/test/schema/RuleTestDescriptor.html#"><code>RuleTestDescriptor</code></a>.</li>
|
||
<li>Many methods of <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/testframework/RuleTst.html#"><code>RuleTst</code></a> have been deprecated as internal API.</li>
|
||
</ul>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>To support the Java preview language features “Pattern Matching for Switch” and “Record Patterns”, the following
|
||
AST nodes have been introduced as experimental:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTSwitchGuard.html#"><code>ASTSwitchGuard</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#"><code>ASTRecordPattern</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTComponentPatternList.html#"><code>ASTComponentPatternList</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setRenderer(net.sourceforge.pmd.cpd.Renderer)"><code>CPDConfiguration#setRenderer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setCPDRenderer(net.sourceforge.pmd.cpd.renderer.CPDRenderer)"><code>CPDConfiguration#setCPDRenderer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getRenderer()"><code>CPDConfiguration#getRenderer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getCPDRenderer()"><code>CPDConfiguration#getCPDRenderer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getRendererFromString(java.lang.String,java.lang.String)"><code>CPDConfiguration#getRendererFromString</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getCPDRendererFromString(java.lang.String,java.lang.String)"><code>CPDConfiguration#getCPDRendererFromString</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/renderer/CPDRendererAdapter.html#"><code>CPDRendererAdapter</code></a></li>
|
||
</ul>
|
||
|
||
<h4 id="6470">6.47.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6460">6.46.0</h4>
|
||
|
||
<p><strong>Deprecated ruleset references</strong></p>
|
||
|
||
<p>Ruleset references with the following formats are now deprecated and will produce a warning
|
||
when used on the CLI or in a ruleset XML file:</p>
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge"><lang-name>-<ruleset-name></code>, eg <code class="language-plaintext highlighter-rouge">java-basic</code>, which resolves to <code class="language-plaintext highlighter-rouge">rulesets/java/basic.xml</code></li>
|
||
<li>the internal release number, eg <code class="language-plaintext highlighter-rouge">600</code>, which resolves to <code class="language-plaintext highlighter-rouge">rulesets/releases/600.xml</code></li>
|
||
</ul>
|
||
|
||
<p>Use the explicit forms of these references to be compatible with PMD 7.</p>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetReferenceId.html#toString()"><code>toString</code></a> is now deprecated. The format of this
|
||
method will remain the same until PMD 7. The deprecation is intended to steer users
|
||
away from relying on this format, as it may be changed in PMD 7.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPaths()"><code>getInputPaths</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(java.lang.String)"><code>setInputPaths</code></a> are now deprecated.
|
||
A new set of methods have been added, which use lists and do not rely on comma splitting.</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/cpd/CPDCommandLineInterface.html#"><code>CPDCommandLineInterface</code></a> has been internalized. In order to execute CPD either
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#runCpd(java.lang.String...)"><code>CPD#runCpd</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#main(java.lang.String[])"><code>CPD#main</code></a>
|
||
should be used.</li>
|
||
<li>Several members of <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCPDCLITest.html#"><code>BaseCPDCLITest</code></a> have been deprecated with replacements.</li>
|
||
<li>The methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ant/Formatter.html#start(java.lang.String)"><code>Formatter#start</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ant/Formatter.html#end(net.sourceforge.pmd.Report)"><code>Formatter#end</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ant/Formatter.html#getRenderer()"><code>Formatter#getRenderer</code></a>,
|
||
and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ant/Formatter.html#isNoOutputSupplied()"><code>Formatter#isNoOutputSupplied</code></a> have been internalized.</li>
|
||
</ul>
|
||
|
||
<h4 id="6450">6.45.0</h4>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>Report has two new methods which allow limited mutations of a given report:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#filterViolations(java.util.function.Predicate)"><code>Report#filterViolations</code></a> creates a new report with
|
||
some violations removed with a given predicate based filter.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#union(net.sourceforge.pmd.reporting.Report)"><code>Report#union</code></a> can combine two reports into a single new Report.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/Predicate.html#"><code>net.sourceforge.pmd.util.Predicate</code></a> will be replaced in PMD7 with the standard Predicate interface from java8.</li>
|
||
<li>The module <code class="language-plaintext highlighter-rouge">pmd-html</code> is entirely experimental right now. Anything in the package
|
||
<code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.html</code> should be used cautiously.</li>
|
||
</ul>
|
||
|
||
<h4 id="6440">6.44.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li>Several members of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> have been newly deprecated, including:
|
||
<ul>
|
||
<li><code class="language-plaintext highlighter-rouge">PMD#EOL</code>: use <code class="language-plaintext highlighter-rouge">System#lineSeparator()</code></li>
|
||
<li><code class="language-plaintext highlighter-rouge">PMD#SUPPRESS_MARKER</code>: use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#DEFAULT_SUPPRESS_MARKER"><code>DEFAULT_SUPPRESS_MARKER</code></a></li>
|
||
<li><code class="language-plaintext highlighter-rouge">PMD#processFiles</code>: use the new programmatic API</li>
|
||
<li><code class="language-plaintext highlighter-rouge">PMD#getApplicableFiles</code>: is internal</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#prependClasspath(java.lang.String)"><code>PMDConfiguration#prependClasspath</code></a> is deprecated
|
||
in favour of <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#prependAuxClasspath(java.lang.String)"><code>prependAuxClasspath</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.lang.String)"><code>PMDConfiguration#setRuleSets</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSets()"><code>getRuleSets</code></a> are deprecated. Use instead
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.util.List)"><code>setRuleSets</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#addRuleSet(java.lang.String)"><code>addRuleSet</code></a>,
|
||
and <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSetPaths()"><code>getRuleSetPaths</code></a>.</li>
|
||
<li>Several members of <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCLITest.html#"><code>BaseCLITest</code></a> have been deprecated with replacements.</li>
|
||
<li>
|
||
<p>Several members of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDCommandLineInterface.html#"><code>PMDCommandLineInterface</code></a> have been explicitly deprecated.
|
||
The whole class however was deprecated long ago already with 6.30.0. It is internal API and should
|
||
not be used.</p>
|
||
</li>
|
||
<li>In modelica, the rule classes <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/6.55.0/net/sourceforge/pmd/lang/modelica/rule/AmbiguousResolutionRule.html#"><code>AmbiguousResolutionRule</code></a>
|
||
and <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/6.55.0/net/sourceforge/pmd/lang/modelica/rule/ConnectUsingNonConnector.html#"><code>ConnectUsingNonConnector</code></a> have been deprecated,
|
||
since they didn’t comply to the usual rule class naming conventions yet.
|
||
The replacements are in the subpackage <code class="language-plaintext highlighter-rouge">bestpractices</code>.</li>
|
||
</ul>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>Together with the new programmatic API the interface
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> has been added as <em>experimental</em>. It intends
|
||
to replace <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/datasource/DataSource.html#"><code>DataSource</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/SourceCode.html#"><code>SourceCode</code></a> in the long term.</p>
|
||
|
||
<p>This interface will change in PMD 7 to support read/write operations
|
||
and other things. You don’t need to use it in PMD 6, as <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#"><code>FileCollector</code></a>
|
||
decouples you from this. A file collector is available through <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#files()"><code>PmdAnalysis#files</code></a>.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="6430">6.43.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<p>Some API deprecations were performed in core PMD classes, to improve compatibility with PMD 7.</p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#"><code>Report</code></a>: the constructor and other construction methods like addViolation or createReport</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#"><code>RuleContext</code></a>: all constructors, getters and setters. A new set
|
||
of stable methods, matching those in PMD 7, was added to replace the <code class="language-plaintext highlighter-rouge">addViolation</code>
|
||
overloads of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#"><code>AbstractRule</code></a>. In PMD 7, <code class="language-plaintext highlighter-rouge">RuleContext</code> will
|
||
be the API to report violations, and it can already be used as such in PMD 6.</li>
|
||
<li>The field <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#configuration"><code>configuration</code></a> is unused and will be removed.</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/RuleSet.html#"><code>RuleSet</code></a>: methods that serve to apply rules, including <code class="language-plaintext highlighter-rouge">apply</code>, <code class="language-plaintext highlighter-rouge">start</code>, <code class="language-plaintext highlighter-rouge">end</code>, <code class="language-plaintext highlighter-rouge">removeDysfunctionalRules</code></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/AbstractAccumulatingRenderer.html#renderFileReport(Report)"><code>AbstractAccumulatingRenderer#renderFileReport</code></a> is internal API
|
||
and should not be overridden in own renderers.</li>
|
||
</ul>
|
||
|
||
<p><strong>Changed API</strong></p>
|
||
|
||
<p>It is now forbidden to report a violation:</p>
|
||
<ul>
|
||
<li>With a <code class="language-plaintext highlighter-rouge">null</code> node</li>
|
||
<li>With a <code class="language-plaintext highlighter-rouge">null</code> message</li>
|
||
<li>With a <code class="language-plaintext highlighter-rouge">null</code> set of format arguments (prefer a zero-length array)</li>
|
||
</ul>
|
||
|
||
<p>Note that the message is set from the XML rule declaration, so this is only relevant
|
||
if you instantiate rules manually.</p>
|
||
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#"><code>RuleContext</code></a> now requires setting the current rule before calling
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#apply(java.util.List,net.sourceforge.pmd.RuleContext)"><code>apply</code></a>. This is
|
||
done automatically by <code class="language-plaintext highlighter-rouge">RuleSet#apply</code> and such. Creating and configuring a
|
||
<code class="language-plaintext highlighter-rouge">RuleContext</code> manually is strongly advised against, as the lifecycle of <code class="language-plaintext highlighter-rouge">RuleContext</code>
|
||
will change drastically in PMD 7.</p>
|
||
|
||
<h4 id="6420">6.42.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6410">6.41.0</h4>
|
||
|
||
<p><strong>Command Line Interface</strong></p>
|
||
|
||
<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>
|
||
|
||
<h4 id="6400">6.40.0</h4>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>The interface <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTCommentContainer.html#"><code>ASTCommentContainer</code></a> has been added to the Apex AST.
|
||
It provides a way to check whether a node contains at least one comment. Currently, this is only implemented for
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTCatchBlockStatement.html#"><code>ASTCatchBlockStatement</code></a> and used by the rule
|
||
<a href="https://docs.pmd-code.org/pmd-doc-7.0.0/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>
|
||
|
||
<h4 id="6390">6.39.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6380">6.38.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6370">6.37.0</h4>
|
||
|
||
<p><strong>PMD CLI</strong></p>
|
||
|
||
<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>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>The AST types and APIs around Sealed Classes are not experimental anymore:</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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.55.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.55.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.55.0/net/sourceforge/pmd/lang/java/ast/ASTPermitsList.html#"><code>ASTPermitsList</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/cpd/TokenEntry.State.html#"><code>net.sourceforge.pmd.cpd.TokenEntry.State</code></a> is considered to be internal API.
|
||
It will probably be moved away with PMD 7.</li>
|
||
</ul>
|
||
|
||
<h4 id="6360">6.36.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6350">6.35.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#doPMD(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#doPMD</code></a> is deprecated.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#runPmd(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#runPmd</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#run(java.lang.String[])"><code>PMD#run</code></a> is deprecated.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#runPmd(java.lang.String...)"><code>PMD#runPmd</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ThreadSafeReportListener.html#"><code>ThreadSafeReportListener</code></a> and the methods to use them in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#"><code>Report</code></a>
|
||
(<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.0/net/sourceforge/pmd/Report.html#getListeners()"><code>getListeners</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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>
|
||
|
||
<h4 id="6340">6.34.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6330">6.33.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6320">6.32.0</h4>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<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/7.0.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/7.0.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:</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#isPatternBinding()"><code>ASTVariableId#isPatternBinding</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.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/7.0.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/7.0.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/7.0.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/7.0.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/7.0.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/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTCompactConstructorDeclaration.html#"><code>ASTCompactConstructorDeclaration</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/lang/java/rule/bestpractices/AvoidUsingHardCodedIPRule.html#"><code>AvoidUsingHardCodedIPRule</code></a>
|
||
are deprecated and considered to be internal API. They will be removed with PMD 7.</li>
|
||
</ul>
|
||
|
||
<h4 id="6310">6.31.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.55.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.55.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.55.0/net/sourceforge/pmd/lang/xml/rule/AbstractXmlRule.html#"><code>AbstractXmlRule</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/GenericToken.html#getKind()"><code>GenericToken#getKind</code></a> has been added as experimental. This
|
||
unifies the token interface for both JavaCC and Antlr. The already existing method
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/token/AntlrToken.html#getKind()"><code>AntlrToken#getKind</code></a> is therefore experimental as well. The
|
||
returned constant depends on the actual language and might change whenever the grammar
|
||
of the language is changed.</li>
|
||
</ul>
|
||
|
||
<h4 id="6300">6.30.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<p><strong>Around RuleSet parsing</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> have been deprecated in favor of <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>RuleSetLoader</code></a>. This is easier to configure, and more maintainable than the multiple overloads of <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/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#"><code>RuleSet</code></a> for simple cases, eg <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#forSingleRule(net.sourceforge.pmd.lang.rule.Rule)"><code>forSingleRule</code></a>. These replace some counterparts in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a></li>
|
||
<li>Since <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a> is also deprecated, many APIs that require a RuleSets instance now are deprecated, and have a counterpart that expects a <code class="language-plaintext highlighter-rouge">List<RuleSet></code>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetReferenceId.html#"><code>RuleSetReferenceId</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetReference.html#"><code>RuleSetReference</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactoryCompatibility.html#"><code>RuleSetFactoryCompatibility</code></a> are deprecated. They are most likely not relevant outside of the implementation of pmd-core.</li>
|
||
</ul>
|
||
|
||
<p><strong>Around the <code class="language-plaintext highlighter-rouge">PMD</code> class</strong></p>
|
||
|
||
<p>Many classes around PMD’s entry point (<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a>) have been deprecated as internal, including:</p>
|
||
<ul>
|
||
<li>The contents of the packages <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/package-summary.html"><code>net.sourceforge.pmd.cli</code></a> in pmd-core, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/processor/package-summary.html"><code>net.sourceforge.pmd.processor</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> (the class will be made a utility class)</li>
|
||
</ul>
|
||
|
||
<p><strong>Miscellaneous</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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.55.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.55.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.55.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>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.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.55.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.55.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.55.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.55.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.55.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.55.0/net/sourceforge/pmd/lang/modelica/rule/ModelicaRuleViolationFactory.html#"><code>net.sourceforge.pmd.lang.modelica.rule.ModelicaRuleViolationFactory</code></a></li>
|
||
</ul>
|
||
|
||
<h4 id="6290">6.29.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6280">6.28.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolationComparator.html#"><code>net.sourceforge.pmd.RuleViolationComparator</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#DEFAULT_COMPARATOR"><code>RuleViolation#DEFAULT_COMPARATOR</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/AbstractTokenizer.html#"><code>net.sourceforge.pmd.cpd.AbstractTokenizer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>net.sourceforge.pmd.cpd.AnyCpdLexer</code></a> instead (previously called AnyTokenizer).</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-fortran/6.55.0/net/sourceforge/pmd/cpd/FortranTokenizer.html#"><code>net.sourceforge.pmd.cpd.FortranTokenizer</code></a>. Was replaced by an <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-fortran/7.0.0/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.html#createCpdLexer(net.sourceforge.pmd.lang.LanguagePropertyBundle)"><code>FortranLanguageModule#createCpdLexer</code></a> anyway.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-perl/6.55.0/net/sourceforge/pmd/cpd/PerlTokenizer.html#"><code>net.sourceforge.pmd.cpd.PerlTokenizer</code></a>. Was replaced by an <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-perl/7.0.0/net/sourceforge/pmd/lang/perl/PerlLanguageModule.html#createCpdLexer(net.sourceforge.pmd.lang.LanguagePropertyBundle)"><code>PerlLanguageModule#createCpdLexer</code></a> anyway.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-ruby/6.55.0/net/sourceforge/pmd/cpd/RubyTokenizer.html#"><code>net.sourceforge.pmd.cpd.RubyTokenizer</code></a>. Was replaced by an <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-ruby/7.0.0/net/sourceforge/pmd/lang/ruby/RubyLanguageModule.html#createCpdLexer(net.sourceforge.pmd.lang.LanguagePropertyBundle)"><code>RubyLanguageModule#createCpdLexer</code></a> anyway.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleReference.html#getOverriddenLanguage()"><code>RuleReference#getOverriddenLanguage</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.0/net/sourceforge/pmd/lang/cs/antlr4/CSharpLexer.html#"><code>net.sourceforge.pmd.lang.cs.antlr4.CSharpLexer</code></a> will be moved to package <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.55.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.55.0/net/sourceforge/pmd/lang/go/antlr4/GolangLexer.html#"><code>net.sourceforge.pmd.lang.go.antlr4.GolangLexer</code></a> will be moved to package
|
||
<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.55.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.55.0/net/sourceforge/pmd/lang/lua/antlr4/LuaLexer.html#"><code>net.sourceforge.pmd.lang.lua.antlr4.LuaLexer</code></a> will be moved to package
|
||
<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>
|
||
|
||
<h4 id="6270">6.27.0</h4>
|
||
|
||
<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>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.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.55.0/net/sourceforge/pmd/lang/AbstractParser.html#"><code>AbstractParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.0/net/sourceforge/pmd/Report.html#"><code>net.sourceforge.pmd.Report</code></a>. They are replaced by accessors
|
||
that produce a List. For example, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#iterator()"><code>iterator()</code></a>
|
||
(and implementing Iterable) and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#isEmpty()"><code>isEmpty()</code></a> are both
|
||
replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.0/net/sourceforge/pmd/lang/scala/ast/ScalaParserVisitorAdapter.html#combine(R,R)"><code>ScalaParserVisitorAdapter#combine</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.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.55.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.55.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/7.0.0/net/sourceforge/pmd/lang/java/types/TypeTestUtil.html#"><code>TypeTestUtil</code></a>, which has the
|
||
same functionality, but a slightly changed API.</li>
|
||
<li>Many of the classes in <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/symboltable/package-summary.html"><code>net.sourceforge.pmd.lang.java.symboltable</code></a>
|
||
are deprecated as internal API.</li>
|
||
</ul>
|
||
|
||
<h4 id="6260">6.26.0</h4>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleChainVisitor.html#"><code>RuleChainVisitor</code></a> and all implementations in language modules</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.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.55.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#<init>(java.lang.String,java.lang.String,java.lang.String,java.lang.Class,java.lang.String...)"><code>BaseLanguageModule#<init></code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/ImportWrapper.html#"><code>ImportWrapper</code></a></li>
|
||
</ul>
|
||
|
||
<h4 id="6250">6.25.0</h4>
|
||
|
||
<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"><rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod" /></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>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.0/net/sourceforge/pmd/RuleChain.html#"><code>RuleChain</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRuleSets(java.lang.String,net.sourceforge.pmd.RuleSetFactory)"><code>RulesetsFactoryUtils#getRuleSets</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/TokenEntry.html#<init>(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.55.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.55.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.55.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.55.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.55.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>
|
||
|
||
<h4 id="6240">6.24.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#addVersion(java.lang.String,net.sourceforge.pmd.lang.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.55.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.55.0/net/sourceforge/pmd/lang/antlr/AntlrTokenManager.ANTLRSyntaxError.html#"><code>ANTLRSyntaxError</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>Experimental APIs</strong></p>
|
||
|
||
<p><strong>Note:</strong> Experimental APIs are identified with the annotation <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/Experimental.html#"><code>Experimental</code></a>,
|
||
see its javadoc for details</p>
|
||
|
||
<ul>
|
||
<li>The experimental methods in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#"><code>BaseLanguageModule</code></a> have been replaced by a
|
||
definitive API.</li>
|
||
</ul>
|
||
|
||
<h4 id="6230">6.23.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.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.55.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.55.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.55.0/net/sourceforge/pmd/lang/rule/xpath/XPathRuleQuery.html#"><code>XPathRuleQuery</code></a></li>
|
||
</ul>
|
||
|
||
<p><strong>In ASTs</strong></p>
|
||
|
||
<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/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
|
||
which for rules, means that they never need to instantiate node themselves.
|
||
Those constructors will be made package private with 7.0.0.</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.</li>
|
||
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfNode.html#"><code>VfNode</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
|
||
to refer to nodes generically.</li>
|
||
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</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/7.0.0/net/sourceforge/pmd/lang/ast/Parser.html#"><code>Parser</code></a> (eg <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/VfParser.html#"><code>VfParser</code></a>) are deprecated and should not be used directly.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser()"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
|
||
<li>The implementation classes of <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/TokenManager.html#"><code>TokenManager</code></a> (eg <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/VfTokenManager.html#"><code>VfTokenManager</code></a>) are deprecated and should not be used outside of our implementation.
|
||
<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: <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/package-summary.html"><code>net.sourceforge.pmd.lang.apex.ast</code></a></li>
|
||
<li>Javascript: <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.55.0/net/sourceforge/pmd/lang/ecmascript/ast/package-summary.html"><code>net.sourceforge.pmd.lang.ecmascript.ast</code></a></li>
|
||
<li>PL/SQL: <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.55.0/net/sourceforge/pmd/lang/plsql/ast/package-summary.html"><code>net.sourceforge.pmd.lang.plsql.ast</code></a></li>
|
||
<li>Scala: <a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/6.55.0/net/sourceforge/pmd/lang/scala/ast/package-summary.html"><code>net.sourceforge.pmd.lang.scala.ast</code></a></li>
|
||
<li>Visualforce: <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/ast/package-summary.html"><code>net.sourceforge.pmd.lang.vf.ast</code></a></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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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.55.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>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.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.55.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.55.0/net/sourceforge/pmd/lang/ast/AbstractTokenManager.html#getFileName()"><code>AbstractTokenManager#getFileName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/token/AntlrToken.html#getType()"><code>AntlrToken#getType</code></a> - use <code class="language-plaintext highlighter-rouge">getKind()</code> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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.55.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.55.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.55.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.55.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.55.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.55.0/net/sourceforge/pmd/lang/rule/XPathRule.html#"><code>XPathRule</code></a>. See javadoc for details.</li>
|
||
</ul>
|
||
|
||
<h4 id="6220">6.22.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code>JavaLanguageHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#"><code>JavaLanguageParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#"><code>JavaDataFlowHandler</code></a></li>
|
||
<li>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
|
||
language module, eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
|
||
See javadoc of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.</li>
|
||
<li>
|
||
<p>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
|
||
eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a>.</p>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleFactory.html#"><code>RuleFactory</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleBuilder.html#"><code>RuleBuilder</code></a></li>
|
||
<li>Constructors of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.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://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.</li>
|
||
</ul>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/DFAGraphRule.html#"><code>DFAGraphRule</code></a> and its implementations</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/DFAGraphMethod.html#"><code>DFAGraphMethod</code></a></li>
|
||
<li>Many methods on the <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
|
||
and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code>Node#isFindBoundary</code></a> is deprecated for XPath queries.</li>
|
||
<li>Many APIs of <code class="language-plaintext highlighter-rouge">net.sourceforge.pmd.lang.metrics</code>, though most of them were internal and
|
||
probably not used directly outside of PMD. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.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://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/QualifiableNode.html#"><code>QualifiableNode</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/QualifiedName.html#"><code>QualifiedName</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#"><code>AbstractJavaParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/AbstractJavaHandler.html#"><code>AbstractJavaHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getTypeKind()"><code>ASTAnyTypeDeclaration#getTypeKind</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#"><code>JavaQualifiedName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()"><code>ASTCatchStatement#getBlock</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()"><code>ASTCompilationUnit#declarationsAreInDefaultPackage</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#"><code>JavaQualifiableNode</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()"><code>ASTAnyTypeDeclaration#getQualifiedName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code>ASTMethodOrConstructorDeclaration#getQualifiedName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code>ASTLambdaExpression#getQualifiedName</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code>ASTMethodOrConstructorDeclaration</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#"><code>ASTLambdaExpression</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()"><code>ASTEnumDeclaration#getImage</code></a>.</li>
|
||
<li>Several methods of <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
|
||
have been added. This includes the XPath attribute <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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a>
|
||
anymore come 7.0.0. Test the type of the expression nested within it.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/metrics/JavaMetrics.html#"><code>JavaMetrics</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/metrics/JavaMetricsComputer.html#"><code>JavaMetricsComputer</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#getArgumentCount()"><code>ASTArguments#getArgumentCount</code></a>.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#size()"><code>size</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFormalParameters.html#getParameterCount()"><code>ASTFormalParameters#getParameterCount</code></a>.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/metrics/ApexMetrics.html#"><code>ApexMetrics</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsComputer.html#"><code>ApexMetricsComputer</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>In ASTs (JSP)</strong></p>
|
||
|
||
<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://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
|
||
which for rules, means that they never need to instantiate node themselves.
|
||
Those constructors will be made package private with 7.0.0.</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.</li>
|
||
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
|
||
to refer to nodes generically.</li>
|
||
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
|
||
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>.
|
||
We will make those setters package private with 7.0.0.</li>
|
||
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/JspParser.html#"><code>JspParser</code></a> is deprecated and should not be used directly.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser()"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
|
||
</ul>
|
||
|
||
<p>Please look at <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.jsp.ast</code></a> to find out the full list of deprecations.</p>
|
||
|
||
<p><strong>In ASTs (Velocity)</strong></p>
|
||
|
||
<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://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
|
||
which for rules, means that they never need to instantiate node themselves.
|
||
Those constructors will be made package private with 7.0.0.</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.</li>
|
||
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
|
||
to refer to nodes generically.</li>
|
||
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
|
||
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>.
|
||
We will make those setters package private with 7.0.0.</li>
|
||
<li>The package <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/directive/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.directive</code></a> as well as the classes
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.html#"><code>DirectiveMapper</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/util/LogUtil.html#"><code>LogUtil</code></a> are deprecated
|
||
for removal. They were only used internally during parsing.</li>
|
||
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/VmParser.html#"><code>VmParser</code></a> is deprecated and should not be used directly.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser()"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
|
||
</ul>
|
||
|
||
<p>Please look at <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.ast</code></a> to find out the full list of deprecations.</p>
|
||
|
||
<p><strong>PLSQL AST</strong></p>
|
||
|
||
<p>The production and node <a href="https://javadoc.io/doc/net.sourceforge.pmd/pmd-plsql/6.21.0/net/sourceforge/pmd/lang/plsql/ast/ASTCursorBody.html"><code>ASTCursorBody</code></a> was unnecessary, not used and has been removed. Cursors have been already
|
||
parsed as <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/ASTCursorSpecification.html#"><code>ASTCursorSpecification</code></a>.</p>
|
||
|
||
<h4 id="6210">6.21.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>Internal API</strong></p>
|
||
|
||
<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.55.0/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code>JavaLanguageHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#"><code>JavaLanguageParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#"><code>JavaDataFlowHandler</code></a></li>
|
||
<li>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
|
||
language module, eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
|
||
See javadoc of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.</li>
|
||
<li>
|
||
<p>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
|
||
eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a>.</p>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleFactory.html#"><code>RuleFactory</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleBuilder.html#"><code>RuleBuilder</code></a></li>
|
||
<li>Constructors of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.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://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a></li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.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://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
|
||
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.</p>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/CharStream.html#"><code>CharStream</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/JavaCharStream.html#"><code>JavaCharStream</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/SimpleCharStream.html#"><code>SimpleCharStream</code></a>: these are APIs used by our JavaCC
|
||
implementations and that will be moved/refactored for PMD 7.0.0. They should not
|
||
be used, extended or implemented directly.</li>
|
||
<li>All classes generated by JavaCC, eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JJTJavaParserState.html#"><code>JJTJavaParserState</code></a>.
|
||
This includes token classes, which will be replaced with a single implementation, and
|
||
subclasses of <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/ParseException.html#"><code>ParseException</code></a>, whose usages will be replaced
|
||
by just that superclass.</li>
|
||
</ul>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li>Many methods on the <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
|
||
and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code>Node#isFindBoundary</code></a> is deprecated for XPath queries.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#"><code>AbstractJavaParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getTypeKind()"><code>ASTAnyTypeDeclaration#getTypeKind</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#"><code>JavaQualifiedName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()"><code>ASTCatchStatement#getBlock</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()"><code>ASTCompilationUnit#declarationsAreInDefaultPackage</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#"><code>JavaQualifiableNode</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()"><code>ASTAnyTypeDeclaration#getQualifiedName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code>ASTMethodOrConstructorDeclaration#getQualifiedName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code>ASTLambdaExpression#getQualifiedName</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code>ASTMethodOrConstructorDeclaration</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#"><code>ASTLambdaExpression</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()"><code>ASTEnumDeclaration#getImage</code></a>.</li>
|
||
<li>Several methods of <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
|
||
have been added. This includes the XPath attribute <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://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a>
|
||
anymore come 7.0.0. Test the type of the expression nested within it.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="6200">6.20.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6190">6.19.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li>All the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/dcd/package-summary.html#"><code>net.sourceforge.pmd.dcd</code></a> and its subpackages. See <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/dcd/DCD.html#"><code>DCD</code></a>.</li>
|
||
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#"><code>LanguageRegistry</code></a>:
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#commaSeparatedTerseNamesForLanguageVersion(java.util.List)"><code>commaSeparatedTerseNamesForLanguageVersion</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#commaSeparatedTerseNamesForLanguage(java.util.List)"><code>commaSeparatedTerseNamesForLanguage</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#findAllVersions()"><code>findAllVersions</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#findLanguageVersionByTerseName(java.lang.String)"><code>findLanguageVersionByTerseName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#getInstance()"><code>getInstance</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getExcludePatterns()"><code>RuleSet#getExcludePatterns</code></a>. Use the new method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getFileExclusions()"><code>getFileExclusions</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getIncludePatterns()"><code>RuleSet#getIncludePatterns</code></a>. Use the new method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getFileInclusions()"><code>getFileInclusions</code></a> instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/Parser.html#canParse()"><code>Parser#canParse</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/Parser.html#getSuppressMap()"><code>Parser#getSuppressMap</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleBuilder.html#<init>(java.lang.String,java.lang.String,java.lang.String)"><code>RuleBuilder#RuleBuilder</code></a>. Use the new constructor with the correct ResourceLoader instead.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleFactory.html#<init>()"><code>RuleFactory#RuleFactory</code></a>. Use the new constructor with the correct ResourceLoader instead.</li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/CanSuppressWarnings.html#"><code>CanSuppressWarnings</code></a> and its implementations</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaRule.html#isSuppressed(net.sourceforge.pmd.lang.ast.Node)"><code>isSuppressed</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaRule.html#getDeclaringType(net.sourceforge.pmd.lang.ast.Node)"><code>getDeclaringType</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#isSupressed(net.sourceforge.pmd.lang.ast.Node,net.sourceforge.pmd.Rule)"><code>isSupressed</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclarator.html#"><code>ASTMethodDeclarator</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getMethodName()"><code>getMethodName</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getBlock()"><code>getBlock</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getParameterCount()"><code>getParameterCount</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-apex
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.html#"><code>CanSuppressWarnings</code></a> and its implementations</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.html#isSupressed(net.sourceforge.pmd.lang.ast.Node,net.sourceforge.pmd.Rule)"><code>isSupressed</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal APIs</strong></p>
|
||
|
||
<ul>
|
||
<li>pmd-core
|
||
<ul>
|
||
<li>All the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a> and its subpackages,
|
||
except <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/datasource/package-summary.html#"><code>net.sourceforge.pmd.util.datasource</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/database/package-summary.html#"><code>net.sourceforge.pmd.util.database</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/GridBagHelper.html#"><code>GridBagHelper</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/ColumnDescriptor.html#"><code>ColumnDescriptor</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="6180">6.18.0</h4>
|
||
|
||
<p><strong>Changes to Renderer</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>Each renderer has now a new method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/Renderer.html#setUseShortNames(java.util.List)"><code>Renderer#setUseShortNames</code></a> which
|
||
is used for implementing the “shortnames” CLI option. The method is automatically called by PMD, if this
|
||
CLI option is in use. When rendering filenames to the report, the new helper method
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/AbstractRenderer.html#determineFileName(java.lang.String)"><code>AbstractRenderer#determineFileName</code></a> should be used. This will change
|
||
the filename to a short name, if the CLI option “shortnames” is used.</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>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li>The methods <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getImportedNameNode()"><code>ASTImportDeclaration#getImportedNameNode</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getPackage()"><code>ASTImportDeclaration#getPackage</code></a> have been deprecated and
|
||
will be removed with PMD 7.0.0.</li>
|
||
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#setSourceCodeFilename(java.lang.String)"><code>RuleContext#setSourceCodeFilename</code></a> has been deprecated
|
||
and will be removed. The already existing method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#setSourceCodeFile(java.io.File)"><code>RuleContext#setSourceCodeFile</code></a>
|
||
should be used instead. The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#getSourceCodeFilename()"><code>RuleContext#getSourceCodeFilename</code></a> still
|
||
exists and returns just the filename without the full path.</li>
|
||
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/processor/AbstractPMDProcessor.html#filenameFrom(net.sourceforge.pmd.util.datasource.DataSource)"><code>AbstractPMDProcessor#filenameFrom</code></a> has been
|
||
deprecated. It was used to determine a “short name” of the file being analyzed, so that the report
|
||
can use short names. However, this logic has been moved to the renderers.</li>
|
||
<li>The methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#metrics()"><code>Report#metrics</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#hasMetrics()"><code>Report#hasMetrics</code></a> have
|
||
been deprecated. They were leftovers from a previous deprecation round targeting
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/stat/StatisticalRule.html#"><code>StatisticalRule</code></a>.</li>
|
||
</ul>
|
||
|
||
<p><strong>Internal APIs</strong></p>
|
||
|
||
<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://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cache/package-summary.html#"><code>net.sourceforge.pmd.cache</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>pmd-java
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/package-summary.html#"><code>net.sourceforge.pmd.lang.java.typeresolution</code></a>: Everything, including
|
||
subpackages, except <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.html#"><code>JavaTypeDefinition</code></a>.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#getClassTypeResolver()"><code>ASTCompilationUnit#getClassTypeResolver</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="6170">6.17.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6160">6.16.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<blockquote>
|
||
<p>Reminder: Please don’t use members marked with the annotation <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>, as they will
|
||
likely be removed, hidden, or otherwise intentionally broken with 7.0.0.</p>
|
||
</blockquote>
|
||
|
||
<p><strong>In ASTs</strong></p>
|
||
|
||
<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://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser, which for rules, means
|
||
that never need to instantiate node themselves. Those constructors will be made package private with 7.0.0.</li>
|
||
<li><strong>Subclassing of abstract node classes, or usage of their type</strong>. Version 7.0.0 will bring a new set of abstractions
|
||
that will be public API, but the base classes are and will stay internal. You should not couple your code to them.
|
||
<ul>
|
||
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaNode.html#"><code>JavaNode</code></a> or
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package, to refer to nodes generically.</li>
|
||
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
|
||
</ul>
|
||
</li>
|
||
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>. We will make those
|
||
setters package private with 7.0.0.</li>
|
||
</ul>
|
||
|
||
<p>Please look at <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.java.ast</code></a> to find out the full list
|
||
of deprecations.</p>
|
||
|
||
<h4 id="6150">6.15.0</h4>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<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.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.apex.ast.DumpFacade</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.java.ast.DumpFacade</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.55.0/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.ecmascript.ast.DumpFacade</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.jsp.ast.DumpFacade</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.55.0/net/sourceforge/pmd/lang/plsql/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.plsql.ast.DumpFacade</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.vf.ast.DumpFacade</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/ast/AbstractVmNode.html#dump(java.lang.String,boolean,java.io.Writer)"><code>net.sourceforge.pmd.lang.vm.ast.AbstractVmNode#dump</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.55.0/net/sourceforge/pmd/lang/xml/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.xml.ast.DumpFacade</code></a></li>
|
||
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDumpFacade(java.io.Writer,java.lang.String,boolean)"><code>LanguageVersionHandler#getDumpFacade</code></a> will be
|
||
removed as well. It is deprecated, along with all its implementations in the subclasses of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code>LanguageVersionHandler</code></a>.</li>
|
||
</ul>
|
||
|
||
<h4 id="6140">6.14.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6130">6.13.0</h4>
|
||
|
||
<p><strong>Command Line Interface</strong></p>
|
||
|
||
<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>
|
||
|
||
<p><strong>Deprecated API</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/CodeClimateRule.html#"><code>CodeClimateRule</code></a> is deprecated in 7.0.0 because it was unused for 2 years and
|
||
created an unwanted dependency.
|
||
Properties “cc_categories”, “cc_remediation_points_multiplier”, “cc_block_highlighting” will also be removed.
|
||
See <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>
|
||
|
||
<h4 id="6120">6.12.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="6110">6.11.0</h4>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/stat/StatisticalRule.html#"><code>StatisticalRule</code></a> and the related helper classes and base rule classes
|
||
are deprecated for removal in 7.0.0. This includes all of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/stat/package-summary.html#"><code>net.sourceforge.pmd.stat</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/stat/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.stat</code></a>,
|
||
and also <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractStatisticalJavaRule.html#"><code>AbstractStatisticalJavaRule</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/rule/AbstractStatisticalApexRule.html#"><code>AbstractStatisticalApexRule</code></a> and the like.
|
||
The methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#addMetric(net.sourceforge.pmd.stat.Metric)"><code>Report#addMetric</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ThreadSafeReportListener.html#metricAdded(net.sourceforge.pmd.stat.Metric)"><code>metricAdded</code></a>
|
||
will also be removed.</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertySource.html#setProperty(net.sourceforge.pmd.properties.MultiValuePropertyDescriptor,V...)"><code>setProperty</code></a> is deprecated,
|
||
because <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> is deprecated as well.</li>
|
||
</ul>
|
||
|
||
<h4 id="6100">6.10.0</h4>
|
||
|
||
<p><strong>Properties framework</strong></p>
|
||
|
||
<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>
|
||
|
||
<p><strong>Changes to how you define properties</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>Construction of property descriptors has been possible through builders since 6.0.0. The 7.0.0 API will only allow
|
||
construction through builders. The builder hierarchy, currently found in the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/builders/package-summary.html#"><code>net.sourceforge.pmd.properties.builders</code></a>,
|
||
is being replaced by the simpler <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyBuilder.html#"><code>PropertyBuilder</code></a>. Their APIs enjoy a high degree of source compatibility.</p>
|
||
</li>
|
||
<li>
|
||
<p>Concrete property classes like <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code>StringMultiProperty</code></a> will gradually
|
||
all be deprecated until 7.0.0. Their usages should be replaced by direct usage of the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a>
|
||
interface, e.g. <code class="language-plaintext highlighter-rouge">PropertyDescriptor<Integer></code> or <code class="language-plaintext highlighter-rouge">PropertyDescriptor<List<String>></code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>Instead of spreading properties across countless classes, the utility class <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> will become
|
||
from 7.0.0 on the only provider for property descriptor builders. Each current property type will be replaced
|
||
by a corresponding method on <code class="language-plaintext highlighter-rouge">PropertyFactory</code>:</p>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#intProperty(java.lang.String)"><code>PropertyFactory#intProperty</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerMultiProperty.html#"><code>IntegerMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#intListProperty(java.lang.String)"><code>PropertyFactory#intListProperty</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FloatProperty.html#"><code>FloatProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/DoubleProperty.html#"><code>DoubleProperty</code></a> are both replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleProperty(java.lang.String)"><code>PropertyFactory#doubleProperty</code></a>.
|
||
Having a separate property for floats wasn’t that useful.
|
||
<ul>
|
||
<li>Similarly, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FloatMultiProperty.html#"><code>FloatMultiProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/DoubleMultiProperty.html#"><code>DoubleMultiProperty</code></a> are replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleListProperty(java.lang.String)"><code>PropertyFactory#doubleListProperty</code></a>.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/StringProperty.html#"><code>StringProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#stringProperty(java.lang.String)"><code>PropertyFactory#stringProperty</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code>StringMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#stringListProperty(java.lang.String)"><code>PropertyFactory#stringListProperty</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/RegexProperty.html#"><code>RegexProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#regexProperty(java.lang.String)"><code>PropertyFactory#regexProperty</code></a></p>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code>EnumeratedProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#enumProperty(java.lang.String,java.util.Map)"><code>PropertyFactory#enumProperty</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code>EnumeratedProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#enumListProperty(java.lang.String,java.util.Map)"><code>PropertyFactory#enumListProperty</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/BooleanProperty.html#"><code>BooleanProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#booleanProperty(java.lang.String)"><code>PropertyFactory#booleanProperty</code></a>
|
||
<ul>
|
||
<li>Its multi-valued counterpart, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/BooleanMultiProperty.html#"><code>BooleanMultiProperty</code></a>, is not replaced, because it doesn’t have a use case.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/CharacterProperty.html#"><code>CharacterProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#charProperty(java.lang.String)"><code>PropertyFactory#charProperty</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/CharacterMultiProperty.html#"><code>CharacterMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#charListProperty(java.lang.String)"><code>PropertyFactory#charListProperty</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/LongProperty.html#"><code>LongProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntProperty(java.lang.String)"><code>PropertyFactory#longIntProperty</code></a>
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/LongMultiProperty.html#"><code>LongMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntListProperty(java.lang.String)"><code>PropertyFactory#longIntListProperty</code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MethodProperty.html#"><code>MethodProperty</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FileProperty.html#"><code>FileProperty</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/TypeProperty.html#"><code>TypeProperty</code></a> and their multi-valued counterparts
|
||
are discontinued for lack of a use-case, and have no planned replacement in 7.0.0 for now.</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"><</span><span class="nc">Integer</span><span class="o">></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>
|
||
|
||
<p><strong>Architectural simplifications</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/EnumeratedPropertyDescriptor.html#"><code>EnumeratedPropertyDescriptor</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/NumericPropertyDescriptor.html#"><code>NumericPropertyDescriptor</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PackagedPropertyDescriptor.html#"><code>PackagedPropertyDescriptor</code></a>,
|
||
and the related builders (in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/builders/package-summary.html#"><code>net.sourceforge.pmd.properties.builders</code></a>) will be removed.
|
||
These specialized interfaces allowed additional constraints to be enforced on the
|
||
value of a property, but made the property class hierarchy very large and impractical
|
||
to maintain. Their functionality will be mapped uniformly to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#"><code>PropertyConstraint</code></a>s,
|
||
which will allow virtually any constraint to be defined, and improve documentation and error reporting. The
|
||
related methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyNumeric()"><code>PropertyTypeId#isPropertyNumeric</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyPackaged()"><code>PropertyTypeId#isPropertyPackaged</code></a> are also deprecated.</p>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/SingleValuePropertyDescriptor.html#"><code>SingleValuePropertyDescriptor</code></a>
|
||
are deprecated. 7.0.0 will introduce a new XML syntax which will remove the need for such a divide
|
||
between single- and multi-valued properties. The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>PropertyDescriptor#isMultiValue</code></a> will be removed
|
||
accordingly.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>Changes to the PropertyDescriptor interface</strong></p>
|
||
|
||
<ul>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#preferredRowCount()"><code>preferredRowCount</code></a> is deprecated with no intended replacement. It was never implemented, and does not belong
|
||
in this interface. The methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#uiOrder()"><code>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<PropertyDescriptor></code> anymore come 7.0.0.</li>
|
||
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#propertyErrorFor(net.sourceforge.pmd.Rule)"><code>propertyErrorFor</code></a> is deprecated and will be removed with no intended
|
||
replacement. It’s really just a shortcut for <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://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#valueFrom(java.lang.String)"><code>valueFrom(String)</code></a> and <code class="language-plaintext highlighter-rouge">String </code><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#asDelimitedString(java.lang.Object)"><code>asDelimitedString</code></a><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://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>isMultiValue</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#type()"><code>type</code></a> are deprecated and won’t be replaced. The new XML syntax will remove the need
|
||
for a divide between multi- and single-value properties, and will allow arbitrary types to be represented.
|
||
Since arbitrary types may be represented, <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://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#errorFor(java.lang.Object)"><code>errorFor</code></a> is deprecated as its return type will be changed to <code class="language-plaintext highlighter-rouge">Optional<String></code> with the shift to Java 8.</li>
|
||
</ul>
|
||
|
||
<p><strong>Deprecated APIs</strong></p>
|
||
|
||
<p><strong>For internalization</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>The implementation of the adapters for the XPath engines Saxon and Jaxen (package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.ast.xpath</code></a>)
|
||
are now deprecated. They’ll be moved to an internal package come 7.0.0. Only <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/Attribute.html#"><code>Attribute</code></a> remains public API.</p>
|
||
</li>
|
||
<li>
|
||
<p>The classes <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptorField.html#"><code>PropertyDescriptorField</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/builders/PropertyDescriptorBuilderConversionWrapper.html#"><code>PropertyDescriptorBuilderConversionWrapper</code></a>, and the methods
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#attributeValuesById()"><code>PropertyDescriptor#attributeValuesById</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isDefinedExternally()"><code>PropertyDescriptor#isDefinedExternally</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyTypeId.html#getFactory()"><code>PropertyTypeId#getFactory</code></a>.
|
||
These were used to read and write properties to and from XML, but were not intended as public API.</p>
|
||
</li>
|
||
<li>
|
||
<p>The class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/ValueParserConstants.html#"><code>ValueParserConstants</code></a> and the interface <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/ValueParser.html#"><code>ValueParser</code></a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>All classes from <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/metrics/impl/visitors/package-summary.html#"><code>net.sourceforge.pmd.lang.java.metrics.impl.visitors</code></a> are now considered internal API. They’re deprecated
|
||
and will be moved into an internal package with 7.0.0. To implement your own metrics visitors,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorAdapter.html#"><code>JavaParserVisitorAdapter</code></a> should be directly subclassed.</p>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowHandler()"><code>LanguageVersionHandler#getDataFlowHandler()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDFAGraphRule()"><code>LanguageVersionHandler#getDFAGraphRule()</code></a></p>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/VisitorStarter.html#"><code>VisitorStarter</code></a></p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p><strong>For removal</strong></p>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>All classes from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/modules/package-summary.html#"><code>net.sourceforge.pmd.properties.modules</code></a> will be removed.</p>
|
||
</li>
|
||
<li>
|
||
<p>The interface <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/Dimensionable.html#"><code>Dimensionable</code></a> has been deprecated.
|
||
It gets in the way of a grammar change for 7.0.0 and won’t be needed anymore (see <a href="https://github.com/pmd/pmd/issues/997">#997</a>).</p>
|
||
</li>
|
||
<li>
|
||
<p>Several methods from <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#"><code>ASTLocalVariableDeclaration</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> have
|
||
also been deprecated:</p>
|
||
</li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> won’t be a <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a> come 7.0.0, so
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getType()"><code>getType</code></a> and
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getTypeDefinition()"><code>getTypeDefinition</code></a> are deprecated.</p>
|
||
</li>
|
||
<li>
|
||
<p>The method <code class="language-plaintext highlighter-rouge">getVariableName</code> on those two nodes will be removed, too.</p>
|
||
</li>
|
||
<li>
|
||
<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<</code><a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#"><code>ASTVariableId</code></a><code class="language-plaintext highlighter-rouge">></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>
|
||
</li>
|
||
<li>
|
||
<p>In <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.java.ast</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserDecoratedVisitor.html#"><code>JavaParserDecoratedVisitor</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitor.html#"><code>JavaParserControllessVisitor</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitorAdapter.html#"><code>JavaParserControllessVisitorAdapter</code></a>, and <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorDecorator.html#"><code>JavaParserVisitorDecorator</code></a> are deprecated with no intended replacement.</p>
|
||
</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>
|
||
</li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.55.0/net/sourceforge/pmd/lang/cpp/CppHandler.html#"><code>CppHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.55.0/net/sourceforge/pmd/lang/cpp/CppLanguageModule.html#"><code>CppLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.55.0/net/sourceforge/pmd/lang/cpp/CppParser.html#"><code>CppParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cs/6.55.0/net/sourceforge/pmd/lang/cs/CsLanguageModule.html#"><code>CsLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-fortran/6.55.0/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.html#"><code>FortranLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-groovy/6.55.0/net/sourceforge/pmd/lang/groovy/GroovyLanguageModule.html#"><code>GroovyLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.55.0/net/sourceforge/pmd/lang/matlab/MatlabHandler.html#"><code>MatlabHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.55.0/net/sourceforge/pmd/lang/matlab/MatlabLanguageModule.html#"><code>MatlabLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.55.0/net/sourceforge/pmd/lang/matlab/MatlabParser.html#"><code>MatlabParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.55.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.html#"><code>ObjectiveCHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.55.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.html#"><code>ObjectiveCLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.55.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.html#"><code>ObjectiveCParser</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-php/6.55.0/net/sourceforge/pmd/lang/php/PhpLanguageModule.html#"><code>PhpLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.55.0/net/sourceforge/pmd/lang/python/PythonHandler.html#"><code>PythonHandler</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.55.0/net/sourceforge/pmd/lang/python/PythonLanguageModule.html#"><code>PythonLanguageModule</code></a></li>
|
||
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.55.0/net/sourceforge/pmd/lang/python/PythonParser.html#"><code>PythonParser</code></a></li>
|
||
<li>
|
||
<p><a href="https://docs.pmd-code.org/apidocs/pmd-ruby/6.55.0/net/sourceforge/pmd/lang/ruby/RubyLanguageModule.html#"><code>RubyLanguageModule</code></a></p>
|
||
</li>
|
||
<li>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:
|
||
<ul>
|
||
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#"><code>Rule</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#isDfa()"><code>isDfa()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#isTypeResolution()"><code>isTypeResolution()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#isMultifile()"><code>isMultifile()</code></a> and their
|
||
respective setters.</li>
|
||
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#"><code>RuleSet</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code>usesDFA(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code>usesTypeResolution(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code>usesMultifile(Language)</code></a></li>
|
||
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code>usesDFA(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code>usesTypeResolution(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code>usesMultifile(Language)</code></a></li>
|
||
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code>LanguageVersionHandler</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowFacade()"><code>getDataFlowFacade()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade()"><code>getSymbolFacade()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade(java.lang.ClassLoader)"><code>getSymbolFacade(ClassLoader)</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getTypeResolutionFacade(java.lang.ClassLoader)"><code>getTypeResolutionFacade(ClassLoader)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getQualifiedNameResolutionFacade(java.lang.ClassLoader)"><code>getQualifiedNameResolutionFacade(ClassLoader)</code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="690">6.9.0</h4>
|
||
|
||
<p>No changes.</p>
|
||
|
||
<h4 id="680">6.8.0</h4>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>A couple of methods and fields in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#"><code>net.sourceforge.pmd.properties.AbstractPropertySource</code></a> have been
|
||
deprecated, as they are replaced by already existing functionality or expose internal implementation
|
||
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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertySource.html#"><code>net.sourceforge.pmd.properties.PropertySource</code></a> have been deprecated as well:
|
||
<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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/AbstractDelegateRule.html#"><code>net.sourceforge.pmd.lang.rule.AbstractDelegateRule</code></a> has been deprecated and will
|
||
be removed with PMD 7.0.0. It is internally only in use by RuleReference.</p>
|
||
</li>
|
||
<li>
|
||
<p>The default constructor of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>net.sourceforge.pmd.lang.rule.RuleReference</code></a> has been deprecated
|
||
and will be removed with PMD 7.0.0. RuleReferences should only be created by providing a Rule and
|
||
a RuleSetReference. Furthermore, the following methods are deprecated: <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>
|
||
|
||
<h4 id="670">6.7.0</h4>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>All classes in the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/report/package-summary.html#"><code>net.sourceforge.pmd.lang.dfa.report</code></a> have been deprecated and will be removed
|
||
with PMD 7.0.0. This includes the class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/report/ReportTree.html#"><code>net.sourceforge.pmd.lang.dfa.report.ReportTree</code></a>. The reason is,
|
||
that this class is very specific to Java and not suitable for other languages. It has only been used for
|
||
<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>
|
||
|
||
<h4 id="650">6.5.0</h4>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>The utility class <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/CommentUtil.html#"><code>CommentUtil</code></a> has been deprecated and will be removed
|
||
with PMD 7.0.0. Its methods have been intended to parse javadoc tags. A more useful solution will be added
|
||
around the AST node <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>
|
||
|
||
<h4 id="640">6.4.0</h4>
|
||
|
||
<ul>
|
||
<li>The following classes in package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/package-summary.html#"><code>net.sourceforge.pmd.benchmark</code></a> have been deprecated: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/Benchmark.html#"><code>Benchmark</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/Benchmarker.html#"><code>Benchmarker</code></a>,
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/BenchmarkReport.html#"><code>BenchmarkReport</code></a>, <code>BenchmarkResult</code>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/RuleDuration.html#"><code>RuleDuration</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/StringBuilderCR.html#"><code>StringBuilderCR</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/TextReport.html#"><code>TextReport</code></a>. Their API is not supported anymore
|
||
and is disconnected from the internals of PMD. Use the newer API based around <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/benchmark/TimeTracker.html#"><code>TimeTracker</code></a> instead, which can be found
|
||
in the same package.</li>
|
||
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/xpath/TypeOfFunction.html#"><code>TypeOfFunction</code></a> has been deprecated. Use the newer <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/xpath/TypeIsFunction.html#"><code>TypeIsFunction</code></a> in the same package.</li>
|
||
<li>The <code class="language-plaintext highlighter-rouge">typeof</code> methods in <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/xpath/JavaFunctions.html#"><code>JavaFunctions</code></a> have been deprecated.
|
||
Use the newer <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 <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a>.
|
||
Use the new <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>
|
||
|
||
<h4 id="620">6.2.0</h4>
|
||
|
||
<ul>
|
||
<li>
|
||
<p>The static method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDParameters.html#transformParametersIntoConfiguration(net.sourceforge.pmd.cli.PMDParameters)"><code>PMDParameters#transformParametersIntoConfiguration</code></a> is now deprecated,
|
||
for removal in 7.0.0. The new instance method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDParameters.html#toConfiguration()"><code>toConfiguration</code></a> replaces it.</p>
|
||
</li>
|
||
<li>
|
||
<p>The method <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getParameters()"><code>ASTConstructorDeclaration#getParameters</code></a> has been deprecated in favor of the new method
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getFormalParameters()"><code>getFormalParameters</code></a>. This method is available for both
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#"><code>ASTConstructorDeclaration</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#"><code>ASTMethodDeclaration</code></a>.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="610">6.1.0</h4>
|
||
|
||
<ul>
|
||
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#getXPathNodeName()"><code>getXPathNodeName</code></a> is added to the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface, which removes the
|
||
use of <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>).
|
||
<ul>
|
||
<li>The default implementation provided in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a>, will be removed with 7.0.0</li>
|
||
<li>With 7.0.0, the <code class="language-plaintext highlighter-rouge">Node.toString</code> method will not necessarily provide its XPath node
|
||
name anymore.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p>The interface <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/Renderer.html#"><code>net.sourceforge.pmd.cpd.Renderer</code></a> has been deprecated. A new interface
|
||
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/renderer/CPDRenderer.html#"><code>CPDRenderer</code></a> has been introduced to replace it. The main
|
||
difference is that the new interface is meant to render directly to a <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><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/FileReporter.html#"><code>net.sourceforge.pmd.cpd.FileReporter</code></a> has also been deprecated as part of this change, as it’s no longer needed.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 id="601">6.0.1</h4>
|
||
|
||
<ul>
|
||
<li>The constant <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#VERSION"><code>PMD#VERSION</code></a> has been deprecated and will be removed with PMD 7.0.0.
|
||
Please use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDVersion.html#VERSION"><code>PMDVersion#VERSION</code></a> instead.</li>
|
||
</ul>
|
||
|
||
<h2 id="-fixed-issues">🐛 Fixed Issues</h2>
|
||
|
||
<ul>
|
||
<li>miscellaneous
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/881">#881</a>: [all] Breaking API changes for 7.0.0</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/896">#896</a>: [all] Use slf4j</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1431">#1431</a>: [ui] Remove old GUI applications (designerold, bgastviewer)</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1451">#1451</a>: [core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2496">#2496</a>: Update PMD 7 Logo on landing page</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2497">#2497</a>: PMD 7 Logo page</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2498">#2498</a>: Update PMD 7 Logo in documentation</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3797">#3797</a>: [all] Use JUnit5</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4462">#4462</a>: Provide Software Bill of Materials (SBOM)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4460">#4460</a>: Fix assembly-plugin warnings</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4582">#4582</a>: [dist] Download link broken</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4586">#4586</a>: Use explicit encoding in ruleset xml files</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4642">#4642</a>: Update regression tests with Java 21 language features</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4691">#4691</a>: [CVEs] Critical and High CEVs reported on PMD and PMD dependencies</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4699">#4699</a>: Make PMD buildable with java 21</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4736">#4736</a>: [ci] Improve build procedure</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4741">#4741</a>: Add pmd-compat6 module for maven-pmd-plugin</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4749">#4749</a>: Fixes NoSuchMethodError on processing errors in pmd-compat6</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4776">#4776</a>: [ci] Upgrade to ruby 3</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4796">#4796</a>: Remove deprecated and release rulesets</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4823">#4823</a>: Update to use renamed pmd-designer</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4827">#4827</a>: [compat6] Support config errors and cpd for csharp</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4830">#4830</a>: Consolidate packages in each maven module</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4867">#4867</a>: [dist] ./mvnw command not found in dist-src</li>
|
||
</ul>
|
||
</li>
|
||
<li>ant
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4080">#4080</a>: [ant] Split off Ant integration into a new submodule</li>
|
||
</ul>
|
||
</li>
|
||
<li>core
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/880">#880</a>: [core] Make visitors generic</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1027">#1027</a>: [core] Apply the new PropertyDescriptor<Pattern> type where applicable</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1204">#1204</a>: [core] Allow numeric properties in XML to be within an unbounded range</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1622">#1622</a>: [core] NodeStream API</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1687">#1687</a>: [core] Deprecate and Remove XPath 1.0 support</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1785">#1785</a>: [core] Allow abstract node types to be valid rulechain visits</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1825">#1825</a>: [core] Support NoAttribute for XPath</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2038">#2038</a>: [core] Remove DCD</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2218">#2218</a>: [core] <code class="language-plaintext highlighter-rouge">isFindBoundary</code> should not be an attribute</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2234">#2234</a>: [core] Consolidate PMD CLI into a single command</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2239">#2239</a>: [core] Merging Javacc build scripts</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2500">#2500</a>: [core] Clarify API for ANTLR based languages</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2518">#2518</a>: [core] Language properties</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2602">#2602</a>: [core] Remove ParserOptions</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/2614">#2614</a>: [core] Upgrade Saxon, add XPath 3.1, remove Jaxen</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/2696">#2696</a>: [core] Remove DFA</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2821">#2821</a>: [core] Rule processing error filenames are missing paths</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2873">#2873</a>: [core] Utility classes in pmd 7</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2885">#2885</a>: [core] Error recovery mode</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3203">#3203</a>: [core] Replace RuleViolationFactory implementations with ViolationDecorator</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3692">#3692</a>: [core] Analysis listeners</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3782">#3782</a>: [core] Language lifecycle</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3815">#3815</a>: [core] Update Saxon HE to 10.7</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3893">#3893</a>: [core] Text documents</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3902">#3902</a>: [core] Violation decorators</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3903">#3903</a>: [core] Consolidate <code class="language-plaintext highlighter-rouge">n.s.pmd.reporting</code> package</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3905">#3905</a>: [core] Stabilize tree export API</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3917">#3917</a>: [core] Consolidate <code class="language-plaintext highlighter-rouge">n.s.pmd.lang.rule</code> package</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3918">#3918</a>: [core] Make LanguageRegistry non static</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3919">#3919</a>: [core] Merge CPD and PMD language</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3922">#3922</a>: [core] Better error reporting for the ruleset parser</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4035">#4035</a>: [core] ConcurrentModificationException in DefaultRuleViolationFactory</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4065">#4065</a>: [core] Rename TokenMgrError to LexException, Tokenizer to CpdLexer</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4120">#4120</a>: [core] Explicitly name all language versions</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4204">#4204</a>: [core] Provide a CpdAnalysis class as a programmatic entry point into CPD</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4301">#4301</a>: [core] Remove deprecated property concrete classes</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4302">#4302</a>: [core] Migrate Property Framework API to Java 8</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4309">#4309</a>: [core] Cleanups in XPath area</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4312">#4312</a>: [core] Remove unnecessary property <code class="language-plaintext highlighter-rouge">color</code> and system property <code class="language-plaintext highlighter-rouge">pmd.color</code> in <code class="language-plaintext highlighter-rouge">TextColorRenderer</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4313">#4313</a>: [core] Remove support for <lang>-<ruleset> hyphen notation for ruleset references</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4314">#4314</a>: [core] Remove ruleset compatibility filter (RuleSetFactoryCompatibility) and CLI option <code class="language-plaintext highlighter-rouge">--no-ruleset-compatibility</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4323">#4323</a>: [core] Refactor CPD integration</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4348">#4348</a>: [core] Consolidate @<!-- -->InternalApi classes</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4349">#4349</a>: [core] Cleanup remaining experimental and deprecated API</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4353">#4353</a>: [core] Micro optimizations for Node API</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4365">#4365</a>: [core] Improve benchmarking</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4397">#4397</a>: [core] Refactor CPD</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4378">#4378</a>: [core] Ruleset loading processes commented rules</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4420">#4420</a>: [core] Remove PMD.EOL</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4425">#4425</a>: [core] Replace TextFile::pathId</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4454">#4454</a>: [core] “Unknown option: ‘-min’” but is referenced in documentation</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4611">#4611</a>: [core] Fix loading language properties from env vars</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4621">#4621</a>: [core] Make <code class="language-plaintext highlighter-rouge">ClasspathClassLoader::getResource</code> child first</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4674">#4674</a>: [core] WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4694">#4694</a>: [core] Fix line/col numbers in TokenMgrError</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4717">#4717</a>: [core] XSLTRenderer doesn’t close report file</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4750">#4750</a>: [core] Fix flaky SummaryHTMLRenderer</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4782">#4782</a>: [core] Avoid using getImage/@<!-- -->Image</li>
|
||
</ul>
|
||
</li>
|
||
<li>cli
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2234">#2234</a>: [core] Consolidate PMD CLI into a single command</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3828">#3828</a>: [core] Progress reporting</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4079">#4079</a>: [cli] Split off CLI implementation into a pmd-cli submodule</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4423">#4423</a>: [cli] Fix NPE when only <code class="language-plaintext highlighter-rouge">--file-list</code> is specified</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4482">#4482</a>: [cli] pmd.bat can only be executed once</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4484">#4484</a>: [cli] ast-dump with no properties produce an NPE</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4594">#4594</a>: [cli] Change completion generation to runtime</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4685">#4685</a>: [cli] Clarify CPD documentation, fix positional parameter handling</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4723">#4723</a>: [cli] Launch fails for “bash pmd”</li>
|
||
</ul>
|
||
</li>
|
||
<li>doc
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/995">#995</a>: [doc] Document API evolution principles as ADR</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2501">#2501</a>: [doc] Verify ANTLR Documentation</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2511">#2511</a>: [doc] Review guides for writing java/xpath rules for correctness with PMD 7</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3175">#3175</a>: [doc] Document language module features</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4294">#4294</a>: [doc] Migration Guide for upgrading PMD 6 ➡️ 7</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4303">#4303</a>: [doc] Document new property framework</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4308">#4308</a>: [doc] Document XPath API @<!-- ->NoAttribute and @<!-- -->DeprecatedAttribute</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4319">#4319</a>: [doc] Document TypeRes API and Symbols API</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4438">#4438</a>: [doc] Documentation links in VS Code are outdated</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4521">#4521</a>: [doc] Website is not mobile friendly</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4676">#4676</a>: [doc] Clarify how CPD <code class="language-plaintext highlighter-rouge">--ignore-literals</code> and <code class="language-plaintext highlighter-rouge">--ignore-identifiers</code> work</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4659">#4659</a>: [doc] Improve ant documentation</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4669">#4669</a>: [doc] Add bld PMD Extension to Tools / Integrations</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4704">#4704</a>: [doc] Multivalued properties do not accept | as a separator</li>
|
||
</ul>
|
||
</li>
|
||
<li>testing
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2435">#2435</a>: [test] Remove duplicated Dummy language module</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4234">#4234</a>: [test] Tests that change the logging level do not work</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>Language specific fixes:</p>
|
||
|
||
<ul>
|
||
<li>apex
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1937">#1937</a>: [apex] Apex should only have a single RootNode</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1648">#1648</a>: [apex,vf] Remove CodeClimate dependency</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1750">#1750</a>: [apex] Remove apex statistical rules</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/2836">#2836</a>: [apex] Remove Apex ProjectMirror</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3766">#3766</a>: [apex] Replace Jorje with fully open source front-end</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3973">#3973</a>: [apex] Update parser to support new ‘as user’ keywords (User Mode for Database Operations)</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4427">#4427</a>: [apex] ApexBadCrypto test failing to detect inline code</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4453">#4453</a>: [apex] [7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812)</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4828">#4828</a>: [apex] Support null coalescing operator ?? (apex 60)</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4845">#4845</a>: [apex] Use same ANLTR version for apex-parser</li>
|
||
</ul>
|
||
</li>
|
||
<li>apex-design
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2667">#2667</a>: [apex] Integrate nawforce/ApexLink to build robust Unused rule</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4509">#4509</a>: [apex] ExcessivePublicCount doesn’t consider inner classes correctly</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4596">#4596</a>: [apex] ExcessivePublicCount ignores properties</li>
|
||
</ul>
|
||
</li>
|
||
<li>apex-documentation
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4774">#4774</a>: [apex] ApexDoc false-positive for the first method of an annotated Apex class</li>
|
||
</ul>
|
||
</li>
|
||
<li>apex-performance
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4675">#4675</a>: [apex] New Rule: OperationWithHighCostInLoop</li>
|
||
</ul>
|
||
</li>
|
||
<li>apex-security
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4646">#4646</a>: [apex] ApexSOQLInjection does not recognise SObjectType or SObjectField as safe variable types</li>
|
||
</ul>
|
||
</li>
|
||
<li>groovy
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4726">#4726</a>: [groovy] Support Groovy to 3 and 4 and CPD suppressions</li>
|
||
</ul>
|
||
</li>
|
||
<li>java
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/520">#520</a>: [java] Allow <code class="language-plaintext highlighter-rouge">@SuppressWarnings</code> with constants instead of literals</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/864">#864</a>: [java] Similar/duplicated implementations for determining FQCN</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/905">#905</a>: [java] Add new node for anonymous class declaration</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/910">#910</a>: [java] AST inconsistency between primitive and reference type arrays</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/997">#997</a>: [java] Java8 parsing corner case with annotated array types</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/998">#998</a>: [java] AST inconsistencies around FormalParameter</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1019">#1019</a>: [java] Breaking Java Grammar changes for PMD 7.0.0</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1124">#1124</a>: [java] ImmutableList implementation in the qname codebase</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1128">#1128</a>: [java] Improve ASTLocalVariableDeclaration</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1150">#1150</a>: [java] ClassOrInterfaceType AST improvements</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1207">#1207</a>: [java] Resolve explicit types using FQCNs, without hitting the classloader</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1307">#1307</a>: [java] AccessNode API changes</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1367">#1367</a>: [java] Parsing error on annotated inner class</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1661">#1661</a>: [java] About operator nodes</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/2366">#2366</a>: [java] Remove qualified names</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2819">#2819</a>: [java] GLB bugs in pmd 7</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3642">#3642</a>: [java] Parse error on rare extra dimensions on method return type on annotation methods</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3763">#3763</a>: [java] Ambiguous reference error in valid code</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3749">#3749</a>: [java] Improve <code class="language-plaintext highlighter-rouge">isOverridden</code> in ASTMethodDeclaration</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3750">#3750</a>: [java] Make symbol table support instanceof pattern bindings</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3751">#3751</a>: [java] Rename some node types</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3752">#3752</a>: [java] Expose annotations in symbol API</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4237">#4237</a>: [java] Cleanup handling of Java comments</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4317">#4317</a>: [java] Some AST nodes should not be TypeNodes</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4359">#4359</a>: [java] Type resolution fails with NPE when the scope is not a type declaration</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4367">#4367</a>: [java] Move testrule TypeResTest into internal</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4383">#4383</a>: [java] IllegalStateException: Object is not an array type!</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4401">#4401</a>: [java] PMD 7 fails to build under Java 19</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4405">#4405</a>: [java] Processing error with ArrayIndexOutOfBoundsException</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4583">#4583</a>: [java] Support JDK 21 (LTS)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4628">#4628</a>: [java] Support loading classes from java runtime images</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4753">#4753</a>: [java] PMD crashes while using generics and wildcards</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4757">#4757</a>: [java] Intermittent NPEs while analyzing Java code</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4794">#4794</a>: [java] Support JDK 22</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-bestpractices
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/342">#342</a>: [java] AccessorMethodGeneration: Name clash with another public field not properly handled</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/755">#755</a>: [java] AccessorClassGeneration false positive for private constructors</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/770">#770</a>: [java] UnusedPrivateMethod yields false positive for counter-variant arguments</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/807">#807</a>: [java] AccessorMethodGeneration false positive with overloads</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/833">#833</a>: [java] ForLoopCanBeForeach should consider iterating on this</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1189">#1189</a>: [java] UnusedPrivateMethod false positive from inner class via external class</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1205">#1205</a>: [java] Improve ConstantsInInterface message to mention alternatives</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1212">#1212</a>: [java] Don’t raise JUnitTestContainsTooManyAsserts on JUnit 5’s assertAll</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1422">#1422</a>: [java] JUnitTestsShouldIncludeAssert false positive with inherited @<!-- -->Rule field</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1455">#1455</a>: [java] JUnitTestsShouldIncludeAssert: False positives for assert methods named “check” and “verify”</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1563">#1563</a>: [java] ForLoopCanBeForeach false positive with method call using index variable</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1565">#1565</a>: [java] JUnitAssertionsShouldIncludeMessage false positive with AssertJ</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1747">#1747</a>: [java] PreserveStackTrace false-positive</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1969">#1969</a>: [java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1998">#1998</a>: [java] AccessorClassGeneration false-negative: subclass calls private constructor</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2130">#2130</a>: [java] UnusedLocalVariable: false-negative with array</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2147">#2147</a>: [java] JUnitTestsShouldIncludeAssert - false positives with lambdas and static methods</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2464">#2464</a>: [java] LooseCoupling must ignore class literals: ArrayList.class</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2542">#2542</a>: [java] UseCollectionIsEmpty can not detect the case <code class="language-plaintext highlighter-rouge">foo.bar().size()</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2650">#2650</a>: [java] UseTryWithResources false positive when AutoCloseable helper used</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2796">#2796</a>: [java] UnusedAssignment false positive with call chains</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2797">#2797</a>: [java] MissingOverride long-standing issues</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2806">#2806</a>: [java] SwitchStmtsShouldHaveDefault false-positive with Java 14 switch non-fallthrough branches</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2822">#2822</a>: [java] LooseCoupling rule: Extend to cover user defined implementations and interfaces</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/2843">#2843</a>: [java] Fix UnusedAssignment FP with field accesses</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2882">#2882</a>: [java] UseTryWithResources - false negative for explicit close</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2883">#2883</a>: [java] JUnitAssertionsShouldIncludeMessage false positive with method call</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2890">#2890</a>: [java] UnusedPrivateMethod false positive with generics</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2946">#2946</a>: [java] SwitchStmtsShouldHaveDefault false positive on enum inside enums</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3672">#3672</a>: [java] LooseCoupling - fix false positive with generics</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3675">#3675</a>: [java] MissingOverride - fix false positive with mixing type vars</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3858">#3858</a>: [java] UseCollectionIsEmpty should infer local variable type from method invocation</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4433">#4433</a>: [java] [7.0-rc1] ReplaceHashtableWithMap on java.util.Properties</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4492">#4492</a>: [java] GuardLogStatement gives false positive when argument is a Java method reference</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4503">#4503</a>: [java] JUnitTestsShouldIncludeAssert: false negative with TestNG</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4516">#4516</a>: [java] UnusedLocalVariable: false-negative with try-with-resources</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4517">#4517</a>: [java] UnusedLocalVariable: false-negative with compound assignments</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4518">#4518</a>: [java] UnusedLocalVariable: false-positive with multiple for-loop indices</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4603">#4603</a>: [java] UnusedAssignment false positive in record compact constructor</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4625">#4625</a>: [java] UnusedPrivateMethod false positive: Autoboxing into Number</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4634">#4634</a>: [java] JUnit4TestShouldUseTestAnnotation false positive with TestNG</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4817">#4817</a>: [java] UnusedPrivateMethod false-positive used in lambda</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-codestyle
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1208">#1208</a>: [java] PrematureDeclaration rule false-positive on variable declared to measure time</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1429">#1429</a>: [java] PrematureDeclaration as result of method call (false positive)</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1480">#1480</a>: [java] IdenticalCatchBranches false positive with return expressions</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1673">#1673</a>: [java] UselessParentheses false positive with conditional operator</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1790">#1790</a>: [java] UnnecessaryFullyQualifiedName false positive with enum constant</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1918">#1918</a>: [java] UselessParentheses false positive with boolean operators</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2134">#2134</a>: [java] PreserveStackTrace not handling <code class="language-plaintext highlighter-rouge">Throwable.addSuppressed(...)</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2299">#2299</a>: [java] UnnecessaryFullyQualifiedName false positive with similar package name</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2391">#2391</a>: [java] UseDiamondOperator FP when expected type and constructed type have a different parameterization</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2528">#2528</a>: [java] MethodNamingConventions - JUnit 5 method naming not support ParameterizedTest</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2739">#2739</a>: [java] UselessParentheses false positive for string concatenation</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2748">#2748</a>: [java] UnnecessaryCast false positive with unchecked cast</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2847">#2847</a>: [java] New Rule: Use Explicit Types</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2973">#2973</a>: [java] New rule: UnnecessaryBoxing</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3195">#3195</a>: [java] Improve rule UnnecessaryReturn to detect more cases</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3218">#3218</a>: [java] Generalize UnnecessaryCast to flag all unnecessary casts</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3221">#3221</a>: [java] PrematureDeclaration false positive for unused variables</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3238">#3238</a>: [java] Improve ExprContext, fix FNs of UnnecessaryCast</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3500">#3500</a>: [java] UnnecessaryBoxing - check for Integer.valueOf(String) calls</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4239">#4239</a>: [java] UnnecessaryLocalBeforeReturn - false positive with catch clause</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4268">#4268</a>: [java] CommentDefaultAccessModifier: false positive with TestNG annotations</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4273">#4273</a>: [java] CommentDefaultAccessModifier ignoredAnnotations should include “org.junit.jupiter.api.extension.RegisterExtension” by default</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4357">#4357</a>: [java] Fix IllegalStateException in UseDiamondOperator rule</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4432">#4432</a>: [java] [7.0-rc1] UnnecessaryImport - Unused static import is being used</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4455">#4455</a>: [java] FieldNamingConventions: false positive with lombok’s @<!-- -->UtilityClass</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4487">#4487</a>: [java] UnnecessaryConstructor: false-positive with @<!-- -->Inject and @<!-- -->Autowired</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4511">#4511</a>: [java] LocalVariableCouldBeFinal shouldn’t report unused variables</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4512">#4512</a>: [java] MethodArgumentCouldBeFinal shouldn’t report unused parameters</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4557">#4557</a>: [java] UnnecessaryImport FP with static imports of overloaded methods</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4578">#4578</a>: [java] CommentDefaultAccessModifier comment needs to be before annotation if present</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4631">#4631</a>: [java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4645">#4645</a>: [java] CommentDefaultAccessModifier - False Positive with JUnit5’s ParameterizedTest</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4754">#4754</a>: [java] EmptyControlStatementRule: Add allowCommentedBlocks property</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4816">#4816</a>: [java] UnnecessaryImport false-positive on generic method call with on lambda</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-design
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/174">#174</a>: [java] SingularField false positive with switch in method that both assigns and reads field</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1014">#1014</a>: [java] LawOfDemeter: False positive with lambda expression</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1605">#1605</a>: [java] LawOfDemeter: False positive for standard UTF-8 charset name</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2160">#2160</a>: [java] Issues with Law of Demeter</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2175">#2175</a>: [java] LawOfDemeter: False positive for chained methods with generic method call</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2179">#2179</a>: [java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2180">#2180</a>: [java] LawOfDemeter: False positive with Thread and ThreadLocalRandom</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2182">#2182</a>: [java] LawOfDemeter: False positive with package-private access</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2188">#2188</a>: [java] LawOfDemeter: False positive with fields assigned to local vars</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2536">#2536</a>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal can’t detect inner class</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3668">#3668</a>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - fix FP with inner private classes</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3754">#3754</a>: [java] SingularField false positive with read in while condition</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3786">#3786</a>: [java] SimplifyBooleanReturns should consider operator precedence</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3840">#3840</a>: [java] LawOfDemeter disallows method call on locally created object</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4238">#4238</a>: [java] Make LawOfDemeter not use the rulechain</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4254">#4254</a>: [java] ImmutableField - false positive with Lombok @<!-- -->Setter</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4434">#4434</a>: [java] [7.0-rc1] ExceptionAsFlowControl when simply propagating</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4456">#4456</a>: [java] FinalFieldCouldBeStatic: false positive with lombok’s @<!-- -->UtilityClass</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4477">#4477</a>: [java] SignatureDeclareThrowsException: false-positive with TestNG annotations</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4490">#4490</a>: [java] ImmutableField - false negative with Lombok @<!-- -->Getter</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4549">#4549</a>: [java] Make LawOfDemeter results deterministic</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-documentation
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4369">#4369</a>: [java] Improve CommentSize</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4416">#4416</a>: [java] Fix reported line number in CommentContentRule</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-errorprone
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/659">#659</a>: [java] MissingBreakInSwitch - last default case does not contain a break</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/718">#718</a>: [java] BrokenNullCheck false positive with parameter/field confusion</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/932">#932</a>: [java] SingletonClassReturningNewInstance false positive with double assignment</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1005">#1005</a>: [java] CloneMethodMustImplementCloneable triggers for interfaces</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1669">#1669</a>: [java] NullAssignment - FP with ternay and null as constructor argument</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1831">#1831</a>: [java] DetachedTestCase reports abstract methods</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1899">#1899</a>: [java] Recognize @<!-- -->SuppressWanings(“fallthrough”) for MissingBreakInSwitch</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2320">#2320</a>: [java] NullAssignment - FP with ternary and null as method argument</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2532">#2532</a>: [java] AvoidDecimalLiteralsInBigDecimalConstructor can not detect the case <code class="language-plaintext highlighter-rouge">new BigDecimal(Expression)</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2579">#2579</a>: [java] MissingBreakInSwitch detects the lack of break in the last case</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2880">#2880</a>: [java] CompareObjectsWithEquals - false negative with type res</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2893">#2893</a>: [java] Remove special cases from rule EmptyCatchBlock</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2894">#2894</a>: [java] Improve MissingBreakInSwitch</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3071">#3071</a>: [java] BrokenNullCheck FP with PMD 6.30.0</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3087">#3087</a>: [java] UnnecessaryBooleanAssertion overlaps with SimplifiableTestAssertion</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3100">#3100</a>: [java] UseCorrectExceptionLogging FP in 6.31.0</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3173">#3173</a>: [java] UseProperClassLoader false positive</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3351">#3351</a>: [java] ConstructorCallsOverridableMethod ignores abstract methods</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3400">#3400</a>: [java] AvoidUsingOctalValues FN with underscores</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3843">#3843</a>: [java] UseEqualsToCompareStrings should consider return type</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4063">#4063</a>: [java] AvoidBranchingStatementAsLastInLoop: False-negative about try/finally block</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4356">#4356</a>: [java] Fix NPE in CloseResourceRule</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4449">#4449</a>: [java] AvoidAccessibilityAlteration: Possible false positive in AvoidAccessibilityAlteration rule when using Lambda expression</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4457">#4457</a>: [java] OverrideBothEqualsAndHashcode: false negative with anonymous classes</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4493">#4493</a>: [java] MissingStaticMethodInNonInstantiatableClass: false-positive about @<!-- -->Inject</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4505">#4505</a>: [java] ImplicitSwitchFallThrough NPE in PMD 7.0.0-rc1</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4510">#4510</a>: [java] ConstructorCallsOverridableMethod: false positive with lombok’s @<!-- -->Value</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4513">#4513</a>: [java] UselessOperationOnImmutable various false negatives with String</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4514">#4514</a>: [java] AvoidLiteralsInIfCondition false positive and negative for String literals when ignoreExpressions=true</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4546">#4546</a>: [java] OverrideBothEqualsAndHashCode ignores records</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4719">#4719</a>: [java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-multithreading
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2537">#2537</a>: [java] DontCallThreadRun can’t detect the case that call run() in <code class="language-plaintext highlighter-rouge">this.run()</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2538">#2538</a>: [java] DontCallThreadRun can’t detect the case that call run() in <code class="language-plaintext highlighter-rouge">foo.bar.run()</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2577">#2577</a>: [java] UseNotifyAllInsteadOfNotify falsely detect a special case with argument: <code class="language-plaintext highlighter-rouge">foo.notify(bar)</code></li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4483">#4483</a>: [java] NonThreadSafeSingleton false positive with double-checked locking</li>
|
||
</ul>
|
||
</li>
|
||
<li>java-performance
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/1224">#1224</a>: [java] InefficientEmptyStringCheck false negative in anonymous class</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2587">#2587</a>: [java] AvoidArrayLoops could also check for list copy through iterated List.add()</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/2712">#2712</a>: [java] SimplifyStartsWith false-positive with AssertJ</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3486">#3486</a>: [java] InsufficientStringBufferDeclaration: Fix NPE</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/3848">#3848</a>: [java] StringInstantiation: false negative when using method result</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4070">#4070</a>: [java] A false positive about the rule RedundantFieldInitializer</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4458">#4458</a>: [java] RedundantFieldInitializer: false positive with lombok’s @<!-- -->Value</li>
|
||
</ul>
|
||
</li>
|
||
<li>javascript
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4673">#4673</a>: [javascript] CPD: Added support for decorator notation</li>
|
||
</ul>
|
||
</li>
|
||
<li>kotlin
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/419">#419</a>: [kotlin] Add support for Kotlin</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4389">#4389</a>: [kotlin] Update grammar to version 1.8</li>
|
||
</ul>
|
||
</li>
|
||
<li>plsql
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4820">#4820</a>: [plsql] WITH clause is ignored for SELECT INTO statements</li>
|
||
</ul>
|
||
</li>
|
||
<li>swift
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1877">#1877</a>: [swift] Feature/swift rules</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1882">#1882</a>: [swift] UnavailableFunction Swift rule</li>
|
||
<li><a href="https://github.com/pmd/pmd/issues/4697">#4697</a>: [swift] Support Swift 5.9 features (mainly macros expansion expressions)</li>
|
||
</ul>
|
||
</li>
|
||
<li>xml
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1800">#1800</a>: [xml] Unimplement org.w3c.dom.Node from the XmlNodeWrapper</li>
|
||
</ul>
|
||
</li>
|
||
<li>xml-bestpractices
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4592">#4592</a>: [xml] Add MissingEncoding rule</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h2 id="-external-contributions">✨ External Contributions</h2>
|
||
|
||
<ul>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1658">#1658</a>: [core] Node support for Antlr-based languages - <a href="https://github.com/matifraga">Matías Fraga</a> (@matifraga)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1698">#1698</a>: [core] [swift] Antlr Base Parser adapter and Swift Implementation - <a href="https://github.com/lsoncini">Lucas Soncini</a> (@lsoncini)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1774">#1774</a>: [core] Antlr visitor rules - <a href="https://github.com/lsoncini">Lucas Soncini</a> (@lsoncini)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1877">#1877</a>: [swift] Feature/swift rules - <a href="https://github.com/matifraga">Matías Fraga</a> (@matifraga)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1881">#1881</a>: [doc] Add ANTLR documentation - <a href="https://github.com/matifraga">Matías Fraga</a> (@matifraga)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/1882">#1882</a>: [swift] UnavailableFunction Swift rule - <a href="https://github.com/tomidelucca">Tomás de Lucca</a> (@tomidelucca)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/2830">#2830</a>: [apex] Apexlink POC - <a href="https://github.com/nawforce">Kevin Jones</a> (@nawforce)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/3866">#3866</a>: [core] Add CLI Progress Bar - <a href="https://github.com/JerritEic">@JerritEic</a> (@JerritEic)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4093">#4093</a>: [apex] Summit-AST Apex module - Part 1 - <a href="https://github.com/eklimo">Edward Klimoshenko</a> (@eklimo)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4151">#4151</a>: [apex] Summit-AST Apex module - Part 2 - expression nodes - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4171">#4171</a>: [apex] Summit-AST Apex module - Part 3 - initializers - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4206">#4206</a>: [apex] Summit-AST Apex module - Part 4 - statements - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4219">#4219</a>: [apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc. - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4242">#4242</a>: [apex] Merge 6.52 into experimental-apex-parser - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4251">#4251</a>: [apex] Summit-AST Apex module - Part 6 Passing testsuite - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4402">#4402</a>: [javascript] CPD: add support for Typescript using antlr4 grammar - <a href="https://github.com/pguyot">Paul Guyot</a> (@pguyot)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4403">#4403</a>: [julia] CPD: Add support for Julia code duplication - <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4412">#4412</a>: [doc] Added new error msg to ConstantsInInterface - <a href="https://github.com/dague1">David Ljunggren</a> (@dague1)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4426">#4426</a>: [cpd] New XML to HTML XLST report format for PMD CPD - <a href="https://github.com/mohan-chinnappan-n">mohan-chinnappan-n</a> (@mohan-chinnappan-n)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4428">#4428</a>: [apex] ApexBadCrypto bug fix for #4427 - inline detection of hard coded values - <a href="https://github.com/sfdcsteve">Steven Stearns</a> (@sfdcsteve)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4431">#4431</a>: [coco] CPD: Coco support for code duplication detection - <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4444">#4444</a>: [java] CommentDefaultAccessModifier - ignore org.junit.jupiter.api.extension.RegisterExtension by default - <a href="https://github.com/nirvikpatel">Nirvik Patel</a> (@nirvikpatel)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4448">#4448</a>: [apex] Bump summit-ast to new release 2.1.0 (and remove workaround) - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4450">#4450</a>: [java] Fix #4449 AvoidAccessibilityAlteration: Correctly handle Lambda expressions in PrivilegedAction scenarios - <a href="https://github.com/mohui1999">Seren</a> (@mohui1999)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4452">#4452</a>: [doc] Update PMD_APEX_ROOT_DIRECTORY documentation reference - <a href="https://github.com/nwcm">nwcm</a> (@nwcm)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4470">#4470</a>: [cpp] CPD: Added strings as literal and ignore identifiers in sequences - <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4474">#4474</a>: [java] ImmutableField: False positive with lombok (fixes #4254) - <a href="https://github.com/PimvanderLoos">Pim van der Loos</a> (@PimvanderLoos)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4479">#4479</a>: [apex] Merge main (7.x) branch into experimental-apex-parser and fix tests - <a href="https://github.com/aaronhurst-google">Aaron Hurst</a> (@aaronhurst-google)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4488">#4488</a>: [java] Fix #4477: A false-positive about SignatureDeclareThrowsException - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4494">#4494</a>: [java] Fix #4487: A false-positive about UnnecessaryConstructor and @<!-- -->Inject and @<!-- -->Autowired - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4495">#4495</a>: [java] Fix #4493: false-positive about MissingStaticMethodInNonInstantiatableClass and @<!-- -->Inject - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4507">#4507</a>: [java] Fix #4503: A false negative about JUnitTestsShouldIncludeAssert and testng - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4520">#4520</a>: [doc] Fix typo: missing closing quotation mark after CPD-END - <a href="https://github.com/joaodinissf">João Dinis Ferreira</a> (@joaodinissf)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4528">#4528</a>: [apex] Update to apexlink - <a href="https://github.com/nawforce">Kevin Jones</a> (@nawforce)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4533">#4533</a>: [java] Fix #4063: False-negative about try/catch block in Loop - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4536">#4536</a>: [java] Fix #4268: CommentDefaultAccessModifier - false positive with TestNG’s @<!-- -->Test annotation - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4537">#4537</a>: [java] Fix #4455: A false positive about FieldNamingConventions and UtilityClass - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4538">#4538</a>: [java] Fix #4456: A false positive about FinalFieldCouldBeStatic and UtilityClass - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4540">#4540</a>: [java] Fix #4457: false negative about OverrideBothEqualsAndHashcode - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4541">#4541</a>: [java] Fix #4458: A false positive about RedundantFieldInitializer and @<!-- -->Value - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4542">#4542</a>: [java] Fix #4510: A false positive about ConstructorCallsOverridableMethod and @<!-- -->Value - <a href="https://github.com/LynnBroe">AnnaDev</a> (@LynnBroe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4553">#4553</a>: [java] Fix #4492: GuardLogStatement gives false positive when argument is a Java method reference - <a href="https://github.com/anastasiia-koba">Anastasiia Koba</a> (@anastasiia-koba)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4562">#4562</a>: [apex] Fixes #4556 - Update Apex bind regex match for all possible combinations - <a href="https://github.com/nwcm">nwcm</a> (@nwcm)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4637">#4637</a>: [java] fix #4634 - JUnit4TestShouldUseTestAnnotation false positive with TestNG - <a href="https://github.com/krdabrowski">Krystian Dabrowski</a> (@krdabrowski)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4640">#4640</a>: [cli] Launch script fails if run via “bash pmd” - <a href="https://github.com/shai-bennathan">Shai Bennathan</a> (@shai-bennathan)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4649">#4649</a>: [apex] Add SObjectType and SObjectField to list of injectable SOQL variable types - <a href="https://github.com/rcorfieldffdc">Richard Corfield</a> (@rcorfieldffdc)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4651">#4651</a>: [doc] Add “Tencent Cloud Code Analysis” in Tools / Integrations - <a href="https://github.com/cyw3">yale</a> (@cyw3)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4664">#4664</a>: [cli] CPD: Fix NPE when only <code class="language-plaintext highlighter-rouge">--file-list</code> is specified - <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4665">#4665</a>: [java] Doc: Fix references AutoClosable -> AutoCloseable - <a href="https://github.com/AndreyBozhko">Andrey Bozhko</a> (@AndreyBozhko)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4673">#4673</a>: [javascript] CPD: Added support for decorator notation - <a href="https://github.com/wener-tiobe">Wener</a> (@wener-tiobe)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4677">#4677</a>: [apex] Add new rule: OperationWithHighCostInLoop - <a href="https://github.com/tprouvot">Thomas Prouvot</a> (@tprouvot)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4698">#4698</a>: [swift] Add macro expansion support for swift 5.9 - <a href="https://github.com/kenji21">Richard B.</a> (@kenji21)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4706">#4706</a>: [java] DetachedTestCase should not report on abstract methods - <a href="https://github.com/Debamoy">Debamoy Datta</a> (@Debamoy)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4719">#4719</a>: [java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string - <a href="https://github.com/ciufudean">ciufudean</a> (@ciufudean)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4738">#4738</a>: [doc] Added reference to the PMD extension for bld - <a href="https://github.com/ethauvin">Erik C. Thauvin</a> (@ethauvin)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4749">#4749</a>: Fixes NoSuchMethodError on processing errors in pmd-compat6 - <a href="https://github.com/bergander">Andreas Bergander</a> (@bergander)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4750">#4750</a>: [core] Fix flaky SummaryHTMLRenderer - <a href="https://github.com/219sansim">219sansim</a> (@219sansim)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4752">#4752</a>: [core] Fix flaky LatticeRelationTest - <a href="https://github.com/219sansim">219sansim</a> (@219sansim)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4754">#4754</a>: [java] EmptyControlStatementRule: Add allowCommentedBlocks property - <a href="https://github.com/bergander">Andreas Bergander</a> (@bergander)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4759">#4759</a>: [java] fix: remove delimiter attribute from ruleset category/java/errorprone.xml - <a href="https://github.com/marcindabrowski">Marcin Dąbrowski</a> (@marcindabrowski)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4825">#4825</a>: [plsql] Fix ignored WITH clause for SELECT INTO statements - <a href="https://github.com/lbovet">Laurent Bovet</a> (@lbovet)</li>
|
||
<li><a href="https://github.com/pmd/pmd/pull/4857">#4857</a>: [javascript] Fix UnnecessaryBlock issues with empty statements - <a href="https://github.com/oleksandr-shvets">Oleksandr Shvets</a> (@oleksandr-shvets)</li>
|
||
</ul>
|
||
|
||
|
||
<div class="tags">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<footer>
|
||
|
||
<hr />
|
||
<div>
|
||
This documentation is written in markdown. <br />
|
||
If there is something missing or can be improved, edit this page on
|
||
github and create a PR:
|
||
<a
|
||
target="_blank"
|
||
href="https://github.com/pmd/pmd/blob/master/docs/pages/release_notes_pmd7.md"
|
||
role="button"
|
||
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
|
||
>
|
||
</div>
|
||
|
||
<hr />
|
||
<div class="row">
|
||
<div class="col-lg-12 footer">
|
||
©2024 PMD Open Source Project. All rights
|
||
reserved. <br />
|
||
Site last generated: Jul 23, 2024 <br />
|
||
<p>
|
||
<img src="images/logo/pmd-logo-70px.png" alt="PMD
|
||
logo"/>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
</div>
|
||
|
||
<!-- /.row -->
|
||
</div>
|
||
<!-- /.container -->
|
||
</div>
|
||
|
||
|
||
<!-- Sticky TOC column -->
|
||
<div class="toc-col">
|
||
<div id="toc"></div>
|
||
</div>
|
||
|
||
<!-- /.toc-container-wrapper -->
|
||
</div>
|
||
</div>
|
||
|
||
<script type="application/javascript" src="assets/jquery-3.5.1/jquery-3.5.1.min.js"></script>
|
||
<script type="application/javascript" src="assets/anchorjs-4.2.2/anchor.min.js"></script>
|
||
<script type="application/javascript" src="assets/navgoco-0.2.1/src/jquery.navgoco.min.js"></script>
|
||
<script type="application/javascript" src="assets/bootstrap-4.5.2-dist/js/bootstrap.bundle.min.js"></script>
|
||
<script type="application/javascript" src="assets/Simple-Jekyll-Search-1.0.8/dest/jekyll-search.js"></script>
|
||
<script type="application/javascript" src="assets/jekyll-table-of-contents/toc.js"></script>
|
||
<script type="application/javascript" src="js/tabstate.js"></script>
|
||
<script type="application/javascript" src="js/customscripts.js"></script>
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|