"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/pages/release_notes.md" between
pmd-src-6.37.0.zip and pmd-src-6.38.0.zip

About: PMD is a source code analyzer for Java, JavaScript, XML and others. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth. Sources (Java).

release_notes.md  (pmd-src-6.37.0):release_notes.md  (pmd-src-6.38.0)
skipping to change at line 15 skipping to change at line 15
--- ---
## {{ site.pmd.date }} - {{ site.pmd.version }} ## {{ site.pmd.date }} - {{ site.pmd.version }}
The PMD team is pleased to announce PMD {{ site.pmd.version }}. The PMD team is pleased to announce PMD {{ site.pmd.version }}.
This is a {{ site.pmd.release_type }} release. This is a {{ site.pmd.release_type }} release.
{% tocmaker is_release_notes_processor %} {% tocmaker is_release_notes_processor %}
### New and noteworthy
#### Java 17 Support
This release of PMD brings support for Java 17. PMD supports [JEP 409: Sealed Cl
asses](https://openjdk.java.net/jeps/409)
which has been promoted to be a standard language feature of Java 17.
PMD also supports [JEP 406: Pattern Matching for switch (Preview)](https://openj
dk.java.net/jeps/406) as a preview
language feature. In order to analyze a project with PMD that uses these languag
e features, you'll need to enable
it via the environment variable `PMD_JAVA_OPTS` and select the new language vers
ion `17-preview`:
export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 17-preview ...
Note: Support for Java 15 preview language features have been removed. The versi
on "15-preview" is no longer available.
#### Updated PMD Designer
This PMD release ships a new version of the pmd-designer.
For the changes, see [PMD Designer Changelog](https://github.com/pmd/pmd-designe
r/releases/tag/6.37.0).
#### New rules
This release ships with 3 new Java rules.
* {% rule java/bestpractices/PrimitiveWrapperInstantiation %} reports usages o
f primitive wrapper
constructors. They are deprecated since Java 9 and should not be used.
```xml
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
```
The rule is part of the quickstart.xml ruleset.
* {% rule java/bestpractices/SimplifiableTestAssertion %} suggests rewriting
some test assertions to be more readable.
```xml
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion" />
```
The rule is part of the quickstart.xml ruleset.
* {% rule java/errorprone/ReturnEmptyCollectionRatherThanNull %} suggests retu
rning empty collections / arrays
instead of null.
```xml
<rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull"
/>
```
The rule is part of the quickstart.xml ruleset.
#### Renamed rules
* The Java rule {% rule java/errorprone/MissingBreakInSwitch %} has been renam
ed to
{% rule java/errorprone/ImplicitSwitchFallThrough %} (category error prone)
to better reflect the rule's
purpose: The rule finds implicit fall-through cases in switch statements, wh
ich are most
likely unexpected. The old rule name described only one way how to avoid a f
all-through,
namely using `break` but `continue`, `throw` and `return` avoid a fall-throu
gh
as well. This enables us to improve this rule in the future.
#### Deprecated rules
* The following Java rules are deprecated and removed from the quickstart rule
set,
as the new rule {% rule java/bestpractices/SimplifiableTestAssertion %} merg
es
their functionality:
* {% rule java/bestpractices/UseAssertEqualsInsteadOfAssertTrue %}
* {% rule java/bestpractices/UseAssertNullInsteadOfAssertTrue %}
* {% rule java/bestpractices/UseAssertSameInsteadOfAssertTrue %}
* {% rule java/bestpractices/UseAssertTrueInsteadOfAssertEquals %}
* {% rule java/design/SimplifyBooleanAssertion %}
* The Java rule {% rule java/errorprone/ReturnEmptyArrayRatherThanNull %} is d
eprecated and removed from
the quickstart ruleset, as the new rule {% rule java/errorprone/ReturnEmptyC
ollectionRatherThanNull %}
supersedes it.
* The following Java rules are deprecated and removed from the quickstart rule
set,
as the new rule {% rule java/bestpractices/PrimitiveWrapperInstantiation %}
merges
their functionality:
* {% rule java/performance/BooleanInstantiation %}
* {% rule java/performance/ByteInstantiation %}
* {% rule java/performance/IntegerInstantiation %}
* {% rule java/performance/LongInstantiation %}
* {% rule java/performance/ShortInstantiation %}
* The Java rule {% rule java/performance/UnnecessaryWrapperObjectCreation %} i
s deprecated
with no planned replacement before PMD 7. In it's current state, the rule is
not useful
as it finds only contrived cases of creating a primitive wrapper and unboxin
g it explicitly
in the same expression. In PMD 7 this and more cases will be covered by a
new rule `UnnecessaryBoxing`.
### Fixed Issues ### Fixed Issues
* apex * apex
* [#3201](https://github.com/pmd/pmd/issues/3201): \[apex] ApexCRUDViolati * [#3462](https://github.com/pmd/pmd/issues/3462): \[apex] SOQL performed
on doesn't report Database class DMLs, inline no-arg object instantiations and i in a for-each loop doesn't trigger ApexCRUDViolationRule
nline list initialization * [#3484](https://github.com/pmd/pmd/issues/3484): \[apex] ApexCRUDViolati
* [#3329](https://github.com/pmd/pmd/issues/3329): \[apex] ApexCRUDViolati onRule maintains state across files
on doesn't report SOQL for loops
* core * core
* [#1603](https://github.com/pmd/pmd/issues/1603): \[core] Language versio * [#3446](https://github.com/pmd/pmd/issues/3446): \[core] Allow XPath rul
n comparison es to access the current file name
* [#2133](https://github.com/pmd/pmd/issues/2133): \[xml] Allow to check S
alesforce XML Metadata using XPath rules
* [#3377](https://github.com/pmd/pmd/issues/3377): \[core] NPE when specif
ying report file in current directory in PMD CLI
* [#3387](https://github.com/pmd/pmd/issues/3387): \[core] CPD should avoi
d unnecessary copies when running with --skip-lexical-errors
* java-bestpractices * java-bestpractices
* [#2908](https://github.com/pmd/pmd/issues/2908): \[java] Merge Junit ass * [#3403](https://github.com/pmd/pmd/issues/3403): \[java] MethodNamingCon
ertion simplification rules ventions junit5TestPattern does not detect parameterized tests
* [#3235](https://github.com/pmd/pmd/issues/3235): \[java] UseTryWithResou
rces false positive when closeable is provided as a method argument or class fie
ld
* java-errorprone
* [#3361](https://github.com/pmd/pmd/issues/3361): \[java] Rename rule Mis
singBreakInSwitch to ImplicitSwitchFallThrough
* [#3382](https://github.com/pmd/pmd/pull/3382): \[java] New rule ReturnEm
ptyCollectionRatherThanNull
* java-performance
* [#3420](https://github.com/pmd/pmd/issues/3420): \[java] NPE in `Ineffic
ientStringBuffering` with Records
### API Changes
#### PMD CLI
* PMD has a new CLI option `-force-language`. With that a language can be forc
ed to be used for all input files,
irrespective of filenames. When using this option, the automatic language se
lection 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.
This option allows to use the xml language for files, that don't use xml as
extension.
See also the examples on [PMD CLI reference](pmd_userdocs_cli_reference.html
#analyze-other-xml-formats).
#### Experimental APIs
* The AST types and APIs around Sealed Classes are not experimental anymore:
* {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#isSealed()
%},
{% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#isNonSealed
() %},
{% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#getPermitte
dSubclasses() %}
* {% jdoc java::lang.java.ast.ASTPermitsList %}
#### Internal API
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 `@InternalApi` annotation. You'll also get a depr
ecation warning.
* The inner class {% jdoc !!core::cpd.TokenEntry.State %} is considered to be
internal API.
It will probably be moved away with PMD 7.
### External Contributions ### External Contributions
* [#3367](https://github.com/pmd/pmd/pull/3367): \[apex] Check SOQL CRUD on fo * [#3445](https://github.com/pmd/pmd/pull/3445): \[java] Fix #3403 about Metho
r loops - [Jonathan Wiesel](https://github.com/jonathanwiesel) dNamingConventions and JUnit5 parameterized tests - [Cyril Sicard](https://githu
* [#3373](https://github.com/pmd/pmd/pull/3373): \[apex] Add ApexCRUDViolation b.com/CyrilSicard)
support for database class, inline no-arg object construction DML and inline li * [#3470](https://github.com/pmd/pmd/pull/3470): \[apex] Fix ApexCRUDViolation
st initialization DML - [Jonathan Wiesel](https://github.com/jonathanwiesel) Rule - add super call - [Josh Feingold](https://github.com/jfeingold35)
* [#3385](https://github.com/pmd/pmd/pull/3385): \[core] CPD: Optimize --skip-
lexical-errors option - [Woongsik Choi](https://github.com/woongsikchoi)
* [#3388](https://github.com/pmd/pmd/pull/3388): \[doc] Add Code Inspector in
the list of tools - [Julien Delange](https://github.com/juli1)
* [#3417](https://github.com/pmd/pmd/pull/3417): \[core] Support forcing a spe
cific language from the command-line - [Aidan Harding](https://github.com/aidan-
harding)
### Stats ### Stats
* 82 commits * 32 commits
* 29 closed tickets & PRs * 8 closed tickets & PRs
* Days since last release: 35 * Days since last release: 27
{% endtocmaker %} {% endtocmaker %}
 End of changes. 6 change blocks. 
194 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)