pmd-devel Mailing List for PMD (Page 2)
A source code analyzer
Brought to you by:
adangel,
juansotuyo
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(768) |
Aug
(543) |
Sep
(364) |
Oct
(326) |
Nov
(182) |
Dec
(148) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(144) |
Feb
(223) |
Mar
(339) |
Apr
(406) |
May
(128) |
Jun
(225) |
Jul
(171) |
Aug
(171) |
Sep
(153) |
Oct
(150) |
Nov
(176) |
Dec
(88) |
2004 |
Jan
(71) |
Feb
(28) |
Mar
(91) |
Apr
(184) |
May
(127) |
Jun
(144) |
Jul
(186) |
Aug
(78) |
Sep
(193) |
Oct
(153) |
Nov
(92) |
Dec
(177) |
2005 |
Jan
(223) |
Feb
(319) |
Mar
(253) |
Apr
(106) |
May
(215) |
Jun
(299) |
Jul
(341) |
Aug
(286) |
Sep
(270) |
Oct
(212) |
Nov
(283) |
Dec
(345) |
2006 |
Jan
(243) |
Feb
(426) |
Mar
(278) |
Apr
(254) |
May
(259) |
Jun
(197) |
Jul
(156) |
Aug
(84) |
Sep
(150) |
Oct
(719) |
Nov
(319) |
Dec
(169) |
2007 |
Jan
(484) |
Feb
(222) |
Mar
(61) |
Apr
(51) |
May
(63) |
Jun
(182) |
Jul
(177) |
Aug
(89) |
Sep
(46) |
Oct
(178) |
Nov
(116) |
Dec
(89) |
2008 |
Jan
(23) |
Feb
(198) |
Mar
(227) |
Apr
(203) |
May
(174) |
Jun
(215) |
Jul
(55) |
Aug
(152) |
Sep
(129) |
Oct
(177) |
Nov
(79) |
Dec
(84) |
2009 |
Jan
(91) |
Feb
(179) |
Mar
(102) |
Apr
(67) |
May
(40) |
Jun
(41) |
Jul
(43) |
Aug
(53) |
Sep
(4) |
Oct
(17) |
Nov
(48) |
Dec
(76) |
2010 |
Jan
(28) |
Feb
(17) |
Mar
(27) |
Apr
(9) |
May
(19) |
Jun
(50) |
Jul
(21) |
Aug
(9) |
Sep
(42) |
Oct
(30) |
Nov
(33) |
Dec
(10) |
2011 |
Jan
(14) |
Feb
(6) |
Mar
(18) |
Apr
(8) |
May
(4) |
Jun
(18) |
Jul
(21) |
Aug
(19) |
Sep
(298) |
Oct
(82) |
Nov
(102) |
Dec
(241) |
2012 |
Jan
(41) |
Feb
(29) |
Mar
(43) |
Apr
(18) |
May
(42) |
Jun
(53) |
Jul
(53) |
Aug
(43) |
Sep
(16) |
Oct
(20) |
Nov
(36) |
Dec
(26) |
2013 |
Jan
(15) |
Feb
(14) |
Mar
(36) |
Apr
(38) |
May
(20) |
Jun
(5) |
Jul
(6) |
Aug
(18) |
Sep
(3) |
Oct
(24) |
Nov
(14) |
Dec
(1) |
2014 |
Jan
(13) |
Feb
(12) |
Mar
(8) |
Apr
(19) |
May
(4) |
Jun
(4) |
Jul
(27) |
Aug
(18) |
Sep
(11) |
Oct
(15) |
Nov
(32) |
Dec
(13) |
2015 |
Jan
(11) |
Feb
(13) |
Mar
(21) |
Apr
(22) |
May
(32) |
Jun
(14) |
Jul
(11) |
Aug
(7) |
Sep
(33) |
Oct
(40) |
Nov
(20) |
Dec
(13) |
2016 |
Jan
(24) |
Feb
(16) |
Mar
(11) |
Apr
(25) |
May
(46) |
Jun
(13) |
Jul
(3) |
Aug
(3) |
Sep
(8) |
Oct
(3) |
Nov
(17) |
Dec
(9) |
2017 |
Jan
(6) |
Feb
(3) |
Mar
(13) |
Apr
(16) |
May
(7) |
Jun
(5) |
Jul
(30) |
Aug
(3) |
Sep
(3) |
Oct
(10) |
Nov
(2) |
Dec
(3) |
2018 |
Jan
(8) |
Feb
(4) |
Mar
(6) |
Apr
(2) |
May
(3) |
Jun
(3) |
Jul
(6) |
Aug
(4) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(5) |
2019 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
(5) |
Oct
(3) |
Nov
(7) |
Dec
(1) |
2020 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
(3) |
Nov
(3) |
Dec
(2) |
2021 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(4) |
Aug
(2) |
Sep
(3) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2022 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(3) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
2023 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2024 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
(2) |
2025 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Andreas D. <and...@pm...> - 2024-07-26 09:07:28
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.4.0 * Documentation: https://docs.pmd-code.org/pmd-doc-7.4.0/ 26-July-2024 - 7.4.0 The PMD team is pleased to announce PMD 7.4.0. This is a minor release. Table Of Contents * 🌟 New and changed rules <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#new-and-changed-rules> o New Rules <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#new-rules> o Changed rules <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#changed-rules> o Renamed rules <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#renamed-rules> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#fixed-issues> * 🚨 API Changes <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#api-changes> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2024/07/pmd-740-26-july-2024-released/#stats> 🌟 New and changed rules New Rules * The new Apex rule |AvoidNonRestrictiveQueries| <https://docs.pmd-code.org/pmd-doc-7.4.0/pmd_rules_apex_performance.html#avoidnonrestrictivequeries> finds SOQL and SOSL queries without a where or limit statement. This can quickly cause governor limit exceptions. Changed rules * |ClassNamingConventions| <https://docs.pmd-code.org/pmd-doc-7.4.0/pmd_rules_apex_codestyle.html#classnamingconventions> (Apex Codestyle): Two new properties to configure different patterns for inner classes and interfaces: |innerClassPattern| and |innerInterfacePattern|. Renamed rules * |InaccurateNumericLiteral| <https://docs.pmd-code.org/pmd-doc-7.4.0/pmd_rules_ecmascript_errorprone.html#inaccuratenumericliteral> (JavaScript Error Prone) has been renamed from |InnaccurateNumericLiteral|. The old rule name still works but is deprecated. 🐛 Fixed Issues * apex o #5094 <https://github.com/pmd/pmd/issues/5094>: [apex] "No adapter exists for type" error message printed to stdout instead of stderr * apex-bestpractices o #5095 <https://github.com/pmd/pmd/issues/5095>: [apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative due to casing (regression in PMD 7) * apex-codestyle o #4800 <https://github.com/pmd/pmd/issues/4800>: [apex] ClassNamingConvention: Support naming convention for /inner/ classes * apex-performance o #635 <https://github.com/pmd/pmd/issues/635>: [apex] New Rule: Avoid soql/sosl queries without a where clause or limit statement * java-bestpractices o #5106 <https://github.com/pmd/pmd/issues/5106>: [java] AccessorClassGeneration: Node was null for default constructor o #5110 <https://github.com/pmd/pmd/issues/5110>: [java] UnusedPrivateMethod for method referenced by lombok.Builder.ObtainVia o #5117 <https://github.com/pmd/pmd/issues/5117>: [java] UnusedPrivateMethod for methods annotated with jakarta.annotation.PostConstruct or PreDestroy * java-errorprone o #1488 <https://github.com/pmd/pmd/issues/1488>: [java] MissingStaticMethodInNonInstantiatableClass: False positive with Lombok Builder on Constructor * javascript-errorprone o #2367 <https://github.com/pmd/pmd/issues/2367>: [javascript] InnaccurateNumericLiteral is misspelled o #4716 <https://github.com/pmd/pmd/issues/4716>: [javascript] InaccurateNumericLiteral with number 259200000 * plsql o #5086 <https://github.com/pmd/pmd/pull/5086>: [plsql] Fixed issue with missing optional table alias in MERGE usage o #5087 <https://github.com/pmd/pmd/pull/5087>: [plsql] Add support for SQL_MACRO o #5088 <https://github.com/pmd/pmd/pull/5088>: [plsql] Add support for 'DEFAULT' clause on the arguments of some oracle functions o #5133 <https://github.com/pmd/pmd/issues/5133>: [plsql] AssertionError: Root of the tree should implement RootNode for a PL/SQL type declaration * cli o #5120 <https://github.com/pmd/pmd/issues/5120>: [cli] Can't start designer under Windows * core o #5091 <https://github.com/pmd/pmd/issues/5091>: [core] PMD CPD v7.3.0 gives deprecation warning for skipLexicalErrors even when not used 🚨 API Changes * javascript o The old rule name |InnaccurateNumericLiteral| has been deprecated. Use the new name |InaccurateNumericLiteral| <https://docs.pmd-code.org/pmd-doc-7.4.0/pmd_rules_ecmascript_errorprone.html#inaccuratenumericliteral> instead. ✨ External Contributions * #5048 <https://github.com/pmd/pmd/pull/5048>: [apex] Added Inner Classes to Apex Class Naming Conventions Rule - Justin Stroud <https://github.com/justinstroudbah> (@justinstroudbah / @sgnl-labs) * #5086 <https://github.com/pmd/pmd/pull/5086>: [plsql] Fixed issue with missing optional table alias in MERGE usage - Arjen Duursma <https://github.com/duursma> (@duursma) * #5087 <https://github.com/pmd/pmd/pull/5087>: [plsql] Add support for SQL_MACRO - Arjen Duursma <https://github.com/duursma> (@duursma) * #5088 <https://github.com/pmd/pmd/pull/5088>: [plsql] Add support for 'DEFAULT' clause on the arguments of some oracle functions - Arjen Duursma <https://github.com/duursma> (@duursma) * #5107 <https://github.com/pmd/pmd/pull/5107>: [doc] Update maven.md - Typo fixed for maven target - karthikaiyasamy <https://github.com/karthikaiyasamy> (@karthikaiyasamy) * #5109 <https://github.com/pmd/pmd/pull/5109>: [java] Exclude constructor with lombok.Builder for MissingStaticMethodInNonInstantiatableClass - Krzysztof Debski <https://github.com/kdebski85> (@kdebski85) * #5111 <https://github.com/pmd/pmd/pull/5111>: [java] Fix UnusedPrivateMethod for @lombok.Builder.ObtainVia - Krzysztof Debski <https://github.com/kdebski85> (@kdebski85) * #5118 <https://github.com/pmd/pmd/pull/5118>: [java] FP for UnusedPrivateMethod with Jakarta @PostConstruct/PreDestroy annotations - Krzysztof Debski <https://github.com/kdebski85> (@kdebski85) * #5121 <https://github.com/pmd/pmd/pull/5121>: [plsql] Fixed issue with missing optional table alias in MERGE usage - Arjen Duursma <https://github.com/duursma> (@duursma) 📈 Stats * 81 commits * 32 closed tickets & PRs * Days since last release: 27 |
From: David D. <dav...@or...> - 2024-07-22 05:53:14
|
Welcome to the OpenJDK Quality Outreach summer update. JDK 23 is now in Rampdown Phase Two [1], its overall feature has been frozen a few weeks ago. Per the JDK Release Process, we have now turned our focus to P1 and P2 bugs, which can be fixed with approval [2]. Late enhancements are still possible, with approval, but the bar is now extraordinarily high. That also means that the JDK 23 Initial Release Candidates are fast approaching, i.e., August 8th [3]! So, and in addition to testing your projects with the latest JDK 23 early-access builds, it is now a good time to start testing with the JDK 24 early-access builds. Make sure to also check the heads-up below as some are related to JDK 23 and might have some impact, i.e., the first one being related to the eventual removal of the Security Manager and the second one discusses the removal of the legacy COMPAT locale provider. [1] https://mail.openjdk.org/pipermail/jdk-dev/2024-July/009252.html [2] https://openjdk.org/jeps/3#rdp-2 [3] https://openjdk.org/projects/jdk/23/ ## Heads-up - JDK 23: Subject.getSubject API Requires Allowing the Security Manager In JDK 17 and as announced in JEP 411 [4], the Security Manager was deprecated for removal. As part of that change, several Security Manager APIs, such as `AccessControlContext`, were deprecated for removal. The `Subject::doAs` and `Subject::getSubject` APIs depend on Security Manager related APIs even though they do not require Security Manager to be installed to use them. As of JDK 23 [5], to help applications prepare for the eventual removal of the Security Manager, subject authorization and the Subject APIs' behavior depend on allowing the Security Manager: - If the system property `java.security.manager` is set on the command line to the empty string, a class name, or the value `allow` then there is no behavior change compared to previous releases. - If the system property `java.security.manager` is not set on the command line or has been set on the command line to the value `disallow`, invoking the `Subject.getSubject` method will throw `UnsupportedOperationException`. Yet, running an application with `-Djava.security.manager=allow` is a temporary workaround to keep older code working. Maintainers of code using `Subject.doAs` and `Subject.getSubject` are strongly encouraged to migrate it with utmost priority to the replacement APIs, `Subject.callAs` and `Subject.current`. Make sure to check [5] and [6] for additional details. The jdeprscan tool [7] scans a JAR file for usage of deprecated API elements and is helpful to find code using these methods. Additionally, consider migrating as soon as possible code that stores a `Subject` in an `AccessControlContext` and invokes `AccessController.doPrivileged` with that context. Such code will stop working when the Security Manager is removed. [4] https://openjdk.org/jeps/411 [5] https://jdk.java.net/23/release-notes#b15 [6] https://inside.java/2024/07/08/quality-heads-up/ [7] https://dev.java/learn/jvm/tools/core/jdeprscan/ ## Heads-up - JDK 23: Unicode / Removal of COMPAT Locale Provider ### A Quick History of Locale Data in the JDK Before the Unicode Consortium created the Common Locale Data Repository (CLDR) in 2003 to manage locale data, the JDK had to provide its own collection. It did so successfully and in JDK 8 supported about 160 locales. To reduce maintenance effort, allow better interoperability between platforms, and improve locale data quality, the JDK started to move towards CLDR in 2014: - JDK 8 comes with two locale data providers, which can be selected with the system property java.locale.providers: . JRE/COMPAT for the JDK’s legacy data collection (default) . CLDR for the CLDR data . a custom locale provider can be implemented - JDK 9 picks CLDR by default - JDK 21 issues a warning on JRE/COMPAT There are plenty of minor and a few notable differences between the legacy data and CLDR - the recently rewritten JEP 252 [8] lists a few of them. ### Locale Data in JDK 23 JDK 23 [9] removes legacy locale data. As a consequence, setting java.locale.providers to JRE or COMPAT has no effect. Projects that are still using legacy locale data are highly encouraged to switch to CLDR as soon as possible. Where that is infeasible, two alternatives remain: - Create custom formatters with patterns that mimic the legacy behavior and use them everywhere where locale-sensitive data is written or parsed. - Implement a custom locale data provider [10]. For more details on that as well as on CLDR in the JDK in general, please check JEP 252 [8] that has been recently rewritten to provide better information and guidance. [8] https://openjdk.org/jeps/252 [9] https://bugs.openjdk.org/browse/JDK-8325568 [10] https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/spi/LocaleServiceProvider.html ## Heads-up - JDK 23: Initial Leyden Early-Access Builds Project Leyden published its first early-access builds (24-leyden+2-8 2024/6/20) [11]. The initial release is focused on improving Java applications start-up time, but other Leyden optimizations will be explored in future releases. Below are some of the highlights of these Leyden EA builds: - Ahead-of-time compilation of Java methods to natively execute them as soon as the application starts up in the production run; - Ahead-of-time resolution of constant pool entries allows the AOT compiler to generate better code and for your application to start faster; - Ahead-of-time generation of Dynamic Proxies and reflection data as frameworks use those extensively during start-up time; - A unified Cache Data Store (CDS) archive to simplify the creation of the CDS archive, while supporting multiple types of optimization artifacts; - Loaded Classes in the CDS archive as soon the application starts up; - Class loader lookup cache to help application frameworks perform repeated lookups without repeatedly scanning the classpath; - Archived Method Profiles to reach Java application peak performance faster. The easiest way to start with Leyden features is by using the java program in the Leyden Early Access Release with the -XX:CacheDataStore flag. More details of this Leyden EA Build can be found in the release notes [12]. [11] https://jdk.java.net/leyden/ [12] https://github.com/openjdk/leyden/blob/leyden-ea1-release-notes/README.md ## JDK 23 Early-Access Builds The JDK 23 early-access builds 32 are available [13], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [14] and the Javadoc here [15]. [13] https://jdk.java.net/23/ [14] https://jdk.java.net/23/release-notes [15] https://download.java.net/java/early_access/jdk23/docs/api/ ## JDK 24 Early-Access Builds The JDK 24 early-access builds 7 are available [16], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [17]. ### Changes in recent JDK 24 builds that may be of interest: - JDK-8334299: Deprecate LockingMode option, along with LM_LEGACY and LM_MONITOR - JDK-8330846: Add stacks of mounted virtual threads to the HotSpot thread … - JDK-8333649: Allow different NativeCall encodings - JDK-8333755: NumberFormat integer only parsing breaks when format has suffix - JDK-8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 - JDK-8327793: Deprecate jstatd for removal - JDK-8248981: Specify list of standard message digest and mgf algorithms for RSASSA-PSS signature - JDK-8334580: Deprecate no-arg constructor BasicSliderUI() for removal - JDK-8320448: Accelerate IndexOf using AVX2 - JDK-8333749: Consolidate ConstantDesc conversion in java.base - JDK-8329141: Obsolete RTM flags and code - JDK-8330198: Add some class loading related perf counters to measure VM startup - JDK-8330699: Obsolete -XX:+UseEmptySlotsInSupers - JDK-8334734: Remove specialized readXxxEntry methods from ClassReader This is only a curated list, a complete list of changes can be found here [18]. [16] https://jdk.java.net/24/ [17] https://jdk.java.net/24/release-notes [18] https://github.com/openjdk/jdk/compare/jdk-24+0...jdk-24+7 ## Topics of Interest - Integrity by Default - Inside Java Newscast https://inside.java/2024/07/18/newscast-73/ - Java and AI? - Inside Java Newscast https://inside.java/2024/07/04/newscast-72/ - What Happened to String Templates? - Inside Java Newscast https://inside.java/2024/06/20/newscast-71/ - Java Language Futures - Spring 2024 Edition https://inside.java/2024/07/01/java-language-futures/ - Project Loom - Structured Concurrency https://inside.java/2024/07/13/structured-concurrency/ - How to Build Custom Java Runtimes with Jlink https://inside.java/2024/06/21/build-runtimes-with-jlink/ ## July 2024 Critical Patch Update Released As part of the July 2024 CPU, Oracle released OpenJDK 22.0.2, JavaFX 22.0.2, JDK 22.0.2, JDK 21.0.4 LTS, JDK 17.0.12 LTS, JDK 11.0.24 LTS, JDK 8u421 as as well as JDK 8u421-perf. ~ We still have a few days before JDK 23 enters into the Release Candidate phase so please make sure to test your projects on the latest early-access builds and report any issue… but that shouldn't be a reason to not enjoy the summer and recharge your batteries! 😎 --David |
From: Andreas D. <and...@pm...> - 2024-06-28 10:16:59
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.3.0 * Documentation: https://docs.pmd-code.org/pmd-doc-7.3.0/ 28-June-2024 - 7.3.0 The PMD team is pleased to announce PMD 7.3.0. This is a minor release. Table Of Contents * 🚀 New and noteworthy <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#new-and-noteworthy> o ✨ New Rules <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#new-rules> o 💥 pmd-compat6 removed (breaking) <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#pmd-compat6-removed-breaking> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#fixed-issues> * 🚨 API Changes <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#api-changes> o CPD Report Format XML <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#cpd-report-format-xml> o CLI <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#cli> o Ant <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#ant> o Deprecated API <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#deprecated-api> o Breaking changes: pmd-compat6 removed <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#breaking-changes-pmd-compat6-removed> * 📈 Stats <https://sourceforge.net/p/pmd/news/2024/06/pmd-730-28-june-2024-released/#stats> 🚀 New and noteworthy ✨ New Rules * The new Java rule |UseEnumCollections| <https://docs.pmd-code.org/pmd-doc-7.3.0/pmd_rules_java_bestpractices.html#useenumcollections> reports usages for |HashSet| and |HashMap| when the keys are of an enum type. The specialized enum collections are more space- and time-efficient. 💥 pmd-compat6 removed (breaking) The already deprecated PMD 6 compatibility module (pmd-compat6) has been removed. It was intended to be used with older versions of the maven-pmd-plugin, but since maven-pmd-plugin 3.22.0, PMD 7 is supported directly and this module is not needed anymore. If you currently use this dependency (|net.sourceforge.pmd:pmd-compat6|), remove it and upgrade maven-pmd-plugin to the latest version (3.23.0 or newer). See also Maven PMD Plugin <https://docs.pmd-code.org/pmd-doc-7.3.0/pmd_userdocs_tools_maven.html>. 🐛 Fixed Issues * cli * #2827 <https://github.com/pmd/pmd/issues/2827>: [cli] Consider processing errors in exit status * core * #4396 <https://github.com/pmd/pmd/issues/4396>: [core] CPD is always case sensitive * #4992 <https://github.com/pmd/pmd/pull/4992>: [core] CPD: Include processing errors in XML report * #5066 <https://github.com/pmd/pmd/issues/5066>: [core] CPD throws java.lang.OutOfMemoryError: Java heap space (since 7.1.0) * apex * #4922 <https://github.com/pmd/pmd/issues/4922>: [apex] SOQL syntax error with TYPEOF in sub-query * #5053 <https://github.com/pmd/pmd/issues/5053>: [apex] CPD fails to parse string literals with escaped characters * #5055 <https://github.com/pmd/pmd/issues/5055>: [apex] SOSL syntax error with WITH USER_MODE or WITH SYSTEM_MODE * apex-bestpractices * #5000 <https://github.com/pmd/pmd/issues/5000>: [apex] UnusedLocalVariable FP with binds in SOSL / SOQL * java * #4885 <https://github.com/pmd/pmd/issues/4885>: [java] AssertionError: Method should be accessible * #5050 <https://github.com/pmd/pmd/issues/5050>: [java] Problems with pattern variables in switch branches * java-bestpractices * #577 <https://github.com/pmd/pmd/issues/577>: [java] New Rule: Check that Map<k,v> is an EnumMap if K is an enum value</k,v> * #5047 <https://github.com/pmd/pmd/issues/5047>: [java] UnusedPrivateMethod FP for Generics & Overloads * plsql * #1934 <https://github.com/pmd/pmd/issues/1934>: [plsql] ParseException with MERGE statement in anonymous block * #2779 <https://github.com/pmd/pmd/issues/2779>: [plsql] Error while parsing statement with (Oracle) DML Error Logging * #4270 <https://github.com/pmd/pmd/issues/4270>: [plsql] Parsing exception COMPOUND TRIGGER with EXCEPTION handler 🚨 API Changes CPD Report Format XML There are some important changes: 1. The XML format will now use an XSD schema, that is available at https://pmd.github.io/schema/cpd-report_1_0_0.xsd. This schema defines the valid elements and attributes that one can expect from a CPD report. 2. The root element |pmd-cpd| contains the new attributes |pmdVersion|, |timestamp| and |version|. The latter is the schema version and is currently "1.0.0". 3. The CPD XML report will now also contain recoverable errors as additional |<error>| elements. See Report formats for CPD <https://sourceforge.net/p/pmd/news/2024/06/pmd_userdocs_cpd_report_formats.html#xml> for an example. The XML format should be compatible as only attributes and elements have been added. However, if you parse the document with a namespace aware parser, you might encounter some issues like no elements being found. In case the new format doesn't work for you (e.g. namespaces, unexpected error elements), you can go back using the old format with the renderer "xmlold" (|XMLOldRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/cpd/XMLOldRenderer.html#>). Note, that this old renderer is deprecated and only there for compatibility reasons. Whatever tooling is used to read the XML format should be updated. CLI * New exit code 5 introduced. PMD and CPD will exit now by default with exit code 5, if any recoverable error (e.g. parsing exception, lexing exception or rule exception) occurred. PMD will still create a report with all detected violations or duplications if recoverable errors occurred. Such errors mean, that the report might be incomplete, as either violations or duplications for an entire file or for a specific rule are missing. These cases can be considered as false-negatives. In any case, the root cause should be investigated. If it's a problem in PMD itself, please create a bug report. * New CLI parameter |--no-fail-on-error| to ignore such errors and not exit with code 5. By default, a build with errors will now fail and with that parameter, the previous behavior can be restored. This parameter is available for both PMD and CPD. * The CLI parameter |--skip-lexical-errors| is deprecated. By default, lexical errors are skipped but the build is failed. Use the new parameter |--[no-]fail-on-error| instead to control whether to fail the build or not. Ant * CPDTask has a new parameter |failOnError|. It controls, whether to fail the build if any recoverable error occurred. By default, the build will fail. CPD will still create a report with all detected duplications, but the report might be incomplete. * The parameter |skipLexicalError| in CPDTask is deprecated and ignored. Lexical errors are now always skipped. Use the new parameter |failOnError| instead to control whether to fail the build or not. Deprecated API * pmd-ant * |CPDTask#setSkipLexicalErrors| <https://docs.pmd-code.org/apidocs/pmd-ant/7.3.0/net/sourceforge/pmd/ant/CPDTask.html#setSkipLexicalErrors(boolean)>: Use |setFailOnError| <https://docs.pmd-code.org/apidocs/pmd-ant/7.3.0/net/sourceforge/pmd/ant/CPDTask.html#setFailOnError(boolean)> instead to control, whether to ignore errors or fail the build. * pmd-core * |CPDConfiguration#isSkipLexicalErrors| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#isSkipLexicalErrors()> and |setSkipLexicalErrors| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setSkipLexicalErrors(boolean)>: Use |setFailOnError| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/AbstractConfiguration.html#setFailOnError(boolean)> to control whether to ignore errors or fail the build. * |net.sourceforge.pmd.cpd.XMLOldRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/cpd/XMLOldRenderer.html#> (the CPD format "xmlold"). * The constructor |AntlrToken#AntlrToken| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrToken.html#AntlrToken(org.antlr.v4.runtime.Token,net.sourceforge.pmd.lang.ast.impl.antlr4.AntlrToken,net.sourceforge.pmd.lang.document.TextDocument)> shouldn't be used directly. Use |AntlrTokenManager| <https://docs.pmd-code.org/apidocs/pmd-core/7.3.0/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrTokenManager.html#> instead. * pmd-java * |ASTResource#getStableName| <https://docs.pmd-code.org/apidocs/pmd-java/7.3.0/net/sourceforge/pmd/lang/java/ast/ASTResource.html#getStableName()> and the corresponding attribute |@StableName|. * |ASTRecordPattern#getVarId| <https://docs.pmd-code.org/apidocs/pmd-java/7.3.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#getVarId()> This method was added here by mistake. Record patterns don't declare a pattern variable for the whole pattern, but rather for individual record components, which can be accessed via |getComponentPatterns| <https://docs.pmd-code.org/apidocs/pmd-java/7.3.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#getComponentPatterns()>. * pmd-plsql * |PLSQLParserImpl| <https://docs.pmd-code.org/apidocs/pmd-plsql/7.3.0/net/sourceforge/pmd/lang/plsql/ast/PLSQLParserImpl.html#> is deprecated now. It should have been package-private because this is an implementation class that should not be used directly. * The node |ASTKEYWORD_UNRESERVED| <https://docs.pmd-code.org/apidocs/pmd-plsql/7.3.0/net/sourceforge/pmd/lang/plsql/ast/ASTKEYWORD_UNRESERVED.html#> is deprecated and is now removed from the AST. Breaking changes: pmd-compat6 removed The already deprecated PMD 6 compatibility module (pmd-compat6) has been removed. See above for details. 📈 Stats * 88 commits * 32 closed tickets & PRs * Days since last release: 27 |
From: David D. <dav...@or...> - 2024-06-10 07:54:31
|
Welcome to the latest OpenJDK Quality Outreach update! JDK 23, scheduled for General Availability on September 17, 2024, is now in Rampdown Phase One (RDP1) [1]. At this point, the overall JDK 23 feature set is frozen (see the final list of JEPs integrated into JDK 23 below) and only low-risk enhancements might still be considered. The coming weeks should be leveraged to identify and resolve as many issues as possible, i.e. before JDK 23 enters the Release Candidates phase in early August [2]. We count on you to test your projects and help us make JDK 23 another solid release! This time, we are covering several heads-up related to JDK 23 : Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal and default annotation processing policy change. Also, make sure to check the new Loom early-access builds which have an improved Java monitors implementation to work better with virtual threads. [1] https://mail.openjdk.org/pipermail/jdk-dev/2024-June/009053.html [2] https://openjdk.org/projects/jdk/23/ ## Heads-Up - JDK 23: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal As mentioned in a previous communication [3], there’s a plan to ultimately remove the sun.misc.Unsafe memory-access methods as the platform offers safer alternatives. JEP 471 (Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal) [4] outlines in more detail this plan including the initial step which is happening in JDK 23, i.e., all of the sun.misc unsafe memory-access methods are now marked as deprecated for removal. This will cause, in JDK 23, compile-time deprecation warnings for code that refers to these methods, alerting library developers to their forthcoming removal. A new command-line option also enables application developers and users to receive runtime warnings when those methods are used. Developers relying on those sun.misc.Unsafe APIs for access memory are strongly encouraged to start, if they haven't done so yet, the migration from the sun.misc.Unsafe APIs to supported replacements. For more details, make sure to read JEP 471 (Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal). [3] https://mail.openjdk.org/pipermail/quality-discuss/2024-January/001132.html [4] https://openjdk.org/jeps/471 ## Heads-Up - JDK 23: Changes Default Annotation Processing Policy Annotation processing is a compile-time feature, where javac scans the to-be-compiled source files for annotations and then the class path for matching annotation processors, so they can generate source code. Up to JDK 22, this feature is enabled by default, which may have been reasonable when it was introduced in JDK 6 circa 2006, but from a current perspective, in the interest of making build output more robust against annotation processors being placed on the class path unintentionally, this is much less reasonable. Hence, starting with JDK 23, javac requires an additional command-line option to enable annotation processing. ### New `-proc` Value To that end, the pre-existing option `-proc:$policy` was extended, where `$policy` can now have the following values: - `none`: compilation _without_ annotation processing, this policy exists since JDK 6 - `only`: annotation processing _without_ compilation, this policy exists since JDK 6 - `full`: annotation processing followed by compilation, this policy is the default in JDK ≤22 but the value itself is new (see next section for versions that support it) Up to and including JDK 22, code bases that require annotation processing before compilation could rely on javac's default behavior to process annotations but that is no longer the case. Starting with JDK 23, at least one annotation-processing command line option needs to be present. If neither `-processor`, `--processor-path`, now `--processor-module-path` is used, `-proc:only` or `-proc:full` has to be provided. In other words, absent other command line options, `-proc:none` is the default on JDK 23. ### Migration to `-proc:full` Several measures were undertaken to help projects prepare for the switch to `-proc:full`: - As of the April 2024 JDK security updates, support for `-proc:full` has been backported to 17u (17.0.11) and 11u (11.0.23) for both Oracle JDK and OpenJDK distributions. Additionally, Oracle's 8u release (8u411) also supports `-proc:full`. - Starting in JDK 21, javac prints an informative message if implicit usage of annotation processing under the default policy is detected. With `-proc:full` backported, it is possible to configure a build that will work the same before and after the change in javac's default policy. Additional details can be found in the original proposal [5]. [5] https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html ## Heads-up - Loom: New EA builds with improved Java monitors implementation to work better with virtual threads Project Loom published new early-access builds [6]. These builds have an improved object monitor implementation that should prevent virtual threads from pinning their carrier thread in the following situations: - when blocking on entering a synchronized method/statement because the object's associated monitor is held by another thread, - when parking (e.g. when doing socket I/O) while in a synchronized method, - when calling `Object.wait` while in a synchronized method. The changes for `Object.wait`/timed-`wait` is the main change since the previous Loom EA build. The Loom team is looking for help to test the changes, i.e., trying out these builds with code that is known to use virtual threads and with libraries that are "very synchronized". The primary goal is to gauge both reliability and performance. Right now, the focus is on being functional and reliable. Please note that the performance for some cases isn't yet fully on par with blocking on j.u.concurrent locks and condition objects. As before, JFR events can be used to identify remaining cases of pinning, parking or blocking in a class initializer for example. The system property `jdk.tracePinnedThreads`, which used to print stack traces when threads are pinned, no longer outputs anything. Please send feedback via email to the Loom mailing list [7] (subscription required). [6] https://jdk.java.net/loom/ [7] http://mail.openjdk.org/mailman/listinfo/loom-dev ## JDK 23 Early-Access Builds JDK 23 early-access builds 26 are now available [8] with the Release Notes here [9] and the javadocs here[10]. Those builds are provided under the GNU GPL v2, with the Classpath Exception. ### JEPs integrated into JDK 23: - JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) - JEP 466: Class-File API (2nd Preview) - JEP 467: Markdown Documentation Comments - JEP 469: Vector API (8th Incubator) - JEP 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal - JEP 473: Stream Gatherers (2nd Preview) - JEP 474: ZGC: Generational Mode by Default - JEP 476: Module Import Declarations (Preview) - JEP 477: Implicitly Declared Classes and Instance Main Methods (3rd Preview) - JEP 480: Structured Concurrency (3rd Preview) - JEP 481: Scoped Values (3rd Preview) - JEP 482: Flexible Constructor Bodies (2nd Preview) ### Changes in recent JDK 23 builds that may be of interest: - JDK-8331670: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal - JDK-8051959: Add thread and timestamp options to java.security.debug system property - JDK-8321428: Deprecate for removal the package java.beans.beancontext - JDK-8319990: Update CLDR to Version 45.0 - JDK-8331975: Enable case-insensitive check in ccache and keytab entry lookup - JDK-8328083: degrade virtual thread support for GetObjectMonitorUsage - JDK-8326666: Remove the Java Management Extension (JMX) Subject Delegation feature - JDK-8295111: dpkg appears to have problems resolving symbolically linked native libraries - JDK-8330077: Allow max number of events to be buffered to be configurable to avoid OVERFLOW_EVENT - JDK-8332476: j.u.r.RandomGeneratorFactor.create(long|byte[]) should throw rather than silently fallback to no-arg create() - JDK-8329113: Deprecate -XX:+UseNotificationThread - JDK-8331202: Support for Duration until another Instant - JDK-8316138: Add GlobalSign 2 TLS root certificates - JDK-8330276: Console methods with explicit Locale - JDK-8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module - JDK-6968351: httpserver clashes with delayed TCP ACKs for low Content-Length - JDK-8331021: Deprecate and then obsolete the DontYieldALot flag - JDK-8330607: Deprecate -XX:+UseEmptySlotsInSupers - JDK-8320522: Remove code related to `RegisterFinalizersAtInit` - JDK-8329636: Deprecate -XX:+PreserveAllAnnotations - JDK-8322234: Remove obsolete desktop integration from Linux installers - JDK-8328649: Disallow enclosing instances for local classes in constructor prologues - JDK-8330734: JFR: Re-engineer mirror class mechanism - JDK-8300148: Consider using a StoreStore barrier instead of Release barrier on ctor exit - JDK-8329997: Add provisions for checking memory segment alignment constraints - JDK-8305457: Implement java.io.IO - JDK-8321314: Reinstate disabling the compiler's default active annotation processing - JDK-6942632: Hotspot should be able to use more than 64 logical processors on Windows - JDK-8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull - JDK-8206447: InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE Note: A more exhaustive list of changes can be found here [11]. [8] https://jdk.java.net/23/ [9] https://jdk.java.net/23/release-notes [10] https://download.java.net/java/early_access/jdk23/docs/api/ [11] https://github.com/openjdk/jdk/compare/jdk-23+17...jdk-23+26 ## New Jextract Early-Access Builds New Jextract early-access builds have been made available [12]. These builds are based on JDK 22 and bring multiple enhancements. For additional details, make sure to check [13]. Moreover, a new jextract guide [14] has been published. [12] https://jdk.java.net/jextract/ [13] https://mail.openjdk.org/pipermail/jextract-dev/2024-May/001699.html [14] https://github.com/openjdk/jextract/blob/master/doc/GUIDE.md ## JavaFX Early-Access Builds These are early access builds of the JavaFX 23 Runtime built from openjdk/jfx [15]. These builds enable JavaFX application developers to build and test their applications with JavaFX 23 on JDK 23. Although these builds are designed to work with JDK 23EA, they are also known to work with JDK 21 and later versions. The latest early access builds of JavaFX 23 are available here [16], under the GNU General Public License, version 2, with the Classpath Exception. JavaFX 23 API Javadocs [17] are also available. [15] https://github.com/openjdk/jfx [16] https://jdk.java.net/javafx23/ [17] https://download.java.net/java/early_access/javafx23/docs/api/overview-summary.html ## Topics of Interest - All Java 23 Features - Inside Java Newscast https://inside.java/2024/06/06/newscast-70/ - Module Imports in Java 23 - Inside Java Newscast https://inside.java/2024/05/16/newscast-69/ - Java 23: JavaDoc Hits the Markdown on Comments - Inside Java Newscast https://inside.java/2024/05/01/newscast-68/ - Java 23: Restoring the Balance with Primitive Patterns - Inside Java Newscast https://inside.java/2024/04/04/newscast-66/ - Java in 2024 - Constant evolution, delivered. https://inside.java/2024/06/01/java-in-2024-keynote/ - Introduction to JDK Mission Control https://inside.java/2024/05/18/jmc-intro/ - What's New in JMC 9? - Sip of Java https://inside.java/2024/04/21/sip096/ - Programmer's Guide to JDK Flight Recorder https://inside.java/2024/04/12/programmer-guide-to-jfr/ - A Decade of JDK Updates in OpenJDK https://inside.java/2024/04/09/a-decade-of-jdk-updates/ - Data-Oriented Programming - Version 1.1 https://inside.java/2024/05/23/dop-v1-1-introduction/ ~ As usual, let us know if you find any issues while testing your project(s) with the latest JDK early-access builds. Thank you! --David |
From: Andreas D. <and...@pm...> - 2024-05-31 11:43:27
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.2.0 * Documentation: https://docs.pmd-code.org/pmd-doc-7.2.0/ 31-May-2024 - 7.2.0 The PMD team is pleased to announce PMD 7.2.0. This is a minor release. Table Of Contents * 🚀 New and noteworthy <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#new-and-noteworthy> o Collections exposed as XPath attributes <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#collections-exposed-as-xpath-attributes> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#updated-pmd-designer> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#fixed-issues> * 🚨 API Changes <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#api-changes> o Deprecated API <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#deprecated-api> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2024/05/pmd-720-31-may-2024-released/#stats> 🚀 New and noteworthy Collections exposed as XPath attributes Up to now, all AST node getters would be exposed to XPath, as long as the return type was a primitive (boxed or unboxed), String or Enum. That meant that collections, even of these basic types, were not exposed, so for instance accessing Apex's |ASTUserClass.getInterfaceNames()| to list the interfaces implemented by a class was impossible from XPath, and would require writing a Java rule to check it. Since this release, PMD will also expose any getter returning a collection of any supported type as a sequence through an XPath attribute. They would require to use apropriate XQuery functions to manipulate the sequence. So for instance, to detect any given |ASTUserClass| in Apex that implements |Queueable|, it is now possible to write: |/UserClass[@InterfaceNames='Queueable'] | Updated PMD Designer This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog (7.2.0) <https://github.com/pmd/pmd-designer/releases/tag/7.2.0>. 🐛 Fixed Issues * core * #4467 <https://github.com/pmd/pmd/issues/4467>: [core] Expose collections from getters as XPath sequence attributes * #4978 <https://github.com/pmd/pmd/issues/4978>: [core] Referenced Rulesets do not emit details on validation errors * #4983 <https://github.com/pmd/pmd/pull/4983>: [cpd] Fix CPD crashes about unicode escapes * #5009 <https://github.com/pmd/pmd/issues/5009>: [core] Kotest tests aren't picked up by surefire * java * #4912 <https://github.com/pmd/pmd/issues/4912>: [java] Unable to parse some Java9+ resource references * #4973 <https://github.com/pmd/pmd/pull/4973>: [java] Stop parsing Java for CPD * #4980 <https://github.com/pmd/pmd/issues/4980>: [java] Bad intersection, unrelated class types java.lang.Object[] and java.lang.Number * #4988 <https://github.com/pmd/pmd/pull/4988>: [java] Fix impl of ASTVariableId::isResourceDeclaration / VariableId/@ResourceDeclaration * #4990 <https://github.com/pmd/pmd/issues/4990>: [java] Add an attribute @PackageQualifier to ASTClassType * #5006 <https://github.com/pmd/pmd/issues/5006>: [java] Bad intersection, unrelated class types Child and Parent<? extends Child> * #5029 <https://github.com/pmd/pmd/issues/5029>: [java] PMD 7.x throws stack overflow in TypeOps$ProjectionVisitor while parsing a Java class * java-bestpractices * #4278 <https://github.com/pmd/pmd/issues/4278>: [java] UnusedPrivateMethod FP with Junit 5 @MethodSource and default factory method name * #4852 <https://github.com/pmd/pmd/issues/4852>: [java] ReplaceVectorWithList false-positive (neither Vector nor List usage) * #4975 <https://github.com/pmd/pmd/issues/4975>: [java] UnusedPrivateMethod false positive when using @MethodSource on a @Nested test * #4985 <https://github.com/pmd/pmd/issues/4985>: [java] UnusedPrivateMethod false-positive / method reference in combination with custom object * java-codestyle * #1619 <https://github.com/pmd/pmd/issues/1619>: [java] LocalVariableCouldBeFinal on 'size' variable in for loop * #3122 <https://github.com/pmd/pmd/issues/3122>: [java] LocalVariableCouldBeFinal should consider blank local variables * #4903 <https://github.com/pmd/pmd/issues/4903>: [java] UnnecessaryBoxing, but explicit conversion is necessary * #4924 <https://github.com/pmd/pmd/issues/4924>: [java] UnnecessaryBoxing false positive in PMD 7.0.0 in lambda * #4930 <https://github.com/pmd/pmd/issues/4930>: [java] EmptyControlStatement should not allow empty try with concise resources * #4954 <https://github.com/pmd/pmd/issues/4954>: [java] LocalVariableNamingConventions should allow unnamed variables by default * #5028 <https://github.com/pmd/pmd/issues/5028>: [java] FormalParameterNamingConventions should accept unnamed parameters by default * java-errorprone * #4042 <https://github.com/pmd/pmd/issues/4042>: [java] A false negative about the rule StringBufferInstantiationWithChar * #5007 <https://github.com/pmd/pmd/issues/5007>: [java] AvoidUsingOctalValues triggers on non-octal double literals with a leading 0 * java-multithreading * #2368 <https://github.com/pmd/pmd/issues/2368>: [java] False positive UnsynchronizedStaticFormatter in static initializer 🚨 API Changes Deprecated API * pmd-java * |ASTResource#getStableName| <https://docs.pmd-code.org/apidocs/pmd-java/7.2.0/net/sourceforge/pmd/lang/java/ast/ASTResource.html#getStableName()> and the corresponding attribute |@StableName| ✨ External Contributions * #5020 <https://github.com/pmd/pmd/issues/5020>: [java] Fix AvoidUsingOctalValues false-positive - Gold856 <https://github.com/Gold856> (@Gold856) 📈 Stats * 152 commits * 46 closed tickets & PRs * Days since last release: 35 |
From: Andreas D. <and...@pm...> - 2024-04-26 08:11:08
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.1.0 * Documentation: https://docs.pmd-code.org/pmd-doc-7.1.0/ 26-April-2024 - 7.1.0 The PMD team is pleased to announce PMD 7.1.0. This is a minor release. Table Of Contents * 🚀 New and noteworthy <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#new-and-noteworthy> o More robust CPD reports <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#more-robust-cpd-reports> o ✨ New Rules <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#new-rules> o 🌟 Rule Changes <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#rule-changes> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#fixed-issues> * 🚨 API Changes <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#api-changes> o Deprecated methods <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#deprecated-methods> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2024/04/pmd-710-26-april-2024-released/#stats> 🚀 New and noteworthy More robust CPD reports There were a number of circumstances, specially around (but not limited to) literal sequences, were CPD would report duplicate overlapping or partially overlapping matches. These have now been fixed, and CPD will report only the longest non-overlapping duplicate. These improvements apply to all supported languages, irrespective of supported flags. ✨ New Rules * The new Java rule |UnnecessaryVarargsArrayCreation| <https://docs.pmd-code.org/pmd-doc-7.1.0/pmd_rules_java_bestpractices.html#unnecessaryvarargsarraycreation> reports explicit array creation when a varargs is expected. This is more heavy to read and could be simplified. * The new Java rule |ConfusingArgumentToVarargsMethod| <https://docs.pmd-code.org/pmd-doc-7.1.0/pmd_rules_java_errorprone.html#confusingargumenttovarargsmethod> reports some confusing situations where a varargs method is called with an inexact argument type. These may end up in a mismatch between the expected parameter type and the actual value. * The new Java rule |LambdaCanBeMethodReference| <https://docs.pmd-code.org/pmd-doc-7.1.0/pmd_rules_java_codestyle.html#lambdacanbemethodreference> reports lambda expressions that can be replaced with a method reference. Please read the documentation of the rule for more info. This rule is now part of the Quickstart ruleset. 🌟 Rule Changes * |JUnitTestsShouldIncludeAssert| <https://docs.pmd-code.org/pmd-doc-7.1.0/pmd_rules_java_bestpractices.html#junittestsshouldincludeassert> and |JUnitTestContainsTooManyAsserts| <https://docs.pmd-code.org/pmd-doc-7.1.0/pmd_rules_java_bestpractices.html#junittestcontainstoomanyasserts> have a new property named |extraAssertMethodNames|. With this property, you can configure which additional static methods should be considered as valid verification methods. This allows to use custom mocking or assertion libraries. 🐛 Fixed Issues * core * #494 <https://github.com/pmd/pmd/issues/494>: [core] Adopt JApiCmp to enforce control over API changes * #4942 <https://github.com/pmd/pmd/issues/4942>: [core] CPD: |--skip-duplicate-files| has no effect (7.0.0 regression) * #4959 <https://github.com/pmd/pmd/pull/4959>: [core] Upgrade saxon to 12.4 * cli * #4791 <https://github.com/pmd/pmd/issues/4791>: [cli] Could not find or load main class * #4913 <https://github.com/pmd/pmd/issues/4913>: [cli] cpd-gui closes immediately * doc * #4901 <https://github.com/pmd/pmd/issues/4901>: [doc] Improve documentation on usage of violationSuppressXPath * apex * #4418 <https://github.com/pmd/pmd/issues/4418>: [apex] ASTAnnotation.getImage() does not return value as written in the class * apex-errorprone * #3953 <https://github.com/pmd/pmd/issues/3953>: [apex] EmptyCatchBlock false positive with formal (doc) comments * cpp * #2438 <https://github.com/pmd/pmd/issues/2438>: [cpp] Repeated Duplication blocks * java * #4899 <https://github.com/pmd/pmd/issues/4899>: [java] Parsing failed in ParseLock#doParse() java.io.IOException: Stream closed * #4902 <https://github.com/pmd/pmd/issues/4902>: [java] "Bad intersection, unrelated class types" for Constable[] and Enum[] * #4947 <https://github.com/pmd/pmd/issues/4947>: [java] Broken TextBlock parser * java-bestpractices * #1084 <https://github.com/pmd/pmd/issues/1084>: [java] Allow JUnitTestsShouldIncludeAssert to configure verification methods * #3216 <https://github.com/pmd/pmd/issues/3216>: [java] New rule: UnnecessaryVarargsArrayCreation * #4435 <https://github.com/pmd/pmd/issues/4435>: [java] [7.0-rc1] UnusedAssignment for used field * #4569 <https://github.com/pmd/pmd/issues/4569>: [java] ForLoopCanBeForeach reports on loop |for (int i = 0; i < list.size(); i += 2)| * #4618 <https://github.com/pmd/pmd/issues/4618>: [java] UnusedAssignment false positive with conditional assignments of fields * java-codestyle * #4602 <https://github.com/pmd/pmd/issues/4602>: [java] UnnecessaryImport: false positives with static imports * #4785 <https://github.com/pmd/pmd/issues/4785>: [java] False Positive: PMD Incorrectly report violation for UnnecessaryImport * #4779 <https://github.com/pmd/pmd/issues/4779>: [java] Examples in documentation of MethodArgumentCanBeFinal do not trigger the rule * #4881 <https://github.com/pmd/pmd/issues/4881>: [java] ClassNamingConventions: interfaces are identified as abstract classes (regression in 7.0.0) * java-design * #2440 <https://github.com/pmd/pmd/issues/2440>: [java] FinalFieldCouldBeStatic FN when the right side of the assignment is a constant expression * #3694 <https://github.com/pmd/pmd/issues/3694>: [java] SingularField ignores static variables * #4873 <https://github.com/pmd/pmd/issues/4873>: [java] AvoidCatchingGenericException: Can no longer suppress on the exception itself * java-errorprone * #2056 <https://github.com/pmd/pmd/issues/2056>: [java] CloseResource false-positive with URLClassLoader in cast expression * #4751 <https://github.com/pmd/pmd/issues/4751>: [java] PMD crashes when analyzing CloseResource Rule * #4928 <https://github.com/pmd/pmd/issues/4928>: [java] EmptyCatchBlock false negative when allowCommentedBlocks=true * #4948 <https://github.com/pmd/pmd/issues/4948>: [java] ImplicitSwitchFallThrough: False-positive with nested switch statements * java-performance * #3845 <https://github.com/pmd/pmd/issues/3845>: [java] InsufficientStringBufferDeclaration should consider literal expression * #4874 <https://github.com/pmd/pmd/issues/4874>: [java] StringInstantiation: False-positive when using |new String(charArray)| * #4886 <https://github.com/pmd/pmd/issues/4886>: [java] BigIntegerInstantiation: False Positive with Java 17 and BigDecimal.TWO * pom-errorprone * #4388 <https://github.com/pmd/pmd/issues/4388>: [pom] InvalidDependencyTypes doesn't consider dependencies at all * misc * #4967 <https://github.com/pmd/pmd/pull/4967>: Fix reproducible build issues with 7.0.0 🚨 API Changes Deprecated methods * pmd-java * |ASTLambdaExpression#getBlock| <https://docs.pmd-code.org/apidocs/pmd-java/7.1.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getBlock()> and |ASTLambdaExpression#getExpression| <https://docs.pmd-code.org/apidocs/pmd-java/7.1.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getExpression()> * |SingularFieldRule#mayBeSingular| <https://docs.pmd-code.org/apidocs/pmd-java/7.1.0/net/sourceforge/pmd/lang/java/rule/design/SingularFieldRule.html#mayBeSingular(net.sourceforge.pmd.lang.java.ast.ModifierOwner)> has been deprecated for removal. The method is only useful for the rule itself and shouldn't be used otherwise. ✨ External Contributions * #4864 <https://github.com/pmd/pmd/pull/4864>: Fix #1084 [Java] add extra assert method names to Junit rules - Erwan Moutymbo <https://github.com/emouty> (@emouty) * #4894 <https://github.com/pmd/pmd/pull/4894>: Fix #4791 Error caused by space in JDK path - Scrates1 <https://github.com/Scrates1> (@Scrates1) 📈 Stats * 205 commits * 71 closed tickets & PRs * Days since last release: 34 |
From: Andreas D. <ad...@ap...> - 2024-04-25 06:52:33
|
The Maven team is pleased to announce the release of the Apache Maven PMD Plugin, version 3.22.0 A Maven plugin for the PMD toolkit, that produces a report on both code rule violations and detected copy and paste fragments, as well as being able to fail the build based on these metrics. https://maven.apache.org/plugins/maven-pmd-plugin/ You should specify the version in your project's plugin configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.22.0</version> </plugin> Release Notes - Maven PMD Plugin - Version 3.22.0 Improvement * [MPMD-379] - Upgrade to use PMD 7.0.0 by default Dependency upgrade * [MPMD-388] - Upgrade to Parent 41 * [MPMD-393] - Upgrade commons-io:commons-io to 2.16.1 * [MPMD-394] - Bump org.apache.maven.plugins:maven-plugins from 41 to 42 Enjoy, -The Maven team |
From: David D. <dav...@or...> - 2024-04-02 09:49:20
|
Welcome to the latest OpenJDK Quality Outreach update! Java 22 was just released along with JavaFX 22 [1][2]. Thank you to all the projects who contributed to those releases by testing and providing feedback using their respective early-access builds. And to celebrate that, the Java DevRel Team hosted a +4h live-stream with guests such as Brian Goetz, Viktor Klang, Alan Bateman, etc. You can watch the launch stream replay here [3]. The JDK 23 schedule is now known [4] with rampdown starting early June and general availability sets for mid-September. So far, 2 JEPs have been targeted to JDK 23: - JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [5] - JEP 466: Class-File API (2nd Preview) [6] The focus should now be shifted to testing your project(s) on JDK 23. And don't forget that the Oracle setup-java github action [7] supports, amongst others, the latest OpenJDK 23 Early-Access builds. So, JDK 23 EA testing is literally one pipeline away. [1] https://mail.openjdk.org/pipermail/jdk-dev/2024-March/008827.html [3] https://jdk.java.net/javafx22/ [3] https://www.youtube.com/live/AjjAZsnRXtE?feature=shared&t=278 [4] https://openjdk.org/projects/jdk/23/ [5] https://openjdk.org/jeps/455 [6] https://openjdk.org/jeps/466 [7] https://github.com/oracle-actions/setup-java ## Heads-up: JDK 20-23: Support for Unicode CLDR Version 42 The JDK update to CLDR version 42 included a change where regular spaces in date/time formats (and some other formatted values) were replaced with (narrow) non-breaking spaces. This lead to issues for existing code that relied on parsing such strings. To address that, JDK 23 allows loose matching of spaces when parsing date/time strings. Loose matching is performed in the lenient parsing style for both date/time parsers in `java.time.format` and `java.text` packages. In the default strict parsing style, those spaces are considered distinct as before. Please read this updated heads-up [9] for details on how to configure strict/lenient parsing in the `java.time.format` (strict by default) and `java.text` (lenient by default) packages. [9] https://inside.java/2024/03/29/quality-heads-up/ ## Heads-up: macOS 14 users running on Apple silicon systems should update directly to macOS 14.4.1 An issue introduced by macOS 14.4 caused some Java processes, regardless of the Java version, to terminate unexpectedly on Apple silicon (AArch64). On March 25 Apple released macOS 14.4.1 and indicated on their support site that it addresses this issue. Oracle can confirm that after applying macOS 14.4.1 we are unable to reproduce the problem. So, Java users on macOS 14 running on Apple silicon systems should skip macOS 14.4 and update directly to macOS 14.4.1. More details can be found on https://blogs.oracle.com/java/post/java-on-macos-14-4 ## JDK 23 Early-Access Builds The JDK 23 EA builds 16 are available [10], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [11] are also available. ### Changes in recent JDK 23 builds that may be of interest: - JDK-8324774: Add DejaVu web fonts (reported by AssertJ) - JDK-8327385: Add JavaDoc option to exclude web fonts from generated documentation (reported by AssertJ) - JDK-8328638: Fallback option for POST-only OCSP requests - JDK-8320362: Load anchor certificates from Keychain keystore - JDK-8327875: ChoiceFormat should advise throwing UnsupportedOperationException for unused methods - JDK-8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs - JDK-8327818: Implement Kerberos debug with sun.security.util.Debug - JDK-7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream - JDK-8319251: Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT - JDK-8327651: Rename DictionaryEntry members related to protection domain - JDK-8321408: Add Certainly roots R1 and E1 - JDK-8164094: javadoc allows to create a @link to a non-existent method - JDK-8325496: Make TrimNativeHeapInterval a product switch - JDK-8174269: Remove COMPAT locale data provider from JDK - JDK-8322750: Test "api/java_awt/interactive/SystemTrayTests.html" failed because … - JDK-8139457: Relax alignment of array elements - JDK-8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly - JDK-8326908: DecimalFormat::toPattern throws OutOfMemoryError when pattern is empty string - JDK-8247972: incorrect implementation of JVM TI GetObjectMonitorUsage - JDK-8325580: Remove "alternatives --remove" call from Java rpm installer - JDK-8326838: JFR: Native mirror events - JDK-8326106: Write and clear stack trace table outside of safepoint - JDK-8323183: ClassFile API performance improvements - JDK-8324829: Uniform use of synchronizations in NMT - JDK-8326586: Improve Speed of System.map - JDK-8318761: MessageFormat pattern support for CompactNumberFormat, ListFormat, and DateTimeFormatter - JDK-8265372: Simplify PKCS9Attribute - JDK-8317431: Implement simpler Comparator when building certification paths - JDK-8327093: Add truncate function to BitMap API Note: A more detailed list of changes can be found here [12]. [10] https://jdk.java.net/23/ [11] https://jdk.java.net/23/release-notes [12] https://github.com/openjdk/jdk/compare/jdk-23+10...jdk-23+16 ## JavaFX 23 Early-Access Builds These are early access builds of the JavaFX 23 Runtime built from openjdk/jfx [13]. These builds enable JavaFX application developers to build and test their applications with JavaFX 23 on JDK 23. Although these builds are designed to work with JDK 23, they are also known to work with JDK 17 and later versions. The latest early access builds of JavaFX 23 Builds 10 (2024/3/26) are available [14], under the GNU General Public License, version 2, with the Classpath Exception. [13] https://github.com/openjdk/jfx [14] https://jdk.java.net/javafx23/ ## Topics of Interest: - The Arrival of Java 22 https://inside.java/2024/03/19/the-arrival-of-java-22/ - JDK 22 Release Notes Review (video) https://inside.java/2024/03/14/newscast-65/ - Java 22 in 2 Minutes https://inside.java/2024/03/21/sip095/ - (Dirty?) Tricks in Java 22 https://inside.java/2024/02/29/newscast-64/ - JDK 22 Security Enhancements https://seanjmullan.org/blog/2024/03/20/jdk22 - Java 17 to 21 - A Showcase of JDK Security Enhancements https://inside.java/2024/03/03/jfokus-jdk-security-changes/ - Netflix - Bending Pause Times to Your Will with Generational ZGC https://netflixtechblog.com/bending-pause-times-to-your-will-with-generational-zgc-256629c9386b - MethodHandle Primer https://jornvernee.github.io/methodhandles/2024/01/19/methodhandle-primer.html - Pruning Dead Exception Handlers https://jornvernee.github.io/hotspot/jit/2024/02/16/prune-dead-exception-handlers.html - Update on String Templates (JEP 459) https://mail.openjdk.org/pipermail/amber-spec-experts/2024-March/004010.html - The State of OpenJDK https://inside.java/2024/02/23/fosdem2024-openjdk-state/ - Project Wakefield - The JDK Wayland Desktop on Linux https://inside.java/2024/03/24/openjdk-wakefield/ - Project Leyden - Capturing Lightning in a Bottle https://inside.java/2024/02/28/leyden/ - jlink - Java's Custom Runtime Builder https://inside.java/2024/02/25/jlink-stackwalker/ - Modern Java in Action https://inside.java/2024/03/09/jfokus-modern-java-action/ - New Java Platform Extension for VS Code Release https://inside.java/2024/03/27/vscode-extension-update/ ~ That's it for this instalment. And don't forget to ping me if you encounter issues with JDK 23 EA builds. --David |
From: Andreas D. <and...@pm...> - 2024-03-22 09:37:12
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.0.0 * Documentation: https://docs.pmd-code.org/pmd-doc-7.0.0/ 22-March-2024 - 7.0.0 🎉 After a long time, we're excited to bring you now the next major version of PMD! 🎉 Since this is a big release, we provide here only a concise version of the release notes. We prepared a separate page with the full Detailed Release Notes for PMD 7.0.0 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html>. 🤝🙏 Many thanks to all users and contributors who were testing the release candidates and provided feedback and/or PRs! ✨ PMD 7... * ...has a new logo * ...analyzes Java 21 and Java 22 projects with even better type resolution and symbol table support * ...analyzes Kotlin and Swift * ...analyzes Apex with a new parser * ...finds duplicated code in Coco, Julia, TypeScript * ...ships 11 new rules and tons of improvements for existing rules * ...provides a new CLI interface with progress bar * ...supports Antlr based languages * ...and many more enhancements 💥 Note: Since PMD 7 is a major release, it is not a drop-in replacement for PMD 6.55.0. A detailed documentation of required changes are available in the Migration Guide for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html>. Expand to see Release Notes Table Of Contents * Changes since 7.0.0-rc4 <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changes-since-700-rc4> o New and Noteworthy <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-and-noteworthy> + Maven PMD Plugin compatibility with PMD 7 <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#maven-pmd-plugin-compatibility-with-pmd-7> + Java 22 Support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#java-22-support> + Swift Support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#swift-support> + Groovy Support (CPD) <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#groovy-support-cpd> + Updated PMD Designer <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#updated-pmd-designer> + Apex Support: Replaced Jorje with fully open source front-end <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#apex-support-replaced-jorje-with-fully-open-source-front-end> + Changed: Visualforce <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-visualforce> + Changed: HTML support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-html-support> + Changed: Kotlin support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-kotlin-support> + Changed: Velocity Template Language (VTL) <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-velocity-template-language-vtl> o Rule Changes <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#rule-changes> o Fixed issues <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#fixed-issues> o API Changes <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#api-changes> o External Contributions <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#external-contributions> * 🚀 Major Features and Enhancements <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#major-features-and-enhancements> o New official logo <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-official-logo> o Revamped Java module <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#revamped-java-module> o Revamped Command Line Interface <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#revamped-command-line-interface> o Full Antlr support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#full-antlr-support> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#updated-pmd-designer> o New CPD report format cpdhtml-v2.xslt <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-cpd-report-format-cpdhtml-v2xslt> * 🎉 Language Related Changes <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#language-related-changes> o New: CPD support for Apache Velocity Template Language (VTL) <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-cpd-support-for-apache-velocity-template-language-vtl> o New: CPD support for Coco <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-cpd-support-for-coco> o New: CPD support for Julia <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-cpd-support-for-julia> o New: CPD support for TypeScript <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-cpd-support-for-typescript> o New: Java 21 and 22 Support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-java-21-and-22-support> o New: Kotlin support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-kotlin-support> o New: Swift support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-swift-support> o Changed: Apex Support: Replaced Jorje with fully open source front-end <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-apex-support-replaced-jorje-with-fully-open-source-front-end> o Changed: CPP can now ignore identifiers in sequences (CPD) <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-cpp-can-now-ignore-identifiers-in-sequences-cpd> o Changed: Groovy Support (CPD) <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-groovy-support-cpd> o Changed: HTML support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-html-support> o Changed: JavaScript support <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-javascript-support> o Changed: Language versions <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-language-versions> o Changed: Rule properties <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-rule-properties> o Changed: Velocity Template Language (VTL) <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-velocity-template-language-vtl> o Changed: Visualforce <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#changed-visualforce> * 🌟 New and changed rules <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-and-changed-rules> o New Rules <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#new-rules> o Other changes <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#other-changes> * 🚨 API <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#api> * 💥 Compatibility and migration notes <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#compatibility-and-migration-notes> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#fixed-issues> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2024/03/pmd-700-22-march-2024-released/#stats> Changes since 7.0.0-rc4 This section lists the most important changes from the last release candidate. The remaining section describes the complete release notes for 7.0.0. New and Noteworthy Maven PMD Plugin compatibility with PMD 7 In order to use PMD 7 with maven-pmd-plugin <https://maven.apache.org/plugins/maven-pmd-plugin/> a new compatibility module has been created. This allows to use PMD 7 by simply adding one additional dependency: 1. Follow the guide Upgrading PMD at Runtime <https://maven.apache.org/plugins/maven-pmd-plugin/examples/upgrading-PMD-at-runtime.html> 2. Add additionally the following dependency: |<dependency> <groupId>net.sourceforge.pmd</groupId> <artifactId>pmd-compat6</artifactId> <version>${pmdVersion}</version> </dependency> | It is important to add this dependency as the *first* in the list, so that maven-pmd-plugin sees the (old) compatible versions of some classes. This module is available beginning with version 7.0.0-rc4 and will be there at least for the first final version PMD 7 (7.0.0). It's not decided yet, whether we will keep updating it, after PMD 7 is finally released. Note: This compatibility module only works for the built-in rules, that are still available in PMD 7. E.g. you need to review your rulesets and look out for deprecated rules and such. See the use case I'm using only built-in rules <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html#im-using-only-built-in-rules> in the Migration Guide for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html>. As PMD 7 revamped the Java module, if you have custom rules, you need to migrate these rules. See the use case I'm using custom rules <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html#im-using-custom-rules> in the Migration Guide. Note: Once the default version of PMD is upgraded to PMD7 in maven-pmd-plugin (see MPMD-379 <https://issues.apache.org/jira/projects/MPMD/issues/MPMD-379>), this compatibility module is no longer needed. The module pmd-compat6 might not be maintained then any further, hence it is already declared as deprecated. No guarantee is given, that the (deprecated) module pmd-compat6 is being maintained over the whole lifetime of PMD 7. Java 22 Support This release of PMD brings support for Java 22. There are the following new standard language features, that are supported now: * JEP 456: Unnamed Variables & Patterns <https://openjdk.org/jeps/456> PMD also supports the following preview language features: * JEP 447: Statements before super(...) (Preview) <https://openjdk.org/jeps/447> * JEP 459: String Templates (Second Preview) <https://openjdk.org/jeps/459> * JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview) <https://openjdk.org/jeps/463> In order to analyze a project with PMD that uses these language features, you'll need to enable it via the environment variable |PMD_JAVA_OPTS| and select the new language version |22-preview|: |exportPMD_JAVA_OPTS=--enable-preview pmdcheck--use-versionjava-22-preview... | Note: Support for Java 20 preview language features have been removed. The version "20-preview" is no longer available. Swift Support * limited support for Swift 5.9 (Macro Expansions) Groovy Support (CPD) * We now support parsing all Groovy features from Groovy 3 and 4. * We now support suppression <https://sourceforge.net/p/pmd/news/2024/03/pmd_userdocs_cpd.html#suppression> through |CPD-ON|/|CPD-OFF| comment pairs. * See PR #4726 <https://github.com/pmd/pmd/pull/4726> for details. Updated PMD Designer 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). For the detailed changes, see PMD Designer Changelog (7.0.0) <https://github.com/pmd/pmd-designer/releases/tag/7.0.0>. Apex Support: Replaced Jorje with fully open source front-end 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 Salesforce Extensions for VS Code <https://github.com/forcedotcom/salesforcedx-vscode>, and it is closed-source. 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. Also having access to the source code, enhancements and modifications are easier to do. Under the hood, we use two open source libraries instead: * apex-parser <https://github.com/apex-dev-tools/apex-parser> originally by Kevin Jones <https://github.com/nawforce> (@nawforce). This project provides the grammar for a ANTLR based parser. * Summit-AST <https://github.com/google/summit-ast> by Google <https://github.com/google> (@google <https://sourceforge.net/u/google/profile/>) 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. Although the parser is completely switched, there are only little known changes to the AST. These are documented in the Migration Guide for PMD 7: Apex AST <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html#apex-ast>. With the new Apex parser, the new language constructs like User Mode Database Operations <https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_enforce_usermode.htm> and the new Null Coalescing Operator |??| <https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_NullCoalescingOperator.htm> can be parsed now. PMD should be able to parse Apex code up to version 60.0 (Spring '24). See #3766 <https://github.com/pmd/pmd/issues/3766> for details. Contributors: Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google), Edward Klimoshenko <https://github.com/eklimo> (@eklimo) Changed: Visualforce 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. If you import rules, you also need to adjust the paths, e.g. * |category/vf/security.xml| ➡️ |category/visualforce/security.xml| Changed: HTML support Support for HTML was introduced in PMD 6.55.0 as an experimental feature. With PMD 7.0.0 this is now considered stable. Changed: Kotlin support Support for Kotlin was introduced with PMD 7.0.0-rc1 as an experimental feature. With PMD 7.0.0 this is now considered stable. Changed: Velocity Template Language (VTL) 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". If you import rules, you also need to adjust the paths, e.g. * |category/vm/...| ➡️ |category/velocity/...| Rule Changes *New Rules* * |OperationWithHighCostInLoop| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithhighcostinloop> finds Schema class methods called in a loop, which is a potential performance issue. * |UseExplicitTypes| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#useexplicittypes> reports usages of |var| keyword, which was introduced with Java 10. * |MissingEncoding| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_xml_bestpractices.html#missingencoding> finds XML files without explicit encoding. *Changed Rules* * |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement>: The rule has a new property to allow empty blocks when they contain a comment (|allowCommentedBlocks|). * |MethodNamingConventions| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#methodnamingconventions>: The deprecated rule property |skipTestMethodUnderscores| 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 |testPattern| instead to configure valid names for test methods. * |CommentRequired| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_documentation.html#commentrequired>: The deprecated property |headerCommentRequirement| has been removed. Use the property |classCommentRequirement| instead. * |NonSerializableClass| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#nonserializableclass>: The deprecated property |prefix| has been removed without replacement. In a serializable class all fields have to be serializable regardless of the name. *Renamed Rulesets* * |category/vf/security.xml| ➡️ |category/visualforce/security.xml| * |category/vm/bestpractices.xml| ➡️ |category/velocity/bestpractices.xml| * |category/vm/design.xml| ➡️ |category/velocity/design.xml| * |category/vm/errorprone.xml| ➡️ |category/velocity/errorprone.xml| *Removed Rules* The following previously deprecated rules have been finally removed: * Apex * performance.xml/AvoidSoqlInLoops (deleted) ➡️ use |OperationWithLimitsInLoop| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop> * performance.xml/AvoidSoslInLoops (deleted) ➡️ use |OperationWithLimitsInLoop| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop> * performance.xml/AvoidDmlStatementsInLoops (deleted) ➡️ use |OperationWithLimitsInLoop| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop> * Java * design.xml/ExcessiveClassLength (deleted) ➡️ use |NcssCount| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount> * design.xml/ExcessiveMethodLength (deleted) ➡️ use |NcssCount| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#ncsscount> * errorprone.xml/BeanMembersShouldSerialize (deleted) ➡️ use |NonSerializableClass| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#nonserializableclass> * errorprone.xml/EmptyFinallyBlock (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptyIfStmt (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptyInitializer (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptyStatementBlock (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptyStatementNotInLoop (deleted) ➡️ use |UnnecessarySemicolon| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessarysemicolon> * errorprone.xml/EmptySwitchStatements (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptySynchronizedBlock (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptyTryBlock (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> * errorprone.xml/EmptyWhileStmt (deleted) ➡️ use |EmptyControlStatement| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement> *Removed deprecated rulesets* 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. List of deprecated rulesets Fixed issues * cli * #4594 <https://github.com/pmd/pmd/pull/4594>: [cli] Change completion generation to runtime * #4685 <https://github.com/pmd/pmd/pull/4685>: [cli] Clarify CPD documentation, fix positional parameter handling * #4723 <https://github.com/pmd/pmd/issues/4723>: [cli] Launch fails for "bash pmd" * core * #1027 <https://github.com/pmd/pmd/issues/1027>: [core] Apply the new PropertyDescriptor<Pattern> type where applicable * #3903 <https://github.com/pmd/pmd/issues/3903>: [core] Consolidate |n.s.pmd.reporting| package * #3905 <https://github.com/pmd/pmd/issues/3905>: [core] Stabilize tree export API * #3917 <https://github.com/pmd/pmd/issues/3917>: [core] Consolidate |n.s.pmd.lang.rule| package * #4065 <https://github.com/pmd/pmd/issues/4065>: [core] Rename TokenMgrError to LexException, Tokenizer to CpdLexer * #4309 <https://github.com/pmd/pmd/issues/4309>: [core] Cleanups in XPath area * #4312 <https://github.com/pmd/pmd/issues/4312>: [core] Remove unnecessary property |color| and system property |pmd.color| in |TextColorRenderer| * #4313 <https://github.com/pmd/pmd/issues/4313>: [core] Remove support for <lang>-<ruleset> hyphen notation for ruleset references * #4314 <https://github.com/pmd/pmd/issues/4314>: [core] Remove ruleset compatibility filter (RuleSetFactoryCompatibility) and CLI option |--no-ruleset-compatibility| * #4348 <https://github.com/pmd/pmd/issues/4348>: [core] Consolidate @InternalApi classes * #4349 <https://github.com/pmd/pmd/issues/4349>: [core] Cleanup remaining experimental and deprecated API * #4378 <https://github.com/pmd/pmd/issues/4378>: [core] Ruleset loading processes commented rules * #4674 <https://github.com/pmd/pmd/issues/4674>: [core] WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass * #4694 <https://github.com/pmd/pmd/pull/4694>: [core] Fix line/col numbers in TokenMgrError * #4717 <https://github.com/pmd/pmd/issues/4717>: [core] XSLTRenderer doesn't close report file * #4750 <https://github.com/pmd/pmd/pull/4750>: [core] Fix flaky SummaryHTMLRenderer * #4782 <https://github.com/pmd/pmd/pull/4782>: [core] Avoid using getImage/@Image * doc * #995 <https://github.com/pmd/pmd/issues/995>: [doc] Document API evolution principles as ADR * #2511 <https://github.com/pmd/pmd/issues/2511>: [doc] Review guides for writing java/xpath rules for correctness with PMD 7 * #3175 <https://github.com/pmd/pmd/issues/3175>: [doc] Document language module features * #4308 <https://github.com/pmd/pmd/issues/4308>: [doc] Document XPath API @DeprecatedAttribute * #4319 <https://github.com/pmd/pmd/issues/4319>: [doc] Document TypeRes API and Symbols API * #4659 <https://github.com/pmd/pmd/pull/4659>: [doc] Improve ant documentation * #4669 <https://github.com/pmd/pmd/pull/4669>: [doc] Add bld PMD Extension to Tools / Integrations * #4676 <https://github.com/pmd/pmd/issues/4676>: [doc] Clarify how CPD |--ignore-literals| and |--ignore-identifiers| work * #4704 <https://github.com/pmd/pmd/issues/4704>: [doc] Multivalued properties do not accept | as a separator * miscellaneous * #4699 <https://github.com/pmd/pmd/pull/4699>: Make PMD buildable with java 21 * #4586 <https://github.com/pmd/pmd/pull/4586>: Use explicit encoding in ruleset xml files * #4642 <https://github.com/pmd/pmd/issues/4642>: Update regression tests with Java 21 language features * #4736 <https://github.com/pmd/pmd/issues/4736>: [ci] Improve build procedure * #4741 <https://github.com/pmd/pmd/pull/4741>: Add pmd-compat6 module for maven-pmd-plugin * #4749 <https://github.com/pmd/pmd/pull/4749>: Fixes NoSuchMethodError on processing errors in pmd-compat6 * #4776 <https://github.com/pmd/pmd/issues/4776>: [ci] Upgrade to ruby 3 * #4796 <https://github.com/pmd/pmd/pull/4796>: Remove deprecated and release rulesets * #4823 <https://github.com/pmd/pmd/pull/4823>: Update to use renamed pmd-designer * #4827 <https://github.com/pmd/pmd/pull/4827>: [compat6] Support config errors and cpd for csharp * #4830 <https://github.com/pmd/pmd/issues/4830>: Consolidate packages in each maven module * #4867 <https://github.com/pmd/pmd/issues/4867>: [dist] ./mvnw command not found in dist-src * apex * #3766 <https://github.com/pmd/pmd/issues/3766>: [apex] Replace Jorje with fully open source front-end * #4828 <https://github.com/pmd/pmd/issues/4828>: [apex] Support null coalescing operator ?? (apex 60) * #4845 <https://github.com/pmd/pmd/issues/4845>: [apex] Use same ANLTR version for apex-parser * apex-bestpractices * #4556 <https://github.com/pmd/pmd/issues/4556>: [apex] UnusedLocalVariable flags for variables which are using in SOQL/SOSL binds * apex-documentation * #4774 <https://github.com/pmd/pmd/issues/4774>: [apex] ApexDoc false-positive for the first method of an annotated Apex class * apex-performance * #4675 <https://github.com/pmd/pmd/issues/4675>: [apex] New Rule: OperationWithHighCostInLoop * groovy * #4726 <https://github.com/pmd/pmd/pull/4726>: [groovy] Support Groovy to 3 and 4 and CPD suppressions * java * #1307 <https://github.com/pmd/pmd/issues/1307>: [java] AccessNode API changes * #3751 <https://github.com/pmd/pmd/issues/3751>: [java] Rename some node types * #4628 <https://github.com/pmd/pmd/pull/4628>: [java] Support loading classes from java runtime images * #4753 <https://github.com/pmd/pmd/issues/4753>: [java] PMD crashes while using generics and wildcards * #4757 <https://github.com/pmd/pmd/issues/4757>: [java] Intermittent NPEs while analyzing Java code * #4794 <https://github.com/pmd/pmd/issues/4794>: [java] Support JDK 22 * java-bestpractices * #4603 <https://github.com/pmd/pmd/issues/4603>: [java] UnusedAssignment false positive in record compact constructor * #4625 <https://github.com/pmd/pmd/issues/4625>: [java] UnusedPrivateMethod false positive: Autoboxing into Number * #4817 <https://github.com/pmd/pmd/issues/4817>: [java] UnusedPrivateMethod false-positive used in lambda * java-codestyle * #2847 <https://github.com/pmd/pmd/issues/2847>: [java] New Rule: Use Explicit Types * #4239 <https://github.com/pmd/pmd/issues/4239>: [java] UnnecessaryLocalBeforeReturn - false positive with catch clause * #4578 <https://github.com/pmd/pmd/issues/4578>: [java] CommentDefaultAccessModifier comment needs to be before annotation if present * #4631 <https://github.com/pmd/pmd/issues/4631>: [java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums * #4645 <https://github.com/pmd/pmd/issues/4645>: [java] CommentDefaultAccessModifier - False Positive with JUnit5's ParameterizedTest * #4754 <https://github.com/pmd/pmd/pull/4754>: [java] EmptyControlStatementRule: Add allowCommentedBlocks property * #4816 <https://github.com/pmd/pmd/issues/4816>: [java] UnnecessaryImport false-positive on generic method call with on lambda * java-design * #174 <https://github.com/pmd/pmd/issues/174>: [java] SingularField false positive with switch in method that both assigns and reads field * java-errorprone * #718 <https://github.com/pmd/pmd/issues/718>: [java] BrokenNullCheck false positive with parameter/field confusion * #932 <https://github.com/pmd/pmd/issues/932>: [java] SingletonClassReturningNewInstance false positive with double assignment * #1831 <https://github.com/pmd/pmd/issues/1831>: [java] DetachedTestCase reports abstract methods * #4719 <https://github.com/pmd/pmd/pull/4719>: [java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string * javascript * #2305 <https://github.com/pmd/pmd/issues/2305>: [javascript] UnnecessaryBlock - false positives with destructuring assignments * #4673 <https://github.com/pmd/pmd/pull/4673>: [javascript] CPD: Added support for decorator notation * plsql * #4820 <https://github.com/pmd/pmd/issues/4820>: [plsql] WITH clause is ignored for SELECT INTO statements * swift * #4697 <https://github.com/pmd/pmd/issues/4697>: [swift] Support Swift 5.9 features (mainly macros expansion expressions) * xml-bestpractices * #4592 <https://github.com/pmd/pmd/pull/4592>: [xml] Add MissingEncoding rule API Changes See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#700>. External Contributions * #4093 <https://github.com/pmd/pmd/pull/4093>: [apex] Summit-AST Apex module - Part 1 - Edward Klimoshenko <https://github.com/eklimo> (@eklimo) * #4151 <https://github.com/pmd/pmd/pull/4151>: [apex] Summit-AST Apex module - Part 2 - expression nodes - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4171 <https://github.com/pmd/pmd/pull/4171>: [apex] Summit-AST Apex module - Part 3 - initializers - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4206 <https://github.com/pmd/pmd/pull/4206>: [apex] Summit-AST Apex module - Part 4 - statements - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4219 <https://github.com/pmd/pmd/pull/4219>: [apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc. - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4242 <https://github.com/pmd/pmd/pull/4242>: [apex] Merge 6.52 into experimental-apex-parser - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4251 <https://github.com/pmd/pmd/pull/4251>: [apex] Summit-AST Apex module - Part 6 Passing testsuite - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4448 <https://github.com/pmd/pmd/pull/4448>: [apex] Bump summit-ast to new release 2.1.0 (and remove workaround) - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4479 <https://github.com/pmd/pmd/pull/4479>: [apex] Merge main (7.x) branch into experimental-apex-parser and fix tests - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4562 <https://github.com/pmd/pmd/pull/4562>: [apex] Fixes #4556 - Update Apex bind regex match for all possible combinations - nwcm <https://github.com/nwcm> (@nwcm) * #4640 <https://github.com/pmd/pmd/pull/4640>: [cli] Launch script fails if run via "bash pmd" - Shai Bennathan <https://github.com/shai-bennathan> (@shai-bennathan) * #4673 <https://github.com/pmd/pmd/pull/4673>: [javascript] CPD: Added support for decorator notation - Wener <https://github.com/wener-tiobe> (@wener-tiobe) * #4677 <https://github.com/pmd/pmd/pull/4677>: [apex] Add new rule: OperationWithHighCostInLoop - Thomas Prouvot <https://github.com/tprouvot> (@tprouvot) * #4698 <https://github.com/pmd/pmd/pull/4698>: [swift] Add macro expansion support for swift 5.9 - Richard B. <https://github.com/kenji21> (@kenji21) * #4706 <https://github.com/pmd/pmd/pull/4706>: [java] DetachedTestCase should not report on abstract methods - Debamoy Datta <https://github.com/Debamoy> (@Debamoy) * #4719 <https://github.com/pmd/pmd/pull/4719>: [java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string - ciufudean <https://github.com/ciufudean> (@ciufudean) * #4738 <https://github.com/pmd/pmd/pull/4738>: [doc] Added reference to the PMD extension for bld - Erik C. Thauvin <https://github.com/ethauvin> (@ethauvin <https://sourceforge.net/u/ethauvin/profile/>) * #4749 <https://github.com/pmd/pmd/pull/4749>: Fixes NoSuchMethodError on processing errors in pmd-compat6 - Andreas Bergander <https://github.com/bergander> (@bergander) * #4750 <https://github.com/pmd/pmd/pull/4750>: [core] Fix flaky SummaryHTMLRenderer - 219sansim <https://github.com/219sansim> (@219sansim) * #4752 <https://github.com/pmd/pmd/pull/4752>: [core] Fix flaky LatticeRelationTest - 219sansim <https://github.com/219sansim> (@219sansim) * #4754 <https://github.com/pmd/pmd/pull/4754>: [java] EmptyControlStatementRule: Add allowCommentedBlocks property - Andreas Bergander <https://github.com/bergander> (@bergander) * #4759 <https://github.com/pmd/pmd/pull/4759>: [java] fix: remove delimiter attribute from ruleset category/java/errorprone.xml - Marcin Dąbrowski <https://github.com/marcindabrowski> (@marcindabrowski <https://sourceforge.net/u/marcindabrowski/profile/>) * #4825 <https://github.com/pmd/pmd/pull/4825>: [plsql] Fix ignored WITH clause for SELECT INTO statements - Laurent Bovet <https://github.com/lbovet> (@lbovet <https://sourceforge.net/u/lbovet/profile/>) * #4857 <https://github.com/pmd/pmd/pull/4857>: [javascript] Fix UnnecessaryBlock issues with empty statements - Oleksandr Shvets <https://github.com/oleksandr-shvets> (@oleksandr-shvets) 🚀 Major Features and Enhancements New official logo The new official logo of PMD: New PMD Logo For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#new-official-logo>. Revamped Java module * Java grammar substantially refactored - more correct regarding the Java Language Specification (JLS) * Built-in rules have been upgraded for the changed AST * Rewritten type resolution framework and symbol table correctly implements the JLS * AST exposes more semantic information (method calls, field accesses) For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#revamped-java>. Contributors: Clément Fournier <https://github.com/oowekyala> (@oowekyala <https://sourceforge.net/u/oowekyala/profile/>), Andreas Dangel <https://github.com/adangel> (@adangel <https://sourceforge.net/u/adangel/profile/>), Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Revamped Command Line Interface * Unified and consistent Command Line Interface for both Linux/Unix and Windows across our different utilities * Single script |pmd| (|pmd.bat| for Windows) to launch the different utilities: o |pmd check| to run PMD rules and analyze a project o |pmd cpd| to run CPD (copy paste detector) o |pmd designer| to run the PMD Rule Designer * Progress bar support for |pmd check| * Shell completion Demo For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#revamped-command-line-interface>. Contributors: Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Full Antlr support * Antlr <https://www.antlr.org/> based grammars can now be used to build full-fledged PMD rules. * Previously, Antlr grammar could only be used for CPD * New supported languages: Swift and Kotlin For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#full-antlr-support>. Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) Updated PMD Designer 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). For the detailed changes, see * PMD Designer Changelog (7.0.0) <https://github.com/pmd/pmd-designer/releases/tag/7.0.0>. * PMD Designer Changelog (7.0.0-rc4) <https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc4>. * PMD Designer Changelog (7.0.0-rc1) <https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc1>. New CPD report format cpdhtml-v2.xslt 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. See the example report <https://docs.pmd-code.org/pmd-doc-7.0.0/report-examples/cpdhtml-v2.html>. Contributors: Mohan Chinnappan <https://github.com/mohan-chinnappan-n> (@mohan-chinnappan-n) 🎉 Language Related Changes Note that this is just a concise listing of the highlights. For more information on the languages, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#-language-related-changes>. New: CPD support for Apache Velocity Template Language (VTL) 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 |pmd-velocity|. New: CPD support for Coco 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 |pmd-coco|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) New: CPD support for Julia Thanks to a contribution, CPD now supports the Julia language. It is shipped in the new module |pmd-julia|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) New: CPD support for TypeScript Thanks to a contribution, CPD now supports the TypeScript language. It is shipped with the rest of the JavaScript support in the module |pmd-javascript|. Contributors: Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/profile/>) New: Java 21 and 22 Support This release of PMD brings support for Java 21 and 22. There are the following new standard language features, that are supported now: * JEP 456: Unnamed Variables & Patterns <https://openjdk.org/jeps/456> (Java 22) * JEP 440: Record Patterns <https://openjdk.org/jeps/440> (Java 21) * JEP 441: Pattern Matching for switch <https://openjdk.org/jeps/441> (Java 21) PMD also supports the following preview language features: * JEP 447: Statements before super(...) (Preview) <https://openjdk.org/jeps/447> (Java 22) * JEP 459: String Templates (Second Preview) <https://openjdk.org/jeps/459> (Java 21 and 22) * JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview) <https://openjdk.org/jeps/463> (Java 21 and 22) In order to analyze a project with PMD that uses these preview language features, you'll need to enable it via the environment variable |PMD_JAVA_OPTS| and select the new language version |22-preview|: |exportPMD_JAVA_OPTS=--enable-preview pmdcheck--use-versionjava-22-preview... | 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. New: Kotlin support * Use PMD to analyze Kotlin code with PMD rules. * Support for Kotlin 1.8 grammar * Initially 2 built-in rules * Support for Kotlin was introduced with PMD 7.0.0-rc1 as an experimental feature. With PMD 7.0.0 this is now considered stable. Contributors: Jeroen Borgers <https://github.com/jborgers> (@jborgers <https://sourceforge.net/u/jborgers/profile/>), Peter Paul Bakker <https://github.com/stokpop> (@stokpop) New: Swift support * Use PMD to analyze Swift code with PMD rules. * Limited support for Swift 5.9 (Macro Expansions) * Initially 4 built-in rules Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) Changed: Apex Support: Replaced Jorje with fully open source front-end 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 Salesforce Extensions for VS Code <https://github.com/forcedotcom/salesforcedx-vscode>, and it is closed-source. 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. Also having access to the source code, enhancements and modifications are easier to do. Under the hood, we use two open source libraries instead: * apex-parser <https://github.com/nawforce/apex-parser> by Kevin Jones <https://github.com/nawforce> (@nawforce) This project provides the grammar for a ANTLR based parser. * Summit-AST <https://github.com/google/summit-ast> by Google <https://github.com/google> (@google <https://sourceforge.net/u/google/profile/>) 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. Although the parsers is completely switched, there are only little known changes to the AST. These are documented in the Migration Guide for PMD 7: Apex AST <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html#apex-ast>. With the new Apex parser, the new language constructs like User Mode Database Operations <https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_enforce_usermode.htm> and the new Null Coalescing Operator |??| <https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_NullCoalescingOperator.htm> can be parsed now. PMD should be able to parse Apex code up to version 60.0 (Spring '24). See #3766 <https://github.com/pmd/pmd/issues/3766> for details. Contributors: Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google), Edward Klimoshenko <https://github.com/eklimo> (@eklimo) Changed: CPP can now ignore identifiers in sequences (CPD) * New command line option for CPD: |--ignore-sequences|. * This option is used for CPP only: with the already existing option |--ignore-literal-sequences|, only literals were ignored. The new option additionally ignores identifiers as well in sequences. * See PR #4470 <https://github.com/pmd/pmd/pull/4470> for details. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) Changed: Groovy Support (CPD) * We now support parsing all Groovy features from Groovy 3 and 4. * We now support suppression <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_cpd.html#suppression> through |CPD-ON|/|CPD-OFF| comment pairs. * See PR #4726 <https://github.com/pmd/pmd/pull/4726> for details. Contributors: Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Changed: HTML support Support for HTML was introduced in PMD 6.55.0 as an experimental feature. With PMD 7.0.0 this is now considered stable. Changed: JavaScript support * Latest version supports ES6 and also some new constructs (see Rhino <https://github.com/mozilla/rhino>) * Comments are retained Changed: Language versions * More predefined language versions for each supported language * Can be used to limit rule execution for specific versions only with |minimumLanguageVersion| and |maximumLanguageVersion| attributes. Changed: Rule properties * The old deprecated classes like |IntProperty| and |StringProperty| have been removed. Please use |PropertyFactory| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#> to create properties. * All properties which accept multiple values now use a comma (|,|) as a delimiter. The previous default was a pipe character (|||). The delimiter is not configurable anymore. If needed, the comma can be escaped with a backslash. * The |min| and |max| attributes in property definitions in the XML are now optional and can appear separately or be omitted. Changed: Velocity Template Language (VTL) 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". If you import rules, you also need to adjust the paths, e.g. * |category/vm/...| ➡️ |category/velocity/...| Changed: Visualforce 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. If you import rules, you also need to adjust the paths, e.g. * |category/vf/security.xml| ➡️ |category/visualforce/security.xml| 🌟 New and changed rules New Rules *Apex* * |OperationWithHighCostInLoop| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithhighcostinloop> finds Schema class methods called in a loop, which is a potential performance issue. * |UnusedMethod| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#unusedmethod> finds unused methods in your code. *Java* * |UnnecessaryBoxing| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing> reports boxing and unboxing conversions that may be made implicit. * |UseExplicitTypes| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#useexplicittypes> reports usages of |var| keyword, which was introduced with Java 10. *Kotlin* * |FunctionNameTooShort| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_bestpractices.html#functionnametooshort> finds functions with a too short name. * |OverrideBothEqualsAndHashcode| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode> finds classes with only either |equals| or |hashCode| overridden, but not both. This leads to unexpected behavior once instances of such classes are used in collections (Lists, HashMaps, ...). *Swift* * |ForceCast| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcecast> flags all force casts, making sure you are defensively considering all types. Having the application crash shouldn't be an option. * |ForceTry| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcetry> flags all force tries, making sure you are defensively handling exceptions. Having the application crash shouldn't be an option. * |ProhibitedInterfaceBuilder| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder> 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. * |UnavailableFunction| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#unavailablefunction> flags any function throwing a |fatalError| not marked as |@available(*, unavailable)| to ensure no calls are actually performed in the codebase. *XML* * |MissingEncoding| <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_xml_bestpractices.html#missingencoding> finds XML files without explicit encoding. Other changes The information about changed rules, removed rules and rulesets can be found in the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#-new-and-changed-rules>. 🚨 API 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. Also, there are some improvement and changes in different areas. For the detailed description of the changes listed here, see Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#-api>. * Miscellaneous smaller changes and cleanups * XPath 3.1 support for XPath-based rules * Node stream API for AST traversal * Metrics framework * Testing framework * Language Lifecycle and Language Properties * Rule Properties * New Programmatic API for CPD 💥 Compatibility and migration notes A detailed documentation of required changes are available in the Migration Guide for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html>. See also Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#-compatibility-and-migration-notes>. 🐛 Fixed Issues More than 300 issues have been fixed in PMD 7. See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#-fixed-issues> for the complete list of fixed issues. ✨ External Contributions Many thanks to the following contributors: @219sansim, @aaronhurst-google, @anastasiia-koba, @AndreyBozhko, @bergander, @ciufudean, @cyw3, @dague1, @Debamoy, @eklimo, @ethauvin <https://sourceforge.net/u/ethauvin/profile/>, @JerritEic, @joaodinissf, @kenji21, @krdabrowski, @lbovet <https://sourceforge.net/u/lbovet/profile/>, @lsoncini, @LynnBroe, @marcindabrowski <https://sourceforge.net/u/marcindabrowski/profile/>, @matifraga, @mohan-chinnappan-n, @mohui1999, @nawforce, @nirvikpatel, @nwcm, @oleksandr-shvets, @pguyot <https://sourceforge.net/u/pguyot/profile/>, @PimvanderLoos, @rcorfieldffdc, @sfdcsteve, @shai-bennathan, @tomidelucca, @tprouvot, @wener-tiobe. See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#-external-contributions> for the full list of PRs. 📈 Stats * 5741 commits * 849 closed tickets & PRs * Days since last release (6.55.0): 390 * Days since last release (7.0.0-rc4): 173 |
From: David D. <dav...@or...> - 2024-02-20 09:11:30
|
Welcome to the latest OpenJDK Quality Outreach update! The first JDK 22 Release Candidates builds are now available [1]. At this stage, only P1 issues will still be evaluated. And with the JDK 22 General Availability set for March 19th, it is now time to fully focus on JDK 23. At the time of writing, one JEP has already been integrated in JDK 23, i.e., JEP 455: 'Primitive Types in Patterns, instanceof, and switch (Preview)' [2]. But new JEP candidates [3][4] have recently been announced, so things should evolve rapidly. I'd like to thank those of you who have already provided feedback on the JDK 22 EA builds. Feedback is always extremely useful, even more, when it comes early in the development cycle. Another area where we need your help is Loom. So, please make sure to check the heads-up below that discusses the so-called Virtual Threads "pinning" issue. [1] https://openjdk.org/projects/jdk/22/ [2] https://openjdk.org/jeps/455 [3] https://openjdk.org/jeps/465 [4] https://openjdk.org/jeps/466 ## Heads-up: Virtual Threads “Pinning” Issue Virtual threads became a permanent feature in JDK 21. This feature has been extremely well received by the Java ecosystem but there are still a few pain points. Much has been written about the so-called "pinning" issue that arises with synchronized methods or synchronized statements. The two most common cases are (a) a virtual thread parks (ex. doing socket I/O) while in a synchronized method, and (b) a virtual thread blocks entering a synchronized method because the object's associated monitor is held by another thread. In both cases, the underlying carrier/native thread is not "released" to do other work. Performance and scalability may suffer and in some cases, starvation and deadlock might happen. This recent "Virtual Threads Next Steps" video [5] explains in more details the why's and discusses some potential solutions. New Loom early-access builds haven been recently published [6]. Those Loom EA builds have changes to the object monitor implementation that do not pin for these two common cases. The Loom team needs your help to test these updated object monitors with code that you know is using virtual threads and with libraries that are heavily synchronized. The goal is to gauge both reliability and performance. The simplest way to report an issue or feedback is to use the Loom mailing list [7]. For the VM savvy, testing with both `-XX:LockingMode=1` (current default) and `-XX:LockingMode=2` would be extremely helpful as that would exercise the two locking modes currently implemented by the HotSpot VM. [5] https://inside.java/2024/02/17/virtual-threads-next-steps/ [6] https://jdk.java.net/loom/ [7] https://mail.openjdk.org/pipermail/loom-dev/ ## JDK 22 Release Candidates The JDK 22 Release Candidate builds (builds 36) are available [8] and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [9], and the javadocs here [10]. [8] https://jdk.java.net/22/ [9] https://jdk.java.net/22/release-notes [10] https://download.java.net/java/early_access/jdk22/docs/api/ ## JDK 23 Early-Access Builds The JDK 23 Early-Access builds 10 are available [11], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [12]. ### Changes in recent JDK 23 builds that may be of interest: - JDK-8324287: Record total and free swap space in JFR - JDK-8275338: Add JFR events for notable serialization situations - JDK-8324665: Loose matching of space separators in the lenient date/time parsing mode - JDK-8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow - JDK-8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern - JDK-8325221: Obsolete TLABStats - JDK-8322535: Change default AArch64 SpinPause instruction - JDK-8323746: Add PathElement hashCode and equals - JDK-8325570: Update to Graphviz 9.0.0 - JDK-8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files - JDK-8320458: Improve structural navigation in API documentation - JDK-8324068: Improve references to tags in the Doc Comment Spec - JDK-8322366: Add IEEE rounding mode corruption check to JNI checks - JDK-8321545: Override toString() for Format subclasses - JDK-8324301: Obsolete MaxGCMinorPauseMillis - JDK-8324632: Update Zlib Data Compression Library to Version 1.3.1 - JDK-8324771: Obsolete RAMFraction related flags - JDK-8323645: Remove unused internal sun.net.www.protocol.jar.URLJarFileCa… - JDK-8325150: (tz) Update Timezone Data to 2024a - JDK-8324571: JDK 23 L10n resource files update Note: Complete list of changes can be found here [13]. [11] https://jdk.java.net/23/ [12] https://jdk.java.net/23/release-notes [13] https://github.com/openjdk/jdk/compare/jdk-23+6...jdk-23+10 ## JavaFX Early-Access Builds: These are early access builds of the JavaFX 22 & 23 Runtime built from openjdk/jfx [14]. These builds enable JavaFX application developers to build and test their applications with JavaFX 22 & 23 on JDK 22 & 23 respectively. Although these builds are designed to work with JDK 22 and above, they are also known to work with JDK 17 and later versions. The latest early access builds of JavaFX 22 Builds 29 are available [15], under the GNU General Public License, version 2, with the Classpath Exception. JavaFX 22 API Javadocs [16] are also available. The latest early access builds of JavaFX 23 Builds 5 are available [17], under the GNU General Public License, version 2, with the Classpath Exception. JavaFX 23 API Javadocs [18] are also available. [14] https://github.com/openjdk/jfx [15] https://jdk.java.net/javafx22/ [16] https://download.java.net/java/early_access/javafx22/docs/api/overview-summary.html [17] https://jdk.java.net/javafx23/ [18] https://download.java.net/java/early_access/javafx23/docs/api/overview-summary.html ## Topics of Interest - Java Renaissance Keynote https://inside.java/2024/02/05/java-renaissance/ - Managing Throughput with Virtual Threads - Sip of Java https://inside.java/2024/02/04/sip094/ - Data-Oriented Programming in Java 21 - JEP Café https://inside.java/2024/02/08/jepcafe22/ - Does Java 22 Kill Build Tools? - Inside Java Newscast https://inside.java/2024/02/15/newscast-63/ - JDK 22 G1/Parallel/Serial GC changes https://tschatzl.github.io/2024/02/06/jdk22-g1-parallel-gc-changes.html - Java 22 Previews Statements Before super(...) and this(...) https://inside.java/2024/02/01/newscast-62/ - State of jextract https://cr.openjdk.org/~mcimadamore/panama/jextract_changes.html - FOSDEM 2024: FFM API - A (quick) peek under the hood https://inside.java/2024/02/13/fosdem2024-ffm-api/ - FOSDEM 2024: Virtual Threads - Next Steps https://inside.java/2024/02/17/virtual-threads-next-steps/ - Java Language Update - Early 2024 Edition https://inside.java/2024/02/18/java-language-update-early-2024-update/ - When Should a Compiler Expand Garbage Collection Barriers? https://robcasloz.github.io/blog/2024/02/14/when-should-a-compiler-expand-garbage-collection-barriers.html - Emulating C# LINQ in Java using Code Reflection https://openjdk.org/projects/babylon/articles/linq - Automatic differentiation of Java code using Code Reflection https://openjdk.org/projects/babylon/articles/auto-diff ## Java Cryptographic Roadmap Update The Java Cryptographic Roadmap [19] has been updated with the following planned changes. * Enable XML Signature secure validation mode by default on JDK 11 and JDK 8 - Target date changed from the July 2024 CPU to the April 2024 CPU. - This change has already been made in JDK 17 and later releases. * Disable DTLS 1.0 in JDK 17 and 11 with the July 2024 CPU - This change has already been made in JDK 20 and later releases. - DTLS is not available in releases prior to JDK 9. [19] https://www.java.com/en/jre-jdk-cryptoroadmap.html ~ That's it for this installment. As usual, if you have issues, or questions, please ping me. --David |
From: David D. <dav...@or...> - 2024-01-26 11:33:35
|
Greetings! We are starting 2024 with JDK 22 as it has just entered Rampdown Phase 2 [1]. And with the initial JDK 22 Release Candidates now less than 2 weeks away (Feb. 8th) [2], it is time to shift our attention to JDK 23. After multiple rounds of incubations and preview, the Foreign Function & Memory API is becoming standard and permanent in JDK 22. If we put its 'Function' angle aside, this API also offers a standard and secure way to access off-heap API. And that brings us to the heads-up below 'Deprecate the memory-access methods in sun.misc.Unsafe for removal in a future release' as developers still using sun.misc.Unsafe for accessing memory are strongly encouraged to start preparing their plans to migrate away from those unsafe methods. [1] https://mail.openjdk.org/pipermail/jdk-dev/2024-January/008675.html [2] https://openjdk.org/projects/jdk/22/ ## Heads-up: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal in a Future Release The effort focused on enforcing the integrity of the Java platform [3] continues! The next phase in that long but important initiative will most likely target the sun.misc.Unsafe API used for accessing memory. Those methods alone represent 79 methods out of the 87 sun.misc.Unsafe methods! This draft JEP [4] outlines the plan to deprecate for removal the sun.misc.Unsafe Memory-Access methods, the reasons, and the standard alternatives. As the draft plan suggests, the first step will be to deprecate all memory-access methods (on-heap, off-heap, and bimodal) for removal. This will cause compile-time deprecation warnings for code that refers to the methods, alerting library developers to their forthcoming removal. In addition, a new command-line option will allow users to receive runtime warnings when those methods are used. This command-line will help users to assess if their codebase uses those unsafe API to access memory. It should be mentioned that other tools such as JFR and jdeprscan can also be used to detect the use of those deprecated APIs. Library developers are strongly encouraged to migrate from sun.misc.Unsafe to the supported replacements, so that applications can migrate smoothly to modern JDKs. The initial step will be to conduct investigations to understand if, how, and where sun.misc.Unsafe methods are used to access memory. [3] https://openjdk.org/jeps/8305968 [4] https://openjdk.org/jeps/8323072 ## Heads-up: Java Array Element Alignment - Weakening of Some Methods Guarantees ? Some methods make promises about Java array element alignment that are too strong. There are some ongoing reflexions to change the implementation (and the specification) of `MethodHandles::byteArrayViewVarHandle`, `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and `ByteBuffer::alignmentOffset` to weaken the guarantees they make about the alignment of Java array elements, in order to bring them in line with the guarantees made by an arbitrary JVM implementation. For more details, make sure to check JDK-8320247 [5] and the related PR [6] but in a nutshell, the new behaviour would be : - The `VarHandle` returned by `MethodHandles::byteArrayViewVarHandle` would only support `get` and `set` methods, and all other access methods would throw an exception. - The `VarHandle` returned by `MethodHandles::byteBufferViewHandle` would only support the `get` and `set` access methods when a heap buffer is used, and all other access methods would throw an exception when used with a heap buffer. Direct byte buffers will continue to work the same way. - The `ByteBuffer::alignmentOffset` and `ByteBuffer::alignedSlice` methods would throw an exception if the buffer is a heap buffer, and the given `unitSize` is greater than 1. If you have relevant feedback about this potential change, please make sure to bring it to the core-libs-dev mailing list [7], or comment on the PR [6]. [5] https://bugs.openjdk.org/browse/JDK-8320247 [6] https://github.com/openjdk/jdk/pull/16681 [7] https://mail.openjdk.org/pipermail/core-libs-dev/ ## JDK 22 Early-Access Builds JDK 22 Early-Access builds 33 are now available [8], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [9] and the javadocs [10] are also available. ### Changes in recent JDK 22 builds that may be of interest: - JDK-8320597: RSA signature verification fails on signed data that does not encode params correctly [Reported by Apache POI] - JDK-8322214: Return value of XMLInputFactory.getProperty() changed from boolean to String in JDK 22 early access builds [Reported by Apache POI] - JDK-8322725: (tz) Update Timezone Data to 2023d - JDK-8321480: ISO 4217 Amendment 176 Update - JDK-8314468: Improve Compiler loops - JDK-8314295: Enhance verification of verifier - JDK-8316976: Improve signature handling - JDK-8317547: Enhance TLS connection support - JDK-8318971: Better Error Handling for Jar Tool When Processing Non-existent Files - JDK-8323659: LinkedTransferQueue add and put methods call overridable offer Note: A complete list of changes can be found here [11]. [8] https://jdk.java.net/22/ [9] https://jdk.java.net/22/release-notes [10] https://download.java.net/java/early_access/jdk22/docs/api/ [11] https://github.com/openjdk/jdk/compare/jdk-22+27...jdk-22+33 ## JDK 23 Early-Access builds JDK 23 Early-Access builds 7 are available [12] for testing. These EA builds are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [13] are also available. ### Changes in recent JDK 23 builds that may be of interest: - JDK-8320597: RSA signature verification fails on signed data that does not encode params correctly [Reported by Apache POI] - JDK-8322214: Return value of XMLInputFactory.getProperty() changed from boolean to String in JDK 22 early access builds [Reported by Apache POI] - JDK-8321545: Override toString() for Format subclasses - JDK-8322366: Add IEEE rounding mode corruption check to JNI checks - JDK-8322383: G1: Only preserve marks on objects that are actually moved - JDK-8275338: Add JFR events for notable serialization situations - JDK-8320458: Improve structural navigation in API documentation - JDK-8320786: Remove ThreadGroup.stop - JDK-8320532: Remove Thread/ThreadGroup suspend/resume - JDK-8312150: Remove -Xnoagent option - JDK-8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock - JDK-8322725: (tz) Update Timezone Data to 2023d - JDK-8321480: ISO 4217 Amendment 176 Update - JDK-8318971: Better Error Handling for Jar Tool When Processing Non-existent Files - JDK-8321594: NativeThreadSet should use placeholder for virtual threads - JDK-8321940: Improve CDSHeapVerifier in handling of interned strings - JDK-8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem - JDK-8322841: Parallel: Remove unused using-declaration in MutableNUMASpace - JDK-8319626: Override toString() for ZipFile - JDK-8322878: Including sealing information Class.toGenericString() Note: A more exhaustive changes list can be found here [14]. [12] https://jdk.java.net/23/ [13] https://jdk.java.net/23/release-notes [14] https://github.com/openjdk/jdk/compare/jdk-23+1...jdk-23+7 ## JavaFX 22 & 23 Early-Access Builds These are early access builds of the JavaFX 22 Runtime built from openjdk/jfx [14]. These builds enable JavaFX application developers to build and test their applications with JavaFX 22 on JDK 22. Although JavaFX 22 is designed to work with JDK 22, it is also known to work with JDK 17 and later versions. The latest early access builds of JavaFX 22 Builds 26 (2024/1/20) are available [15], under the GNU General Public License, version 2, with the Classpath Exception. JavaFX 22 API Javadocs [16] are also available. The first early access builds (2024/1/19) of JavaFX 23 are now also available [17]. [14] https://github.com/openjdk/jfx [15] https://jdk.java.net/javafx22/ [16] https://download.java.net/java/early_access/javafx22/docs/api/overview-summary.html [17] https://jdk.java.net/javafx23/ ## Topics of Interest - Podcast “The Panama Effect” with Jorn Vernee https://inside.java/2024/01/08/podcast-032/ - Java's Plans for 2024 - Inside Java Newscast https://inside.java/2024/01/18/newscast-61/ - Java 22 Unpacking - Inside Java Newscast https://inside.java/2023/12/07/newscast-59/ - Java Highlights of 2023 - Inside Java Newscast https://inside.java/2023/12/21/newscast-60/ - JDK 21: The GCs keep getting better https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html - Java SE Security Developer’s Guide https://docs.oracle.com/en/java/javase/21/security/index.html#Java-Platform%2C-Standard-Edition - Another VS Code Extension for Java https://inside.java/2023/12/03/java-vscode-extension/ ## January 2024 Critical Patch Update Released As part of the January 2024 CPU, Oracle released OpenJDK 21.0.2, JDK 21.0.2 LTS, JDK 17.0.10 LTS, 11.0.22 LTS, 8u401, and 8u401-perf. ~ As usual, let us know if you find any quirks while testing your project(s) with the latest JDK early-access builds. --David |
From: David D. <dav...@or...> - 2023-12-13 17:17:53
|
Welcome to the final OpenJDK Quality Outreach update of 2023! JDK 22, scheduled for General Availability on March 19, 2024, is now in Rampdown Phase One (RDP1) [1]. At this point, the overall JDK 22 feature set is frozen (see the final list of JEPs integrated into JDK 22 below) and only low-risk enhancements might still be considered. The coming weeks should be leveraged to identify and resolve as many issues as possible, i.e. before JDK 22 enters the Release Candidates phase in early February 2024. So, we count on you to test your projects and help us make JDK 22 another solid release! [1] https://mail.openjdk.org/pipermail/jdk-dev/2023-December/008535.html ## JDK 22 Early-Access Builds JDK 22 Early-Access builds 27 are now available [2] with the Release Notes here [3]. Those builds are provided under the GNU GPL v2, with the Classpath Exception. ### JEPs integrated into JDK 22: - JEP 423: Region Pinning for G1 - JEP 447: Statements before super(…) (Preview) - JEP 454: Foreign Function & Memory API - JEP 456: Unnamed Variables & Patterns - JEP 457: Class-File API (Preview) - JEP 458: Launch Multi-File Source-Code Programs - JEP 459: String Templates (2nd Preview) - JEP 460: Vector API (7th Incubator) - JEP 461: Stream Gatherers (Preview) - JEP 462: Structured Concurrency (2nd Preview) - JEP 463: Implicitly Declared Classes and Instance Main Methods (2nd Preview) - JEP 464: Scoped Values (2nd Preview) ### Changes in recent JDK 22 builds that may be of interest: - JDK-8318646: Integer#parseInt("") throws empty NumberFormatException message [Reported by Apache Lucene] - JDK-8318082: ConcurrentModificationException from IndexWriter [Reported by JOOQ] - JDK-8319450: New methods java.net.InetXAddress.ofLiteral() miss @since tag [Reported by JaCoCo] - JDK-8321164: javac w/ annotation processor throws AssertionError: Filling jrt:/… during … [Reported by Hibernate] - JDK-8310644: Make panama memory segment close use async handshakes - JDK-8302233: HSS/LMS: keytool and jarsigner changes - JDK-8211238: New @Deprecated JFR event - JDK-8319124: Update XML Security for Java to 3.0.3 - JDK-8306055: Add a built-in Catalog to JDK XML module - JDK-8319244: implement JVMTI handshakes support for virtual threads - JDK-8319196: ExecutableElement.getReceiverType doesn't return receiver types for methods loaded from bytecode - JDK-8318759: Add four DigiCert root certificates - JDK-8317374: Add Let's Encrypt ISRG Root X2 - JDK-8306116: Update CLDR to Version 44.0 - JDK-8287843: File::getCanonicalFile doesn't work for \\?\C:\</?\C:\> style paths DOS device paths - JDK-8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" - JDK-8311596: Add separate system properties for TLS server and client for maximum chain length - JDK-8318160: javac does not reject private method reference with type-variable receiver - JDK-8305753: Allow JIT compilation for -Xshare:dump - JDK-8187591: -Werror turns incubator module warning to an error - JDK-8318096: Introduce AsymmetricKey interface with a getParams method - JDK-8319174: Enhance robustness of some j.m.BigInteger constructors - JDK-8288899: Changes to java.util.concurrent.ForkJoinPool and ForkJoinTask - JDK-8272215: Add InetAddress methods for parsing IP address literals - JDK-8316996: Catalog API Enhancement: add a factory method - JDK-8305814: Update Xalan Java to 2.7.3 - JDK-8313643: Update HarfBuzz to 8.2.2 - JDK-8316030: Update Libpng to 1.6.40 Note: A more comprehensive list of changes can be found here [4]. [2] https://jdk.java.net/22/ [3] https://jdk.java.net/22/release-notes [4] https://github.com/openjdk/jdk/compare/jdk-22+20...jdk-22+27 ## JDK 23 Early-Access Builds Given that JDK 22 is in Rampdown Phase, the initial JDK 23 EA builds are now also available [5]. These EA builds are provided under the GNU General Public License v2, with the Classpath Exception. [5] https://jdk.java.net/23/ ## JavaFX 22 Early-Access Builds These are early-access builds of the JavaFX 22 [8] Runtime built from openjdk/jfx [9]. This allows JavaFX application developers to build and test their applications with JavaFX 22 on JDK 22. The JavaFX 22 API Javadocs are also available [10]. The JavaFX runtime is delivered as an SDK and as a set of jmods for each platform. You can use the SDK to compile and run JavaFX applications. You can use the jmods with jlink to create a JDK that includes the JavaFX modules, and optionally, your modular application. JavaFX 22 is designed to work with JDK 22,but it is known to work with JDK 17 and later versions. [8] https://jdk.java.net/javafx22/ [9] https://github.com/openjdk/jfx [10] https://download.java.net/java/early_access/javafx22/docs/api/overview-summary.html ## Topics of Interest: - Java 22 Unpacking - Inside Java Newscast https://inside.java/2023/12/07/newscast-59/ - Java On The GPU - Inside Java Newscast https://inside.java/2023/11/16/newscast-58/ - Better Java Streams with Gatherers - Inside Java Newscast https://inside.java/2023/11/02/newscast-57/ - Another VS Code Extension for Java https://inside.java/2023/12/03/java-vscode-extension/ - Introducing Generational ZGC https://inside.java/2023/11/28/gen-zgc-explainer/ - Improved Emoji Support in Java 21 - Sip of Java https://inside.java/2023/11/20/sip089/ - JDK Tool Access from JShell - Sip of Java https://inside.java/2023/10/23/sip085/ - Optimizing your equals() methods with Pattern Matching - JEP Cafe https://inside.java/2023/11/10/jepcafe21/ - Package a JavaFX Application as a Platform Specific Executable https://inside.java/2023/11/14/package-javafx-native-exec/ - Open sourcing Jipher for FIPS regulated environments https://blogs.oracle.com/developers/post/open-sourcing-jipher - In-memory HttpServer Handler https://inside.java/2023/11/06/in-memory-http-server-handler/ - Java Architects Answer Your Questions https://inside.java/2023/10/26/ama-java-architects/ - Hazelcast Jet on Generational ZGC https://kstefanj.github.io/2023/11/07/hazelcast-on-generational-zgc.html ~ As usual, let us know if you find any quirks while testing your project(s) with the latest JDK early-access builds. And as the year-end is approaching, I'd like to thank you for being part of the OpenJDK Quality Outreach Program. I hope that you will disconnect a bit to spend time with your family and your friends. See you in 2024 with Java 22 and Java 23! |
From: <gau...@ii...> - 2023-11-25 23:35:12
|
<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><title>Your Email Content</title> </head> <body> Greetings from the community of programmers of IIT Guwahati and IIT Patna! <br><br> This is Gautam Sharma, pursuing a BTech in the Department of Computer Science and Engineering at the Indian Institute of Technology, Guwahati. I am also Competitive Programming Head at Coding Club, IIT Guwahati. We at Coding Club, IIT Guwahati were truly awe-inspired by your project <a href="https://pmd.github.io/">PMD</a>! Apart from the wonderful open-source community that constantly improves and develops PMD, we would like to invite you to put PMD at <a href="https://www.codepeak.tech/">CodePeak-2023</a> for contributions! <br><br> Every year, the Coding Club, IITG organizes CodePeak, which is a month-long open-source event organized in collaboration with NJACK, IIT Patna. The event invites participants to contribute to various projects, aiming to lay a foundation for future involvement in larger programs like GSoC and Outreachy. The event targets first-timers who wish to participate in Free and Open Source(FOSS) Contributions and the experienced developers who want to show their skills by contributing to real-world projects. <br><br> CodePeak 2023, now in it's third iteration is one of the <b>biggest open-source events for Indian college students</b>, serving as a pre-cursor for many prestigious events like GSoC and Outreachy. We have had <strong>over 6000 participants</strong>, with <strong>over 150 projects</strong>, and <strong>3800 pull requests</strong> in the past iterations of CodePeak! The contributors and mentors are also rewarded handsomely for their efforts towards open source by the organizers and our respected sponsors! This year, the winners will get a chance to visit Oxford! <br><br> Mentoring PMD at CodePeak 2023 can go a long way, making it mainstream/known to the untapped talent pool of open-source enthusiasts who would definitely enjoy contributing to PMD during and after CodePeak 2023. <br><br> Kindly refer to the mentor guide of CodePeak 2023 <a href="https://drive.google.com/file/d/1zgjsiAMsqqExznSTFi1k3lloNOi7LY4O/view?usp=sharing">here</a>. <br><br> Looking forward to your reply and involvement in CodePeak 2023! <br><br> CodePeak 2023: <a href="https://www.codepeak.tech/">www.codepeak.tech</a> <br> Coding Club IITG Instagram Page: <a href="https://www.instagram.com/codingclubiitg/">www.instagram.com/codingclubiitg/</a> <br><br> Warm Regards <br> Gautam Sharma <br> Competitive Programming Head, Coding Club IITG <br> Department of Computer Science and Engineering <br> Indian Institute of Technology, Guwahati <br> Assam, India </body> </html> |
From: David D. <dav...@or...> - 2023-10-20 09:57:11
|
Greetings! JDK 21 has been released (General Availability) on September 19th as planned. You can find "The Arrival of Java 21" announcement here [1], and some additional Java 21 materials in the "Topics of Interest" section below. On behalf of the entire Java team, let me send our thanks to all of you. Through your active participation in this program, you are helping shape the Java platform! Needless to say, that Java 21 is an important release, so may I ask you to send me a brief email with the Java 21 support status of your project(s): Already supported - Plan to support short-term - Don't plan to support short-term ? And now that JDK 21 is out, let's shift our attention to JDK 22 which will enter the Rampdown Phase in less than 50 days on December 7 [2]. I want to conclude this update by briefly mentioning three different initiatives to are relevant to this group as they are, in their own way and at various levels, contributing to adopt newer Java releases more rapidly: the Class-File API, Oracle's Java Platform extension for VS Code, and the Java Playground. ### The Class-File API The Class-File API is a new standard API for parsing, generating, and transforming Java class files. One of its unique aspects is that it will co-evolve with the class-file format, which overtime will greatly reduce the friction of implementing new class-file features. With the fast-paced evolution of the Java platform, this was much-needed. This API should soon be previewed and as it matures, we expect the JDK to switch from using various custom class-file libraries to this standard API. We also expect that overtime frameworks relying on bytecode manipulation will also benefit from using this new JDK class-file library. For more information, please check this recent Newscast [3] for an overview, Brian Goetz's JVMLS session [4] for more details and design considerations, and JEP 457: Class-File API (Preview) [5] for the technical details. ### Oracle's Java Platform extension for Visual Studio Code Oracle has just announced [6] a new Visual Studio Code extension for Java developers. Unlike other VS Code extensions, this new extension is using under the hood the `javac` compiler for code editing and compilation, and OpenJDK's debugger interface for debugging. This enables us to offer VS Code IDE support for new JDK features as soon as they are introduced, even during JDK Early Access phases. To this effect, this VS Code Extension will support the current JDK releases as well as the next upcoming JDK version. For more information, please check the announcement [6]. ### The Java Playground The Java Playground [7] is an online sandbox that helps testing and exploring new Java language features. No setup required, just type your Java snippet in your browser and run it! Right now, the Playground is using Java 21 with Preview Features enabled, and it will switch to a new Java version as soon as there is a new Java language features integrated in OpenJDK Early-Access builds. The Playground is focusing mostly on Project Amber and is certainly not mean to be some sort of a lightweight online-IDE, it is instead a learning tool to play with new Java language feature shortly after they have been integrated into the platform. [1] https://inside.java/2023/09/19/the-arrival-of-java-21/ [2] https://mail.openjdk.org/pipermail/jdk-dev/2023-September/008269.html [3] https://www.youtube.com/watch?v=bQ2Rwpyj_Ks [4] https://www.youtube.com/watch?v=pcg-E_qyMOI [5] https://openjdk.org/jeps/457 [6] https://inside.java/2023/10/18/announcing-vscode-extension/ [7] https://dev.java/playground ## Heads-Up - JDK 22: Implicit Annotation Processing Behavior Change As discussed in the July 2023 Quality Outreach update [8], starting in JDK 21 javac emits a note if _implicit_ annotation processing is being used, that is, if one or more annotation processors are found and run from the class path when no explicit annotation processing configuration options are used. The note is reported since, quoting from the note text: "A future release of javac may disable annotation processing unless at least one processor is specified by name (-processor), or a search path is specified (--processor-path, --processor-module-path), or annotation processing is enabled explicitly (-proc:only, -proc:full)." That future version of javac has arrived in JDK 22 b19+ with JDK-8306819 ("Consider disabling the compiler's default active annotation processing"). In the situation where a note was emitted in JDK 21, in JDK 22 no note is emitted, and annotation processors are *not* run. To restore the previous behavior with respect to running annotation processors, add the '-proc:full' javac option. Feedback on the annotation processing policy change can be sent to compiler-dev [9]. [8] https://mail.openjdk.org/pipermail/quality-discuss/2023-July/001122.html [9] https://mail.openjdk.org/mailman/listinfo/compiler-dev ## JDK 21 General Availability JDK 21, the reference implementation of Java 21, is now Generally Available [10]. The OpenJDK GA 21.0.1 builds are available [11], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [12] and the Javadocs [13] are also available. [10] https://mail.openjdk.org/pipermail/jdk-dev/2023-September/008267.html [11] https://jdk.java.net/21/ [12] https://jdk.java.net/21/release-notes [13] https://docs.oracle.com/en/java/javase/21/docs/api/index.html ## JavaFX 21 GA Builds & JavaFX 22 EA Builds Open-source builds of JavaFX 21 are now Generally Available [14], under the GNU General Public License, version 2, with the Classpath Exception. The Release Notes [15], and the JavaFX 21 API Javadocs [16] are also available. The JavaFX runtime is delivered as an SDK and as a set of jmods for each platform. You can use the SDK to compile and run JavaFX applications. You can use the jmods with jlink to create a JDK that includes the JavaFX modules, and optionally, your modular application. JavaFX 21 is designed to work with JDK 21, but it is known to work with JDK 17 and later versions. In addition, the early access builds of the JavaFX 22 Runtime (builds 12) are also available [17]. They enable JavaFX application developers to build and test their applications with JavaFX 22 on JDK 22 EA. [14] https://jdk.java.net/javafx21/ [15] https://github.com/openjdk/jfx/blob/jfx21/doc-files/release-notes-21.md [16] https://download.java.net/java/GA/javafx21/69ca518c413e4df09f6be747a2400cf6/docs/api/index.html [17] https://jdk.java.net/javafx22/ ## JDK 22 Early-Access Builds The latest Early-Access builds 20 (2023/10/19) are available [18], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [19]. Changes in recent JDK 22 builds (b12-b20) that may be of interest: (Note that this is only a curated list of changes, make sure to check [20] for additional changes.) - JDK-8306819: Consider disabling the compiler's default active annotation … - JDK-8316691: Heap dump: separate stack traces for mounted virtual threads … - JDK-8317603: Improve exception messages thrown by sun.nio.ch.Net native m… - JDK-8312522: Implementation of Foreign Function & Memory API - JDK-8296581: Better system proxy support - JDK-8316994: Avoid modifying ClassLoader and Module objects during -Xshar… - JDK-8316970: Add internal annotation to mark restricted methods - JDK-8301686: TLS 1.3 handshake fails if server_name doesn't match resumin… - JDK-8268622: Performance issues in javac Name class - JDK-8317246: Cleanup java.net.URLEncoder and URLDecoder use of file.encod… - JDK-8311084: Add typeSymbol() API for applicable constant pool entries - JDK-8316229: Enhance class initialization logging - JDK-8315771: [JVMCI] Resolution of bootstrap methods with int[] static arguments - JDK-8316681: Rewrite URLEncoder.encode to use small reusable buffers - JDK-8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles - JDK-8296246: Update Unicode Data Files to Version 15.1.0 - JDK-8316160: Remove sun.misc.Unsafe.{shouldBeInitialized,ensureClassInitialized} - JDK-8313452: Improve Classfile API attributes handling safety - JDK-8314774: Optimize URLEncoder - JDK-8246280: Refine API to model sealed classes and interfaces in javax.lang.model - JDK-8314960: Add Certigna Root CA - JDK-8306632: Add a JDK Property for specifying DTD support - JDK-8315938: Deprecate for removal Unsafe methods that have standard APIs for many releases - JDK-8041488: Locale-Dependent List Patterns - JDK-8311939: Excessive allocation of Matcher.groups array - JDK-8314569: (fs) Improve normalization of UnixPath for input with trailing slashes - JDK-8314611: Provide more explicative error message parsing Currencies - JDK-8315117: Update Zlib Data Compression Library to Version 1.3 - JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system - JDK-8316681: Rewrite URLEncoder.encode to use small reusable buffers [18] https://jdk.java.net/22/ [19] https://jdk.java.net/22/release-notes [20] https://github.com/openjdk/jdk/compare/jdk-22%2B12...jdk-22%2B20 ## New Jextract Early-Access Builds Jextract mechanically generates Java bindings from native library headers. New Jextract EA builds are now available (Build 21-jextract+1-2 (2023/9/25)) [21], those EA builds are based on JDK 21 and are intended for expert users. [21] https://jdk.java.net/jextract/ ## Topics of Interest: Java 21… and Beyond - Brian Goetz Devoxx 2023 Keynote https://inside.java/2023/10/14/java-21-and-beyond/ JDK 21 Security Enhancements https://seanjmullan.org/blog/2023/09/22/jdk21 With Java 21, Your Code Runs Even Faster but How is that Possible? https://inside.java/2023/10/06/devoxx-your-code-runs-even-faster/ My Favorite JDK 21 Feature: Javadoc Search URL https://stuartmarks.wordpress.com/2023/09/22/my-favorite-jdk-21-feature-javadoc-search-url/ Upgrading from Java 17 to 21 #RoadTo21 https://inside.java/2023/08/27/roadto21-upgrade/ Java 21 API Changes #RoadTo21 https://inside.java/2023/09/10/roadto21-api/ Java 21 Security #RoadTo21 https://inside.java/2023/09/13/roadto21-security/ Java 21 Tool Enhancements: Better Across the Board #RoadTo21 https://inside.java/2023/09/06/roadto21-performance/ Java 21 JVM and GC Improvements #RoadTo21 https://inside.java/2023/09/03/roadto21-performance/ Java 21 Brings Full Pattern Matching #RoadTo21 https://inside.java/2023/09/17/roadto21-pattern-matching/ Java 21 new feature: Virtual Threads #RoadTo21 https://inside.java/2023/08/30/roadto21-virtualthreads/ G1: Java's Default Garbage Collector https://inside.java/2023/10/15/g1/ New candidate JEP: 457: Class-File API (Preview) https://openjdk.org/jeps/457 Using JAXB in Custom Ant Tasks on Recent Java Versions https://jaitechwriteups.blogspot.com/2023/10/using-jaxb-in-custom-ant-tasks-on.html Java Records are "Trusted" and Consequently Faster http://minborgsjavapot.blogspot.com/2023/09/java-records-are-trusted-and.html JVMLS 2023 Keynote https://inside.java/2023/09/14/jvmls-keynote/ JVMLS - Project Leyden https://inside.java/2023/09/07/project-leyden/ JVMLS - Value Objects in Valhalla https://inside.java/2023/09/05/value-objects-in-valhalla/ Complete JVMLS 2023 playlist https://www.youtube.com/playlist?list=PLX8CzqL3ArzW90jKUCf4H6xCKpStxsOzp Teaching Old Streams New Tricks https://inside.java/2023/10/11/devoxx-teaching-old-streams-new-tricks/ Support Markdown in javadoc Comments https://mail.openjdk.org/pipermail/javadoc-dev/2023-October/006455.html Brian Goetz Answers Your Java Questions https://inside.java/2023/10/20/ama-brian/ ## October 2023 Critical Patch Update Released As part of the October 2023 CPU, Oracle released OpenJDK 21.0.1, JDK 21.0.1, JDK 17.0.9 LTS, 11.0.21 LTS, 8u391, and 8u391-perf. ~ PS: Don't forget to update me about your plans related to Java 21. Until next time! --David |
From: Andreas D. <and...@pm...> - 2023-09-30 18:19:29
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.0.0-rc4 * Documentation: https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/ 30-September-2023 - 7.0.0-rc4 We're excited to bring you the next major version of PMD! Since this is a big release, we provide here only a concise version of the release notes. We prepared a separate page with the full Detailed Release Notes for PMD 7.0.0 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html>. *ℹ️ Release Candidates* PMD 7.0.0 is finally almost ready. In order to gather feedback, we are going to ship a couple of release candidates. These are officially available on GitHub and Maven Central and can be used as usual (e.g. as a dependency). We encourage you to try out the new features, but keep in mind that we may introduce API breaking changes between the release candidates. It should be stable enough if you don't use custom rules. We have still some tasks planned for the next release candidates. You can see the progress in PMD 7 Tracking Issue #3898 <https://github.com/pmd/pmd/issues/3898>. If you find any problem or difficulty while updating from PMD 6, please provide feedback via our issue tracker <https://github.com/pmd/pmd/issues/new/choose>. That way we can improve the experience for all. Table Of Contents * Changes since 7.0.0-rc3 <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changes-since-7.0.0-rc3> o New and Noteworthy <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new-and-noteworthy> + Migration Guide for PMD 7 <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#migration-guide-for-pmd-7> + Apex Jorje Updated <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#apex-jorje-updated> + Java 21 Support <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#java-21-support> o Fixed issues <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#fixed-issues> o API Changes <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#api-changes> + pmd-java <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#pmd-java> + Rule properties <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#rule-properties> + New Programmatic API for CPD <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new-programmatic-api-for-cpd> + Removed classes and methods <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#removed-classes-and-methods> + Moved packages <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#moved-packages> + Changed types and other changes <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed-types-and-other-changes> + Internal APIs <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#internal-apis> + Deprecated API <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#deprecated-api> + Experimental APIs <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#experimental-apis> o External Contributions <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#external-contributions> * 🚀 Major Features and Enhancements <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#🚀-major-features-and-enhancements> o New official logo <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new-official-logo> o Revamped Java module <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#revamped-java-module> o Revamped Command Line Interface <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#revamped-command-line-interface> o Full Antlr support <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#full-antlr-support> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#updated-pmd-designer> o New CPD report format cpdhtml-v2.xslt <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new-cpd-report-format-cpdhtml-v2.xslt> * 🎉 Language Related Changes <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#🎉-language-related-changes> o New: Swift support <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new:-swift-support> o New: Kotlin support (experimental) <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new:-kotlin-support-(experimental)> o New: CPD support for TypeScript <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new:-cpd-support-for-typescript> o New: CPD support for Julia <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new:-cpd-support-for-julia> o New: CPD support for Coco <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new:-cpd-support-for-coco> o New: Java 21 Support <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new:-java-21-support> o Changed: JavaScript support <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed:-javascript-support> o Changed: Language versions <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed:-language-versions> o Changed: CPP can now ignore identifiers in sequences (CPD) <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed:-cpp-can-now-ignore-identifiers-in-sequences-(cpd)> o Changed: Apex Jorje Updated <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed:-apex-jorje-updated> o Changed: Rule properties <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed:-rule-properties> * 🌟 New and changed rules <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#🌟-new-and-changed-rules> o New Rules <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#new-rules> o Changed Rules <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#changed-rules> o Removed Rules <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#removed-rules> * 🚨 API <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#🚨-api> * 💥 Compatibility and migration notes <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#💥-compatibility-and-migration-notes> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#🐛-fixed-issues> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#✨-external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2023/09/pmd-700-rc4-30-september-2023-released/#📈-stats> Changes since 7.0.0-rc3 This section lists the most important changes from the last release candidate. The remaining section describes the complete release notes for 7.0.0. New and Noteworthy Migration Guide for PMD 7 A detailed documentation of required changes are available in the Migration Guide for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_userdocs_migrating_to_pmd7.html>. Apex Jorje Updated With the new version of Apex Jorje, the new language constructs like User Mode Database Operations can be parsed now. PMD should now be able to parse Apex code up to version 59.0 (Winter '23). Java 21 Support This release of PMD brings support for Java 21. There are the following new standard language features, that are supported now: * JEP 440: Record Patterns <https://openjdk.org/jeps/440> * JEP 441: Pattern Matching for switch <https://openjdk.org/jeps/441> PMD also supports the following preview language features: * JEP 430: String Templates (Preview) <https://openjdk.org/jeps/430> * JEP 443: Unnamed Patterns and Variables (Preview) <https://openjdk.org/jeps/443> * JEP 445: Unnamed Classes and Instance Main Methods (Preview) <https://openjdk.org/jeps/445> In order to analyze a project with PMD that uses these language features, you'll need to enable it via the environment variable |PMD_JAVA_OPTS| and select the new language version |21-preview|: |exportPMD_JAVA_OPTS=--enable-preview pmdcheck--use-versionjava-21-preview... | Note: Support for Java 19 preview language features have been removed. The version "19-preview" is no longer available. Fixed issues * miscellaneous * #4582 <https://github.com/pmd/pmd/issues/4582>: [dist] Download link broken * #4691 <https://github.com/pmd/pmd/issues/4691>: [CVEs] Critical and High CEVs reported on PMD and PMD dependencies * core * #1204 <https://github.com/pmd/pmd/issues/1204>: [core] Allow numeric properties in XML to be within an unbounded range * #3919 <https://github.com/pmd/pmd/issues/3919>: [core] Merge CPD and PMD language * #4204 <https://github.com/pmd/pmd/issues/4204>: [core] Provide a CpdAnalysis class as a programmatic entry point into CPD * #4301 <https://github.com/pmd/pmd/issues/4301>: [core] Remove deprecated property concrete classes * #4302 <https://github.com/pmd/pmd/issues/4302>: [core] Migrate Property Framework API to Java 8 * #4323 <https://github.com/pmd/pmd/issues/4323>: [core] Refactor CPD integration * #4397 <https://github.com/pmd/pmd/pull/4397>: [core] Refactor CPD * #4611 <https://github.com/pmd/pmd/pull/4611>: [core] Fix loading language properties from env vars * #4621 <https://github.com/pmd/pmd/issues/4621>: [core] Make |ClasspathClassLoader::getResource| child first * cli * #4423 <https://github.com/pmd/pmd/pull/4423>: [cli] Fix NPE when only |--file-list| is specified * doc * #4294 <https://github.com/pmd/pmd/issues/4294>: [doc] Migration Guide for upgrading PMD 6 ➡️ 7 * #4303 <https://github.com/pmd/pmd/issues/4303>: [doc] Document new property framework * #4521 <https://github.com/pmd/pmd/issues/4521>: [doc] Website is not mobile friendly * apex * #3973 <https://github.com/pmd/pmd/issues/3973>: [apex] Update parser to support new 'as user' keywords (User Mode for Database Operations) * #4453 <https://github.com/pmd/pmd/issues/4453>: [apex] [7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812) * apex-design * #4596 <https://github.com/pmd/pmd/issues/4596>: [apex] ExcessivePublicCount ignores properties * apex-security * #4646 <https://github.com/pmd/pmd/issues/4646>: [apex] ApexSOQLInjection does not recognise SObjectType or SObjectField as safe variable types * java * #4401 <https://github.com/pmd/pmd/issues/4401>: [java] PMD 7 fails to build under Java 19 * #4583 <https://github.com/pmd/pmd/issues/4583>: [java] Support JDK 21 (LTS) * java-bestpractices * #4634 <https://github.com/pmd/pmd/issues/4634>: [java] JUnit4TestShouldUseTestAnnotation false positive with TestNG API Changes pmd-java * Support for Java 19 preview language features have been removed. The version "19-preview" is no longer available. Rule properties * The old deprecated classes like |IntProperty| and |StringProperty| have been removed. Please use |PropertyFactory| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/properties/PropertyFactory.html#> to create properties. * All properties which accept multiple values now use a comma (|,|) as a delimiter. The previous default was a pipe character (|||). The delimiter is not configurable anymore. If needed, the comma can be escaped with a backslash. * The |min| and |max| attributes in property definitions in the XML are now optional and can appear separately or be omitted. New Programmatic API for CPD See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html#new-programmatic-api-for-cpd> and PR #4397 <https://github.com/pmd/pmd/pull/4397> for details. Removed classes and methods The following previously deprecated classes have been removed: * pmd-core * |net.sourceforge.pmd.cpd.AbstractTokenizer| ➡️ use |AnyTokenizer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/AnyTokenizer.html#> instead * |net.sourceforge.pmd.cpd.CPD| ➡️ use |PmdCli| <https://docs.pmd-code.org/apidocs/pmd-cli/7.0.0-rc4/net/sourceforge/pmd/cli/PmdCli.html#> from |pmd-cli| module for CLI support or use |CpdAnalysis| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CpdAnalysis.html#> for programmatic API * |net.sourceforge.pmd.cpd.GridBagHelper| (now package private) * |net.sourceforge.pmd.cpd.TokenEntry.State| * |net.sourceforge.pmd.lang.document.CpdCompat| * |net.sourceforge.pmd.properties.BooleanMultiProperty| * |net.sourceforge.pmd.properties.BooleanProperty| * |net.sourceforge.pmd.properties.CharacterMultiProperty| * |net.sourceforge.pmd.properties.CharacterProperty| * |net.sourceforge.pmd.properties.DoubleMultiProperty| * |net.sourceforge.pmd.properties.DoubleProperty| * |net.sourceforge.pmd.properties.EnumeratedMultiProperty| * |net.sourceforge.pmd.properties.EnumeratedProperty| * |net.sourceforge.pmd.properties.EnumeratedPropertyDescriptor| * |net.sourceforge.pmd.properties.FileProperty| (note: without replacement) * |net.sourceforge.pmd.properties.FloatMultiProperty| * |net.sourceforge.pmd.properties.FloatProperty| * |net.sourceforge.pmd.properties.IntegerMultiProperty| * |net.sourceforge.pmd.properties.IntegerProperty| * |net.sourceforge.pmd.properties.LongMultiProperty| * |net.sourceforge.pmd.properties.LongProperty| * |net.sourceforge.pmd.properties.MultiValuePropertyDescriptor| * |net.sourceforge.pmd.properties.NumericPropertyDescriptor| * |net.sourceforge.pmd.properties.PropertyDescriptorField| * |net.sourceforge.pmd.properties.RegexProperty| * |net.sourceforge.pmd.properties.SingleValuePropertyDescriptor| * |net.sourceforge.pmd.properties.StringMultiProperty| * |net.sourceforge.pmd.properties.StringProperty| * |net.sourceforge.pmd.properties.ValueParser| * |net.sourceforge.pmd.properties.ValueParserConstants| * |net.sourceforge.pmd.properties.builders.MultiNumericPropertyBuilder| * |net.sourceforge.pmd.properties.builders.MultiPackagedPropertyBuilder| * |net.sourceforge.pmd.properties.builders.MultiValuePropertyBuilder| * |net.sourceforge.pmd.properties.builders.PropertyDescriptorBuilder| * |net.sourceforge.pmd.properties.builders.PropertyDescriptorBuilderConversionWrapper| * |net.sourceforge.pmd.properties.builders.PropertyDescriptorExternalBuilder| * |net.sourceforge.pmd.properties.builders.SingleNumericPropertyBuilder| * |net.sourceforge.pmd.properties.builders.SinglePackagedPropertyBuilder| * |net.sourceforge.pmd.properties.builders.SingleValuePropertyBuilder| * |net.sourceforge.pmd.properties.modules.EnumeratedPropertyModule| * |net.sourceforge.pmd.properties.modules.NumericPropertyModule| The following previously deprecated methods have been removed: * pmd-core * |net.sourceforge.pmd.properties.PropertyBuilder.GenericCollectionPropertyBuilder#delim(char)| * |net.sourceforge.pmd.properties.PropertySource#setProperty(...)| * |net.sourceforge.pmd.properties.PropertyTypeId#factoryFor(...)| * |net.sourceforge.pmd.properties.PropertyTypeId#typeIdFor(...)| * |net.sourceforge.pmd.properties.PropertyDescriptor|: removed methods errorFor, type, isMultiValue, uiOrder, compareTo, isDefinedExternally, valueFrom, asDelimitedString The following methods have been removed: * pmd-core * |CPDConfiguration| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDConfiguration.html#> o |#sourceCodeFor(File)|, |#postConstruct()|, |#tokenizer()|, |#filenameFilter()| removed * |Mark| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/Mark.html#> o |#getSourceSlice()|, |#setLineCount(int)|, |#getLineCount()|, |#setSourceCode(SourceCode)| removed o |#getBeginColumn()|, |#getBeginLine()|, |#getEndLine()|, |#getEndColumn()| removed ➡️ use |getLocation| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/Mark.html#getLocation()> instead * |Match| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/Match.html#> o |#LABEL_COMPARATOR| removed o |#setMarkSet(...)|, |#setLabel(...)|, |#getLabel()|, |#addTokenEntry(...)| removed o |#getSourceCodeSlice()| removed ➡️ use |CPDReport#getSourceCodeSlice| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDReport.html#getSourceCodeSlice(net.sourceforge.pmd.cpd.Mark)> instead * |TokenEntry| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/TokenEntry.html#> o |#getEOF()|, |#clearImages()|, |#getIdentifier()|, |#getIndex()|, |#setHashCode(int)| removed o |#EOF| removed ➡️ use |isEof| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/TokenEntry.html#isEof()> instead * |Parser.ParserTask| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/ast/Parser.ParserTask.html#> o |#getFileDisplayName()| removed ➡️ use |getFileId| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/ast/Parser.ParserTask.html#getFileId()> instead (|getFileId().getAbsolutePath()|) The following classes have been removed: * pmd-core * |net.sourceforge.pmd.cpd.AbstractLanguage| * |net.sourceforge.pmd.cpd.AnyLanguage| * |net.sourceforge.pmd.cpd.Language| * |net.sourceforge.pmd.cpd.LanguageFactory| * |net.sourceforge.pmd.cpd.MatchAlgorithm| (now package private) * |net.sourceforge.pmd.cpd.MatchCollector| (now package private) * |net.sourceforge.pmd.cpd.SourceCode| (and all inner classes like |FileCodeLoader|, ...) * |net.sourceforge.pmd.cpd.token.TokenFilter| Moved packages * pmd-core * |NumericConstraints| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/net/sourceforge/pmd/properties/NumericConstraints.html#> (old package: |net.sourceforge.pmd.properties.constraints.NumericConstraints|) * |PropertyConstraint| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/net/sourceforge/pmd/properties/PropertyConstraint.html#> (old package: |net.sourceforge.pmd.properties.constraints.PropertyConstraint|) o not experimental anymore * |ReportException| <https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0-rc4/net/sourceforge/pmd/ant/ReportException.html#> (old package: |net.sourceforge.pmd.cpd|, moved to module |pmd-ant|) o it is now a RuntimeException * |CPDReportRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDReportRenderer.html#> (old package: |net.sourceforge.pmd.cpd.renderer|) * |AntlrTokenFilter| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/impl/AntlrTokenFilter.html#> (old package: |net.sourceforge.pmd.cpd.token|) * |BaseTokenFilter| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/impl/BaseTokenFilter.html#> (old package: |net.sourceforge.pmd.cpd.token.internal|) * |JavaCCTokenFilter| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/impl/JavaCCTokenFilter.html#> (old package: |net.sourceforge.pmd.cpd.token|) Changed types and other changes * pmd-core * |PropertyDescriptor| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/net/sourceforge/pmd/properties/PropertyDescriptor.html#> is now a class (was an interface) and it is not comparable anymore. * |AbstractConfiguration#setSourceEncoding| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/AbstractConfiguration.html#setSourceEncoding(java.nio.charset.Charset)> o previously this method took a simple String for the encoding. * |PmdConfiguration| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/PmdConfiguration.html#> and |CPDConfiguration| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDConfiguration.html#> o many getters and setters have been moved to the parent class |AbstractConfiguration| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/AbstractConfiguration.html#> * |CPDListener#addedFile| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDListener.html#addedFile(int)> o no |File| parameter anymore * |CPDReport#getNumberOfTokensPerFile| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDReport.html#getNumberOfTokensPerFile()> returns a |Map| of |FileId,Integer| instead of |String| * |CPDReport#filterMatches| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(java.util.function.Predicate)> now takes a |java.util.function.Predicate| as parameter * |Tokenizer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/Tokenizer.html#> o constants are now |PropertyDescriptor| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/properties/PropertyDescriptor.html#> instead of |String|, to be used as language properties o |tokenize| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/Tokenizer.html#tokenize(net.sourceforge.pmd.lang.document.TextDocument,net.sourceforge.pmd.cpd.TokenFactory)> changed parameters. Now takes a |TextDocument| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/document/TextDocument.html#> and a |TokenFactory| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/TokenFactory.html#> (instead of |SourceCode| and |Tokens|) * |Language| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/Language.html#> o method |#createProcessor(LanguagePropertyBundle)| moved to |PmdCapableLanguage| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/PmdCapableLanguage.html#> * |StringUtil#linesWithTrimIndent| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/util/StringUtil.html#linesWithTrimIndent(net.sourceforge.pmd.lang.document.Chars)> now takes a |Chars| instead of a |String|. * All language modules (like pmd-apex, pmd-cpp, ...) * consistent package naming: |net.sourceforge.pmd.lang.<langId>.cpd| * adapted to use |CpdCapableLanguage| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/CpdCapableLanguage.html#> * consistent static method |#getInstance()| * removed constants like |ID|, |TERSE_NAME| or |NAME|. Use |getInstance().getName()| etc. instead Internal APIs * |Tokens| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/cpd/Tokens.html#> * |PropertyTypeId| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/net/sourceforge/pmd/properties/PropertyTypeId.html#> Deprecated API * |Language#getTerseName| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/Language.html#getTerseName()> ➡️ use |getId| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/Language.html#getId()> instead * The method |ASTPattern#getParenthesisDepth| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#getParenthesisDepth()> 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. Experimental APIs * To support the Java preview language features "String Templates" and "Unnamed Patterns and Variables", the following AST nodes have been introduced as experimental: * |ASTTemplateExpression| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/java/ast/ASTTemplateExpression.html#> * |ASTTemplate| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/java/ast/ASTTemplate.html#> * |ASTTemplateFragment| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/java/ast/ASTTemplateFragment.html#> * |ASTUnnamedPattern| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/java/ast/ASTUnnamedPattern.html#> * The AST nodes for supporting "Record Patterns" and "Pattern Matching for switch" are not experimental anymore: * |ASTRecordPattern| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/jast/ast/ASTRecordPattern.html#> * |ASTPatternList| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/jast/ast/ASTPatternList.html#> (Note: it was renamed from |ASTComponentPatternList|) * |ast| <https://docs.pmd-code.org/apidocs/pmd-java/7.0.0-rc4/net/sourceforge/pmd/lang/jast/ast.html#> (Note: it was renamed from |ASTSwitchGuard|) External Contributions * #4528 <https://github.com/pmd/pmd/pull/4528>: [apex] Update to apexlink - Kevin Jones <https://github.com/nawforce> (@nawforce) * #4637 <https://github.com/pmd/pmd/pull/4637>: [java] fix #4634 - JUnit4TestShouldUseTestAnnotation false positive with TestNG - Krystian Dabrowski <https://github.com/krdabrowski> (@krdabrowski) * #4649 <https://github.com/pmd/pmd/pull/4649>: [apex] Add SObjectType and SObjectField to list of injectable SOQL variable types - Richard Corfield <https://github.com/rcorfieldffdc> (@rcorfieldffdc) * #4651 <https://github.com/pmd/pmd/pull/4651>: [doc] Add "Tencent Cloud Code Analysis" in Tools / Integrations - yale <https://github.com/cyw3> (@cyw3) * #4664 <https://github.com/pmd/pmd/pull/4664>: [cli] CPD: Fix NPE when only |--file-list| is specified - Wener <https://github.com/wener-tiobe> (@wener-tiobe) * #4665 <https://github.com/pmd/pmd/pull/4665>: [java] Doc: Fix references AutoClosable -> AutoCloseable - Andrey Bozhko <https://github.com/AndreyBozhko> (@AndreyBozhko) 🚀 Major Features and Enhancements New official logo The new official logo of PMD: New PMD Logo Revamped Java module * Java grammar substantially refactored - more correct regarding the Java Language Specification (JLS) * Built-in rules have been upgraded for the changed AST * Rewritten type resolution framework and symbol table correctly implements the JLS * AST exposes more semantic information (method calls, field accesses) For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html#revamped-java>. Contributors: Clément Fournier <https://github.com/oowekyala> (@oowekyala <https://sourceforge.net/u/oowekyala/>), Andreas Dangel <https://github.com/adangel> (@adangel <https://sourceforge.net/u/adangel/>), Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Revamped Command Line Interface * unified and consistent Command Line Interface for both Linux/Unix and Windows across our different utilities * single script |pmd| (|pmd.bat| for Windows) to launch the different utilities: o |pmd check| to run PMD rules and analyze a project o |pmd cpd| to run CPD (copy paste detector) o |pmd designer| to run the PMD Rule Designer * progress bar support for |pmd check| * shell completion Demo For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html>. Contributors: Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Full Antlr support * Antlr <https://www.antlr.org/> based grammars can now be used to build full-fledged PMD rules. * Previously, Antlr grammar could only be used for CPD * New supported languages: Swift and Kotlin For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html>. Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) 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-designer/releases/tag/7.0.0-rc1>. New CPD report format cpdhtml-v2.xslt 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. See the example report <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/report-examples/cpdhtml-v2.html>. 🎉 Language Related Changes Note that this is just a concise listing of the highlight. For more information on the languages, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html>. New: Swift support * use PMD to analyze Swift code with PMD rules * initially 4 built-in rules Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) New: Kotlin support (experimental) * use PMD to analyze Kotlin code with PMD rules * Support for Kotlin 1.8 grammar * initially 2 built-in rules New: CPD support for TypeScript Thanks to a contribution, CPD now supports the TypeScript language. It is shipped with the rest of the JavaScript support in the module |pmd-javascript|. Contributors: Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/>) New: CPD support for Julia Thanks to a contribution, CPD now supports the Julia language. It is shipped in the new module |pmd-julia|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) New: CPD support for Coco 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 |pmd-coco|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) New: Java 21 Support This release of PMD brings support for Java 21. There are the following new standard language features, that are supported now: * JEP 440: Record Patterns <https://openjdk.org/jeps/440> * JEP 441: Pattern Matching for switch <https://openjdk.org/jeps/441> PMD also supports the following preview language features: * JEP 430: String Templates (Preview) <https://openjdk.org/jeps/430> * JEP 443: Unnamed Patterns and Variables (Preview) <https://openjdk.org/jeps/443> * JEP 445: Unnamed Classes and Instance Main Methods (Preview) <https://openjdk.org/jeps/445> In order to analyze a project with PMD that uses these language features, you'll need to enable it via the environment variable |PMD_JAVA_OPTS| and select the new language version |21-preview|: |exportPMD_JAVA_OPTS=--enable-preview pmdcheck--use-versionjava-21-preview... | Note: Support for Java 19 preview language features have been removed. The version "19-preview" is no longer available. Changed: JavaScript support * latest version supports ES6 and also some new constructs (see Rhino <https://github.com/mozilla/rhino>]) * comments are retained Changed: Language versions * more predefined language versions for each supported language * can be used to limit rule execution for specific versions only with |minimumLanguageVersion| and |maximumLanguageVersion| attributes. Changed: CPP can now ignore identifiers in sequences (CPD) * new command line option for CPD: |--ignore-sequences|. * This option is used for CPP only: with the already existing option |--ignore-literal-sequences|, only literals were ignored. The new option additional ignores identifiers as well in sequences. * See PR #4470 <https://github.com/pmd/pmd/pull/4470> for details. Changed: Apex Jorje Updated With the new version of Apex Jorje, the new language constructs like User Mode Database Operations can be parsed now. PMD should now be able to parse Apex code up to version 59.0 (Winter '23). Changed: Rule properties * The old deprecated classes like |IntProperty| and |StringProperty| have been removed. Please use |PropertyFactory| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/properties/PropertyFactory.html#> to create properties. * All properties which accept multiple values now use a comma (|,|) as a delimiter. The previous default was a pipe character (|||). The delimiter is not configurable anymore. If needed, the comma can be escaped with a backslash. * The |min| and |max| attributes in property definitions in the XML are now optional and can appear separately or be omitted. 🌟 New and changed rules New Rules *Apex* * |UnusedMethod| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#unusedmethod> finds unused methods in your code. *Java* * |UnnecessaryBoxing| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_codestyle.html#unnecessaryboxing> reports boxing and unboxing conversions that may be made implicit. *Kotlin* * |FunctionNameTooShort| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_kotlin_bestpractices.html#functionnametooshort> * |OverrideBothEqualsAndHashcode| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode> *Swift* * |ProhibitedInterfaceBuilder| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder> * |UnavailableFunction| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_swift_bestpractices.html#unavailablefunction> * |ForceCast| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_swift_errorprone.html#forcecast> * |ForceTry| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_swift_errorprone.html#forcetry> Changed Rules *General changes* * All statistical rules (like ExcessiveClassLength, ExcessiveParameterList) have been simplified and unified. The properties |topscore| and |sigma| have been removed. The property |minimum| 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 (vm): o Apex: |ExcessiveClassLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#excessiveclasslength>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#excessiveparameterlist>, |ExcessivePublicCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#excessivepubliccount>, |NcssConstructorCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#ncssconstructorcount>, |NcssMethodCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#ncssmethodcount>, |NcssTypeCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_apex_design.html#ncsstypecount> o Java: |ExcessiveImports| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#excessiveimports>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#excessiveparameterlist>, |ExcessivePublicCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#excessivepubliccount>, |SwitchDensity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#switchdensity> o PLSQL: |ExcessiveMethodLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#excessivemethodlength>, |ExcessiveObjectLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#excessiveobjectlength>, |ExcessivePackageBodyLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#excessivepackagebodylength>, |ExcessivePackageSpecificationLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#excessivepackagespecificationlength>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#excessiveparameterlist>, |ExcessiveTypeLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#excessivetypelength>, |NcssMethodCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#ncssmethodcount>, |NcssObjectCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#ncssobjectcount>, |NPathComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_plsql_design.html#npathcomplexity> o VM: |ExcessiveTemplateLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_vm_design.html#excessivetemplatelength> * The general property |violationSuppressXPath| which is available for all rules to suppress warnings <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_userdocs_suppressing_warnings.html> 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 |violationSuppressXPath| properties. *Apex General changes* * The properties |cc_categories|, |cc_remediation_points_multiplier|, |cc_block_highlighting| have been removed from all rules. These properties have been deprecated since PMD 6.13.0. See issue #1648 <https://github.com/pmd/pmd/issues/1648> for more details. *Java General changes* * 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. |CognitiveComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#cognitivecomplexity>. The report location is controlled by the overrides of the method |getReportLocation| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc4/net/sourceforge/pmd/lang/ast/Node.html#getReportLocation()> in different node types. See issue #4439 <https://github.com/pmd/pmd/issues/4439> and issue #730 <https://github.com/pmd/pmd/issues/730> for more details. *Java Best Practices* * |ArrayIsStoredDirectly| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_bestpractices.html#arrayisstoreddirectly>: Violations are now reported on the assignment and not anymore on the formal parameter. The reported line numbers will probably move. * |AvoidReassigningLoopVariables| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_bestpractices.html#avoidreassigningloopvariables>: This rule might not report anymore all reassignments of the control variable in for-loops when the property |forReassign| is set to |skip|. See issue #4500 <https://github.com/pmd/pmd/issues/4500> for more details. * |LooseCoupling| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_bestpractices.html#loosecoupling>: The rule has a new property to allow some types to be coupled to (|allowedTypes|). * |UnusedLocalVariable| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_bestpractices.html#unusedlocalvariable>: This rule has some important false-negatives fixed and finds many more cases now. For details see issues #2130 <https://github.com/pmd/pmd/issues/2130>, #4516 <https://github.com/pmd/pmd/issues/4516>, and #4517 <https://github.com/pmd/pmd/issues/4517>. *Java Codestyle* * |MethodNamingConventions| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_codestyle.html#methodnamingconventions>: The property |checkNativeMethods| has been removed. The property was deprecated since PMD 6.3.0. Use the property |nativePattern| to control whether native methods should be considered or not. * |ShortVariable| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_codestyle.html#shortvariable>: This rule now also reports short enum constant names. * |UseDiamondOperator| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_codestyle.html#usediamondoperator>: The property |java7Compatibility| has been removed. The rule now handles Java 7 properly without a property. * |UnnecessaryFullyQualifiedName| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname>: 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. * |UselessParentheses| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_codestyle.html#uselessparentheses>: The rule has two new properties which control how strict the rule should be applied. With |ignoreClarifying| (default: true) parentheses that are strictly speaking not necessary are allowed, if they separate expressions of different precedence. The other property |ignoreBalancing| (default: true) is similar, in that it allows parentheses that help reading and understanding the expressions. *Java Design* * |CyclomaticComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#cyclomaticcomplexity>: The property |reportLevel| 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 |classReportLevel| and |methodReportLevel| instead. * |ImmutableField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#immutablefield>: The property |ignoredAnnotations| has been removed. The property was deprecated since PMD 6.52.0. * |LawOfDemeter| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#lawofdemeter>: The rule has a new property |trustRadius|. This defines the maximum degree of trusted data. The default of 1 is the most restrictive. * |NPathComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#npathcomplexity>: The property |minimum| has been removed. It was deprecated since PMD 6.0.0. Use the property |reportLevel| instead. * |SingularField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#singularfield>: The properties |checkInnerClasses| and |disallowNotAssignment| have been removed. The rule is now more precise and will check these cases properly. * |UseUtilityClass| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_design.html#useutilityclass>: The property |ignoredAnnotations| has been removed. *Java Documentation* * |CommentContent| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_documentation.html#commentcontent>: The properties |caseSensitive| and |disallowedTerms| are removed. The new property |forbiddenRegex| can be used now to define the disallowed terms with a single regular expression. * |CommentRequired| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_documentation.html#commentrequired>: o Overridden methods are now detected even without the |@Override| annotation. This is relevant for the property |methodWithOverrideCommentRequirement|. See also pull request #3757 <https://github.com/pmd/pmd/pull/3757>. o Elements in annotation types are now detected as well. This might lead to an increased number of violations for missing public method comments. * |CommentSize| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_documentation.html#commentsize>: When determining the line-length of a comment, the leading comment prefix markers (e.g. |*| or |//|) are ignored and don't add up to the line-length. See also pull request #4369 <https://github.com/pmd/pmd/pull/4369>. *Java Error Prone* * |AvoidDuplicateLiterals| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_errorprone.html#avoidduplicateliterals>: The property |exceptionfile| has been removed. The property was deprecated since PMD 6.10.0. Use the property |exceptionList| instead. * |DontImportSun| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_errorprone.html#dontimportsun>: |sun.misc.Signal| is not special-cased anymore. * |EmptyCatchBlock| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_errorprone.html#emptycatchblock>: |CloneNotSupportedException| and |InterruptedException| are not special-cased anymore. Rename the exception parameter to |ignored| to ignore them. * |ImplicitSwitchFallThrough| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_rules_java_errorprone.html#implicitswitchfallthrough>: 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. Removed Rules Many rules, that were previously deprecated have been finally removed. See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html> for the complete list. 🚨 API 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. Also, there are some improvement and changes in different areas. For the detailed description of the changes listed here, see Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html>. * Miscellaneous smaller changes and cleanups * XPath 3.1 support for XPath-based rules * Node stream API for AST traversal * Metrics framework * Testing framework * Language Lifecycle and Language Properties * Rule Properties * New Programmatic API for CPD 💥 Compatibility and migration notes A detailed documentation of required changes are available in the Migration Guide for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_userdocs_migrating_to_pmd7.html>. See also Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc4/pmd_release_notes_pmd7.html>. 🐛 Fixed Issues * miscellaneous o #881 <https://github.com/pmd/pmd/issues/881>: [all] Breaking API changes for 7.0.0 o #896 <https://github.com/pmd/pmd/issues/896>: [all] Use slf4j o #1431 <https://github.com/pmd/pmd/pull/1431>: [ui] Remove old GUI applications (designerold, bgastviewer) o #1451 <https://github.com/pmd/pmd/issues/1451>: [core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string o #2496 <https://github.com/pmd/pmd/issues/2496>: Update PMD 7 Logo on landing page o #2497 <https://github.com/pmd/pmd/issues/2497>: PMD 7 Logo page o #2498 <https://github.com/pmd/pmd/issues/2498>: Update PMD 7 Logo in documentation o #3797 <https://github.com/pmd/pmd/issues/3797>: [all] Use JUnit5 o #4462 <https://github.com/pmd/pmd/issues/4462>: Provide Software Bill of Materials (SBOM) o #4460 <https://github.com/pmd/pmd/pull/4460>: Fix assembly-plugin warnings o #4582 <https://github.com/pmd/pmd/issues/4582>: [dist] Download link broken o #4691 <https://github.com/pmd/pmd/issues/4691>: [CVEs] Critical and High CEVs reported on PMD and PMD dependencies * ant o #4080 <https://github.com/pmd/pmd/issues/4080>: [ant] Split off Ant integration into a new submodule * core o #880 <https://github.com/pmd/pmd/issues/880>: [core] Make visitors generic o #1204 <https://github.com/pmd/pmd/issues/1204>: [core] Allow numeric properties in XML to be within an unbounded range o #1622 <https://github.com/pmd/pmd/pull/1622>: [core] NodeStream API o #1687 <https://github.com/pmd/pmd/issues/1687>: [core] Deprecate and Remove XPath 1.0 support o #1785 <https://github.com/pmd/pmd/issues/1785>: [core] Allow abstract node types to be valid rulechain visits o #1825 <https://github.com/pmd/pmd/pull/1825>: [core] Support NoAttribute for XPath o #2038 <https://github.com/pmd/pmd/issues/2038>: [core] Remove DCD o #2218 <https://github.com/pmd/pmd/issues/2218>: [core] |isFindBoundary| should not be an attribute o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #2239 <https://github.com/pmd/pmd/issues/2239>: [core] Merging Javacc build scripts o #2500 <https://github.com/pmd/pmd/issues/2500>: [core] Clarify API for ANTLR based languages o #2518 <https://github.com/pmd/pmd/issues/2518>: [core] Language properties o #2602 <https://github.com/pmd/pmd/issues/2602>: [core] Remove ParserOptions o #2614 <https://github.com/pmd/pmd/pull/2614>: [core] Upgrade Saxon, add XPath 3.1, remove Jaxen o #2696 <https://github.com/pmd/pmd/pull/2696>: [core] Remove DFA o #2821 <https://github.com/pmd/pmd/issues/2821>: [core] Rule processing error filenames are missing paths o #2873 <https://github.com/pmd/pmd/issues/2873>: [core] Utility classes in pmd 7 o #2885 <https://github.com/pmd/pmd/issues/2885>: [core] Error recovery mode o #3203 <https://github.com/pmd/pmd/issues/3203>: [core] Replace RuleViolationFactory implementations with ViolationDecorator o #3692 <https://github.com/pmd/pmd/pull/3692>: [core] Analysis listeners o #3782 <https://github.com/pmd/pmd/issues/3782>: [core] Language lifecycle o #3815 <https://github.com/pmd/pmd/issues/3815>: [core] Update Saxon HE to 10.7 o #3893 <https://github.com/pmd/pmd/pull/3893>: [core] Text documents o #3902 <https://github.com/pmd/pmd/issues/3902>: [core] Violation decorators o #3918 <https://github.com/pmd/pmd/issues/3918>: [core] Make LanguageRegistry non static o #3919 <https://github.com/pmd/pmd/issues/3919>: [core] Merge CPD and PMD language o #3922 <https://github.com/pmd/pmd/pull/3922>: [core] Better error reporting for the ruleset parser o #4035 <https://github.com/pmd/pmd/issues/4035>: [core] ConcurrentModificationException in DefaultRuleViolationFactory o #4120 <https://github.com/pmd/pmd/issues/4120>: [core] Explicitly name all language versions o #4204 <https://github.com/pmd/pmd/issues/4204>: [core] Provide a CpdAnalysis class as a programmatic entry point into CPD o #4301 <https://github.com/pmd/pmd/issues/4301>: [core] Remove deprecated property concrete classes o #4302 <https://github.com/pmd/pmd/issues/4302>: [core] Migrate Property Framework API to Java 8 o #4323 <https://github.com/pmd/pmd/issues/4323>: [core] Refactor CPD integration o #4353 <https://github.com/pmd/pmd/pull/4353>: [core] Micro optimizations for Node API o #4365 <https://github.com/pmd/pmd/pull/4365>: [core] Improve benchmarking o #4397 <https://github.com/pmd/pmd/pull/4397>: [core] Refactor CPD o #4420 <https://github.com/pmd/pmd/pull/4420>: [core] Remove PMD.EOL o #4425 <https://github.com/pmd/pmd/pull/4425>: [core] Replace TextFile::pathId o #4454 <https://github.com/pmd/pmd/issues/4454>: [core] "Unknown option: '-min'" but is referenced in documentation o #4611 <https://github.com/pmd/pmd/pull/4611>: [core] Fix loading language properties from env vars o #4621 <https://github.com/pmd/pmd/issues/4621>: [core] Make |ClasspathClassLoader::getResource| child first * cli o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #3828 <https://github.com/pmd/pmd/issues/3828>: [core] Progress reporting o #4079 <https://github.com/pmd/pmd/issues/4079>: [cli] Split off CLI implementation into a pmd-cli submodule o #4423 <https://github.com/pmd/pmd/pull/4423>: [cli] Fix NPE when only |--file-list| is specified o #4482 <https://github.com/pmd/pmd/issues/4482>: [cli] pmd.bat can only be executed once o #4484 <https://github.com/pmd/pmd/issues/4484>: [cli] ast-dump with no properties produce an NPE * doc o #2501 <https://github.com/pmd/pmd/issues/2501>: [doc] Verify ANTLR Documentation o #4294 <https://github.com/pmd/pmd/issues/4294>: [doc] Migration Guide for upgrading PMD 6 ➡️ 7 o #4303 <https://github.com/pmd/pmd/issues/4303>: [doc] Document new property framework o #4438 <https://github.com/pmd/pmd/issues/4438>: [doc] Documentation links in VS Code are outdated o #4521 <https://github.com/pmd/pmd/issues/4521>: [doc] Website is not mobile friendly * testing o #2435 <https://github.com/pmd/pmd/issues/2435>: [test] Remove duplicated Dummy language module o #4234 <https://github.com/pmd/pmd/issues/4234>: [test] Tests that change the logging level do not work Language specific fixes: * apex o #1937 <https://github.com/pmd/pmd/issues/1937>: [apex] Apex should only have a single RootNode o #1648 <https://github.com/pmd/pmd/issues/1648>: [apex,vf] Remove CodeClimate dependency o #1750 <https://github.com/pmd/pmd/pull/1750>: [apex] Remove apex statistical rules o #2836 <https://github.com/pmd/pmd/pull/2836>: [apex] Remove Apex ProjectMirror o #3973 <https://github.com/pmd/pmd/issues/3973>: [apex] Update parser to support new 'as user' keywords (User Mode for Database Operations) o #4427 <https://github.com/pmd/pmd/issues/4427>: [apex] ApexBadCrypto test failing to detect inline code o #4453 <https://github.com/pmd/pmd/issues/4453>: [apex] [7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812) * apex-design o #2667 <https://github.com/pmd/pmd/issues/2667>: [apex] Integrate nawforce/ApexLink to build robust Unused rule o #4509 <https://github.com/pmd/pmd/issues/4509>: [apex] ExcessivePublicCount doesn't consider inner classes correctly o #4596 <https://github.com/pmd/pmd/issues/4596>: [apex] ExcessivePublicCount ignores properties * apex-security o #4646 <https://github.com/pmd/pmd/issues/4646>: [apex] ApexSOQLInjection does not recognise SObjectType or SObjectField as safe variable types * java o #520 <https://github.com/pmd/pmd/issues/520>: [java] Allow |@SuppressWarnings| with constants instead of literals o #864 <https://github.com/pmd/pmd/issues/864>: [java] Similar/duplicated implementations for determining FQCN o #905 <https://github.com/pmd/pmd/issues/905>: [java] Add new node for anonymous class declaration o #910 <https://github.com/pmd/pmd/issues/910>: [java] AST inconsistency between primitive and reference type arrays o #997 <https://github.com/pmd/pmd/issues/997>: [java] Java8 parsing corner case with annotated array types o #998 <https://github.com/pmd/pmd/issues/998>: [java] AST inconsistencies around FormalParameter o #1019 <https://github.com/pmd/pmd/issues/1019>: [java] Breaking Java Grammar changes for PMD 7.0.0 o #1124 <https://github.com/pmd/pmd/issues/1124>: [java] ImmutableList implementation in the qname codebase o #1128 <https://github.com/pmd/pmd/issues/1128>: [java] Improve ASTLocalVariableDeclaration o #1150 <https://github.com/pmd/pmd/issues/1150>: [java] ClassOrInterfaceType AST improvements o #1207 <https://github.com/pmd/pmd/issues/1207>: [java] Resolve explicit types using FQCNs, without hitting the classloader o #1367 <https://github.com/pmd/pmd/issues/1367>: [java] Parsing error on annotated inner class o #1661 <https://github.com/pmd/pmd/issues/1661>: [java] About operator nodes o #2366 <https://github.com/pmd/pmd/pull/2366>: [java] Remove qualified names o #2819 <https://github.com/pmd/pmd/issues/2819>: [java] GLB bugs in pmd 7 o #3642 <https://github.com/pmd/pmd/issues/3642>: [java] Parse error on rare extra dimensions on method return type on annotation methods o #3763 <https://github.com/pmd/pmd/issues/3763>: [java] Am... [truncated message content] |
From: David D. <dav...@or...> - 2023-08-22 16:06:33
|
Greetings! JDK 21 is now in the Release Candidate Phase so everything is on track for the Java 21 GA release on September 19th! If you haven't done so, please start testing your project(s) using JDK 22 Early-Access builds and let us know the results. In other news, the JVM Language Summit took place a few days ago in Santa Clara (California). During this unique gathering of Java architects and OpenJDK developers, key updates were shared and discussed, ex. where Valhalla stands today, the new Class-File API, an update on Leyden and Valhalla, Project Panama, the challenges of Virtual Threads, continuation internals, etc. We have started to publish the JVMLS 2023 videos so make sure to keep an eye on this evolving JVMLS playlist [1] to understand where the Java platform is heading to. ## JDK 21 Early-Access Builds Per the JDK 21 schedule [2], we are now in the Release-Candidate Phase. The overall feature set [3] is frozen, no further JEPs will be targeted to this release. ### JEPs integrated to JDK 21: - 430: String Templates (Preview) - 431: Sequenced Collections - 439: Generational ZGC - 440: Record Patterns - 441: Pattern Matching for switch - 442: Foreign Function & Memory API (3rd Preview) - 443: Unnamed Patterns and Variables (Preview) - 444: Virtual Threads - 445: Unnamed Classes and Instance Main Methods (Preview) - 446: Scoped Values (Preview) - 448: Vector API (6th Incubator) - 449: Deprecate the Windows 32-bit x86 Port for Removal - 451: Prepare to Disallow the Dynamic Loading of Agents - 452: Key Encapsulation Mechanism API - 453: Structured Concurrency (Preview) The first JDK 21 Release Candidate builds (builds 35) are available [4]. Those builds are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [5] and the Javadocs [6] are also available. [1] https://www.youtube.com/playlist?list=PLX8CzqL3ArzW90jKUCf4H6xCKpStxsOzp [2] https://openjdk.org/projects/jdk/21/#Schedule [3] https://openjdk.org/projects/jdk/21/#Features [4] https://jdk.java.net/21/ [5] https://jdk.java.net/21/release-notes [6] https://download.java.net/java/early_access/jdk21/docs/api/ ## JDK 22 Early-Access Builds The latest Early-Access builds 11 are available [7], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [8]. ### Changes in recent JDK 22 builds (b8-b11) that may be of interest: Note that this is only a curated list of changes, make sure to check [9] for additional changes. - JDK-8314209: Wrong @since tag for RandomGenerator::equiDoubles [Reported by JaCoCo] - JDK-8312489: Increase Default Value of the System Property jdk.jar.maxSignatureFileSize - JDK-8312433: HttpClient request fails due to connection being considered … - JDK-8313307: java/util/Formatter/Padding.java fails on some Locales - JDK-8312821: Javac accepts char literal as template - JDK-8313251: Add NativeLibraryLoad event - JDK-8313809: String template fails with java.lang.StringIndexOutOfBoundsE… - JDK-8312984: javac may crash on a record pattern with too few components - JDK-8310033: Clarify return value of Java Time compareTo methods - JDK-8302017: Allocate BadPaddingException only if it will be thrown - JDK-8310913: Move ReferencedKeyMap to jdk.internal so it may be shared - JDK-8313251: Add NativeLibraryLoad event to provide more detail about shared lib/dll loads - JDK-8311653: Modify -XshowSettings launcher behavior - JDK-8306441: Two phase segmented heap dump - JDK-8311981: JVM May Hang When Using Generational ZGC if a VM Handshake Stalls on Memory - JDK-8308850: Change JVM options with small ranges that get -Wconversion warnings to 32 bits [7] https://jdk.java.net/22/ [8] https://jdk.java.net/22/release-notes [9] https://github.com/openjdk/jdk/compare/jdk-22%2B8...jdk-22%2B11 ## JavaFX 21 & 22 Early-Access Builds These are early-access builds of the JavaFX Runtime, built from openjdk/jfx [10]. They allow JavaFX application developers to build and test their applications with JavaFX 21 or 22 on the latest JDK. The latest builds 29 (2023/8/7) of JavaFX 21 are now available [11]. The early-access builds 5 (2023/8/18) of the JavaFX 22 Runtime which is designed to work with JDK 22 are also available [12]. These early-access builds are provided under the GNU General Public License, version 2, with the Classpath Exception. Please send the feedback on the openjfx-dev mailing list [13]. [10] https://github.com/openjdk/jfx [11] https://jdk.java.net/javafx21/ [12] https://jdk.java.net/javafx22/ [13] http://mail.openjdk.org/mailman/listinfo/openjfx-dev ## Topics of Interest: JDK 21: G1/Parallel/Serial GC improvements https://tschatzl.github.io/2023/08/04/jdk21-g1-parallel-gc-changes.html To Java 21 and Beyond! https://inside.java/2023/08/08/to-java21-and-beyond/ Strengthen your Java App's Defenses with Key Encapsulation Mechanism API https://inside.java/2023/08/03/newscast-54/ JVMLS - Foreign Function & Memory API https://inside.java/2023/08/21/jvmls-ffm-api/ JVMLS - Java and GPU … are we nearly there yet? https://inside.java/2023/08/22/java-and-gpu/ Draft JEP: Computed Constants https://minborgsjavapot.blogspot.com/2023/08/java-new-draft-jep-computed-constants.html Using Computed Constants to Manage Static State in Leyden https://cr.openjdk.org/~jrose/leyden/after-computed-constants.html Project Leyden: Toward Condensers https://openjdk.org/projects/leyden/notes/03-toward-condensers New OpenJDK Container mailing list https://mail.openjdk.org/pipermail/container-discuss/2023-August/000000.html Introduction: Q-descriptors and v-bytecodes https://cr.openjdk.org/~jrose/values/larval-values.html ~ Until next time! --David |
From: David D. <dav...@or...> - 2023-07-28 10:06:01
|
Welcome to the OpenJDK Quality Outreach summer update. JDK 21 is now in Rampdown Phase Two [1], its overall feature has been frozen a few weeks ago. Per the JDK Release Process [2] we have now turned our focus to P1 and P2 bugs, which can be fixed with approval [3]. Late enhancements are still possible, with approval, but the bar is now extraordinarily high [4]. That also means that the JDK 21 Initial Release Candidates are fast approaching, i.e., August 10 [5]. So, and in addition to testing your projects with the latest JDK 21 early-access builds, it is now also a good time to start testing with the JDK 22 early-access builds. [1] https://mail.openjdk.org/pipermail/jdk-dev/2023-July/008034.html [2] https://openjdk.org/jeps/3 [3] https://openjdk.org/jeps/3#Fix-Request-Process [4] https://openjdk.org/jeps/3#Late-Enhancement-Request-Process [5] https://openjdk.org/projects/jdk/21/ ## Heads-up - JDK 21 & JDK 22: Note if implicit annotation processing is being used Annotation processing by javac is enabled by default, including when no annotation processing configuration options are present. We are considering disabling implicit annotation processing by default in a future release, possibly as early as JDK 22 [6]. To alert javac users of this possibility, as of JDK 21 b29 and JDK 22 b04, javac prints a note if implicit annotation processing is being used [7]. The reported note is: Annotation processing is enabled because one or more processors were found on the class path. A future release of javac may disable annotation processing unless at least one processor is specified by name (-processor), or a search path is specified (--processor-path, --processor-module-path), or annotation processing is enabled explicitly (-proc:only, -proc:full). Use -Xlint:-options to suppress this message. Use -proc:none to disable annotation processing. Good build hygiene includes explicitly configuring annotation processing. To ease the transition to a different default policy in the future, the new-in-JDK-21 `-proc:full` javac option requests the current default behavior of looking for annotation processors on the class path. [6] https://bugs.openjdk.org/browse/JDK-8306819 [7] https://bugs.openjdk.org/browse/JDK-8310061 ## Heads-up - JDK 22: JLine is now the Default Console Provider In JDK 22, `System.console()` has been changed [8] to return a `Console` with enhanced editing features that improve the experience of programs that use the `Console` API. In addition, `System.console()` now returns a `Console` object when the standard streams are redirected or connected to a virtual terminal. Prior to JDK 22, `System.console()` instead returned `null` for these cases. This change may impact code that checks the return from `System.console()` to test if the JVM is connected to a terminal. If required, the `-Djdk.console=java.base` flag will restore the old behavior where the console is only returned when it is connected to a terminal. Starting JDK 22, one could also use the new `Console.isTerminal()` method to test if the console is connected to a terminal. [8] https://bugs.openjdk.org/browse/JDK-8308591 ## JDK 21 Early-Access Builds The JDK 21 early-access builds 33 are available [9], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [10] and the Javadoc here [11]. [9] https://jdk.java.net/21/ [10] https://jdk.java.net/21/release-notes [11] https://download.java.net/java/early_access/jdk21/docs/api/ ## JDK 22 Early-Access Builds The JDK 22 early-access builds 8 are available [12], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [13]. [12] https://openjdk.org/projects/jdk/22 [13] https://jdk.java.net/22/release-notes ### Changes in recent JDK 22 builds (b2-b8) that may be of interest: Note that this is only a curated list of changes, make sure to check [14] for additional changes. - JDK-8309882: LinkedHashMap adds an errant serializable field [Reported by Eclipse Collections] - JDK-8312366: [arm32] Build crashes after JDK-8310233 [Reported by JaCoCo] - JDK-8167252: Some of Charset.availableCharsets() does not contain itself [Reported by IntelliJ] - JDK-8310061: Note if implicit annotation processing is being used - JDK-8308591: JLine as the default Console provider - JDK-8312019: Simplify and modernize java.util.BitSet.equals - JDK-8308593: Add KEEPALIVE Extended Socket Options Support for Windows - JDK-8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6 - JDK-6983726: Reimplement MethodHandleProxies.asInterfaceInstance - JDK-8281658: Add a security category to the java -XshowSettings option - JDK-8310201: Reduce verbose locale output in -XshowSettings launcher option - JDK-8295894: Remove SECOM certificate that is expiring in September 2023 - JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly - JDK-8282797: CompileCommand parsing errors should exit VM - JDK-8305104: Remove the old core reflection implementation - JDK-8310460: Remove jdeps -profile option - JDK-8309032: jpackage does not work for module projects unless --module-path is specified - JDK-8291065: Creating a VarHandle for a static field triggers class initialization - JDK-8312072: Deprecate for removal the -Xnoagent option - JDK-8304885: Reuse stale data to improve DNS resolver resiliency= - JDK-8310047: Add UTF-32 based Charsets into StandardCharsets - JDK-8302483: Enhance ZIP performance - JDK-8300596: New System Property to Control the Maximum Size of Signature Files - JDK-8294323: ASLR Support for CDS Archive - JDK-8311038: Incorrect exhaustivity computation - JDK-8312089: Simplify and modernize equals, hashCode, and compareTo in java.nio… - JDK-8311188: Simplify and modernize equals and hashCode in java.text - JDK-8300285: Enhance TLS data handling - JDK-8302475: Enhance HTTP client file downloading [14] https://github.com/openjdk/jdk/compare/jdk-22%2B1...jdk-22%2B8 ## JavaFX Early-Access Builds These are early access builds of the JavaFX 21 Runtime, built from openjdk/jfx [15]. They enable JavaFX application developers to build and test their applications with JavaFX 21 on JDK 21. The latest JavaFX 21 early-access builds (build 27 - 2023/7/21) are now available [16] with their related Javadoc [17]. Moreover, the initial JavaFX 22 early-access builds [18] are now also available. These early-access builds are provided under the GNU General Public License, version 2, with the Classpath Exception. Please send feedback to the openjfx-dev mailing list [19]. [15] https://github.com/openjdk/jfx [16] https://jdk.java.net/javafx21/ [17] https://download.java.net/java/early_access/javafx21/docs/api/overview-summary.html [18] https://jdk.java.net/javafx22/ [19] http://mail.openjdk.org/mailman/listinfo/openjfx-dev ## Topics of Interest: Foreign Function & Memory API Summer Update https://mail.openjdk.org/pipermail/panama-dev/2023-July/019510.html What's Arriving for JFR in JDK 21 - Inside Java Newscast #53 https://inside.java/2023/07/20/java-21-jfr/ Java's Startup Booster: CDS - Stack Walker https://inside.java/2023/07/11/javas-startup-booster-cds/ ## July 2023 Critical Patch Update Released As part of the July 2023 CPU, Oracle released OpenJDK 20.0.2, JavaFX 20.0.2, JDK 20.0.2, JDK 17.0.8 LTS, JDK 11.0.20 LTS, JDK 8u381, as well as JDK 8u381-perf. ~ We still have a few days before JDK 21 enters into the Release Candidate phase so please make sure to test your projects on the latest early-access builds and report any issue. PS: Make sure to enjoy the summer and recharge your batteries! 😎 --David |
From: David D. <dav...@or...> - 2023-06-14 10:28:47
|
Welcome to the OpenJDK Quality Outreach June update. JDK 21 has entered Rampdown Phase One (RDP1) [1], which means that the main-line has been forked into a dedicated JDK 21 stabilization repository. At this point, the overall JDK 21 feature set is frozen. Any changes pushed to the main line are now bound for JDK 22. The stabilization repository is open for select bug fixes and, with approval, late low-risk enhancements per the JDK Release Process [2]. And in contrast to past practice, most stabilization changes will be integrated via backports from the main-line repository [1]. The coming weeks are critical to identify and resolve as many issues as possible, i.e. before JDK 21 enters the Release Candidates phase in August. We need to make sure those few weeks are leveraged to test both existing code running on top of JDK 21 and new JDK 21 features. The heads-up below illustrates the importance and the benefits of doing such tests. [1] https://mail.openjdk.org/pipermail/jdk-dev/2023-June/007911.html [2] https://openjdk.org/jeps/3#Integrating-fixes-and-enhancements ## Heads-up: On the Importance of Doing Tests With OpenJDK Early-Access Builds The following is a recent example that demonstrates the benefits of testing an existing codebase using the OpenJDK early-access builds. Last month, we published a heads-up focused on Sequenced Collections [3] as they could potentially introduce some incompatibilities. The Eclipse Collections (EC) team did their homework and sure enough, EC was impacted as it was now throwing compilation errors with JDK 21 early-access builds. The EC team was able to quickly fix those compilation errors, i.e., it was mainly about adding overriding default methods. But once those compilation errors were fixed, and this is where it gets interesting, another issue surfaced. This time, the problem was related to LinkedHashMap serialization. After some investigation, the EC team identified that second issue as JDK one and a JBS ticket was opened. That issue was then confirmed as a JDK regression and was promptly fixed in OpenJDK main-line, i.e., JDK 22. The fix was then backported into the JDK 21 stabilization repository. This EC pull request [4] provides additional details. In this case, the JDK fix was easy but it is nevertheless the kind of issues that could have easily fallen through the crack if the EC team wasn’t pro-actively testing with OpenJDK early-access builds. The EC issue would have then surfaced after the JDK 21 General Availability... and who knows when the JDK LinkedHashMap serialization regression would have been fixed? TL; DR; Testing an existing codebase with OpenJDK early-access builds is a win-win situation. It helps the project itself, Eclipse Collections in this case, as it enables developers to identify issues in their own codebase before that new JDK version is Generally Available. It helps the JDK too as any JDK issue detected early enough in the development cycle gives the OpenJDK engineers a chance to address it before the General Availability of that new JDK version. And last but not least, having a robust JDK is also a win for the Java community at large. And thanks to the Eclipse Collections team and especially to Donald Raab for helping to make the Java platform more robust! [3] https://inside.java/2023/05/12/quality-heads-up/ [4] https://github.com/eclipse/eclipse-collections/pull/1461 ## JDK 21 Early-Access Builds JDK 21 Early-Access builds 26 are now available [5], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [6] and the javadocs here [7]. ### JEPs integrated into JDK 21: - 430: String Templates (Preview) - 431: Sequenced Collections - 439: Generational ZGC - 440: Record Patterns - 441: Pattern Matching for switch - 442: Foreign Function & Memory API (3rd Preview) - 443: Unnamed Patterns and Variables (Preview) - 444: Virtual Threads - 445: Unnamed Classes and Instance Main Methods (Preview) - 446: Scoped Values (Preview) - 448: Vector API (6th Incubator) - 449: Deprecate the Windows 32-bit x86 Port for Removal - 451: Prepare to Disallow the Dynamic Loading of Agents - 452: Key Encapsulation Mechanism API - 453: Structured Concurrency (Preview) It is worth mentioning that JEP 404 (Generational Shenandoah - Experimental) has been proposed to drop from JDK 21 [8]. ### Changes in recent JDK 21 builds (b23-b26) that may be of interest: Note that this is only a curated list of changes, make sure to check [9] for additional changes. - JDK-8298127: HSS/LMS Signature Verification - JDK-8305972: Update XML Security for Java to 3.0.2 - JDK-8308244: Installation of jdk rpm corrupts alternatives - JDK-8307990: jspawnhelper must close its writing side of a pipe before reading from it - JDK-8303465: KeyStore of type KeychainStore, provider Apple does not show all trusted certificates - JDK-8303530: Redefine JAXP Configuration File - JDK-8307478: Implementation of Prepare to Restrict The Dynamic Loading of Agents - JDK-8301553: Support Password-Based Cryptography in SunPKCS11 - JDK-8308341: JNI_GetCreatedJavaVMs returns a partially initialized JVM - JDK-8308108: Support Unicode extension for collation settings - JDK-8305972: Update XML Security for Java to 3.0.2 - JDK-8305091: Change ChaCha20 cipher init behavior to match AES-GCM - JDK-8179502: Enhance OCSP, CRL and Certificate Fetch Timeouts - JDK-8307547: Support variant collations - JDK-8308876: JFR: Deserialization of EventTypeInfo uses incorrect attribute names - JDK-8297878: KEM: Implementation - JDK-8308819: add JDWP and JDI virtual thread support for ThreadReference.ForceEarlyReturn - JDK-8307779: Relax the java.awt.Robot specification - JDK-8306703: JFR: Summary views - JDK-8309146: extend JDI StackFrame.setValue() and JDWP StackFrame.setValues minimal support for virtual threads - JDK-8307840: SequencedMap view method specification and implementation adjustments - JDK-8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading - JDK-8306431: File.listRoots method description should be re-examined [5] https://jdk.java.net/21/ [6] https://jdk.java.net/21/release-notes [7] https://download.java.net/java/early_access/jdk21/docs/api/ [8] https://mail.openjdk.org/pipermail/jdk-dev/2023-June/007910.html [9] https://github.com/openjdk/jdk/compare/jdk-21+23...jdk-21+26 ## JDK 22 Early-Access Builds Given that JDK 21 is now in Rampdown Phase, the initial JDK 22 Early-Access builds are now also available [10]. Those EA builds are provided under the GNU General Public License v2, with the Classpath Exception. [10] https://jdk.java.net/22/ ## JavaFX 21 Early-Access Builds These are early access builds of the JavaFX 21 Runtime, built from openjdk/jfx [11]. They are intended to allow JavaFX application developers to build and test their applications with JavaFX 21 on JDK 21. The latest builds 21 (2023/6/8) are now available [12]. These early-access builds are provided under the GNU General Public License, version 2, with the Classpath Exception. Feedback should be reported to the openjfx-dev mailing list [13]. [11] https://github.com/openjdk/jfx [12] https://jdk.java.net/javafx21/ [13] http://mail.openjdk.org/mailman/listinfo/openjfx-dev ## Topics of Interest All That is in Java 21?! https://inside.java/2023/06/08/newscast-50/ Script Java Easily in 21 and Beyond https://inside.java/2023/05/25/newscast-49/ New JFR `view` Command https://egahlin.github.io/2023/05/30/views.html Patterns: Exhaustiveness, Unconditionality, and Remainder https://openjdk.org/projects/amber/design-notes/patterns/exhaustiveness Design Document on Nullability and Value Types https://mail.openjdk.org/pipermail/valhalla-spec-observers/2023-May/002243.html JFR: Java's Observability & Monitoring Framework - Stack Walker #2 https://inside.java/2023/05/14/stackwalker-02/ ## JDK Crypto Roadmap Update Oracle updated the JDK Cryptographic Roadmap to announce a change, with the Oct CPU (2023-10-17), of the priority order used by JDK 8 and JDK 11 when negotiating cipher suites to use on TLS connections. Please check the JDK Cryptographic Roadmap page [14] for more details. [14] https://www.java.com/en/jre-jdk-cryptoroadmap.html ~ Please, make sure to test your projects using the JDK 21 EA builds as we still have time to fix potential issues. And thanks for participating in the OpenJDK Quality Outreach program! --David |
From: Andreas D. <and...@pm...> - 2023-05-30 19:07:44
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.0.0-rc3 * Documentation: https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/ 30-May-2023 - 7.0.0-rc3 We're excited to bring you the next major version of PMD! Since this is a big release, we provide here only a concise version of the release notes. We prepared a separate page with the full Detailed Release Notes for PMD 7.0.0 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. *ℹ️ Release Candidates* PMD 7.0.0 is finally almost ready. In order to gather feedback, we are going to ship a couple of release candidates. These are officially available on GitHub and Maven Central and can be used as usual (e.g. as a dependency). We encourage you to try out the new features, but keep in mind that we may introduce API breaking changes between the release candidates. It should be stable enough if you don't use custom rules. We have still some tasks planned for the next release candidates. You can see the progress in PMD 7 Tracking Issue #3898 <https://github.com/pmd/pmd/issues/3898>. If you find any problem or difficulty while updating from PMD 6, please provide feedback via our issue tracker <https://github.com/pmd/pmd/issues/new/choose>. That way we can improve the experience for all. Table Of Contents * Changes since 7.0.0-rc2 <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#changes-since-7.0.0-rc2> o New CPD report format cpdhtml-v2.xslt <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new-cpd-report-format-cpdhtml-v2.xslt> o Fixed issues <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#fixed-issues> o API Changes <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#api-changes> o External Contributions <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#external-contributions> * 🚀 Major Features and Enhancements <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#🚀-major-features-and-enhancements> o New official logo <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new-official-logo> o Revamped Java module <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#revamped-java-module> o Revamped Command Line Interface <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#revamped-command-line-interface> o Full Antlr support <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#full-antlr-support> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#updated-pmd-designer> o New CPD report format cpdhtml-v2.xslt <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new-cpd-report-format-cpdhtml-v2.xslt> * 🎉 Language Related Changes <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#🎉-language-related-changes> o New: Swift support <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new:-swift-support> o New: Kotlin support (experimental) <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new:-kotlin-support-(experimental)> o New: CPD support for TypeScript <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new:-cpd-support-for-typescript> o New: CPD support for Julia <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new:-cpd-support-for-julia> o New: CPD support for Coco <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new:-cpd-support-for-coco> o Changed: JavaScript support <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#changed:-javascript-support> o Changed: Language versions <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#changed:-language-versions> o Changed: CPP can now ignore identifiers in sequences (CPD) <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#changed:-cpp-can-now-ignore-identifiers-in-sequences-(cpd)> * 🌟 New and changed rules <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#🌟-new-and-changed-rules> o New Rules <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#new-rules> o Changed Rules <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#changed-rules> o Removed Rules <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#removed-rules> * 🚨 API <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#🚨-api> * 💥 Compatibility and migration notes <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#💥-compatibility-and-migration-notes> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#🐛-fixed-issues> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#✨-external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2023/05/pmd-700-rc3-30-may-2023-released/#📈-stats> Changes since 7.0.0-rc2 This section lists the most important changes from the last release candidate. The remaining section describes the complete release notes for 7.0.0. New CPD report format cpdhtml-v2.xslt 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. See the example report <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/report-examples/cpdhtml-v2.html>. Fixed issues * miscellaneous * #4460 <https://github.com/pmd/pmd/pull/4460>: Fix assembly-plugin warnings * core * #4425 <https://github.com/pmd/pmd/pull/4425>: [core] Replace TextFile::pathId * #4454 <https://github.com/pmd/pmd/issues/4454>: [core] "Unknown option: '-min'" but is referenced in documentation * java-bestpractices * #4433 <https://github.com/pmd/pmd/issues/4433>: [java] [7.0-rc1] ReplaceHashtableWithMap on java.util.Properties * #4492 <https://github.com/pmd/pmd/issues/4492>: [java] GuardLogStatement gives false positive when argument is a Java method reference * #4503 <https://github.com/pmd/pmd/issues/4503>: [java] JUnitTestsShouldIncludeAssert: false negative with TestNG * java-codestyle * #4268 <https://github.com/pmd/pmd/issues/4268>: [java] CommentDefaultAccessModifier: false positive with TestNG annotations * #4432 <https://github.com/pmd/pmd/issues/4432>: [java] [7.0-rc1] UnnecessaryImport - Unused static import is being used * #4455 <https://github.com/pmd/pmd/issues/4455>: [java] FieldNamingConventions: false positive with lombok's @UtilityClass * #4557 <https://github.com/pmd/pmd/issues/4557>: [java] UnnecessaryImport FP with static imports of overloaded methods * java-design * #4434 <https://github.com/pmd/pmd/issues/4434>: [java] [7.0-rc1] ExceptionAsFlowControl when simply propagating * #4456 <https://github.com/pmd/pmd/issues/4456>: [java] FinalFieldCouldBeStatic: false positive with lombok's @UtilityClass * #4549 <https://github.com/pmd/pmd/pull/4549>: [java] Make LawOfDemeter results deterministic * java-errorprone * #4063 <https://github.com/pmd/pmd/issues/4063>: [java] AvoidBranchingStatementAsLastInLoop: False-negative about try/finally block * #4457 <https://github.com/pmd/pmd/issues/4457>: [java] OverrideBothEqualsAndHashcode: false negative with anonymous classes * #4510 <https://github.com/pmd/pmd/issues/4510>: [java] ConstructorCallsOverridableMethod: false positive with lombok's @Value * #4546 <https://github.com/pmd/pmd/issues/4546>: [java] OverrideBothEqualsAndHashCode ignores records * java-performance * #4458 <https://github.com/pmd/pmd/issues/4458>: [java] RedundantFieldInitializer: false positive with lombok's @Value API Changes * The following previously deprecated classes have been removed: * pmd-core o |net.sourceforge.pmd.PMD| o |net.sourceforge.pmd.cli.PMDCommandLineInterface| o |net.sourceforge.pmd.cli.PMDParameters| o |net.sourceforge.pmd.cli.PmdParametersParseResult| * The asset filenames of PMD on GitHub Releases <https://github.com/pmd/pmd/releases> are now |pmd-dist-<version>-bin.zip|, |pmd-dist-<version>-src.zip| and |pmd-dist-<version>-doc.zip|. Keep that in mind, if you have an automated download script. The structure inside the ZIP files stay the same, e.g. we still provide inside the binary distribution ZIP file the base directory |pmd-bin-<version>|. * The CLI option |--stress| (or |-stress|) has been removed without replacement. * The CLI option |--minimum-priority| 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. * Replaced |RuleViolation::getFilename| with new |RuleViolation#getFileId| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/RuleViolation.html#getFileId()>, that returns a |FileId| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/lang/document/FileId.html#>. This is an identifier for a |TextFile| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/lang/document/TextFile.html#> and could represent a path name. This allows to have a separate display name, e.g. renderers use |FileNameRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/reporting/FileNameRenderer.html#> to either display the full path name or a relative path name (see |Renderer#setFileNameRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/renderers/Renderer.html#setFileNameRenderer(net.sourceforge.pmd.reporting.FileNameRenderer)> and |ConfigurableFileNameRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/reporting/ConfigurableFileNameRenderer.html#>). Many places where we used a simple String for a path-like name before have been adapted to use the new |FileId| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/lang/document/FileId.html#>. See PR #4425 <https://github.com/pmd/pmd/pull/4425> for details. External Contributions * #4426 <https://github.com/pmd/pmd/pull/4426>: [cpd] New XML to HTML XLST report format for PMD CPD - mohan-chinnappan-n <https://github.com/mohan-chinnappan-n> (@mohan-chinnappan-n) * #4431 <https://github.com/pmd/pmd/pull/4431>: [coco] CPD: Coco support for code duplication detection - Wener <https://github.com/wener-tiobe> (@wener-tiobe) * #4470 <https://github.com/pmd/pmd/pull/4470>: [cpp] CPD: Added strings as literal and ignore identifiers in sequences - Wener <https://github.com/wener-tiobe> (@wener-tiobe) * #4507 <https://github.com/pmd/pmd/pull/4507>: [java] Fix #4503: A false negative about JUnitTestsShouldIncludeAssert and testng - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4533 <https://github.com/pmd/pmd/pull/4533>: [java] Fix #4063: False-negative about try/catch block in Loop - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4536 <https://github.com/pmd/pmd/pull/4536>: [java] Fix #4268: CommentDefaultAccessModifier - false positive with TestNG's @Test annotation - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4537 <https://github.com/pmd/pmd/pull/4537>: [java] Fix #4455: A false positive about FieldNamingConventions and UtilityClass - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4538 <https://github.com/pmd/pmd/pull/4538>: [java] Fix #4456: A false positive about FinalFieldCouldBeStatic and UtilityClass - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4540 <https://github.com/pmd/pmd/pull/4540>: [java] Fix #4457: false negative about OverrideBothEqualsAndHashcode - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4541 <https://github.com/pmd/pmd/pull/4541>: [java] Fix #4458: A false positive about RedundantFieldInitializer and @Value - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4542 <https://github.com/pmd/pmd/pull/4542>: [java] Fix #4510: A false positive about ConstructorCallsOverridableMethod and @Value - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4553 <https://github.com/pmd/pmd/pull/4553>: [java] Fix #4492: GuardLogStatement gives false positive when argument is a Java method reference - Anastasiia Koba <https://github.com/anastasiia-koba> (@anastasiia-koba) 🚀 Major Features and Enhancements New official logo The new official logo of PMD: New PMD Logo Revamped Java module * Java grammar substantially refactored - more correct regarding the Java Language Specification (JLS) * Built-in rules have been upgraded for the changed AST * Rewritten type resolution framework and symbol table correctly implements the JLS * AST exposes more semantic information (method calls, field accesses) For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. Contributors: Clément Fournier <https://github.com/oowekyala> (@oowekyala <https://sourceforge.net/u/oowekyala/>), Andreas Dangel <https://github.com/adangel> (@adangel <https://sourceforge.net/u/adangel/>), Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Revamped Command Line Interface * unified and consistent Command Line Interface for both Linux/Unix and Windows across our different utilities * single script |pmd| (|pmd.bat| for Windows) to launch the different utilities: o |pmd check| to run PMD rules and analyze a project o |pmd cpd| to run CPD (copy paste detector) o |pmd designer| to run the PMD Rule Designer * progress bar support for |pmd check| * shell completion Demo For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. Contributors: Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Full Antlr support * Antlr <https://www.antlr.org/> based grammars can now be used to build full-fledged PMD rules. * Previously, Antlr grammar could only be used for CPD * New supported languages: Swift and Kotlin For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) 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-designer/releases/tag/7.0.0-rc1>. New CPD report format cpdhtml-v2.xslt 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. See the example report <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/report-examples/cpdhtml-v2.html>. 🎉 Language Related Changes Note that this is just a concise listing of the highlight. For more information on the languages, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. New: Swift support * use PMD to analyze Swift code with PMD rules * initially 4 built-in rules Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) New: Kotlin support (experimental) * use PMD to analyze Kotlin code with PMD rules * Support for Kotlin 1.8 grammar * initially 2 built-in rules New: CPD support for TypeScript Thanks to a contribution, CPD now supports the TypeScript language. It is shipped with the rest of the JavaScript support in the module |pmd-javascript|. Contributors: Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/>) New: CPD support for Julia Thanks to a contribution, CPD now supports the Julia language. It is shipped in the new module |pmd-julia|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) New: CPD support for Coco 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 |pmd-coco|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) Changed: JavaScript support * latest version supports ES6 and also some new constructs (see Rhino <https://github.com/mozilla/rhino>]) * comments are retained Changed: Language versions * more predefined language versions for each supported language * can be used to limit rule execution for specific versions only with |minimumLanguageVersion| and |maximumLanguageVersion| attributes. Changed: CPP can now ignore identifiers in sequences (CPD) * new command line option for CPD: |--ignore-sequences|. * This option is used for CPP only: with the already existing option |--ignore-literal-sequences|, only literals were ignored. The new option additional ignores identifiers as well in sequences. * See PR #4470 <https://github.com/pmd/pmd/pull/4470> for details. 🌟 New and changed rules New Rules *Apex* * |UnusedMethod| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#unusedmethod> finds unused methods in your code. *Java* * |UnnecessaryBoxing| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_codestyle.html#unnecessaryboxing> reports boxing and unboxing conversions that may be made implicit. *Kotlin* * |FunctionNameTooShort| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_kotlin_bestpractices.html#functionnametooshort> * |OverrideBothEqualsAndHashcode| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode> *Swift* * |ProhibitedInterfaceBuilder| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder> * |UnavailableFunction| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_swift_bestpractices.html#unavailablefunction> * |ForceCast| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_swift_errorprone.html#forcecast> * |ForceTry| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_swift_errorprone.html#forcetry> Changed Rules *General changes* * All statistical rules (like ExcessiveClassLength, ExcessiveParameterList) have been simplified and unified. The properties |topscore| and |sigma| have been removed. The property |minimum| 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 (vm): o Apex: |ExcessiveClassLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#excessiveclasslength>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#excessiveparameterlist>, |ExcessivePublicCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#excessivepubliccount>, |NcssConstructorCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#ncssconstructorcount>, |NcssMethodCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#ncssmethodcount>, |NcssTypeCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_apex_design.html#ncsstypecount> o Java: |ExcessiveImports| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#excessiveimports>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#excessiveparameterlist>, |ExcessivePublicCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#excessivepubliccount>, |SwitchDensity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#switchdensity> o PLSQL: |ExcessiveMethodLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#excessivemethodlength>, |ExcessiveObjectLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#excessiveobjectlength>, |ExcessivePackageBodyLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#excessivepackagebodylength>, |ExcessivePackageSpecificationLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#excessivepackagespecificationlength>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#excessiveparameterlist>, |ExcessiveTypeLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#excessivetypelength>, |NcssMethodCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#ncssmethodcount>, |NcssObjectCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#ncssobjectcount>, |NPathComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#npathcomplexity> o VM: |ExcessiveTemplateLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_vm_design.html#excessivetemplatelength> * The general property |violationSuppressXPath| which is available for all rules to suppress warnings <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_userdocs_suppressing_warnings.html> 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 |violationSuppressXPath| properties. *Apex General changes* * The properties |cc_categories|, |cc_remediation_points_multiplier|, |cc_block_highlighting| have been removed from all rules. These properties have been deprecated since PMD 6.13.0. See issue #1648 <https://github.com/pmd/pmd/issues/1648> for more details. *Java General changes* * 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. |CognitiveComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#cognitivecomplexity>. The report location is controlled by the overrides of the method |getReportLocation| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc3/net/sourceforge/pmd/lang/ast/Node.html#getReportLocation()> in different node types. See issue #4439 <https://github.com/pmd/pmd/issues/4439> and issue #730 <https://github.com/pmd/pmd/issues/730> for more details. *Java Best Practices* * |ArrayIsStoredDirectly| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_bestpractices.html#arrayisstoreddirectly>: Violations are now reported on the assignment and not anymore on the formal parameter. The reported line numbers will probably move. * |AvoidReassigningLoopVariables| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_bestpractices.html#avoidreassigningloopvariables>: This rule might not report anymore all reassignments of the control variable in for-loops when the property |forReassign| is set to |skip|. See issue #4500 <https://github.com/pmd/pmd/issues/4500> for more details. * |LooseCoupling| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_bestpractices.html#loosecoupling>: The rule has a new property to allow some types to be coupled to (|allowedTypes|). * |UnusedLocalVariable| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_bestpractices.html#unusedlocalvariable>: This rule has some important false-negatives fixed and finds many more cases now. For details see issues #2130 <https://github.com/pmd/pmd/issues/2130>, #4516 <https://github.com/pmd/pmd/issues/4516>, and #4517 <https://github.com/pmd/pmd/issues/4517>. *Java Codestyle* * |MethodNamingConventions| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_codestyle.html#methodnamingconventions>: The property |checkNativeMethods| has been removed. The property was deprecated since PMD 6.3.0. Use the property |nativePattern| to control whether native methods should be considered or not. * |ShortVariable| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_codestyle.html#shortvariable>: This rule now also reports short enum constant names. * |UseDiamondOperator| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_codestyle.html#usediamondoperator>: The property |java7Compatibility| has been removed. The rule now handles Java 7 properly without a property. * |UnnecessaryFullyQualifiedName| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname>: 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. * |UselessParentheses| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_codestyle.html#uselessparentheses>: The rule has two new properties which control how strict the rule should be applied. With |ignoreClarifying| (default: true) parentheses that are strictly speaking not necessary are allowed, if they separate expressions of different precedence. The other property |ignoreBalancing| (default: true) is similar, in that it allows parentheses that help reading and understanding the expressions. *Java Design* * |CyclomaticComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#cyclomaticcomplexity>: The property |reportLevel| 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 |classReportLevel| and |methodReportLevel| instead. * |ImmutableField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#immutablefield>: The property |ignoredAnnotations| has been removed. The property was deprecated since PMD 6.52.0. * |LawOfDemeter| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#lawofdemeter>: The rule has a new property |trustRadius|. This defines the maximum degree of trusted data. The default of 1 is the most restrictive. * |NPathComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#npathcomplexity>: The property |minimum| has been removed. It was deprecated since PMD 6.0.0. Use the property |reportLevel| instead. * |SingularField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#singularfield>: The properties |checkInnerClasses| and |disallowNotAssignment| have been removed. The rule is now more precise and will check these cases properly. * |UseUtilityClass| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_design.html#useutilityclass>: The property |ignoredAnnotations| has been removed. *Java Documentation* * |CommentContent| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_documentation.html#commentcontent>: The properties |caseSensitive| and |disallowedTerms| are removed. The new property |forbiddenRegex| can be used now to define the disallowed terms with a single regular expression. * |CommentRequired| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_documentation.html#commentrequired>: o Overridden methods are now detected even without the |@Override| annotation. This is relevant for the property |methodWithOverrideCommentRequirement|. See also pull request #3757 <https://github.com/pmd/pmd/pull/3757>. o Elements in annotation types are now detected as well. This might lead to an increased number of violations for missing public method comments. * |CommentSize| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_documentation.html#commentsize>: When determining the line-length of a comment, the leading comment prefix markers (e.g. |*| or |//|) are ignored and don't add up to the line-length. See also pull request #4369 <https://github.com/pmd/pmd/pull/4369>. *Java Error Prone* * |AvoidDuplicateLiterals| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_errorprone.html#avoidduplicateliterals>: The property |exceptionfile| has been removed. The property was deprecated since PMD 6.10.0. Use the property |exceptionList| instead. * |DontImportSun| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_errorprone.html#dontimportsun>: |sun.misc.Signal| is not special-cased anymore. * |EmptyCatchBlock| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_errorprone.html#emptycatchblock>: |CloneNotSupportedException| and |InterruptedException| are not special-cased anymore. Rename the exception parameter to |ignored| to ignore them. * |ImplicitSwitchFallThrough| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_java_errorprone.html#implicitswitchfallthrough>: 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. Removed Rules Many rules, that were previously deprecated have been finally removed. See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html> for the complete list. 🚨 API 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. Also, there are some improvement and changes in different areas. For the detailed description of the changes listed here, see Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. * Miscellaneous smaller changes and cleanups * XPath 3.1 support for XPath-based rules * Node stream API for AST traversal * Metrics framework * Testing framework * Language Lifecycle and Language Properties 💥 Compatibility and migration notes See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_release_notes_pmd7.html>. 🐛 Fixed Issues * miscellaneous o #881 <https://github.com/pmd/pmd/issues/881>: [all] Breaking API changes for 7.0.0 o #896 <https://github.com/pmd/pmd/issues/896>: [all] Use slf4j o #1431 <https://github.com/pmd/pmd/pull/1431>: [ui] Remove old GUI applications (designerold, bgastviewer) o #1451 <https://github.com/pmd/pmd/issues/1451>: [core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string o #2496 <https://github.com/pmd/pmd/issues/2496>: Update PMD 7 Logo on landing page o #2497 <https://github.com/pmd/pmd/issues/2497>: PMD 7 Logo page o #2498 <https://github.com/pmd/pmd/issues/2498>: Update PMD 7 Logo in documentation o #3797 <https://github.com/pmd/pmd/issues/3797>: [all] Use JUnit5 o #4462 <https://github.com/pmd/pmd/issues/4462>: Provide Software Bill of Materials (SBOM) o #4460 <https://github.com/pmd/pmd/pull/4460>: Fix assembly-plugin warnings * ant o #4080 <https://github.com/pmd/pmd/issues/4080>: [ant] Split off Ant integration into a new submodule * core o #880 <https://github.com/pmd/pmd/issues/880>: [core] Make visitors generic o #1622 <https://github.com/pmd/pmd/pull/1622>: [core] NodeStream API o #1687 <https://github.com/pmd/pmd/issues/1687>: [core] Deprecate and Remove XPath 1.0 support o #1785 <https://github.com/pmd/pmd/issues/1785>: [core] Allow abstract node types to be valid rulechain visits o #1825 <https://github.com/pmd/pmd/pull/1825>: [core] Support NoAttribute for XPath o #2038 <https://github.com/pmd/pmd/issues/2038>: [core] Remove DCD o #2218 <https://github.com/pmd/pmd/issues/2218>: [core] |isFindBoundary| should not be an attribute o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #2239 <https://github.com/pmd/pmd/issues/2239>: [core] Merging Javacc build scripts o #2500 <https://github.com/pmd/pmd/issues/2500>: [core] Clarify API for ANTLR based languages o #2518 <https://github.com/pmd/pmd/issues/2518>: [core] Language properties o #2602 <https://github.com/pmd/pmd/issues/2602>: [core] Remove ParserOptions o #2614 <https://github.com/pmd/pmd/pull/2614>: [core] Upgrade Saxon, add XPath 3.1, remove Jaxen o #2696 <https://github.com/pmd/pmd/pull/2696>: [core] Remove DFA o #2821 <https://github.com/pmd/pmd/issues/2821>: [core] Rule processing error filenames are missing paths o #2873 <https://github.com/pmd/pmd/issues/2873>: [core] Utility classes in pmd 7 o #2885 <https://github.com/pmd/pmd/issues/2885>: [core] Error recovery mode o #3203 <https://github.com/pmd/pmd/issues/3203>: [core] Replace RuleViolationFactory implementations with ViolationDecorator o #3692 <https://github.com/pmd/pmd/pull/3692>: [core] Analysis listeners o #3782 <https://github.com/pmd/pmd/issues/3782>: [core] Language lifecycle o #3815 <https://github.com/pmd/pmd/issues/3815>: [core] Update Saxon HE to 10.7 o #3893 <https://github.com/pmd/pmd/pull/3893>: [core] Text documents o #3902 <https://github.com/pmd/pmd/issues/3902>: [core] Violation decorators o #3918 <https://github.com/pmd/pmd/issues/3918>: [core] Make LanguageRegistry non static o #3922 <https://github.com/pmd/pmd/pull/3922>: [core] Better error reporting for the ruleset parser o #4035 <https://github.com/pmd/pmd/issues/4035>: [core] ConcurrentModificationException in DefaultRuleViolationFactory o #4120 <https://github.com/pmd/pmd/issues/4120>: [core] Explicitly name all language versions o #4353 <https://github.com/pmd/pmd/pull/4353>: [core] Micro optimizations for Node API o #4365 <https://github.com/pmd/pmd/pull/4365>: [core] Improve benchmarking o #4420 <https://github.com/pmd/pmd/pull/4420>: [core] Remove PMD.EOL o #4425 <https://github.com/pmd/pmd/pull/4425>: [core] Replace TextFile::pathId o #4454 <https://github.com/pmd/pmd/issues/4454>: [core] "Unknown option: '-min'" but is referenced in documentation * cli o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #3828 <https://github.com/pmd/pmd/issues/3828>: [core] Progress reporting o #4079 <https://github.com/pmd/pmd/issues/4079>: [cli] Split off CLI implementation into a pmd-cli submodule o #4482 <https://github.com/pmd/pmd/issues/4482>: [cli] pmd.bat can only be executed once o #4484 <https://github.com/pmd/pmd/issues/4484>: [cli] ast-dump with no properties produce an NPE * doc o #2501 <https://github.com/pmd/pmd/issues/2501>: [doc] Verify ANTLR Documentation o #4438 <https://github.com/pmd/pmd/issues/4438>: [doc] Documentation links in VS Code are outdated * testing o #2435 <https://github.com/pmd/pmd/issues/2435>: [test] Remove duplicated Dummy language module o #4234 <https://github.com/pmd/pmd/issues/4234>: [test] Tests that change the logging level do not work Language specific fixes: * apex o #1937 <https://github.com/pmd/pmd/issues/1937>: [apex] Apex should only have a single RootNode o #1648 <https://github.com/pmd/pmd/issues/1648>: [apex,vf] Remove CodeClimate dependency o #1750 <https://github.com/pmd/pmd/pull/1750>: [apex] Remove apex statistical rules o #2836 <https://github.com/pmd/pmd/pull/2836>: [apex] Remove Apex ProjectMirror o #4427 <https://github.com/pmd/pmd/issues/4427>: [apex] ApexBadCrypto test failing to detect inline code * apex-design o #2667 <https://github.com/pmd/pmd/issues/2667>: [apex] Integrate nawforce/ApexLink to build robust Unused rule o #4509 <https://github.com/pmd/pmd/issues/4509>: [apex] ExcessivePublicCount doesn't consider inner classes correctly * java o #520 <https://github.com/pmd/pmd/issues/520>: [java] Allow |@SuppressWarnings| with constants instead of literals o #864 <https://github.com/pmd/pmd/issues/864>: [java] Similar/duplicated implementations for determining FQCN o #905 <https://github.com/pmd/pmd/issues/905>: [java] Add new node for anonymous class declaration o #910 <https://github.com/pmd/pmd/issues/910>: [java] AST inconsistency between primitive and reference type arrays o #997 <https://github.com/pmd/pmd/issues/997>: [java] Java8 parsing corner case with annotated array types o #998 <https://github.com/pmd/pmd/issues/998>: [java] AST inconsistencies around FormalParameter o #1019 <https://github.com/pmd/pmd/issues/1019>: [java] Breaking Java Grammar changes for PMD 7.0.0 o #1124 <https://github.com/pmd/pmd/issues/1124>: [java] ImmutableList implementation in the qname codebase o #1128 <https://github.com/pmd/pmd/issues/1128>: [java] Improve ASTLocalVariableDeclaration o #1150 <https://github.com/pmd/pmd/issues/1150>: [java] ClassOrInterfaceType AST improvements o #1207 <https://github.com/pmd/pmd/issues/1207>: [java] Resolve explicit types using FQCNs, without hitting the classloader o #1367 <https://github.com/pmd/pmd/issues/1367>: [java] Parsing error on annotated inner class o #1661 <https://github.com/pmd/pmd/issues/1661>: [java] About operator nodes o #2366 <https://github.com/pmd/pmd/pull/2366>: [java] Remove qualified names o #2819 <https://github.com/pmd/pmd/issues/2819>: [java] GLB bugs in pmd 7 o #3642 <https://github.com/pmd/pmd/issues/3642>: [java] Parse error on rare extra dimensions on method return type on annotation methods o #3763 <https://github.com/pmd/pmd/issues/3763>: [java] Ambiguous reference error in valid code o #3749 <https://github.com/pmd/pmd/issues/3749>: [java] Improve |isOverridden| in ASTMethodDeclaration o #3750 <https://github.com/pmd/pmd/issues/3750>: [java] Make symbol table support instanceof pattern bindings o #3752 <https://github.com/pmd/pmd/issues/3752>: [java] Expose annotations in symbol API o #4237 <https://github.com/pmd/pmd/pull/4237>: [java] Cleanup handling of Java comments o #4317 <https://github.com/pmd/pmd/issues/4317>: [java] Some AST nodes should not be TypeNodes o #4359 <https://github.com/pmd/pmd/issues/4359>: [java] Type resolution fails with NPE when the scope is not a type declaration o #4367 <https://github.com/pmd/pmd/issues/4367>: [java] Move testrule TypeResTest into internal o #4383 <https://github.com/pmd/pmd/issues/4383>: [java] IllegalStateException: Object is not an array type! o #4405 <https://github.com/pmd/pmd/issues/4405>: [java] Processing error with ArrayIndexOutOfBoundsException * java-bestpractices o #342 <https://github.com/pmd/pmd/issues/342>: [java] AccessorMethodGeneration: Name clash with another public field not properly handled o #755 <https://github.com/pmd/pmd/issues/755>: [java] AccessorClassGeneration false positive for private constructors o #770 <https://github.com/pmd/pmd/issues/770>: [java] UnusedPrivateMethod yields false positive for counter-variant arguments o #807 <https://github.com/pmd/pmd/issues/807>: [java] AccessorMethodGeneration false positive with overloads o #833 <https://github.com/pmd/pmd/issues/833>: [java] ForLoopCanBeForeach should consider iterating on this o #1189 <https://github.com/pmd/pmd/issues/1189>: [java] UnusedPrivateMethod false positive from inner class via external class o #1205 <https://github.com/pmd/pmd/issues/1205>: [java] Improve ConstantsInInterface message to mention alternatives o #1212 <https://github.com/pmd/pmd/issues/1212>: [java] Don't raise JUnitTestContainsTooManyAsserts on JUnit 5's assertAll o #1422 <https://github.com/pmd/pmd/issues/1422>: [java] JUnitTestsShouldIncludeAssert false positive with inherited @Rule field o #1455 <https://github.com/pmd/pmd/issues/1455>: [java] JUnitTestsShouldIncludeAssert: False positives for assert methods named "check" and "verify" o #1563 <https://github.com/pmd/pmd/issues/1563>: [java] ForLoopCanBeForeach false positive with method call using index variable o #1565 <https://github.com/pmd/pmd/issues/1565>: [java] JUnitAssertionsShouldIncludeMessage false positive with AssertJ o #1747 <https://github.com/pmd/pmd/issues/1747>: [java] PreserveStackTrace false-positive o #1969 <https://github.com/pmd/pmd/issues/1969>: [java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class o #1998 <https://github.com/pmd/pmd/issues/1998>: [java] AccessorClassGeneration false-negative: subclass calls private constructor o #2130 <https://github.com/pmd/pmd/issues/2130>: [java] UnusedLocalVariable: false-negative with array o #2147 <https://github.com/pmd/pmd/issues/2147>: [java] JUnitTestsShouldIncludeAssert - false positives with lambdas and static methods o #2464 <https://github.com/pmd/pmd/issues/2464>: [java] LooseCoupling must ignore class literals: ArrayList.class o #2542 <https://github.com/pmd/pmd/issues/2542>: [java] UseCollectionIsEmpty can not detect the case |foo.bar().size()| o #2650 <https://github.com/pmd/pmd/issues/2650>: [java] UseTryWithResources false positive when AutoCloseable helper used o #2796 <https://github.com/pmd/pmd/issues/2796>: [java] UnusedAssignment false positive with call chains o #2797 <https://github.com/pmd/pmd/issues/2797>: [java] MissingOverride long-standing issues o #2806 <https://github.com/pmd/pmd/issues/2806>: [java] SwitchStmtsShouldHaveDefault false-positive with Java 14 switch non-fallthrough branches o #2822 <https://github.com/pmd/pmd/issues/2822>: [java] LooseCoupling rule: Extend to cover user defined implementations and interfaces o #2843 <https://github.com/pmd/pmd/pull/2843>: [java] Fix UnusedAssignment FP with field accesses o #2882 <https://github.com/pmd/pmd/issues/2882>: [java] UseTryWithResources - false negative for explicit close o #2883 <https://github.com/pmd/pmd/issues/2883>: [java] JUnitAssertionsShouldIncludeMessage false positive with method call o #2890 <https://github.com/pmd/pmd/issues/2890>: [java] UnusedPrivateMethod false positive with generics o #2946 <https://github.com/pmd/pmd/issues/2946>: [java] SwitchStmtsShouldHaveDefault false positive on enum inside enums o #3672 <https://github.com/pmd/pmd/pull/3672>: [java] LooseCoupling - fix false positive with generics o #3675 <https://github.com/pmd/pmd/pull/3675>: [java] MissingOverride - fix false positive with mixing type vars o #3858 <https://github.com/pmd/pmd/issues/3858>: [java] UseCollectionIsEmpty should infer local variable type from method invocation o #4433 <https://github.com/pmd/pmd/issues/4433>: [java] [7.0-rc1] ReplaceHashtableWithMap on java.util.Properties o #4492 <https://github.com/pmd/pmd/issues/4492>: [java] GuardLogStatement gives false positive when argument is a Java method reference o #4503 <https://github.com/pmd/pmd/issues/4503>: [java] JUnitTestsShouldIncludeAssert: false negative with TestNG o #4516 <https://github.com/pmd/pmd/issues/4516>: [java] UnusedLocalVariable: false-negative with try-with-resources o #4517 <https://github.com/pmd/pmd/issues/4517>: [java] UnusedLocalVariable: false-negative with compound assignments o #4518 <https://github.com/pmd/pmd/issues/4518>: [java] UnusedLocalVariable: false-positive with multiple for-loop indices * java-codestyle o #1208 <https://github.com/pmd/pmd/issues/1208>: [java] PrematureDeclaration rule false-positive on variable declared to measure time o #1429 <https://github.com/pmd/pmd/issues/1429>: [java] PrematureDeclaration as result of method call (false positive) o #1480 <https://github.com/pmd/pmd/issues/1480>: [java] IdenticalCatchBranches false positive with return expressions o #1673 <https://github.com/pmd/pmd/issues/1673>: [java] UselessParentheses false positive with conditional operator o #1790 <https://github.com/pmd/pmd/issues/1790>: [java] UnnecessaryFullyQualifiedName false positive with enum constant o #1918 <https://github.com/pmd/pmd/issues/1918>: [java] UselessParentheses false positive with boolean operators o #2134 <https://github.com/pmd/pmd/issues/2134>: [java] PreserveStackTrace not handling |Throwable.addSuppressed(...)| o #2299 <https://github.com/pmd/pmd/issues/2299>: [java] UnnecessaryFullyQualifiedName false positive with similar package name o #2391 <https://github.com/pmd/pmd/issues/2391>: [java] UseDiamondOperator FP when expected type and constructed type have a different parameterization o #2528 <https://github.com/pmd/pmd/issues/2528>: [java] MethodNamingConventions - JUnit 5 method naming not support ParameterizedTest o #2739 <https://github.com/pmd/pmd/issues/2739>: [java] UselessParentheses false positive for string concatenation o #2748 <https://github.com/pmd/pmd/issues/2748>: [java] UnnecessaryCast false positive with unchecked cast o #2973 <https://github.com/pmd/pmd/issues/2973>: [java] New rule: UnnecessaryBoxing o #3195 <https://github.com/pmd/pmd/pull/3195>: [java] Improve rule UnnecessaryReturn to detect more cases o #3218 <https://github.com/pmd/pmd/pull/3218>: [java] Generalize UnnecessaryCast to flag all unnecessary casts o #3221 <https://github.com/pmd/pmd/issues/3221>: [java] PrematureDeclaration false positive for unused variables o #3238 <https://github.com/pmd/pmd/issues/3238>: [java] Improve ExprContext, fix FNs of UnnecessaryCast o #3500 <https://github.com/pmd/pmd/pull/3500>: [java] UnnecessaryBoxing - check for Integer.valueOf(String) calls o #4268 <https://github.com/pmd/pmd/issues/4268>: [java] CommentDefaultAccessModifier: false positive with TestNG annotations o #4273 <https://github.com/pmd/pmd/issues/4273>: [java] CommentDefaultAccessModifier ignoredAnnotations should include "org.junit.jupiter.api.extension.RegisterExtension" by default o #4357 <https://github.com/pmd/pmd/pull/4357>: [java] Fix IllegalStateException in UseDiamondOperator rule o #4432 <https://github.com/pmd/pmd/issues/4432>: [java] [7.0-rc1] UnnecessaryImport - Unused static import is being used o #4455 <https://github.com/pmd/pmd/issues/4455>: [java] FieldNamingConventions: false positive with lombok's @UtilityClass o #4487 <https://github.com/pmd/pmd/issues/4487>: [java] UnnecessaryConstructor: false-positive with @Inject and @Autowired o #4511 <https://github.com/pmd/pmd/issues/4511>: [java] LocalVariableCouldBeFinal shouldn't report unused variables o #4512 <https://github.com/pmd/pmd/issues/4512>: [java] MethodArgumentCouldBeFinal shouldn't report unused parameters o #4557 <https://github.com/pmd/pmd/issues/4557>: [java] UnnecessaryImport FP with static imports of overloaded methods * java-design o #1014 <https://github.com/pmd/pmd/issues/1014>: [java] LawOfDemeter: False positive with lambda expression o #1605 <https://github.com/pmd/pmd/issues/1605>: [java] LawOfDemeter: False positive for standard UTF-8 charset name o #2160 <https://github.com/pmd/pmd/issues/2160>: [java] Issues with Law of Demeter o #2175 <https://github.com/pmd/pmd/issues/2175>: [java] LawOfDemeter: False positive for chained methods with generic method call o #2179 <https://github.com/pmd/pmd/issues/2179>: [java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property o #2180 <https://github.com/pmd/pmd/issues/2180>: [java] LawOfDemeter: False positive with Thread and ThreadLocalRandom o #2182 <https://github.com/pmd/pmd/issues/2182>: [java] LawOfDemeter: False positive with package-private access o #2188 <https://github.com/pmd/pmd/issues/2188>: [java] LawOfDemeter: False positive with fields assigned to local vars o #2536 <https://github.com/pmd/pmd/issues/2536>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal can't detect inner class o #3668 <https://github.com/pmd/pmd/pull/3668>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - fix FP with inner private classes o #3754 <https://github.com/pmd/pmd/issues/3754>: [java] SingularField false positive with read in while condition o #3786 <https://github.com/pmd/pmd/issues/3786>: [java] SimplifyBooleanReturns should consider operator precedence o #3840 <https://github.com/pmd/pmd/issues/3840>: [java] LawOfDemeter disallows method call on locally created object o #4238 <https://github.com/pmd/pmd/pull/4238>: [java] Make LawOfDemeter not use the rulechain o #4254 <https://github.com/pmd/pmd/issues/4254>: [java] ImmutableField - false positive with Lombok @Setter o #4434 <https://github.com/pmd/pmd/issues/4434>: [java] [7.0-rc1] ExceptionAsFlowControl when simply propagating o #4456 <https://github.com/pmd/pmd/issues/4456>: [java] FinalFieldCouldBeStatic: false positive with lombok's @UtilityClass o #4477 <https://github.com/pmd/pmd/issues/4477>: [java] SignatureDeclareThrowsException: false-positive with TestNG annotations o #4490 <https://github.com/pmd/pmd/issues/4490>: [java] ImmutableField - false negative with Lombok @Getter o #4549 <https://github.com/pmd/pmd/pull/4549>: [java] Make LawOfDemeter results deterministic * java-documentation o #4369 <https://github.com/pmd/pmd/pull/4369>: [java] Improve CommentSize o #4416 <https://github.com/pmd/pmd/pull/4416>: [java] Fix reported line number in CommentContentRule * java-errorprone o #659 <https://github.com/pmd/pmd/issues/659>: [java] MissingBreakInSwitch - last default case does not contain a break o #1005 <https://github.com/pmd/pmd/issues/1005>: [java] CloneMethodMustImplementCloneable triggers for interfaces o #1669 <https://github.com/pmd/pmd/issues/1669>: [java] NullAssignment - FP with ternay and null as constructor argument o #1899 <https://github.com/pmd/pmd/issues/1899>: [java] Recognize @SuppressWanings("fallthrough") for MissingBreakInSwitch o #2320 <https://github.com/pmd/pmd/issues/2320>: [java] NullAssignment - FP with ternary and null as method argument o #2532 <https://github.com/pmd/pmd/issues/2532>: [java] AvoidDecimalLiteralsInBigDecimalConstructor can not detect the case |new BigDecimal(Expression)| o #2579 <https://github.com/pmd/pmd/issues/2579>: [java] MissingBreakInSwitch detects the lack of break in the last case o #2880 <https://github.com/pmd/pmd/issues/2880>: [java] CompareObjectsWithEquals - false negative with type res o #2893 <https://github.com/pmd/pmd/issues/2893>: [java] Remove special cases from rule EmptyCatchBlock o #2894 <https://github.com/pmd/pmd/issues/2894>: [java] Improve MissingBreakInSwitch o #3071 <https://github.com/pmd/pmd/issues/3071>: [java] BrokenNullCheck FP with PMD 6.30.0 o #3087 <https://github.com/pmd/pmd/issues/3087>: [java] UnnecessaryBooleanAssertion overlaps with SimplifiableTestAssertion o #3100 <https://github.com/pmd/pmd/issues/3100>: [java] UseCorrectExceptionLogging FP in 6.31.0 o #3173 <https://github.com/pmd/pmd/issues/3173>: [java] UseProperClassLoader false positive o #3351 <https://github.com/pmd/pmd/issues/3351>: [java] ConstructorCallsOverridableMethod ignores abstract methods o #3400 <https://github.com/pmd/pmd/issues/3400>: [java] AvoidUsingOctalValues FN with underscores o #3843 <https://github.com/pmd/pmd/issues/3843>: [java] UseEqualsToCompareStrings should consider return type o #4063 <https://github.com/pmd/pmd/issues/4063>: [java] AvoidBranchingStatementAsLastInLoop: False-negative about try/finally block o #4356 <https://github.com/pmd/pmd/pull/4356>: [java] Fix NPE in CloseResourceRule o #4449 <https://github.com/pmd/pmd/issues/4449>: [java] AvoidAccessibilityAlteration: Possible false positive in AvoidAccessibilityAlteration rule when using Lambda expression o #4457 <https://github.com/pmd/pmd/issues/4457>: [java] OverrideBothEqualsAndHashcode: false negative with anonymous classes o #4493 <https://github.com/pmd/pmd/issues/4493>: [java] MissingStaticMethodInNonInstantiatableClass: false-positive about @Inject o #4505 <https://github.com/pmd/pmd/issues/4505>: [java] ImplicitSwitchFallThrough NPE in PMD 7.0.0-rc1 o #4510 <https://github.com/pmd/pmd/issues/4510>: [java] ConstructorCallsOverridableMethod: false positive with lombok's @Value o #4513 <https://github.com/pmd/pmd/issues/4513>: [java] UselessOperationOnImmutable various false negatives with String o #4514 <https://github.com/pmd/pmd/issues/4514>: [java] AvoidLiteralsInIfCondition false positive and negative for String literals when ignoreExpressions=true o #4546 <https://github.com/pmd/pmd/issues/4546>: [java] OverrideBothEqualsAndHashCode ignores records * java-multithreading o #2537 <https://github.com/pmd/pmd/issues/2537>: [java] DontCallThreadRun can't detect the case that call run() in |this.run()| o #2538 <https://github.com/pmd/pmd/issues/2538>: [java] DontCallThreadRun can't detect the case that call run() in |foo.bar.run()| o #2577 <https://github.com/pmd/pmd/issues/2577>: [java] UseNotifyAllInsteadOfNotify falsely detect a special case with argument: |foo.notify(bar)| o #4483 <https://github.com/pmd/pmd/issues/4483>: [java] NonThreadSafeSingleton false positive with double-checked locking * java-performance o #1224 <https://github.com/pmd/pmd/issues/1224>: [java] InefficientEmptyStringCheck false negative in anonymous class o #2587 <https://github.com/pmd/pmd/issues/2587>: [java] AvoidArrayLoops could also check for list copy through iterated List.add() o #2712 <https://github.com/pmd/pmd/issues/2712>: [java] SimplifyStartsWith false-positive with AssertJ o #3486 <https://github.com/pmd/pmd/pull/3486>: [java] InsufficientStringBufferDeclaration: Fix NPE o #3848 <https://github.com/pmd/pmd/issues/3848>: [java] StringInstantiation: false negative when using method result o #4070 <https://github.com/pmd/pmd/issues/4070>: [java] A false positive about the rule RedundantFieldInitializer o #4458 <https://github.com/pmd/pmd/issues/4458>: [java] RedundantFieldInitializer: false positive with lombok's @Value * kotlin o #419 <https://github.com/pmd/pmd/issues/419>: [kotlin] Add support for Kotlin o #4389 <https://github.com/pmd/pmd/pull/4389>: [kotlin] Update grammar to version 1.8 * swift o #1877 <https://github.com/pmd/pmd/pull/1877>: [swift] Feature/swift rules o #1882 <https://github.com/pmd/pmd/pull/1882>: [swift] UnavailableFunction Swift rule * xml o #1800 <https://github.com/pmd/pmd/pull/1800>: [xml] Unimplement org.w3c.dom.Node from the XmlNodeWrapper ✨ External Contributions * #1658 <https://github.com/pmd/pmd/pull/1658>: [core] Node support for Antlr-based languages - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1698 <https://github.com/pmd/pmd/pull/1698>: [core] [swift] Antlr Base Parser adapter and Swift Implementation - Lucas Soncini <https://github.com/lsoncini> (@lsoncini) * #1774 <https://github.com/pmd/pmd/pull/1774>: [core] Antlr visitor rules - Lucas Soncini <https://github.com/lsoncini> (@lsoncini) * #1877 <https://github.com/pmd/pmd/pull/1877>: [swift] Feature/swift rules - Matías Fraga... [truncated message content] |
From: David D. <dav...@or...> - 2023-05-15 16:34:25
|
Welcome to the latest OpenJDK Quality Outreach update! The schedule for JDK 21 is now known [1] with Rampdown Phase One (RDP1) phase set for June 8th and General Availability (GA) set for September 19th. As we are getting closer to RDP1, we are gradually getting a better view on the JDK 21 content. At the time of writing, 5 JEPs are already integrated in the JDK 21 mainline - Virtual Threads, Generational ZGC, etc. – see below for more details. This newsletter heads-up is focused on one of those JEPs; i.e., JEP 431 Sequenced Collections, as it might induce some incompatibilities on existing codebases. Please do tell us if your project works or fails on the latest JDK 21 Early-Access builds. We still have some time to fix issues before JDK 21 reaches General Availability. [1] https://openjdk.org/projects/jdk/21/ ## Heads-Up - JDK 21: Potential Sequenced Collections Incompatibilities The Sequenced Collection JEP [2] has been integrated into JDK 21, build 20. This JEP introduces several new interfaces into the collections framework’s interface hierarchy, and these interfaces introduce new default methods. When such changes are made, they can cause conflicts that result in source or binary incompatibilities. Any conflicts that occur will be in code that implements new collections or that subclasses existing collection classes. Code that simply uses collections implementations will be largely unaffected. There are several kinds of conflicts that might arise. The first is a simple method naming conflict, if a method already exists with the same name but with a different return type or access modifier. Another is a clash between different inherited default method implementations arising from covariant overrides. A class might inherit multiple default methods if it implements multiple interfaces from different parts of the collections framework. A third example occurs with type inference. With type inference (e.g., the use of `var`) the compiler will infer a type for that local variable. It’s possible for other code to use explicitly declared types that must match the inferred type. The change to the interface hierarchy might result in a different inferred type, causing an incompatibility. Make sure to check the following article [3] that provides additional details and strategies to mitigate potential incompatibilities. [2] https://openjdk.org/jeps/431 [3] https://inside.java/2023/05/12/quality-heads-up/ Additional Sequenced Collections resources are also listed in the 'Topics of Interest' section below. ## JDK 21 Early-Access builds The latest Early-Access builds 22 are available [4], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [5] and the Javadocs [6] are also available. [4] https://jdk.java.net/21/ [5] https://jdk.java.net/21/release-notes [6] https://download.java.net/java/early_access/jdk21/docs/api/ ### JEPs integrated to JDK 21, so far: - 430: String Templates (Preview) - 431: Sequenced Collections - 439: Generational ZGC - 442: Foreign Function & Memory API (3rd Preview) - 444: Virtual Threads ### JEPs targeted to JDK 21, so far: - 440: Record Patterns - 441: Pattern Matching for switch - 448: Vector API (6th Incubator) JEPs proposed to target JDK 21: - 404: Generational Shenandoah (Experimental) - 443: Unnamed Patterns and Variables (Preview) - 445: Unnamed Classes and Instance Main Methods (Preview) - 449: Deprecate the Windows 32-bit x86 Port for Removal ### Changes in recent builds that may be of interest: Note that this is only a curated list of changes, make sure to check https://github.com/openjdk/jdk/compare/jdk-21+0...jdk-21+22 for additional changes. JDK 21 Build 22: - JDK-8307466: java.time.Instant calculation bug in until and between methods - JDK-8307399: get rid of compatibility ThreadStart/ThreadEnd events for virtual threads - JDK-8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions - JDK-8280031: Deprecate GTK2 for removal - JDK-8307629: FunctionDescriptor::toMethodType should allow sequence layouts (mainline) - JDK-8302845: Replace finalizer usage in JNDI DNS provider with Cleaner - JDK-8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions - JDK-8306881: Update FreeType to 2.13.0 - JDK-8285932: Implementation of JEP 430 String Templates (Preview) - JDK-8307301: Update HarfBuzz to 7.2.0 - JDK-8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention - JDK-8291555: Implement alternative fast-locking scheme - JDK-8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern JDK 21 Build 21: - JDK-8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity - JDK-8303784: no-@Target annotations should be applicable to type parameter declarations - JDK-8303002: Reject packed structs from linker - JDK-8300784: Specify exactly how padding should be presented to the linker - JDK-8303524: Check FunctionDescriptor byte order when linking - JDK-8304265: Implementation of Foreign Function and Memory API (Third Preview) - JDK-8293117: Add atomic bitset functions - JDK-8306696: Remove MetaspaceReclaimPolicy=aggressive and obsolete MetaspaceReclaimPolicy JDK 21 Build 20: - JDK-8306658: GHA: MSVC installation could be optional since it might already be pre-installed - JDK-8305590: Remove nothrow exception specifications from operator new - JDK-8266571: JEP 431 Sequenced Collections - JDK-8306772: Remove sun.security.x509.CertException, sun.security.x509.CertParseError - JDK-8306075: Micro-optimize Enum.hashCode - JDK-8306031: Update IANA Language Subtag Registry to Version 2023-04-13 - JDK-8298048: Combine CDS archive heap into a single block - JDK-8305994: Guarantee eventual async monitor deflation JDK 21 Build 19: - JDK-8296248: Update CLDR to Version 43.0 - JDK-8257967: JFR: Events for loaded agents - JDK-8305811: (bf) Improve performance of CharBuffer::append(CharSequence[,int,int]) - JDK-8304450: [vectorapi] Refactor VectorShuffle implementation JDK 21 Build 18: - JDK-8302819: Remove JAR Index - JDK-8267140: Support closing the HttpClient by making it auto-closable - JDK-8205129: Remove java.lang.Compiler - JDK-8305310: Calculate PublicKey from PrivateKey - JDK-8304919: Implementation of Virtual Threads (JEP 444) - JDK-8182621: JSSE should reject empty TLS plaintexts - JDK-8304745: Lazily initialize byte[] in java.io.BufferedInputStream JDK 21 Build 17: - JDK-8305107: Emoji related binary properties in RegEx - JDK-8304982: Emit warning for removal of `COMPAT` provider - JDK-8303260: (fc) FileChannel::transferFrom should support position > size() - JDK-8304846: Provide a shared utility to dump generated classes defined via Lookup API - JDK-8303229: JFR: Preserve disk repository after exit - JDK-8305113: (tz) Update Timezone Data to 2023c - JDK-8294266: Add a way to pre-touch java thread stacks - JDK-8301106: Allow archived Java strings to be moved by GC - JDK-8305157: The java.util.Arrays class should be declared final - JDK-8304743: Compile_lock and SystemDictionary updates - JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly - JDK-8302323: Add repeat methods to StringBuilder/StringBuffer JDK 21 Build 16: - JDK-8303392: Runtime.exec and ProcessBuilder.start should use System logger - JDK-8300977: Retire java.io.ExpiringCache - JDK-8296656: java.lang.NoClassDefFoundError exception on running fully legitimate code - JDK-8027682: javac wrongly accepts semicolons in package and import decls - JDK-8231349: Move intrinsic stubs generation to compiler runtime initialization code - JDK-8288730: Add type parameter to Lookup::accessClass and Lookup::ensureInitialized - JDK-8304759: Add BitMap iterators - JDK-8304691: Remove jlink --post-process-path option - JDK-8304301: Remove the global option SuperWordMaxVectorSize - JDK-8298725: Add BitMap support for reverse iteration - JDK-8302191: Performance degradation for float/double modulo on Linux ## JavaFX 21 Early-Access Builds These are early-access builds of the JavaFX 21 Runtime, built from openjdk/jfx [7]. They enabled JavaFX application developers to build and test their applications with JavaFX 21 on JDK 21. The latest builds 17 (2023/5/15) are available [8]. They are provided under the GNU General Public License, version 2, with the Classpath Exception. Please send the feedback to the openjfx-dev mailing list [9]. [7] https://github.com/openjdk/jfx [8] https://jdk.java.net/javafx21/ [9] https://mail.openjdk.org/pipermail/openjfx-dev/ ## Topics of Interest: New candidate: JEP 451: Prepare to Disallow the Dynamic Loading of Agents https://openjdk.org/jeps/451 Save Memory with Compact Headers https://inside.java/2023/05/11/newscast-48/ Interpolating Strings like a King in Java 21 https://inside.java/2023/04/27/newscast-47/ “Sequenced Collections” podcast with Stuart Marks https://inside.java/2023/04/25/podcast-031/ Z Garbage Collector: The Next Generation https://inside.java/2023/04/23/levelup-zgc/ Getting Rid Of Unused Variables https://inside.java/2023/04/13/newscast-46/ Evolving the Security of the Java Platform https://inside.java/2023/04/11/levelup-security/ Java Language Futures, Spring 2023 Edition https://inside.java/2023/04/06/levelup-amber/ Java 21's New (Sequenced) Collections https://inside.java/2023/03/30/newscast/ JFR: Java's Observability & Monitoring Framework https://inside.java/2023/05/14/stackwalker-02/ Additionals Level Up - Java Developer Day videos https://www.youtube.com/playlist?list=PLX8CzqL3ArzX_RZNjtyETshl876jfE2bo ## April 2023 Critical Patch Update Released As part of the April 2023 CPU, Oracle released OpenJDK 20.0.1, JDK 20.0.1, JDK 17.0.7 LTS, JDK 11.0.19 LTS, JDK 8u371, as well as JDK 8u371-perf. ~ Thanks for participating in the OpenJDK Quality Outreach program. If you find any issue on JDK 21 EA builds, please send it my way! --David |
From: Andreas D. <and...@pm...> - 2023-04-29 22:34:18
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.0.0-rc2 * Documentation: https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/ 29-April-2023 - 7.0.0-rc2 We're excited to bring you the next major version of PMD! Since this is a big release, we provide here only a concise version of the release notes. We prepared a separate page with the full Detailed Release Notes for PMD 7.0.0 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. *ℹ️ Release Candidates* PMD 7.0.0 is finally almost ready. In order to gather feedback, we are going to ship a couple of release candidates. These are officially available on GitHub and Maven Central and can be used as usual (e.g. as a dependency). We encourage you to try out the new features, but keep in mind that we may introduce API breaking changes between the release candidates. It should be stable enough if you don't use custom rules. We have still some tasks planned for the next release candidates. You can see the progress in PMD 7 Tracking Issue #3898 <https://github.com/pmd/pmd/issues/3898>. If you find any problem or difficulty while updating from PMD 6, please provide feedback via our issue tracker <https://github.com/pmd/pmd/issues/new/choose>. That way we can improve the experience for all. Table Of Contents * Changes since 7.0.0-rc1 <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#changes-since-7.0.0-rc1> o API Changes <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#api-changes> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#updated-pmd-designer> o Language Related Changes <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#language-related-changes> o Rule Changes <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#rule-changes> o Fixed Issues <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#fixed-issues> o External contributions <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#external-contributions> * 🚀 Major Features and Enhancements <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#🚀-major-features-and-enhancements> o New official logo <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#new-official-logo> o Revamped Java module <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#revamped-java-module> o Revamped Command Line Interface <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#revamped-command-line-interface> o Full Antlr support <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#full-antlr-support> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#updated-pmd-designer> * 🎉 Language Related Changes <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#🎉-language-related-changes> o New: Swift support <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#new:-swift-support> o New: Kotlin support (experimental) <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#new:-kotlin-support-(experimental)> o New: CPD support for TypeScript <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#new:-cpd-support-for-typescript> o New: CPD support for Julia <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#new:-cpd-support-for-julia> o Changed: JavaScript support <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#changed:-javascript-support> o Changed: Language versions <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#changed:-language-versions> * 🌟 New and changed rules <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#🌟-new-and-changed-rules> o New Rules <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#new-rules> o Changed Rules <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#changed-rules> o Removed Rules <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#removed-rules> * 🚨 API <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#🚨-api> * 💥 Compatibility and migration notes <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#💥-compatibility-and-migration-notes> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#🐛-fixed-issues> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#✨-external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2023/04/pmd-700-rc2-29-april-2023-released/#📈-stats> Changes since 7.0.0-rc1 This section lists the most important changes from the last release candidate. The remaining section describes the complete release notes for 7.0.0. API Changes * Moved the two classes |AntlrTokenizer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/cpd/impl/AntlrTokenizer.html#> and |JavaCCTokenizer| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/cpd/impl/JavaCCTokenizer.html#> from |internal| package into package |net.sourceforge.pmd.cpd.impl| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/cpd/impl/package-summary.html#>. These two classes are part of the API and are base classes for CPD language implementations. * |AntlrBaseRule| is gone in favor of |AbstractVisitorRule| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/lang/rule/AbstractVisitorRule.html#>. * The classes |KotlinInnerNode| <https://docs.pmd-code.org/apidocs/pmd-kotlin/7.0.0-rc2/net/sourceforge/pmd/lang/kotlin/ast/KotlinInnerNode.html#> and |SwiftInnerNode| <https://docs.pmd-code.org/apidocs/pmd-swift/7.0.0-rc2/net/sourceforge/pmd/lang/swift/ast/SwiftInnerNode.html#> are package-private now. * The parameter order of |addSourceFile| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/lang/document/FileCollector.html#addSourceFile(String,String)> has been swapped in order to have the same meaning as in 6.55.0. That will make it easier if you upgrade from 6.55.0 to 7.0.0. However, that means, that you need to change these method calls if you have migrated to 7.0.0-rc1 already. 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-designer/releases/tag/7.0.0-rc1>. Language Related Changes * New: CPD support for TypeScript * New: CPD support for Julia Rule Changes * |ImmutableField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#immutablefield>: the property |ignoredAnnotations| has been removed. The property was deprecated since PMD 6.52.0. * |SwitchDensity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#switchdensity>: the type of the property |minimum| has been changed from decimal to integer for consistency with other statistical rules. Fixed Issues * cli * #4482 <https://github.com/pmd/pmd/issues/4482>: [cli] pmd.bat can only be executed once * #4484 <https://github.com/pmd/pmd/issues/4484>: [cli] ast-dump with no properties produce an NPE * core * #2500 <https://github.com/pmd/pmd/issues/2500>: [core] Clarify API for ANTLR based languages * doc * #2501 <https://github.com/pmd/pmd/issues/2501>: [doc] Verify ANTLR Documentation * #4438 <https://github.com/pmd/pmd/issues/4438>: [doc] Documentation links in VS Code are outdated * java-codestyle * #4273 <https://github.com/pmd/pmd/issues/4273>: [java] CommentDefaultAccessModifier ignoredAnnotations should include "org.junit.jupiter.api.extension.RegisterExtension" by default * #4487 <https://github.com/pmd/pmd/issues/4487>: [java] UnnecessaryConstructor: false-positive with @Inject and @Autowired * java-design * #4254 <https://github.com/pmd/pmd/issues/4254>: [java] ImmutableField - false positive with Lombok @Setter * #4477 <https://github.com/pmd/pmd/issues/4477>: [java] SignatureDeclareThrowsException: false-positive with TestNG annotations * #4490 <https://github.com/pmd/pmd/issues/4490>: [java] ImmutableField - false negative with Lombok @Getter * java-errorprone * #4449 <https://github.com/pmd/pmd/issues/4449>: [java] AvoidAccessibilityAlteration: Possible false positive in AvoidAccessibilityAlteration rule when using Lambda expression * #4493 <https://github.com/pmd/pmd/issues/4493>: [java] MissingStaticMethodInNonInstantiatableClass: false-positive about @Inject * #4505 <https://github.com/pmd/pmd/issues/4505>: [java] ImplicitSwitchFallThrough NPE in PMD 7.0.0-rc1 * java-multithreading * #4483 <https://github.com/pmd/pmd/issues/4483>: [java] NonThreadSafeSingleton false positive with double-checked locking * miscellaneous * #4462 <https://github.com/pmd/pmd/issues/4462>: Provide Software Bill of Materials (SBOM) External contributions * #4402 <https://github.com/pmd/pmd/pull/4402>: [javascript] CPD: add support for Typescript using antlr4 grammar - Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/>) * #4403 <https://github.com/pmd/pmd/pull/4403>: [julia] CPD: Add support for Julia code duplication - Wener <https://github.com/wener-tiobe> (@wener-tiobe) * #4444 <https://github.com/pmd/pmd/pull/4444>: [java] CommentDefaultAccessModifier - ignore org.junit.jupiter.api.extension.RegisterExtension by default - Nirvik Patel <https://github.com/nirvikpatel> (@nirvikpatel) * #4450 <https://github.com/pmd/pmd/pull/4450>: [java] Fix #4449 AvoidAccessibilityAlteration: Correctly handle Lambda expressions in PrivilegedAction scenarios - Seren <https://github.com/mohui1999> (@mohui1999) * #4452 <https://github.com/pmd/pmd/pull/4452>: [doc] Update PMD_APEX_ROOT_DIRECTORY documentation reference - nwcm <https://github.com/nwcm> (@nwcm) * #4474 <https://github.com/pmd/pmd/pull/4474>: [java] ImmutableField: False positive with lombok (fixes #4254) - Pim van der Loos <https://github.com/PimvanderLoos> (@PimvanderLoos) * #4488 <https://github.com/pmd/pmd/pull/4488>: [java] Fix #4477: A false-positive about SignatureDeclareThrowsException - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4494 <https://github.com/pmd/pmd/pull/4494>: [java] Fix #4487: A false-positive about UnnecessaryConstructor and @Inject and @Autowired - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4495 <https://github.com/pmd/pmd/pull/4495>: [java] Fix #4493: false-positive about MissingStaticMethodInNonInstantiatableClass and @Inject - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4520 <https://github.com/pmd/pmd/pull/4520>: [doc] Fix typo: missing closing quotation mark after CPD-END - João Dinis Ferreira <https://github.com/joaodinissf> (@joaodinissf) 🚀 Major Features and Enhancements New official logo The new official logo of PMD: New PMD Logo Revamped Java module * Java grammar substantially refactored - more correct regarding the Java Language Specification (JLS) * Built-in rules have been upgraded for the changed AST * Rewritten type resolution framework and symbol table correctly implements the JLS * AST exposes more semantic information (method calls, field accesses) For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. Contributors: Clément Fournier <https://github.com/oowekyala> (@oowekyala <https://sourceforge.net/u/oowekyala/>), Andreas Dangel <https://github.com/adangel> (@adangel <https://sourceforge.net/u/adangel/>), Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Revamped Command Line Interface * unified and consistent Command Line Interface for both Linux/Unix and Windows across our different utilities * single script |pmd| (|pmd.bat| for Windows) to launch the different utilities: o |pmd check| to run PMD rules and analyze a project o |pmd cpd| to run CPD (copy paste detector) o |pmd designer| to run the PMD Rule Designer * progress bar support for |pmd check| * shell completion Demo For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. Contributors: Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Full Antlr support * Antlr <https://www.antlr.org/> based grammars can now be used to build full-fledged PMD rules. * Previously, Antlr grammar could only be used for CPD * New supported languages: Swift and Kotlin For more information, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) 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-designer/releases/tag/7.0.0-rc1>. 🎉 Language Related Changes Note that this is just a concise listing of the highlight. For more information on the languages, see the Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. New: Swift support * use PMD to analyze Swift code with PMD rules * initially 4 built-in rules Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) New: Kotlin support (experimental) * use PMD to analyze Kotlin code with PMD rules * Support for Kotlin 1.8 grammar * initially 2 built-in rules New: CPD support for TypeScript Thanks to a contribution, CPD now supports the TypeScript language. It is shipped with the rest of the JavaScript support in the module |pmd-javascript|. Contributors: Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/>) New: CPD support for Julia Thanks to a contribution, CPD now supports the Julia language. It is shipped in the new module |pmd-julia|. Contributors: Wener <https://github.com/wener-tiobe> (@wener-tiobe) Changed: JavaScript support * latest version supports ES6 and also some new constructs (see Rhino <https://github.com/mozilla/rhino>]) * comments are retained Changed: Language versions * more predefined language versions for each supported language * can be used to limit rule execution for specific versions only with |minimumLanguageVersion| and |maximumLanguageVersion| attributes. 🌟 New and changed rules New Rules *Apex* * |UnusedMethod| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#unusedmethod> finds unused methods in your code. *Java* * |UnnecessaryBoxing| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_codestyle.html#unnecessaryboxing> reports boxing and unboxing conversions that may be made implicit. *Kotlin* * |FunctionNameTooShort| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_kotlin_bestpractices.html#functionnametooshort> * |OverrideBothEqualsAndHashcode| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode> *Swift* * |ProhibitedInterfaceBuilder| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder> * |UnavailableFunction| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_swift_bestpractices.html#unavailablefunction> * |ForceCast| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_swift_errorprone.html#forcecast> * |ForceTry| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_swift_errorprone.html#forcetry> Changed Rules *General changes* * All statistical rules (like ExcessiveClassLength, ExcessiveParameterList) have been simplified and unified. The properties |topscore| and |sigma| have been removed. The property |minimum| 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 (vm): * Apex: |ExcessiveClassLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#excessiveclasslength>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#excessiveparameterlist>, |ExcessivePublicCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#excessivepubliccount>, |NcssConstructorCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#ncssconstructorcount>, |NcssMethodCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#ncssmethodcount>, |NcssTypeCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_apex_design.html#ncsstypecount> * Java: |ExcessiveImports| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#excessiveimports>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#excessiveparameterlist>, |ExcessivePublicCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#excessivepubliccount>, |SwitchDensity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#switchdensity> * PLSQL: |ExcessiveMethodLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#excessivemethodlength>, |ExcessiveObjectLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#excessiveobjectlength>, |ExcessivePackageBodyLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#excessivepackagebodylength>, |ExcessivePackageSpecificationLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#excessivepackagespecificationlength>, |ExcessiveParameterList| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#excessiveparameterlist>, |ExcessiveTypeLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#excessivetypelength>, |NcssMethodCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#ncssmethodcount>, |NcssObjectCount| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#ncssobjectcount>, |NPathComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_plsql_design.html#npathcomplexity> * VM: |ExcessiveTemplateLength| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_vm_design.html#excessivetemplatelength> * The general property |violationSuppressXPath| which is available for all rules to suppress warnings <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_userdocs_suppressing_warnings.html> 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 |violationSuppressXPath| properties. *Apex General changes* * The properties |cc_categories|, |cc_remediation_points_multiplier|, |cc_block_highlighting| have been removed from all rules. These properties have been deprecated since PMD 6.13.0. See issue #1648 <https://github.com/pmd/pmd/issues/1648> for more details. *Java General changes* * 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. |CognitiveComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#cognitivecomplexity>. The report location is controlled by the overrides of the method |getReportLocation| <https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/lang/ast/Node.html#getReportLocation()> in different node types. See issue #4439 <https://github.com/pmd/pmd/issues/4439> and issue #730 <https://github.com/pmd/pmd/issues/730> for more details. *Java Best Practices* * |ArrayIsStoredDirectly| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_bestpractices.html#arrayisstoreddirectly>: Violations are now reported on the assignment and not anymore on the formal parameter. The reported line numbers will probably move. * |AvoidReassigningLoopVariables| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_bestpractices.html#avoidreassigningloopvariables>: This rule might not report anymore all reassignments of the control variable in for-loops when the property |forReassign| is set to |skip|. See issue #4500 <https://github.com/pmd/pmd/issues/4500> for more details. * |LooseCoupling| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_bestpractices.html#loosecoupling>: The rule has a new property to allow some types to be coupled to (|allowedTypes|). * |UnusedLocalVariable| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_bestpractices.html#unusedlocalvariable>: This rule has some important false-negatives fixed and finds many more cases now. For details see issues #2130 <https://github.com/pmd/pmd/issues/2130>, #4516 <https://github.com/pmd/pmd/issues/4516>, and #4517 <https://github.com/pmd/pmd/issues/4517>. *Java Codestyle* * |MethodNamingConventions| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_codestyle.html#methodnamingconventions>: The property |checkNativeMethods| has been removed. The property was deprecated since PMD 6.3.0. Use the property |nativePattern| to control whether native methods should be considered or not. * |ShortVariable| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_codestyle.html#shortvariable>: This rule now also reports short enum constant names. * |UseDiamondOperator| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_codestyle.html#usediamondoperator>: The property |java7Compatibility| has been removed. The rule now handles Java 7 properly without a property. * |UnnecessaryFullyQualifiedName| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname>: 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. * |UselessParentheses| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_codestyle.html#uselessparentheses>: The rule has two new properties which control how strict the rule should be applied. With |ignoreClarifying| (default: true) parentheses that are strictly speaking not necessary are allowed, if they separate expressions of different precedence. The other property |ignoreBalancing| (default: true) is similar, in that it allows parentheses that help reading and understanding the expressions. *Java Design* * |CyclomaticComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#cyclomaticcomplexity>: The property |reportLevel| 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 |classReportLevel| and |methodReportLevel| instead. * |ImmutableField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#immutablefield>: The property |ignoredAnnotations| has been removed. The property was deprecated since PMD 6.52.0. * |LawOfDemeter| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#lawofdemeter>: The rule has a new property |trustRadius|. This defines the maximum degree of trusted data. The default of 1 is the most restrictive. * |NPathComplexity| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#npathcomplexity>: The property |minimum| has been removed. It was deprecated since PMD 6.0.0. Use the property |reportLevel| instead. * |SingularField| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#singularfield>: The properties |checkInnerClasses| and |disallowNotAssignment| have been removed. The rule is now more precise and will check these cases properly. * |UseUtilityClass| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_design.html#useutilityclass>: The property |ignoredAnnotations| has been removed. *Java Documentation* * |CommentContent| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_documentation.html#commentcontent>: The properties |caseSensitive| and |disallowedTerms| are removed. The new property |forbiddenRegex| can be used now to define the disallowed terms with a single regular expression. * |CommentRequired| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_documentation.html#commentrequired>: * Overridden methods are now detected even without the |@Override| annotation. This is relevant for the property |methodWithOverrideCommentRequirement|. See also pull request #3757 <https://github.com/pmd/pmd/pull/3757>. * Elements in annotation types are now detected as well. This might lead to an increased number of violations for missing public method comments. * |CommentSize| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_documentation.html#commentsize>: When determining the line-length of a comment, the leading comment prefix markers (e.g. |*| or |//|) are ignored and don't add up to the line-length. See also pull request #4369 <https://github.com/pmd/pmd/pull/4369>. *Java Error Prone* * |AvoidDuplicateLiterals| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_errorprone.html#avoidduplicateliterals>: The property |exceptionfile| has been removed. The property was deprecated since PMD 6.10.0. Use the property |exceptionList| instead. * |DontImportSun| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_errorprone.html#dontimportsun>: |sun.misc.Signal| is not special-cased anymore. * |EmptyCatchBlock| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_errorprone.html#emptycatchblock>: |CloneNotSupportedException| and |InterruptedException| are not special-cased anymore. Rename the exception parameter to |ignored| to ignore them. * |ImplicitSwitchFallThrough| <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_rules_java_errorprone.html#implicitswitchfallthrough>: 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. Removed Rules Many rules, that were previously deprecated have been finally removed. See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html> for the complete list. 🚨 API 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. Also, there are some improvement and changes in different areas. For the detailed description of the changes listed here, see Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. * Miscellaneous smaller changes and cleanups * XPath 3.1 support for XPath-based rules * Node stream API for AST traversal * Metrics framework * Testing framework * Language Lifecycle and Language Properties 💥 Compatibility and migration notes See Detailed Release Notes for PMD 7 <https://docs.pmd-code.org/pmd-doc-7.0.0-rc2/pmd_release_notes_pmd7.html>. 🐛 Fixed Issues * miscellaneous o #881 <https://github.com/pmd/pmd/issues/881>: [all] Breaking API changes for 7.0.0 o #896 <https://github.com/pmd/pmd/issues/896>: [all] Use slf4j o #1431 <https://github.com/pmd/pmd/pull/1431>: [ui] Remove old GUI applications (designerold, bgastviewer) o #1451 <https://github.com/pmd/pmd/issues/1451>: [core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string o #2496 <https://github.com/pmd/pmd/issues/2496>: Update PMD 7 Logo on landing page o #2497 <https://github.com/pmd/pmd/issues/2497>: PMD 7 Logo page o #2498 <https://github.com/pmd/pmd/issues/2498>: Update PMD 7 Logo in documentation o #3797 <https://github.com/pmd/pmd/issues/3797>: [all] Use JUnit5 o #4462 <https://github.com/pmd/pmd/issues/4462>: Provide Software Bill of Materials (SBOM) * ant o #4080 <https://github.com/pmd/pmd/issues/4080>: [ant] Split off Ant integration into a new submodule * core o #880 <https://github.com/pmd/pmd/issues/880>: [core] Make visitors generic o #1622 <https://github.com/pmd/pmd/pull/1622>: [core] NodeStream API o #1687 <https://github.com/pmd/pmd/issues/1687>: [core] Deprecate and Remove XPath 1.0 support o #1785 <https://github.com/pmd/pmd/issues/1785>: [core] Allow abstract node types to be valid rulechain visits o #1825 <https://github.com/pmd/pmd/pull/1825>: [core] Support NoAttribute for XPath o #2038 <https://github.com/pmd/pmd/issues/2038>: [core] Remove DCD o #2218 <https://github.com/pmd/pmd/issues/2218>: [core] |isFindBoundary| should not be an attribute o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #2239 <https://github.com/pmd/pmd/issues/2239>: [core] Merging Javacc build scripts o #2500 <https://github.com/pmd/pmd/issues/2500>: [core] Clarify API for ANTLR based languages o #2518 <https://github.com/pmd/pmd/issues/2518>: [core] Language properties o #2602 <https://github.com/pmd/pmd/issues/2602>: [core] Remove ParserOptions o #2614 <https://github.com/pmd/pmd/pull/2614>: [core] Upgrade Saxon, add XPath 3.1, remove Jaxen o #2696 <https://github.com/pmd/pmd/pull/2696>: [core] Remove DFA o #2821 <https://github.com/pmd/pmd/issues/2821>: [core] Rule processing error filenames are missing paths o #2873 <https://github.com/pmd/pmd/issues/2873>: [core] Utility classes in pmd 7 o #2885 <https://github.com/pmd/pmd/issues/2885>: [core] Error recovery mode o #3203 <https://github.com/pmd/pmd/issues/3203>: [core] Replace RuleViolationFactory implementations with ViolationDecorator o #3692 <https://github.com/pmd/pmd/pull/3692>: [core] Analysis listeners o #3782 <https://github.com/pmd/pmd/issues/3782>: [core] Language lifecycle o #3815 <https://github.com/pmd/pmd/issues/3815>: [core] Update Saxon HE to 10.7 o #3893 <https://github.com/pmd/pmd/pull/3893>: [core] Text documents o #3902 <https://github.com/pmd/pmd/issues/3902>: [core] Violation decorators o #3918 <https://github.com/pmd/pmd/issues/3918>: [core] Make LanguageRegistry non static o #3922 <https://github.com/pmd/pmd/pull/3922>: [core] Better error reporting for the ruleset parser o #4035 <https://github.com/pmd/pmd/issues/4035>: [core] ConcurrentModificationException in DefaultRuleViolationFactory o #4120 <https://github.com/pmd/pmd/issues/4120>: [core] Explicitly name all language versions o #4353 <https://github.com/pmd/pmd/pull/4353>: [core] Micro optimizations for Node API o #4365 <https://github.com/pmd/pmd/pull/4365>: [core] Improve benchmarking o #4420 <https://github.com/pmd/pmd/pull/4420>: [core] Remove PMD.EOL * cli o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #3828 <https://github.com/pmd/pmd/issues/3828>: [core] Progress reporting o #4079 <https://github.com/pmd/pmd/issues/4079>: [cli] Split off CLI implementation into a pmd-cli submodule o #4482 <https://github.com/pmd/pmd/issues/4482>: [cli] pmd.bat can only be executed once o #4484 <https://github.com/pmd/pmd/issues/4484>: [cli] ast-dump with no properties produce an NPE * doc o #2501 <https://github.com/pmd/pmd/issues/2501>: [doc] Verify ANTLR Documentation o #4438 <https://github.com/pmd/pmd/issues/4438>: [doc] Documentation links in VS Code are outdated * testing o #2435 <https://github.com/pmd/pmd/issues/2435>: [test] Remove duplicated Dummy language module o #4234 <https://github.com/pmd/pmd/issues/4234>: [test] Tests that change the logging level do not work Language specific fixes: * apex o #1937 <https://github.com/pmd/pmd/issues/1937>: [apex] Apex should only have a single RootNode o #1648 <https://github.com/pmd/pmd/issues/1648>: [apex,vf] Remove CodeClimate dependency o #1750 <https://github.com/pmd/pmd/pull/1750>: [apex] Remove apex statistical rules o #2836 <https://github.com/pmd/pmd/pull/2836>: [apex] Remove Apex ProjectMirror o #4427 <https://github.com/pmd/pmd/issues/4427>: [apex] ApexBadCrypto test failing to detect inline code * apex-design o #2667 <https://github.com/pmd/pmd/issues/2667>: [apex] Integrate nawforce/ApexLink to build robust Unused rule o #4509 <https://github.com/pmd/pmd/issues/4509>: [apex] ExcessivePublicCount doesn't consider inner classes correctly * java o #520 <https://github.com/pmd/pmd/issues/520>: [java] Allow |@SuppressWarnings| with constants instead of literals o #864 <https://github.com/pmd/pmd/issues/864>: [java] Similar/duplicated implementations for determining FQCN o #905 <https://github.com/pmd/pmd/issues/905>: [java] Add new node for anonymous class declaration o #910 <https://github.com/pmd/pmd/issues/910>: [java] AST inconsistency between primitive and reference type arrays o #997 <https://github.com/pmd/pmd/issues/997>: [java] Java8 parsing corner case with annotated array types o #998 <https://github.com/pmd/pmd/issues/998>: [java] AST inconsistencies around FormalParameter o #1019 <https://github.com/pmd/pmd/issues/1019>: [java] Breaking Java Grammar changes for PMD 7.0.0 o #1124 <https://github.com/pmd/pmd/issues/1124>: [java] ImmutableList implementation in the qname codebase o #1128 <https://github.com/pmd/pmd/issues/1128>: [java] Improve ASTLocalVariableDeclaration o #1150 <https://github.com/pmd/pmd/issues/1150>: [java] ClassOrInterfaceType AST improvements o #1207 <https://github.com/pmd/pmd/issues/1207>: [java] Resolve explicit types using FQCNs, without hitting the classloader o #1367 <https://github.com/pmd/pmd/issues/1367>: [java] Parsing error on annotated inner class o #1661 <https://github.com/pmd/pmd/issues/1661>: [java] About operator nodes o #2366 <https://github.com/pmd/pmd/pull/2366>: [java] Remove qualified names o #2819 <https://github.com/pmd/pmd/issues/2819>: [java] GLB bugs in pmd 7 o #3642 <https://github.com/pmd/pmd/issues/3642>: [java] Parse error on rare extra dimensions on method return type on annotation methods o #3763 <https://github.com/pmd/pmd/issues/3763>: [java] Ambiguous reference error in valid code o #3749 <https://github.com/pmd/pmd/issues/3749>: [java] Improve |isOverridden| in ASTMethodDeclaration o #3750 <https://github.com/pmd/pmd/issues/3750>: [java] Make symbol table support instanceof pattern bindings o #3752 <https://github.com/pmd/pmd/issues/3752>: [java] Expose annotations in symbol API o #4237 <https://github.com/pmd/pmd/pull/4237>: [java] Cleanup handling of Java comments o #4317 <https://github.com/pmd/pmd/issues/4317>: [java] Some AST nodes should not be TypeNodes o #4359 <https://github.com/pmd/pmd/issues/4359>: [java] Type resolution fails with NPE when the scope is not a type declaration o #4367 <https://github.com/pmd/pmd/issues/4367>: [java] Move testrule TypeResTest into internal * java-bestpractices o #342 <https://github.com/pmd/pmd/issues/342>: [java] AccessorMethodGeneration: Name clash with another public field not properly handled o #755 <https://github.com/pmd/pmd/issues/755>: [java] AccessorClassGeneration false positive for private constructors o #770 <https://github.com/pmd/pmd/issues/770>: [java] UnusedPrivateMethod yields false positive for counter-variant arguments o #807 <https://github.com/pmd/pmd/issues/807>: [java] AccessorMethodGeneration false positive with overloads o #833 <https://github.com/pmd/pmd/issues/833>: [java] ForLoopCanBeForeach should consider iterating on this o #1189 <https://github.com/pmd/pmd/issues/1189>: [java] UnusedPrivateMethod false positive from inner class via external class o #1205 <https://github.com/pmd/pmd/issues/1205>: [java] Improve ConstantsInInterface message to mention alternatives o #1212 <https://github.com/pmd/pmd/issues/1212>: [java] Don't raise JUnitTestContainsTooManyAsserts on JUnit 5's assertAll o #1422 <https://github.com/pmd/pmd/issues/1422>: [java] JUnitTestsShouldIncludeAssert false positive with inherited @Rule field o #1455 <https://github.com/pmd/pmd/issues/1455>: [java] JUnitTestsShouldIncludeAssert: False positives for assert methods named "check" and "verify" o #1563 <https://github.com/pmd/pmd/issues/1563>: [java] ForLoopCanBeForeach false positive with method call using index variable o #1565 <https://github.com/pmd/pmd/issues/1565>: [java] JUnitAssertionsShouldIncludeMessage false positive with AssertJ o #1747 <https://github.com/pmd/pmd/issues/1747>: [java] PreserveStackTrace false-positive o #1969 <https://github.com/pmd/pmd/issues/1969>: [java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class o #1998 <https://github.com/pmd/pmd/issues/1998>: [java] AccessorClassGeneration false-negative: subclass calls private constructor o #2130 <https://github.com/pmd/pmd/issues/2130>: [java] UnusedLocalVariable: false-negative with array o #2147 <https://github.com/pmd/pmd/issues/2147>: [java] JUnitTestsShouldIncludeAssert - false positives with lambdas and static methods o #2464 <https://github.com/pmd/pmd/issues/2464>: [java] LooseCoupling must ignore class literals: ArrayList.class o #2542 <https://github.com/pmd/pmd/issues/2542>: [java] UseCollectionIsEmpty can not detect the case |foo.bar().size()| o #2650 <https://github.com/pmd/pmd/issues/2650>: [java] UseTryWithResources false positive when AutoCloseable helper used o #2796 <https://github.com/pmd/pmd/issues/2796>: [java] UnusedAssignment false positive with call chains o #2797 <https://github.com/pmd/pmd/issues/2797>: [java] MissingOverride long-standing issues o #2806 <https://github.com/pmd/pmd/issues/2806>: [java] SwitchStmtsShouldHaveDefault false-positive with Java 14 switch non-fallthrough branches o #2822 <https://github.com/pmd/pmd/issues/2822>: [java] LooseCoupling rule: Extend to cover user defined implementations and interfaces o #2843 <https://github.com/pmd/pmd/pull/2843>: [java] Fix UnusedAssignment FP with field accesses o #2882 <https://github.com/pmd/pmd/issues/2882>: [java] UseTryWithResources - false negative for explicit close o #2883 <https://github.com/pmd/pmd/issues/2883>: [java] JUnitAssertionsShouldIncludeMessage false positive with method call o #2890 <https://github.com/pmd/pmd/issues/2890>: [java] UnusedPrivateMethod false positive with generics o #2946 <https://github.com/pmd/pmd/issues/2946>: [java] SwitchStmtsShouldHaveDefault false positive on enum inside enums o #3672 <https://github.com/pmd/pmd/pull/3672>: [java] LooseCoupling - fix false positive with generics o #3675 <https://github.com/pmd/pmd/pull/3675>: [java] MissingOverride - fix false positive with mixing type vars o #3858 <https://github.com/pmd/pmd/issues/3858>: [java] UseCollectionIsEmpty should infer local variable type from method invocation o #4516 <https://github.com/pmd/pmd/issues/4516>: [java] UnusedLocalVariable: false-negative with try-with-resources o #4517 <https://github.com/pmd/pmd/issues/4517>: [java] UnusedLocalVariable: false-negative with compound assignments o #4518 <https://github.com/pmd/pmd/issues/4518>: [java] UnusedLocalVariable: false-positive with multiple for-loop indices * java-codestyle o #1208 <https://github.com/pmd/pmd/issues/1208>: [java] PrematureDeclaration rule false-positive on variable declared to measure time o #1429 <https://github.com/pmd/pmd/issues/1429>: [java] PrematureDeclaration as result of method call (false positive) o #1480 <https://github.com/pmd/pmd/issues/1480>: [java] IdenticalCatchBranches false positive with return expressions o #1673 <https://github.com/pmd/pmd/issues/1673>: [java] UselessParentheses false positive with conditional operator o #1790 <https://github.com/pmd/pmd/issues/1790>: [java] UnnecessaryFullyQualifiedName false positive with enum constant o #1918 <https://github.com/pmd/pmd/issues/1918>: [java] UselessParentheses false positive with boolean operators o #2134 <https://github.com/pmd/pmd/issues/2134>: [java] PreserveStackTrace not handling |Throwable.addSuppressed(...)| o #2299 <https://github.com/pmd/pmd/issues/2299>: [java] UnnecessaryFullyQualifiedName false positive with similar package name o #2391 <https://github.com/pmd/pmd/issues/2391>: [java] UseDiamondOperator FP when expected type and constructed type have a different parameterization o #2528 <https://github.com/pmd/pmd/issues/2528>: [java] MethodNamingConventions - JUnit 5 method naming not support ParameterizedTest o #2739 <https://github.com/pmd/pmd/issues/2739>: [java] UselessParentheses false positive for string concatenation o #2748 <https://github.com/pmd/pmd/issues/2748>: [java] UnnecessaryCast false positive with unchecked cast o #2973 <https://github.com/pmd/pmd/issues/2973>: [java] New rule: UnnecessaryBoxing o #3195 <https://github.com/pmd/pmd/pull/3195>: [java] Improve rule UnnecessaryReturn to detect more cases o #3218 <https://github.com/pmd/pmd/pull/3218>: [java] Generalize UnnecessaryCast to flag all unnecessary casts o #3221 <https://github.com/pmd/pmd/issues/3221>: [java] PrematureDeclaration false positive for unused variables o #3238 <https://github.com/pmd/pmd/issues/3238>: [java] Improve ExprContext, fix FNs of UnnecessaryCast o #3500 <https://github.com/pmd/pmd/pull/3500>: [java] UnnecessaryBoxing - check for Integer.valueOf(String) calls o #4273 <https://github.com/pmd/pmd/issues/4273>: [java] CommentDefaultAccessModifier ignoredAnnotations should include "org.junit.jupiter.api.extension.RegisterExtension" by default o #4357 <https://github.com/pmd/pmd/pull/4357>: [java] Fix IllegalStateException in UseDiamondOperator rule o #4487 <https://github.com/pmd/pmd/issues/4487>: [java] UnnecessaryConstructor: false-positive with @Inject and @Autowired o #4511 <https://github.com/pmd/pmd/issues/4511>: [java] LocalVariableCouldBeFinal shouldn't report unused variables o #4512 <https://github.com/pmd/pmd/issues/4512>: [java] MethodArgumentCouldBeFinal shouldn't report unused parameters * java-design o #1014 <https://github.com/pmd/pmd/issues/1014>: [java] LawOfDemeter: False positive with lambda expression o #1605 <https://github.com/pmd/pmd/issues/1605>: [java] LawOfDemeter: False positive for standard UTF-8 charset name o #2160 <https://github.com/pmd/pmd/issues/2160>: [java] Issues with Law of Demeter o #2175 <https://github.com/pmd/pmd/issues/2175>: [java] LawOfDemeter: False positive for chained methods with generic method call o #2179 <https://github.com/pmd/pmd/issues/2179>: [java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property o #2180 <https://github.com/pmd/pmd/issues/2180>: [java] LawOfDemeter: False positive with Thread and ThreadLocalRandom o #2182 <https://github.com/pmd/pmd/issues/2182>: [java] LawOfDemeter: False positive with package-private access o #2188 <https://github.com/pmd/pmd/issues/2188>: [java] LawOfDemeter: False positive with fields assigned to local vars o #2536 <https://github.com/pmd/pmd/issues/2536>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal can't detect inner class o #3668 <https://github.com/pmd/pmd/pull/3668>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - fix FP with inner private classes o #3754 <https://github.com/pmd/pmd/issues/3754>: [java] SingularField false positive with read in while condition o #3786 <https://github.com/pmd/pmd/issues/3786>: [java] SimplifyBooleanReturns should consider operator precedence o #4238 <https://github.com/pmd/pmd/pull/4238>: [java] Make LawOfDemeter not use the rulechain o #4254 <https://github.com/pmd/pmd/issues/4254>: [java] ImmutableField - false positive with Lombok @Setter o #4477 <https://github.com/pmd/pmd/issues/4477>: [java] SignatureDeclareThrowsException: false-positive with TestNG annotations o #4490 <https://github.com/pmd/pmd/issues/4490>: [java] ImmutableField - false negative with Lombok @Getter * java-documentation o #4369 <https://github.com/pmd/pmd/pull/4369>: [java] Improve CommentSize o #4416 <https://github.com/pmd/pmd/pull/4416>: [java] Fix reported line number in CommentContentRule * java-errorprone o #659 <https://github.com/pmd/pmd/issues/659>: [java] MissingBreakInSwitch - last default case does not contain a break o #1005 <https://github.com/pmd/pmd/issues/1005>: [java] CloneMethodMustImplementCloneable triggers for interfaces o #1669 <https://github.com/pmd/pmd/issues/1669>: [java] NullAssignment - FP with ternay and null as constructor argument o #1899 <https://github.com/pmd/pmd/issues/1899>: [java] Recognize @SuppressWanings("fallthrough") for MissingBreakInSwitch o #2320 <https://github.com/pmd/pmd/issues/2320>: [java] NullAssignment - FP with ternary and null as method argument o #2532 <https://github.com/pmd/pmd/issues/2532>: [java] AvoidDecimalLiteralsInBigDecimalConstructor can not detect the case |new BigDecimal(Expression)| o #2579 <https://github.com/pmd/pmd/issues/2579>: [java] MissingBreakInSwitch detects the lack of break in the last case o #2880 <https://github.com/pmd/pmd/issues/2880>: [java] CompareObjectsWithEquals - false negative with type res o #2893 <https://github.com/pmd/pmd/issues/2893>: [java] Remove special cases from rule EmptyCatchBlock o #2894 <https://github.com/pmd/pmd/issues/2894>: [java] Improve MissingBreakInSwitch o #3071 <https://github.com/pmd/pmd/issues/3071>: [java] BrokenNullCheck FP with PMD 6.30.0 o #3087 <https://github.com/pmd/pmd/issues/3087>: [java] UnnecessaryBooleanAssertion overlaps with SimplifiableTestAssertion o #3100 <https://github.com/pmd/pmd/issues/3100>: [java] UseCorrectExceptionLogging FP in 6.31.0 o #3173 <https://github.com/pmd/pmd/issues/3173>: [java] UseProperClassLoader false positive o #3351 <https://github.com/pmd/pmd/issues/3351>: [java] ConstructorCallsOverridableMethod ignores abstract methods o #3400 <https://github.com/pmd/pmd/issues/3400>: [java] AvoidUsingOctalValues FN with underscores o #3843 <https://github.com/pmd/pmd/issues/3843>: [java] UseEqualsToCompareStrings should consider return type o #4356 <https://github.com/pmd/pmd/pull/4356>: [java] Fix NPE in CloseResourceRule o #4449 <https://github.com/pmd/pmd/issues/4449>: [java] AvoidAccessibilityAlteration: Possible false positive in AvoidAccessibilityAlteration rule when using Lambda expression o #4493 <https://github.com/pmd/pmd/issues/4493>: [java] MissingStaticMethodInNonInstantiatableClass: false-positive about @Inject o #4505 <https://github.com/pmd/pmd/issues/4505>: [java] ImplicitSwitchFallThrough NPE in PMD 7.0.0-rc1 o #4513 <https://github.com/pmd/pmd/issues/4513>: [java] UselessOperationOnImmutable various false negatives with String o #4514 <https://github.com/pmd/pmd/issues/4514>: [java] AvoidLiteralsInIfCondition false positive and negative for String literals when ignoreExpressions=true * java-multithreading o #2537 <https://github.com/pmd/pmd/issues/2537>: [java] DontCallThreadRun can't detect the case that call run() in |this.run()| o #2538 <https://github.com/pmd/pmd/issues/2538>: [java] DontCallThreadRun can't detect the case that call run() in |foo.bar.run()| o #2577 <https://github.com/pmd/pmd/issues/2577>: [java] UseNotifyAllInsteadOfNotify falsely detect a special case with argument: |foo.notify(bar)| o #4483 <https://github.com/pmd/pmd/issues/4483>: [java] NonThreadSafeSingleton false positive with double-checked locking * java-performance o #1224 <https://github.com/pmd/pmd/issues/1224>: [java] InefficientEmptyStringCheck false negative in anonymous class o #2587 <https://github.com/pmd/pmd/issues/2587>: [java] AvoidArrayLoops could also check for list copy through iterated List.add() o #2712 <https://github.com/pmd/pmd/issues/2712>: [java] SimplifyStartsWith false-positive with AssertJ o #3486 <https://github.com/pmd/pmd/pull/3486>: [java] InsufficientStringBufferDeclaration: Fix NPE o #3848 <https://github.com/pmd/pmd/issues/3848>: [java] StringInstantiation: false negative when using method result * kotlin o #419 <https://github.com/pmd/pmd/issues/419>: [kotlin] Add support for Kotlin o #4389 <https://github.com/pmd/pmd/pull/4389>: [kotlin] Update grammar to version 1.8 * swift o #1877 <https://github.com/pmd/pmd/pull/1877>: [swift] Feature/swift rules o #1882 <https://github.com/pmd/pmd/pull/1882>: [swift] UnavailableFunction Swift rule * xml o #1800 <https://github.com/pmd/pmd/pull/1800>: [xml] Unimplement org.w3c.dom.Node from the XmlNodeWrapper ✨ External Contributions * #1658 <https://github.com/pmd/pmd/pull/1658>: [core] Node support for Antlr-based languages - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1698 <https://github.com/pmd/pmd/pull/1698>: [core] [swift] Antlr Base Parser adapter and Swift Implementation - Lucas Soncini <https://github.com/lsoncini> (@lsoncini) * #1774 <https://github.com/pmd/pmd/pull/1774>: [core] Antlr visitor rules - Lucas Soncini <https://github.com/lsoncini> (@lsoncini) * #1877 <https://github.com/pmd/pmd/pull/1877>: [swift] Feature/swift rules - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1881 <https://github.com/pmd/pmd/pull/1881>: [doc] Add ANTLR documentation - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1882 <https://github.com/pmd/pmd/pull/1882>: [swift] UnavailableFunction Swift rule - Tomás de Lucca <https://github.com/tomidelucca> (@tomidelucca) * #2830 <https://github.com/pmd/pmd/pull/2830>: [apex] Apexlink POC - Kevin Jones <https://github.com/nawforce> (@nawforce) * #3866 <https://github.com/pmd/pmd/pull/3866>: [core] Add CLI Progress Bar - @JerritEic <https://github.com/JerritEic> (@JerritEic) * #4402 <https://github.com/pmd/pmd/pull/4402>: [javascript] CPD: add support for Typescript using antlr4 grammar - Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/>) * #4403 <https://github.com/pmd/pmd/pull/4403>: [julia] CPD: Add support for Julia code duplication - Wener <https://github.com/wener-tiobe> (@wener-tiobe) * #4412 <https://github.com/pmd/pmd/pull/4412>: [doc] Added new error msg to ConstantsInInterface - David Ljunggren <https://github.com/dague1> (@dague1) * #4428 <https://github.com/pmd/pmd/pull/4428>: [apex] ApexBadCrypto bug fix for #4427 - inline detection of hard coded values - Steven Stearns <https://github.com/sfdcsteve> (@sfdcsteve) * #4444 <https://github.com/pmd/pmd/pull/4444>: [java] CommentDefaultAccessModifier - ignore org.junit.jupiter.api.extension.RegisterExtension by default - Nirvik Patel <https://github.com/nirvikpatel> (@nirvikpatel) * #4450 <https://github.com/pmd/pmd/pull/4450>: [java] Fix #4449 AvoidAccessibilityAlteration: Correctly handle Lambda expressions in PrivilegedAction scenarios - Seren <https://github.com/mohui1999> (@mohui1999) * #4452 <https://github.com/pmd/pmd/pull/4452>: [doc] Update PMD_APEX_ROOT_DIRECTORY documentation reference - nwcm <https://github.com/nwcm> (@nwcm) * #4474 <https://github.com/pmd/pmd/pull/4474>: [java] ImmutableField: False positive with lombok (fixes #4254) - Pim van der Loos <https://github.com/PimvanderLoos> (@PimvanderLoos) * #4488 <https://github.com/pmd/pmd/pull/4488>: [java] Fix #4477: A false-positive about SignatureDeclareThrowsException - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4494 <https://github.com/pmd/pmd/pull/4494>: [java] Fix #4487: A false-positive about UnnecessaryConstructor and @Inject and @Autowired - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4495 <https://github.com/pmd/pmd/pull/4495>: [java] Fix #4493: false-positive about MissingStaticMethodInNonInstantiatableClass and @Inject - AnnaDev <https://github.com/LynnBroe> (@LynnBroe) * #4520 <https://github.com/pmd/pmd/pull/4520>: [doc] Fix typo: missing closing quotation mark after CPD-END - João Dinis Ferreira <https://github.com/joaodinissf> (@joaodinissf) 📈 Stats * 4557 commits * 572 closed tickets & PRs * Days since last release: 35 |
From: David D. <dav...@or...> - 2023-03-28 14:17:41
|
Welcome to the latest OpenJDK Quality Outreach update! Last week was busy as we released both Java 20 and JavaFX 20. To celebrate the launch, we hosted a live event focused on Java 20, i.e. Level Up Java Day. All the sessions recordings will be made available shortly on the YouTube Java channel. Some recent events shown us that it is useful to conduct tests using the latest early-access OpenJDK builds. This will benefit the OpenJDK codebase but also your own codebase. Sometime, a failure could be due to an actual regression introduced in OpenJDK. In that case, we obviously want to hear about it while we can still address it. But sometime, a failure could also be due to a subtle behaviour change… that works as expected. Regardless of if it's a bug or a test that is now broken due to a behaviour change, we want to hear from you. In the latter case, it might also mean that we should probably communicate more about those changes even if they might seem subtle. On that note, please make sure to check all the 2 Heads-Up below: "Support for Unicode CLDR Version 42" and "New network interface names on Windows". So please, let us know if you observe anything using the latest early-access builds of JDK 21. ## Heads-Up - JDK 20 - Support for Unicode CLDR Version 42 The JDK's locale data is based on the Unicode Consortium's Unicode Common Locale Data Repository (CLDR). As mentioned in the December 2022 Quality Outreach newsletter [1], JDK 20 upgraded CLDR [2] to version 42 [3], which was released in October 2022. This version includes a "more sophisticated handling of spaces" [4] that replaces regular spaces with non-breaking spaces (NBSP / `\u00A0`) or narrow non-breaking spaces (NNBSP / `\u202F`): - in time formats between `a` and time - in unit formats between {0} and unit - in Cyrillic date formats before year marker such as `г` Other noticeable changes include: * " at " is no longer used for standard date/time format ’ [5] * fix first day of week info for China (CN) [6] * Japanese: Support numbers up to 9999京 [7] As a consequence, production and test code that produces or parses locale-dependent strings like formatted dates and times may change behavior in potentially breaking ways (e.g. when a handcrafted datetime string with a regular space is parsed, but the parser now expects an NBSP or NNBSP). Issues can be hard to analyze because expected and actual strings look very similar or even identical in various text representations. To detect and fix these issues, make sure to use a text editor that displays different kinds of spaces differently. If the required fixes can't be implemented when upgrading to JDK 20, consider using the JVM argument `-Djava.locale.providers=COMPAT` to use legacy locale data. Note that this limits some locale-related functionality and treat it as a temporary workaround, not a proper solution. Moreover, the `COMPAT` option will be eventually removed in the future. It is also important to keep in mind that this kind of locale data evolves regularly so programs parsing/composing the locale data by themselves should be routinely checked with each JDK release. [1] https://mail.openjdk.org/pipermail/quality-discuss/2022-December/001100.html [2] https://bugs.openjdk.org/browse/JDK-8284840 [3] https://cldr.unicode.org/index/downloads/cldr-42 [4] https://unicode-org.atlassian.net/browse/CLDR-14032 [5] https://unicode-org.atlassian.net/browse/CLDR-14831 [6] https://unicode-org.atlassian.net/browse/CLDR-11510 [7] https://unicode-org.atlassian.net/browse/CLDR-15966 ## Heads-Up - JDK 21 - New network interface names on Windows Network Names that the JDK assigns to network interfaces on Windows are changing in JDK 21 [8]. The JDK historically synthesized names for network interfaces on Windows. This has changed to use the names assigned by the Windows operating system. For example, the JDK may have historically assigned a name such as “eth0” for an ethernet interface and “lo” for the loopback. The equivalent names that Windows assigns may be names such as “ethernet_32768” and “loopback_0". This change may impact code that does a lookup of network interfaces with the `NetworkInterace.getByName(String name)` method. It also may also be surprising to code that enumerates all network interfaces with the `NetworkInterfaces.networkInterfaces()` or `NetworkInterface.getNetworkInterfaces()` methods as the names of the network interfaces will look different to previous releases. Depending on configuration, it is possible that enumerating all network interfaces will enumerate network interfaces that weren’t previously enumerated because they didn’t have an Internet Protocol address assigned. The display name returned by `NetworkInterface::getDisplayName` has not changed so this should facilitate the identification of network interfaces when using Windows native tools. [8] https://bugs.openjdk.org/browse/JDK-8303898 ## JDK 20 General Availability JDK 20, the reference implementation of Java 20, is now Generally Available [9]. The GA builds 36 are available [10], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [11] and the javadocs here [12]. This release includes 7 JEPs, all in various stages of incubation and preview: - JEP 429: Scoped Values (Incubator) - JEP 432: Record Patterns (2nd Preview) - JEP 433: Pattern Matching for switch (4th Preview) - JEP 434: Foreign Function & Memory API (2nd Preview) - JEP 436: Virtual Threads (2nd Preview) - JEP 437: Structured Concurrency (2nd Incubator) along with hundreds of smaller enhancements and thousands of bug fixes. Thank you to everyone who contributed to this release, including participants in this program who provided feedback on JDK 20. [9] https://mail.openjdk.org/pipermail/jdk-dev/2023-March/007517.html [10] https://jdk.java.net/20/ [11] https://jdk.java.net/20/release-notes [12] https://docs.oracle.com/en/java/javase/20/docs/api/ ## JavaFX 20 General Availability Open-source builds of JavaFX 20 are now Generally Available [13], under the GNU General Public License, version 2, with the Classpath Exception. The JavaFX runtime is delivered as an SDK and as a set of jmods for each platform. You can use the SDK to compile and run JavaFX applications. You can use the jmods with jlink to create a JDK that includes the JavaFX modules, and optionally, your modular application. JavaFX 20 is designed to work with JDK 20, but it is known to work with JDK 17 and later versions. The Release Notes are available here [14], JavaFX 20 API javadocs are also available [15]. [13] https://jdk.java.net/javafx20/ [14] https://github.com/openjdk/jfx/blob/jfx20/doc-files/release-notes-20.md [15] https://download.java.net/java/GA/javafx20/bdc68b4b9cbc4ebcb30745c85038d91d/docs/api/overview-summary.html ## JDK 21 Early-Access builds The latest early-access, i.e., builds 15 are available [16], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [17]. [16] https://jdk.java.net/21/ [17] https://jdk.java.net/21/release-notes ### Changes in recent builds that may be of interest: JDK 21 build 15 - JDK-8303018: Unicode Emoji Properties - JDK-8298469: Obsolete legacy parallel class loading workaround for non-parallel-capable class loaders - JDK-8191565: Last-ditch Full GC should also move humongous objects - JDK-8292818: replace 96-bit representation for field metadata with variable-sized streams - JDK-8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics - JDK-8303648: Add String.indexOf(String str, int beginIndex, int endIndex) - JDK-8304139: Add <init> and <clinit> method constants to ConstantDescs - JDK-8015831: Add lint check for calling overridable methods from a constructor JDK 21 build 14: - JDK-8303410: Remove ContentSigner APIs and jarsigner -altsigner and -altsignerpath options - JDK-8302659: Modernize Windows native code for NetworkInterface - JDK-8298966: Deprecate JMX Subject Delegation and the method JMXConnector.getMBeanServerConnection(Subject) for removal. - JDK-8294982: Implementation of Classfile API - JDK-8303820: Simplify type metadata JDK 21 build 13: - JDK-8303413: (fs) Ignore polling interval sensitivity modifiers in PollingWatchService - JDK-8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal - JDK-8295425: Match the default priv exp length between SunPKCS11 and other JDK providers - JDK-8303409: Add Windows AArch64 ABI support to the Foreign Function & Memory API - JDK-8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) JDK 21 build 12: - JDK-8301119: Support for GB18030-2022 - JDK-8026369: javac potentially ambiguous overload warning needs an improved scheme - JDK-8293667: Align jlink's --compress option with jmod's --compress option - JDK-8282319: java.util.Locale method to stream available Locales JDK 21 build 11: - JDK-8302385: Remove MetaspaceReclaimPolicy=none - JDK-8300575: JVMTI support when using alternative virtual thread implementation - JDK-8301992: Embed SymbolTable CHT node - JDK-8301749: Tracking malloc pooled memory size JDK 21 build 10: - JDK-8301700: Increase the default TLS Diffie-Hellman group size from 1024-bit to 2048-bit - JDK-8301260: Add system property to toggle XML Signature secure validation mode - JDK-8297632: InputStream.transferTo() method should specify what the return value should be when the number of bytes … - JDK-8245654: Add Certigna Root CA - JDK-8301819: Enable continuations code by default - JDK-8300914: Allow `@` as an escape in documentation comments - JDK-8225409: G1: Remove the Hot Card Cache ## JavaFX 21 Early-Access Builds These are early access builds of the JavaFX 21 Runtime, built from openjdk/jfx [18]. It is intended to allow JavaFX application developers to build and test their applications with JavaFX 21 on JDK 21. The latest builds 9 (2023/3/20) are now available [19] and are provided under the GNU General Public License, version 2, with the Classpath Exception. Please report feedback on the openjfx-dev mailing list [20]. [18] https://github.com/openjdk/jfx [19] https://jdk.java.net/javafx21/ [20] http://mail.openjdk.org/mailman/listinfo/openjfx-dev ## New Generational ZGC Early-Access Builds The latest builds 21-genzgc+5-33 (2023/3/9) are available [21]. These open-source binaries of Generational ZGC [22] are based on an incomplete version of JDK 21 and are provided under the GNU General Public License, version 2, with the Classpath Exception. Please send feedback on the zgc-dev mailing list [23]. [21] https://jdk.java.net/genzgc/ [22] https://openjdk.org/jeps/439 [23] http://mail.openjdk.org/mailman/listinfo/zgc-dev ## Topics of Interest: The Arrival of Java 20! https://inside.java/2023/03/21/the-arrival-of-java-20/ Video: Java First. Java Always. | Level Up Keynote https://inside.java/2023/03/22/levelup-keynote/ Video: Java 20 Unboxing - Inside Java Newscast https://inside.java/2023/03/23/newscast-44/ JDK 20 Security Enhancements https://seanjmullan.org/blog/2023/03/22/jdk20 G1/Parallel/Serial GC improvements in JDK 20 https://tschatzl.github.io/2023/03/14/jdk20-g1-parallel-gc-changes.html Podcast: “Preview Features: A Look Back and A Look Ahead” with Alex Buckley https://inside.java/2023/03/21/podcast-030/ Video: Write performant Java code with the Vector API - JEP Café https://inside.java/2023/03/14/jepcafe18/ Video: Data-Oriented Programming in Java https://inside.java/2023/03/09/data-oriented-programming/ Video: ZGC - Java’s Highly Scalable Low-Latency Garbage Collector https://inside.java/2023/03/05/stackwalker-01/ Video: The Holy Grail of Java Performance - Inside Java Newscast https://inside.java/2023/03/02/newscast-43/ Video: Programmer's Guide to JDK Flight Recorder https://inside.java/2023/02/27/programmer-guide-to-jfr/ Video: Foreign Function & Memory API Live https://inside.java/2023/02/16/ffm-api/ JEP targeted to JDK 21: 430: String Templates (Preview) https://openjdk.org/jeps/430 JEP targeted to JDK 21: 431: Sequenced Collections https://openjdk.org/jeps/431 ~ Thanks for participating in the OpenJDK Quality Outreach program. And as always, if you find an issue, please let us know through the usual channels. -- David |
From: Andreas D. <and...@pm...> - 2023-03-25 14:04:58
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.0.0-rc1 * Documentation: https://docs.pmd-code.org/pmd-doc-7.0.0-rc1/ 25-March-2023 - 7.0.0-rc1 We're excited to bring you the next major version of PMD! Since this is a big release, we provide here only a concise version of the release notes. We prepared a separate page with the full Detailed Release Notes for PMD 7.0.0 <https://pmd.github.io/pmd-7.0.0-rc1/pmd_release_notes_pmd7.html>. *ℹ️ Release Candidates* PMD 7.0.0 is finally almost ready. In order to gather feedback, we are going to ship a couple of release candidates. These are officially available on GitHub and Maven Central and can be used as usual (e.g. as a dependency). We encourage you to try out the new features, but keep in mind that we may introduce API breaking changes between the release candidates. It should be stable enough if you don't use custom rules. We have still some tasks planned for the next release candidates. You can see the progress in PMD 7 Tracking Issue #3898 <https://github.com/pmd/pmd/issues/3898>. If you find any problem or difficulty while updating from PMD 6, please provide feedback via our issue tracker <https://github.com/pmd/pmd/issues/new/choose>. That way we can improve the experience for all. Table Of Contents * 🚀 Major Features and Enhancements <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#🚀-major-features-and-enhancements> o New official logo <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#new-official-logo> o Revamped Java module <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#revamped-java-module> o Revamped Command Line Interface <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#revamped-command-line-interface> o Full Antlr support <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#full-antlr-support> * 🎉 Language Related Changes <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#🎉-language-related-changes> o New: Swift support <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#new:-swift-support> o New: Kotlin support (experimental) <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#new:-kotlin-support-(experimental)> o Changed: JavaScript support <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#changed:-javascript-support> o Changed: Language versions <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#changed:-language-versions> * 🌟 New and changed rules <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#🌟-new-and-changed-rules> o New Rules <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#new-rules> o Changed Rules <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#changed-rules> o Removed Rules <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#removed-rules> * 🚨 API <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#🚨-api> * 💥 Compatibility and migration notes <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#💥-compatibility-and-migration-notes> * 🐛 Fixed Issues <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#🐛-fixed-issues> * ✨ External Contributions <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#✨-external-contributions> * 📈 Stats <https://sourceforge.net/p/pmd/news/2023/03/pmd-700-rc1-25-march-2023-released/#📈-stats> 🚀 Major Features and Enhancements New official logo The new official logo of PMD: New PMD Logo Revamped Java module * Java grammar substantially refactored - more correct regarding the Java Language Specification (JLS) * Built-in rules have been upgraded for the changed AST * Rewritten type resolution framework and symbol table correctly implements the JLS * AST exposes more semantic information (method calls, field accesses) For more information, see the Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html>. Contributors: Clément Fournier <https://github.com/oowekyala> (@oowekyala <https://sourceforge.net/u/oowekyala/>), Andreas Dangel <https://github.com/adangel> (@adangel <https://sourceforge.net/u/adangel/>), Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Revamped Command Line Interface * unified and consistent Command Line Interface for both Linux/Unix and Windows across our different utilities * single script |pmd| (|pmd.bat| for Windows) to launch the different utilities: * |pmd check| to run PMD rules and analyze a project * |pmd cpd| to run CPD (copy paste detector) * |pmd designer| to run the PMD Rule Designer * progress bar support for |pmd check| * shell completion Demo For more information, see the Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html>. Contributors: Juan Martín Sotuyo Dodero <https://github.com/jsotuyod> (@jsotuyod) Full Antlr support * Antlr <https://www.antlr.org/> based grammars can now be used to build full-fledged PMD rules. * Previously, Antlr grammar could only be used for CPD * New supported languages: Swift and Kotlin For more information, see the Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html>. Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) 🎉 Language Related Changes Note that this is just a concise listing of the highlight. For more information on the languages, see the Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html>. New: Swift support * use PMD to analyze Swift code with PMD rules * initially 4 built-in rules Contributors: Lucas Soncini <https://github.com/lsoncini> (@lsoncini), Matías Fraga <https://github.com/matifraga> (@matifraga), Tomás De Lucca <https://github.com/tomidelucca> (@tomidelucca) New: Kotlin support (experimental) * use PMD to analyze Kotlin code with PMD rules * Support for Kotlin 1.8 grammar * initially 2 built-in rules Changed: JavaScript support * latest version supports ES6 and also some new constructs (see Rhino <https://github.com/mozilla/rhino>]) * comments are retained Changed: Language versions * more predefined language versions for each supported language * can be used to limit rule execution for specific versions only with |minimumLanguageVersion| and |maximumLanguageVersion| attributes. 🌟 New and changed rules New Rules *Apex* * |UnusedMethod| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_apex_design.html#unusedmethod> finds unused methods in your code. *Java* * |UnnecessaryBoxing| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_codestyle.html#unnecessaryboxing> reports boxing and unboxing conversions that may be made implicit. *Kotlin* * |FunctionNameTooShort| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_kotlin_bestpractices.html#functionnametooshort> * |OverrideBothEqualsAndHashcode| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode> *Swift* * |ProhibitedInterfaceBuilder| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder> * |UnavailableFunction| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_swift_bestpractices.html#unavailablefunction> * |ForceCast| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_swift_errorprone.html#forcecast> * |ForceTry| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_swift_errorprone.html#forcetry> Changed Rules *Java* * |UnnecessaryFullyQualifiedName| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname>: 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. * |UselessParentheses| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_codestyle.html#uselessparentheses>: the rule has two new properties which control how strict the rule should be applied. With |ignoreClarifying| (default: true) parentheses that are strictly speaking not necessary are allowed, if they separate expressions of different precedence. The other property |ignoreBalancing| (default: true) is similar, in that it allows parentheses that help reading and understanding the expressions. * |LooseCoupling| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_bestpractices.html#loosecoupling>: the rule has a new property to allow some types to be coupled to (|allowedTypes|). * |EmptyCatchBlock| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_errorprone.html#emptycatchblock>: |CloneNotSupportedException| and |InterruptedException| are not special-cased anymore. Rename the exception parameter to |ignored| to ignore them. * |DontImportSun| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_errorprone.html#dontimportsun>: |sun.misc.Signal| is not special-cased anymore. * |UseDiamondOperator| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_codestyle.html#usediamondoperator>: the property |java7Compatibility| is removed. The rule now handles Java 7 properly without a property. * |SingularField| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_design.html#singularfield>: Properties |checkInnerClasses| and |disallowNotAssignment| are removed. The rule is now more precise and will check these cases properly. * |UseUtilityClass| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_design.html#useutilityclass>: The property |ignoredAnnotations| has been removed. * |LawOfDemeter| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_design.html#lawofdemeter>: the rule has a new property |trustRadius|. This defines the maximum degree of trusted data. The default of 1 is the most restrictive. * |CommentContent| <https://pmd.github.io/pmd-7.0.0-rc1/pmd_rules_java_documentation.html#commentcontent>: The properties |caseSensitive| and |disallowedTerms| are removed. The new property |fobiddenRegex| can be used now to define the disallowed terms with a single regular expression. Removed Rules Many rules, that were previously deprecated have been finally removed. See Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html> for the complete list. 🚨 API 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. Also, there are some improvement and changes in different areas. For the detailed description of the changes listed here, see Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html>. * Miscellaneous smaller changes and cleanups * XPath 3.1 support for XPath-based rules * Node stream API for AST traversal * Metrics framework * Testing framework * Language Lifecycle and Language Properties 💥 Compatibility and migration notes See Detailed Release Notes for PMD 7 <https://sourceforge.net/p/pmd/news/2023/03/pmd_release_notes_pmd7.html>. 🐛 Fixed Issues * miscellaneous o #881 <https://github.com/pmd/pmd/issues/881>: [all] Breaking API changes for 7.0.0 o #896 <https://github.com/pmd/pmd/issues/896>: [all] Use slf4j o #1431 <https://github.com/pmd/pmd/pull/1431>: [ui] Remove old GUI applications (designerold, bgastviewer) o #1451 <https://github.com/pmd/pmd/issues/1451>: [core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string o #2496 <https://github.com/pmd/pmd/issues/2496>: Update PMD 7 Logo on landing page o #2497 <https://github.com/pmd/pmd/issues/2497>: PMD 7 Logo page o #2498 <https://github.com/pmd/pmd/issues/2498>: Update PMD 7 Logo in documentation o #3797 <https://github.com/pmd/pmd/issues/3797>: [all] Use JUnit5 * ant o #4080 <https://github.com/pmd/pmd/issues/4080>: [ant] Split off Ant integration into a new submodule * core o #880 <https://github.com/pmd/pmd/issues/880>: [core] Make visitors generic o #1622 <https://github.com/pmd/pmd/pull/1622>: [core] NodeStream API o #1687 <https://github.com/pmd/pmd/issues/1687>: [core] Deprecate and Remove XPath 1.0 support o #1785 <https://github.com/pmd/pmd/issues/1785>: [core] Allow abstract node types to be valid rulechain visits o #1825 <https://github.com/pmd/pmd/pull/1825>: [core] Support NoAttribute for XPath o #2038 <https://github.com/pmd/pmd/issues/2038>: [core] Remove DCD o #2218 <https://github.com/pmd/pmd/issues/2218>: [core] |isFindBoundary| should not be an attribute o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #2239 <https://github.com/pmd/pmd/issues/2239>: [core] Merging Javacc build scripts o #2518 <https://github.com/pmd/pmd/issues/2518>: [core] Language properties o #2602 <https://github.com/pmd/pmd/issues/2602>: [core] Remove ParserOptions o #2614 <https://github.com/pmd/pmd/pull/2614>: [core] Upgrade Saxon, add XPath 3.1, remove Jaxen o #2696 <https://github.com/pmd/pmd/pull/2696>: [core] Remove DFA o #2821 <https://github.com/pmd/pmd/issues/2821>: [core] Rule processing error filenames are missing paths o #2873 <https://github.com/pmd/pmd/issues/2873>: [core] Utility classes in pmd 7 o #2885 <https://github.com/pmd/pmd/issues/2885>: [core] Error recovery mode o #3203 <https://github.com/pmd/pmd/issues/3203>: [core] Replace RuleViolationFactory implementations with ViolationDecorator o #3692 <https://github.com/pmd/pmd/pull/3692>: [core] Analysis listeners o #3782 <https://github.com/pmd/pmd/issues/3782>: [core] Language lifecycle o #3815 <https://github.com/pmd/pmd/issues/3815>: [core] Update Saxon HE to 10.7 o #3893 <https://github.com/pmd/pmd/pull/3893>: [core] Text documents o #3902 <https://github.com/pmd/pmd/issues/3902>: [core] Violation decorators o #3918 <https://github.com/pmd/pmd/issues/3918>: [core] Make LanguageRegistry non static o #3922 <https://github.com/pmd/pmd/pull/3922>: [core] Better error reporting for the ruleset parser o #4035 <https://github.com/pmd/pmd/issues/4035>: [core] ConcurrentModificationException in DefaultRuleViolationFactory o #4120 <https://github.com/pmd/pmd/issues/4120>: [core] Explicitly name all language versions o #4353 <https://github.com/pmd/pmd/pull/4353>: [core] Micro optimizations for Node API o #4365 <https://github.com/pmd/pmd/pull/4365>: [core] Improve benchmarking o #4420 <https://github.com/pmd/pmd/pull/4420>: [core] Remove PMD.EOL * cli o #2234 <https://github.com/pmd/pmd/issues/2234>: [core] Consolidate PMD CLI into a single command o #3828 <https://github.com/pmd/pmd/issues/3828>: [core] Progress reporting o #4079 <https://github.com/pmd/pmd/issues/4079>: [cli] Split off CLI implementation into a pmd-cli submodule * testing o #2435 <https://github.com/pmd/pmd/issues/2435>: [test] Remove duplicated Dummy language module o #4234 <https://github.com/pmd/pmd/issues/4234>: [test] Tests that change the logging level do not work Language specific fixes: * apex o #1937 <https://github.com/pmd/pmd/issues/1937>: [apex] Apex should only have a single RootNode o #1648 <https://github.com/pmd/pmd/issues/1648>: [apex,vf] Remove CodeClimate dependency o #1750 <https://github.com/pmd/pmd/pull/1750>: [apex] Remove apex statistical rules o #2836 <https://github.com/pmd/pmd/pull/2836>: [apex] Remove Apex ProjectMirror o #4427 <https://github.com/pmd/pmd/issues/4427>: [apex] ApexBadCrypto test failing to detect inline code * apex-design o #2667 <https://github.com/pmd/pmd/issues/2667>: [apex] Integrate nawforce/ApexLink to build robust Unused rule * java o #520 <https://github.com/pmd/pmd/issues/520>: [java] Allow |@SuppressWarnings| with constants instead of literals o #864 <https://github.com/pmd/pmd/issues/864>: [java] Similar/duplicated implementations for determining FQCN o #905 <https://github.com/pmd/pmd/issues/905>: [java] Add new node for anonymous class declaration o #910 <https://github.com/pmd/pmd/issues/910>: [java] AST inconsistency between primitive and reference type arrays o #997 <https://github.com/pmd/pmd/issues/997>: [java] Java8 parsing corner case with annotated array types o #998 <https://github.com/pmd/pmd/issues/998>: [java] AST inconsistencies around FormalParameter o #1019 <https://github.com/pmd/pmd/issues/1019>: [java] Breaking Java Grammar changes for PMD 7.0.0 o #1124 <https://github.com/pmd/pmd/issues/1124>: [java] ImmutableList implementation in the qname codebase o #1128 <https://github.com/pmd/pmd/issues/1128>: [java] Improve ASTLocalVariableDeclaration o #1150 <https://github.com/pmd/pmd/issues/1150>: [java] ClassOrInterfaceType AST improvements o #1207 <https://github.com/pmd/pmd/issues/1207>: [java] Resolve explicit types using FQCNs, without hitting the classloader o #1367 <https://github.com/pmd/pmd/issues/1367>: [java] Parsing error on annotated inner class o #1661 <https://github.com/pmd/pmd/issues/1661>: [java] About operator nodes o #2366 <https://github.com/pmd/pmd/pull/2366>: [java] Remove qualified names o #2819 <https://github.com/pmd/pmd/issues/2819>: [java] GLB bugs in pmd 7 o #3763 <https://github.com/pmd/pmd/issues/3763>: [java] Ambiguous reference error in valid code o #3749 <https://github.com/pmd/pmd/issues/3749>: [java] Improve |isOverridden| in ASTMethodDeclaration o #3750 <https://github.com/pmd/pmd/issues/3750>: [java] Make symbol table support instanceof pattern bindings o #3752 <https://github.com/pmd/pmd/issues/3752>: [java] Expose annotations in symbol API o #4237 <https://github.com/pmd/pmd/pull/4237>: [java] Cleanup handling of Java comments o #4317 <https://github.com/pmd/pmd/issues/4317>: [java] Some AST nodes should not be TypeNodes o #4359 <https://github.com/pmd/pmd/issues/4359>: [java] Type resolution fails with NPE when the scope is not a type declaration o #4367 <https://github.com/pmd/pmd/issues/4367>: [java] Move testrule TypeResTest into internal * java-bestpractices o #342 <https://github.com/pmd/pmd/issues/342>: [java] AccessorMethodGeneration: Name clash with another public field not properly handled o #755 <https://github.com/pmd/pmd/issues/755>: [java] AccessorClassGeneration false positive for private constructors o #770 <https://github.com/pmd/pmd/issues/770>: [java] UnusedPrivateMethod yields false positive for counter-variant arguments o #807 <https://github.com/pmd/pmd/issues/807>: [java] AccessorMethodGeneration false positive with overloads o #833 <https://github.com/pmd/pmd/issues/833>: [java] ForLoopCanBeForeach should consider iterating on this o #1189 <https://github.com/pmd/pmd/issues/1189>: [java] UnusedPrivateMethod false positive from inner class via external class o #1205 <https://github.com/pmd/pmd/issues/1205>: [java] Improve ConstantsInInterface message to mention alternatives o #1212 <https://github.com/pmd/pmd/issues/1212>: [java] Don't raise JUnitTestContainsTooManyAsserts on JUnit 5's assertAll o #1422 <https://github.com/pmd/pmd/issues/1422>: [java] JUnitTestsShouldIncludeAssert false positive with inherited @Rule field o #1565 <https://github.com/pmd/pmd/issues/1565>: [java] JUnitAssertionsShouldIncludeMessage false positive with AssertJ o #1747 <https://github.com/pmd/pmd/issues/1747>: [java] PreserveStackTrace false-positive o #1969 <https://github.com/pmd/pmd/issues/1969>: [java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class o #1998 <https://github.com/pmd/pmd/issues/1998>: [java] AccessorClassGeneration false-negative: subclass calls private constructor o #2130 <https://github.com/pmd/pmd/issues/2130>: [java] UnusedLocalVariable: false-negative with array o #2147 <https://github.com/pmd/pmd/issues/2147>: [java] JUnitTestsShouldIncludeAssert - false positives with lambdas and static methods o #2464 <https://github.com/pmd/pmd/issues/2464>: [java] LooseCoupling must ignore class literals: ArrayList.class o #2542 <https://github.com/pmd/pmd/issues/2542>: [java] UseCollectionIsEmpty can not detect the case |foo.bar().size()| o #2650 <https://github.com/pmd/pmd/issues/2650>: [java] UseTryWithResources false positive when AutoCloseable helper used o #2796 <https://github.com/pmd/pmd/issues/2796>: [java] UnusedAssignment false positive with call chains o #2797 <https://github.com/pmd/pmd/issues/2797>: [java] MissingOverride long-standing issues o #2806 <https://github.com/pmd/pmd/issues/2806>: [java] SwitchStmtsShouldHaveDefault false-positive with Java 14 switch non-fallthrough branches o #2822 <https://github.com/pmd/pmd/issues/2822>: [java] LooseCoupling rule: Extend to cover user defined implementations and interfaces o #2843 <https://github.com/pmd/pmd/pull/2843>: [java] Fix UnusedAssignment FP with field accesses o #2882 <https://github.com/pmd/pmd/issues/2882>: [java] UseTryWithResources - false negative for explicit close o #2883 <https://github.com/pmd/pmd/issues/2883>: [java] JUnitAssertionsShouldIncludeMessage false positive with method call o #2890 <https://github.com/pmd/pmd/issues/2890>: [java] UnusedPrivateMethod false positive with generics o #2946 <https://github.com/pmd/pmd/issues/2946>: [java] SwitchStmtsShouldHaveDefault false positive on enum inside enums o #3672 <https://github.com/pmd/pmd/pull/3672>: [java] LooseCoupling - fix false positive with generics o #3675 <https://github.com/pmd/pmd/pull/3675>: [java] MissingOverride - fix false positive with mixing type vars * java-codestyle o #1208 <https://github.com/pmd/pmd/issues/1208>: [java] PrematureDeclaration rule false-positive on variable declared to measure time o #1429 <https://github.com/pmd/pmd/issues/1429>: [java] PrematureDeclaration as result of method call (false positive) o #1673 <https://github.com/pmd/pmd/issues/1673>: [java] UselessParentheses false positive with conditional operator o #1790 <https://github.com/pmd/pmd/issues/1790>: [java] UnnecessaryFullyQualifiedName false positive with enum constant o #1918 <https://github.com/pmd/pmd/issues/1918>: [java] UselessParentheses false positive with boolean operators o #2134 <https://github.com/pmd/pmd/issues/2134>: [java] PreserveStackTrace not handling |Throwable.addSuppressed(...)| o #2299 <https://github.com/pmd/pmd/issues/2299>: [java] UnnecessaryFullyQualifiedName false positive with similar package name o #2391 <https://github.com/pmd/pmd/issues/2391>: [java] UseDiamondOperator FP when expected type and constructed type have a different parameterization o #2528 <https://github.com/pmd/pmd/issues/2528>: [java] MethodNamingConventions - JUnit 5 method naming not support ParameterizedTest o #2739 <https://github.com/pmd/pmd/issues/2739>: [java] UselessParentheses false positive for string concatenation o #2748 <https://github.com/pmd/pmd/issues/2748>: [java] UnnecessaryCast false positive with unchecked cast o #2973 <https://github.com/pmd/pmd/issues/2973>: [java] New rule: UnnecessaryBoxing o #3195 <https://github.com/pmd/pmd/pull/3195>: [java] Improve rule UnnecessaryReturn to detect more cases o #3218 <https://github.com/pmd/pmd/pull/3218>: [java] Generalize UnnecessaryCast to flag all unnecessary casts o #3221 <https://github.com/pmd/pmd/issues/3221>: [java] PrematureDeclaration false positive for unused variables o #3238 <https://github.com/pmd/pmd/issues/3238>: [java] Improve ExprContext, fix FNs of UnnecessaryCast o #3500 <https://github.com/pmd/pmd/pull/3500>: [java] UnnecessaryBoxing - check for Integer.valueOf(String) calls o #4357 <https://github.com/pmd/pmd/pull/4357>: [java] Fix IllegalStateException in UseDiamondOperator rule * java-design o #1014 <https://github.com/pmd/pmd/issues/1014>: [java] LawOfDemeter: False positive with lambda expression o #1605 <https://github.com/pmd/pmd/issues/1605>: [java] LawOfDemeter: False positive for standard UTF-8 charset name o #2175 <https://github.com/pmd/pmd/issues/2175>: [java] LawOfDemeter: False positive for chained methods with generic method call o #2179 <https://github.com/pmd/pmd/issues/2179>: [java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property o #2180 <https://github.com/pmd/pmd/issues/2180>: [java] LawOfDemeter: False positive with Thread and ThreadLocalRandom o #2182 <https://github.com/pmd/pmd/issues/2182>: [java] LawOfDemeter: False positive with package-private access o #2188 <https://github.com/pmd/pmd/issues/2188>: [java] LawOfDemeter: False positive with fields assigned to local vars o #2536 <https://github.com/pmd/pmd/issues/2536>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal can't detect inner class o #3668 <https://github.com/pmd/pmd/pull/3668>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - fix FP with inner private classes o #3754 <https://github.com/pmd/pmd/issues/3754>: [java] SingularField false positive with read in while condition o #3786 <https://github.com/pmd/pmd/issues/3786>: [java] SimplifyBooleanReturns should consider operator precedence o #4238 <https://github.com/pmd/pmd/pull/4238>: [java] Make LawOfDemeter not use the rulechain * java-documentation o #4369 <https://github.com/pmd/pmd/pull/4369>: [java] Improve CommentSize o #4416 <https://github.com/pmd/pmd/pull/4416>: [java] Fix reported line number in CommentContentRule * java-errorprone o #659 <https://github.com/pmd/pmd/issues/659>: [java] MissingBreakInSwitch - last default case does not contain a break o #1005 <https://github.com/pmd/pmd/issues/1005>: [java] CloneMethodMustImplementCloneable triggers for interfaces o #1669 <https://github.com/pmd/pmd/issues/1669>: [java] NullAssignment - FP with ternay and null as constructor argument o #1899 <https://github.com/pmd/pmd/issues/1899>: [java] Recognize @SuppressWanings("fallthrough") for MissingBreakInSwitch o #2320 <https://github.com/pmd/pmd/issues/2320>: [java] NullAssignment - FP with ternary and null as method argument o #2532 <https://github.com/pmd/pmd/issues/2532>: [java] AvoidDecimalLiteralsInBigDecimalConstructor can not detect the case |new BigDecimal(Expression)| o #2579 <https://github.com/pmd/pmd/issues/2579>: [java] MissingBreakInSwitch detects the lack of break in the last case o #2880 <https://github.com/pmd/pmd/issues/2880>: [java] CompareObjectsWithEquals - false negative with type res o #2893 <https://github.com/pmd/pmd/issues/2893>: [java] Remove special cases from rule EmptyCatchBlock o #2894 <https://github.com/pmd/pmd/issues/2894>: [java] Improve MissingBreakInSwitch o #3071 <https://github.com/pmd/pmd/issues/3071>: [java] BrokenNullCheck FP with PMD 6.30.0 o #3087 <https://github.com/pmd/pmd/issues/3087>: [java] UnnecessaryBooleanAssertion overlaps with SimplifiableTestAssertion o #3100 <https://github.com/pmd/pmd/issues/3100>: [java] UseCorrectExceptionLogging FP in 6.31.0 o #3173 <https://github.com/pmd/pmd/issues/3173>: [java] UseProperClassLoader false positive o #3351 <https://github.com/pmd/pmd/issues/3351>: [java] ConstructorCallsOverridableMethod ignores abstract methods o #3400 <https://github.com/pmd/pmd/issues/3400>: [java] AvoidUsingOctalValues FN with underscores o #4356 <https://github.com/pmd/pmd/pull/4356>: [java] Fix NPE in CloseResourceRule * java-multithreading o #2537 <https://github.com/pmd/pmd/issues/2537>: [java] DontCallThreadRun can't detect the case that call run() in |this.run()| o #2538 <https://github.com/pmd/pmd/issues/2538>: [java] DontCallThreadRun can't detect the case that call run() in |foo.bar.run()| o #2577 <https://github.com/pmd/pmd/issues/2577>: [java] UseNotifyAllInsteadOfNotify falsely detect a special case with argument: |foo.notify(bar)| * java-performance o #1224 <https://github.com/pmd/pmd/issues/1224>: [java] InefficientEmptyStringCheck false negative in anonymous class o #2587 <https://github.com/pmd/pmd/issues/2587>: [java] AvoidArrayLoops could also check for list copy through iterated List.add() o #2712 <https://github.com/pmd/pmd/issues/2712>: [java] SimplifyStartsWith false-positive with AssertJ o #3486 <https://github.com/pmd/pmd/pull/3486>: [java] InsufficientStringBufferDeclaration: Fix NPE * kotlin o #419 <https://github.com/pmd/pmd/issues/419>: [kotlin] Add support for Kotlin o #4389 <https://github.com/pmd/pmd/pull/4389>: [kotlin] Update grammar to version 1.8 * swift o #1877 <https://github.com/pmd/pmd/pull/1877>: [swift] Feature/swift rules o #1882 <https://github.com/pmd/pmd/pull/1882>: [swift] UnavailableFunction Swift rule * xml o #1800 <https://github.com/pmd/pmd/pull/1800>: [xml] Unimplement org.w3c.dom.Node from the XmlNodeWrapper ✨ External Contributions * #1658 <https://github.com/pmd/pmd/pull/1658>: [core] Node support for Antlr-based languages - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1698 <https://github.com/pmd/pmd/pull/1698>: [core] [swift] Antlr Base Parser adapter and Swift Implementation - Lucas Soncini <https://github.com/lsoncini> (@lsoncini) * #1774 <https://github.com/pmd/pmd/pull/1774>: [core] Antlr visitor rules - Lucas Soncini <https://github.com/lsoncini> (@lsoncini) * #1877 <https://github.com/pmd/pmd/pull/1877>: [swift] Feature/swift rules - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1881 <https://github.com/pmd/pmd/pull/1881>: [doc] Add ANTLR documentation - Matías Fraga <https://github.com/matifraga> (@matifraga) * #1882 <https://github.com/pmd/pmd/pull/1882>: [swift] UnavailableFunction Swift rule - Tomás de Lucca <https://github.com/tomidelucca> (@tomidelucca) * #2830 <https://github.com/pmd/pmd/pull/2830>: [apex] Apexlink POC - Kevin Jones <https://github.com/nawforce> (@nawforce) * #3866 <https://github.com/pmd/pmd/pull/3866>: [core] Add CLI Progress Bar - @JerritEic <https://github.com/JerritEic> (@JerritEic) * #4412 <https://github.com/pmd/pmd/pull/4412>: [doc] Added new error msg to ConstantsInInterface - David Ljunggren <https://github.com/dague1> (@dague1) * #4428 <https://github.com/pmd/pmd/pull/4428>: [apex] ApexBadCrypto bug fix for #4427 - inline detection of hard coded values - Steven Stearns <https://github.com/sfdcsteve> (@sfdcsteve) 📈 Stats * 4416 commits * 464 closed tickets & PRs * Days since last release: 28 |
From: Andreas D. <and...@pm...> - 2023-02-25 17:33:58
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.55.0 * Documentation: https://pmd.github.io/pmd-6.55.0/ 25-February-2023 - 6.55.0 The PMD team is pleased to announce PMD 6.55.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#new-and-noteworthy> o PMD 7 Development <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#pmd-7-development> o Java 20 Support <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#java-20-support> o T-SQL support <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#t-sql-support> * Fixed Issues <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#api-changes> o Go <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#go> o Java <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#java> * External Contributions <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2023/02/pmd-6550-25-february-2023-released/#stats> New and noteworthy PMD 7 Development This release is the last planned release of PMD 6. The first version 6.0.0 was released in December 2017. Over the course of more than 5 years we published almost every month a new minor version of PMD 6 with new features and improvements. Already in November 2018 we started in parallel the development of the next major version 7.0.0, and we are now in the process of finalizing the scope of the major version. We want to release a couple of release candidates before publishing the final version 7.0.0. We plan to release 7.0.0-rc1 soon. You can see the progress in PMD 7 Tracking Issue #3898 <https://github.com/pmd/pmd/issues/3898>. Java 20 Support This release of PMD brings support for Java 20. There are no new standard language features. PMD supports JEP 433: Pattern Matching for switch (Fourth Preview) <https://openjdk.org/jeps/433> and JEP 432: Record Patterns (Second Preview) <https://openjdk.org/jeps/432> as preview language features. In order to analyze a project with PMD that uses these language features, you'll need to enable it via the environment variable |PMD_JAVA_OPTS| and select the new language version |20-preview|: |exportPMD_JAVA_OPTS=--enable-preview ./run.shpmd--use-versionjava-20-preview... | T-SQL support Thanks to the contribution from Paul Guyot <https://github.com/pguyot> PMD now has CPD support for T-SQL (Transact-SQL). Being based on a proper Antlr grammar, CPD can: * ignore comments * honor comment-based suppressions <https://sourceforge.net/p/pmd/news/2023/02/pmd_userdocs_cpd.html#suppression> Fixed Issues * core * #4395 <https://github.com/pmd/pmd/issues/4395>: [core] Support environment variable CLASSPATH with pmd.bat under Windows * java * #4333 <https://github.com/pmd/pmd/issues/4333>: [java] Support JDK 20 * java-errorprone * #4393 <https://github.com/pmd/pmd/issues/4393>: [java] MissingStaticMethodInNonInstantiatableClass false-positive for Lombok's @UtilityClass for classes with non-private fields API Changes Go * 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: * |GoLanguageModule| <https://docs.pmd-code.org/apidocs/pmd-go/6.55.0/net/sourceforge/pmd/lang/go/GoLanguageModule.html#> Java * Support for Java 18 preview language features have been removed. The version "18-preview" is no longer available. * The experimental class |net.sourceforge.pmd.lang.java.ast.ASTGuardedPattern| has been removed. External Contributions * #4384 <https://github.com/pmd/pmd/pull/4384>: [swift] Add more swift 5.x support (#unavailable mainly) - Richard B. <https://github.com/kenji21> (@kenji21) * #4390 <https://github.com/pmd/pmd/pull/4390>: Add support for T-SQL using Antlr4 lexer - Paul Guyot <https://github.com/pguyot> (@pguyot <https://sourceforge.net/u/pguyot/>) * #4392 <https://github.com/pmd/pmd/pull/4392>: [java] Fix #4393 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class - Dawid Ciok <https://github.com/dawiddc> (@dawiddc) Stats * 40 commits * 11 closed tickets & PRs * Days since last release: 28 |
From: David D. <dav...@or...> - 2023-02-15 06:36:16
|
Welcome to the latest OpenJDK Quality Outreach update! The first Release Candidates of JDK 20 have been released [1] as per the schedule [2]. At this stage, only P1 issues will be evaluated. And with the JDK 20 General Availability sets for March 21st, it is now time to fully focus on JDK 21. I'd like to thank those of you who have already provided feedback on the Early Builds of JDK 21. Feedback is always extremely useful, even more, when it comes early in the development cycle. We are always thinking about the future but the future is not limited to new features (pun intended). Properly removing legacy features from the platform is also critical. Deprecation has always been an important, phased, and ongoing effort. To name just two recent examples, `Thread.stop()` is removed in JDK 20 [3], and the URL Public Constructors are deprecated in JDK 20 (see the related heads-up below). It is important to prepare your codebase for such upcoming evolution sooner rather than later. To conclude on deprecation, I'll mention my colleague Nicolai who recently did a full video on this exact topic, i.e. "Prepare your Codebase for the Future Now!" [4]. [1] https://mail.openjdk.org/pipermail/jdk-dev/2023-February/007364.html [2] https://openjdk.org/projects/jdk/20/ [3] https://inside.java/2022/11/09/quality-heads-up/ [4] https://inside.java/2023/02/02/newscast-41/ ## Heads-Up - JDK 20 - Deprecate URL Public Constructors The `java.net.URL` class, dating from Java SE 1.0, does not encode or decode any URL components according to the RFC2396 escaping mechanism. It is the responsibility of the caller to encode any fields, which need to be escaped prior to calling URL, and also to decode any escaped fields that are returned from URL. This has led to many usability issues, including some potential vulnerabilities when the calling code did not take this into consideration. In Java SE 1.4, the `java.net.URI` class has been added to mitigate some of the `java.net.URL` shortcomings. It also offers methods to create an URL from an URI. JDK 20 will deprecate all public constructors of `java.net.URL`. This will provide a strong warning and discourage developers from using them. To construct a URL, the `URI::toURL` alternative should instead be preferred. To construct a `file:` based URL, `Path::toURI` should be used prior to `URI::toURL`. For more details, see https://bugs.openjdk.org/browse/JDK-8294241 ## Heads-Up - JDK 20 - JMX Connections Use an ObjectInputFilter by Default The default JMX agent now sets an ObjectInputFilter on the RMI connection to restrict the types that the server will deserialize. This should not affect normal usage of the MBeans in the JDK. Applications which register their own MBeans in the platform MBeanServer may need to extend the serialization filter to support any additional types that their custom MBeans accept as parameters. The default filter already covers any type that OpenMBeans and MXBeans might use. The serialization filter pattern is set in `JDK/conf/management/management.properties` using the property `com.sun.management.jmxremote.serial.filter.pattern`. If additional Java types need to be passed, the default can be overridden by running with `-Dcom.sun.management.jmxremote.serial.filter.pattern=.` Serialization Filtering and the filter pattern format are described in detail in the Core Libraries Guide [5]. [5] https://docs.oracle.com/en/java/javase/19/core/serialization-filtering1.html#GUID-55BABE96-3048-4A9F-A7E6-781790FF3480 ## Heads-Up - Testing Loom: Scoped Values and Structured Concurrency With one JEP in Preview (Virtual Threads - 2nd Preview) and two JEPs incubating (Scoped Values - Incubator & Structured Concurrency - 2nd Incubator) Loom made considerable progress in JDK 20. The Loom team is always eager to hear from developers experimenting with those APIs, especially given that both Scoped Values and Structured Concurrency might become Preview in JDK 21. Feedback should be reported to the loom-dev [6] mailing list. [6] https://mail.openjdk.org/pipermail/loom-dev/ ## JDK 20 Release Candidate builds The Release Candidate builds (builds 36) are available [7] and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [8]. [7] https://jdk.java.net/20/ [8] https://jdk.java.net/20/release-notes ### Changes in recent JDK 20 builds that may be of interest: - JDK-8300623: Lambda deserialization regression involving Enum method reference - JDK-8298400: Virtual thread instability when stack overflows - JDK-8298377: JfrVframeStream causes deadlocks in ZGC ## JDK 21 Early-Access builds The JDK 21 Early-Access (builds 9) are available [9], and are provided under the GNU General Public License v2, with the Classpath Exception. The related Javadocs are available here [10] and the Release Notes here [11]. [9] https://jdk.java.net/21/ [10] https://download.java.net/java/early_access/jdk21/docs/api/ [11] https://jdk.java.net/21/release-notes ### Changes in recent JDK 21 builds that may be of interest: - JDK-8299891: JMX ObjectInputFilter additional classes needed [Reported by Apache Derby] - JDK-8298478: (fs) Path.of should allow input to include long path prefix - JDK-8300869: Make use of the Double.toString(double) algorithm in java.ut… - JDK-8300891: Deprecate for removal javafx21x.swing.plaf.synth.SynthLookAndFee… - JDK-8286907: keytool should warn about weak PBE algorithms - JDK-8298445: Add LeakSanitizer support in HotSpot - JDK-8288050: SunJCE provider now supports SHA-512/224 and SHA-512/256 as digests for the PBES2 algorithms - JDK-8301207: (jdeps) Deprecate jdeps -profile option - JDK-8300247: Harden C1 xchg on AArch64 and PPC - JDK-8208077: File::listRoots Changed To Return All Available Drives On Windows - JDK-8300623: Lambda deserialization regression involving Enum method reference - JDK-8294680: Refactor scaled border rendering - JDK-8300584: Accelerate AVX-512 CRC32C for small buffers - JDK-8299896: Reduce enum values of HtmlLinkInfo.Kind - JDK-8300266: Detect Virtualization on Linux aarch64 - JDK-8298908: Instrument Metaspace for Asan ## Generational ZGC Early-Access Builds The latest Early-Access builds (build 21-genzgc+1-8 - 2023/1/27) of Generational ZGC [12] are available [13]. Those builds are based on an incomplete version of JDK 21 and are provided under the GNU General Public License, version 2, with the Classpath Exception. Feedback should be sent to the zgc-dev mailing list [14]. [12] https://bugs.openjdk.org/browse/JDK-8272979 [13] https://jdk.java.net/genzgc/ [14] https://mail.openjdk.org/pipermail/zgc-dev ## JavaFX 21 Early-Access Builds The Early-Access builds of the JavaFX runtime, built from openjdk/jfx [15], allow JavaFX application developers to build and test their applications with JavaFX 21 on JDK 21. The latest Early-Access builds (build 2 2023/1/27) are now available [16] under the GNU General Public License, version 2, with the Classpath Exception. The related Javadocs are available here [17]. Feedback should be sent to the openjfx-dev mailing list [18]. [15] https://github.com/openjdk/jfx [16] https://jdk.java.net/javafx21/ [17] https://download.java.net/java/early_access/javafx21/docs/api/index.html [18] http://mail.openjdk.org/mailman/listinfo/openjfx-dev ## Topics of Interest: - JDK 21 - Image Performance Improvements https://minborgsjavapot.blogspot.com/2023/02/jdk-21-image-performance-improvements.html - JDK 21 - Performance Improvements Revealed https://minborgsjavapot.blogspot.com/2023/01/java-21-performance-improvements.html - From Java Security with Love - Inside Java Newscast #42 https://inside.java/2023/02/14/newscast-42/ - ZGC - The Future of Low-Latency Garbage Collection Is Here https://inside.java/2023/01/25/zgc/ - Draft JEP: JDK Packaging Guidelines https://mail.openjdk.org/pipermail/jdk-dev/2023-February/007327.html - Future Java - Prepare Your Codebase Now! - Inside Java Newscast #41 https://inside.java/2023/02/02/newscast-41/ - Java Modules in Real Life https://inside.java/2023/01/29/java-modules-in-real-life/ ~ Thanks for participating in the OpenJDK Quality Outreach program. And as always, if you find an issue, please let us know through the usual channels. -- David |