pmd-devel Mailing List for PMD (Page 3)
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
(2) |
Oct
|
Nov
|
Dec
|
|
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 |
|
From: Andreas D. <and...@pm...> - 2023-01-28 15:55:00
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.54.0 * Documentation: https://pmd.github.io/pmd-6.54.0/ 28-January-2023 - 6.54.0 The PMD team is pleased to announce PMD 6.54.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#new-and-noteworthy> o New report format html-report-v2.xslt <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#new-report-format-html-report-v2.xslt> * Fixed Issues <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#api-changes> o PMD CLI <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#pmd-cli> o Deprecated APIs <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#deprecated-apis> + For removal <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#for-removal> + Internal APIs <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#internal-apis> + Experimental APIs <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#experimental-apis> * External Contributions <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2023/01/pmd-6540-28-january-2023-released/#stats> New and noteworthy New report format html-report-v2.xslt Thanks to @mohan-chinnappan-n a new PMD report format has been added which features a data table with charting functions. It uses an XSLT stylesheet to convert PMD's XML format into HTML. See the example report <https://pmd.github.io/latest/report-examples/html-report-v2.html>. Fixed Issues * apex-bestpractices * #2669 <https://github.com/pmd/pmd/issues/2669>: [apex] UnusedLocalVariable false positive in dynamic SOQL * core * #4026 <https://github.com/pmd/pmd/issues/4026>: [cli] Filenames printed as absolute paths in the report despite parameter |--short-names| * #4279 <https://github.com/pmd/pmd/issues/4279>: [core] Can not set ruleset property value to empty * #4329 <https://github.com/pmd/pmd/pull/4329>: [core] Refactor usage of snakeyaml * #4340 <https://github.com/pmd/pmd/issues/4340>: [core] Allow to filter found matches in CPDReport * java * #4364 <https://github.com/pmd/pmd/issues/4364>: [java] Parsing error with textblock containing quote followed by two backslashes * testing * #4236 <https://github.com/pmd/pmd/issues/4236>: [test] kotest logs look broken API Changes PMD CLI * PMD now supports a new |--relativize-paths-with| flag (or short |-z|), which replaces |--short-names|. It serves the same purpose: Shortening the pathnames in the reports. However, with the new flag it's possible to explicitly define one or more pathnames that should be used as the base when creating relative paths. The old flag |--short-names| is deprecated. Deprecated APIs For removal * |ApexRootNode#getApexVersion| <https://docs.pmd-code.org/apidocs/pmd-apex/6.54.0/net/sourceforge/pmd/lang/apex/ast/ApexRootNode.html#getApexVersion()> has been deprecated for removal. The version returned is always |Version.CURRENT|, as the apex compiler integration doesn't use additional information which Apex version actually is used. Therefore, this method can't be used to determine the Apex version of the project that is being analyzed. * |CPDConfiguration#setEncoding| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setEncoding(java.lang.String)> and |CPDConfiguration#getEncoding| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getEncoding()>. Use the methods |getSourceEncoding| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/AbstractConfiguration.html#getSourceEncoding()> and |setSourceEncoding| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/AbstractConfiguration.html#setSourceEncoding(java.lang.String)> instead. Both are available for |CPDConfiguration| which extends |AbstractConfiguration|. * |BaseCLITest| <https://docs.pmd-code.org/apidocs/pmd-test/6.54.0/net/sourceforge/pmd/cli/BaseCLITest.html#> and |BaseCPDCLITest| <https://docs.pmd-code.org/apidocs/pmd-test/6.54.0/net/sourceforge/pmd/cli/BaseCPDCLITest.html#> have been deprecated for removal without replacement. CLI tests should be done in pmd-core only (and in PMD7 in pmd-cli). Individual language modules shouldn't need to test the CLI integration logic again. Instead, the individual language modules should test their functionality as unit tests. * |CPDConfiguration.LanguageConverter| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/cpd/CPDConfiguration.LanguageConverter.html#> * |FileCollector#addZipFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFile(java.nio.file.Path)> has been deprecated. It is replaced by |FileCollector#addZipFileWithContent| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)> which directly adds the content of the zip file for analysis. * |PMDConfiguration#setReportShortNames| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/PMDConfiguration.html#setReportShortNames(boolean)> and |PMDConfiguration#isReportShortNames| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/PMDConfiguration.html#isReportShortNames()> have been deprecated for removal. Use |PMDConfiguration#addRelativizeRoot| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/PMDConfiguration.html#addRelativizeRoot(java.nio.file.Path)> instead. Internal APIs * |CSVWriter| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/renderers/CSVWriter.html#> * Some fields in |AbstractAntTestHelper| <https://docs.pmd-code.org/apidocs/pmd-test/6.54.0/net/sourceforge/pmd/ant/AbstractAntTestHelper.html#> Experimental APIs * CPDReport has a new method which limited mutation of a given report: * |filterMatches| <https://docs.pmd-code.org/apidocs/pmd-core/6.54.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(net.sourceforge.pmd.util.Predicate)> creates a new CPD report with some matches removed with a given predicate based filter. External Contributions * #4110 <https://github.com/pmd/pmd/pull/4110>: [apex] Feature/unused variable bind false positive with dynamic SOQL - Thomas Prouvot <https://github.com/tprouvot> (@tprouvot) * #4125 <https://github.com/pmd/pmd/pull/4125>: [core] New report format html-report-v2.xslt to provide html with datatable and chart features - Mohan Chinnappan <https://github.com/mohan-chinnappan-n> - (@mohan-chinnappan-n) * #4280 <https://github.com/pmd/pmd/pull/4280>: [apex] Deprecate ApexRootNode.getApexVersion - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4285 <https://github.com/pmd/pmd/pull/4285>: [java] CommentDefaultAccessModifier - add co.elastic.clients.util.VisibleForTesting as default suppressed annotation - Matthew Luckam <https://github.com/mluckam> (@mluckam) Stats * 107 commits * 19 closed tickets & PRs * Days since last release: 27 |
|
From: David D. <dav...@or...> - 2023-01-25 06:27:56
|
Hi, First off, on behalf of Oracle’s Java Team, I’d like to wish you a happy and prosperous new year! In 2023, two Java releases will be made available: JDK 20 (March) & JDK 21 (September). JDK 20 [1] has entered Rampdown Phase Two (RDP2) [2], its initial Release Candidate is planned for February 9. Given that and to be better prepared for the future, it makes sense to begin testing your project(s) using JDK 21 early-access (EA) builds. Your feedback allows us to evaluate and address issues you find while testing EA builds. [1] https://jdk.java.net/20/ [2] https://mail.openjdk.org/pipermail/jdk-dev/2023-January/007308.html [3] https://jdk.java.net/21/ ## Heads-up - JDK 21: JMX Subject Delegation & Fine-grained Security Deprecation JMX has some features that rely on Security Manager APIs which are deprecated for removal (see JEP 411 [4]). These features are "Subject Delegation" and "Fine-grained Security", which both seem to be generally unused, and would require significant investment to implement without touching the deprecated APIs. As a consequence, "Subject Delegation" is being proposed for deprecation in JDK 21 [5]. Fine-grained Security is also being considered for deprecation at the same time. This feature [6] has allowed configuration of a security policy to restrict or permit access to specific MBean actions. It is expected that this feature is generally unused, possibly because there is simply no demand for such detailed control, and that it is too complex to create and maintain the policies. [4] https://openjdk.org/jeps/411 [5] https://bugs.openjdk.org/browse/JDK-8298966 [6] https://docs.oracle.com/en/java/javase/19/jmx/fine-grained-security-example.html ## JDK 20 Early-Access builds The latest early-access builds of JDK 20 (builds 32) 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://openjdk.org/projects/jdk/20/ [8] https://jdk.java.net/20/release-notes ### JEPs integrated into JDK 20: - 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) ### Changes in recent JDK 20 builds that may be of interest: - JDK-8298525: javadoc crashes with "UnsupportedOperationException: Not yet implemented" in SeeTaglet.inherit [Reported by Apache Ant] - JDK-8298893: Rename option UsePolyIntrinsics to UsePoly1305Intrinsics - JDK-8287411: Enhance DTLS Performance - JDK-8293554: Enhanced DH Key Exchanges ## JDK 21 Early-Access builds The latest early-access builds of JDK 21 (builds 6) are available [9], and are provided under the GNU General Public License v2, with the Classpath Exception. The related EA API Javadoc is also available [10]. [9] https://jdk.java.net/21/ [10] https://download.java.net/java/early_access/jdk21/docs/api/ ### Changes in recent JDK 21 builds that may be of interest: - JDK-8297295: Remove ThreadGroup.allowThreadSuspension - JDK-8287411: Enhance DTLS performance - JDK-8233269: Improve handling of JAVA_ARGS - JDK-8297933: Compiler should only use verified interface types for optimization - JDK-8298381: Improve handling of session tickets for multiple SSLContexts - JDK-8299501: Usage of constructors of primitive wrapper classes should be avoided in java.util API docs - JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area - JDK-8299544: Improve performance of CRC32C intrinsics (non-AVX-512) for small inputs - JDK-8299576: Reimplement java.io.Bits using VarHandle access - JDK-8278326: Socket close is not thread safe and other cleanup - JDK-8299673: Simplify object pinning interactions with string deduplication ## JavaFX 20 & 21 Early-Access Builds These are early-access builds of the JavaFX Runtime, built from openjdk/jfx [11]. Those EA builds are intended to allow JavaFX application developers to build and test their applications with JavaFX 20 on JDK 20. The latest EA builds (JavaFX 20 EA b16 2023/1/14) are now available [12] and are provided under the GNU General Public License, version 2, with the Classpath Exception. Please note that initial JavaFX 21 early-access builds (JavaFX 21 b1 2023/1/19) are now available [13] as well. Feedback should be reported to the openjfx-dev mailing list [14]. [11] https://github.com/openjdk/jfx [12] https://jdk.java.net/javafx20/ [13] https://jdk.java.net/javafx21/ [14] http://mail.openjdk.org/mailman/listinfo/openjfx-dev ## Topics of Interest: - On Markdown in (Java) documentation comments https://mail.openjdk.org/pipermail/javadoc-dev/2023-January/005563.html - Lifetimes in the Foreign Function & Memory API https://cr.openjdk.java.net/~mcimadamore/panama/why_lifetimes.html - Java's Plans for 2023 - Inside Java Newscast #40 https://inside.java/2023/01/19/newscast-40/ - Informational JEP: Preview Features: A Look Back, and A Look Ahead https://openjdk.org/jeps/8300604 - Java 20 - An Almost Infinite Memory Segment Allocator https://minborgsjavapot.blogspot.com/2023/01/java-20-almost-infinite-memory-segment.html - Podcast: “Helidon Níma & Virtual Threads” https://inside.java/2023/01/12/podcast-029/ - From ThreadLocal to ScopedValue with Loom - JEP Café #16 https://inside.java/2023/01/10/jepcafe16/ - Java 20 - Colossal Sparse Memory Segments https://minborgsjavapot.blogspot.com/2023/01/java-20-colossal-sparse-memory-segments.html - Another Panama Update https://mail.openjdk.org/pipermail/panama-dev/2022-December/018182.html - Secure Coding Guidelines for Java SE https://inside.java/2023/01/04/secure-coding-guideline/ - Java Networking Enhancements since JDK 11 https://inside.java/2022/12/28/jdk-networking-enhancements/ - Podcast: “Java Language - State of the Union” https://inside.java/2022/12/23/podcast-028/ - Tutorial - Using Pattern Matching https://dev.java/learn/pattern-matching/ - 24 Java Features You Missed In 2022 - Inside Java Newscast #39 https://inside.java/2022/12/15/newscast-39/ ## January 2023 Critical Patch Update Released As part of the January 2023 CPU, we released JDK 19.0.2, JDK 17.0.6 LTS, JDK 11.0.18 LTS and JDK 8u361 as well as OpenJDK 19.0.2. ## Oracle JRE and JDK Cryptographic Roadmap The crypto roadmap [14] provides the information on Oracle's plans for changes to the security algorithms and associated policies/settings in the Oracle JRE & JDK. [14] https://www.java.com/en/jre-jdk-cryptoroadmap.html ~ We look forward to your continued participation in 2023. And as always, if you find an issue, please let us know through the usual channels. |
|
From: Andreas D. <and...@pm...> - 2022-12-31 18:14:23
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.53.0 * Documentation: https://pmd.github.io/pmd-6.53.0/ 31-December-2022 - 6.53.0 The PMD team is pleased to announce PMD 6.53.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#new-and-noteworthy> o Modified rules <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#modified-rules> o Deprecated rules <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#deprecated-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#api-changes> o Deprecated APIs <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#deprecated-apis> + For removal <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#for-removal> * External Contributions <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/12/pmd-6530-31-december-2022-released/#stats> New and noteworthy Modified rules * The Java rule |UnusedPrivateField| <https://pmd.github.io/pmd-6.53.0/pmd_rules_java_bestpractices.html#unusedprivatefield> has a new property |reportForAnnotations|. This is a list of fully qualified names of the annotation types that should be reported anyway. If an unused field has any of these annotations, then it is reported. If it has any other annotation, then it is still considered to be used and is not reported. Deprecated rules * The Java rules |ExcessiveClassLength| <https://pmd.github.io/pmd-6.53.0/pmd_rules_java_design.html#excessiveclasslength> and |ExcessiveMethodLength| <https://pmd.github.io/pmd-6.53.0/pmd_rules_java_design.html#excessivemethodlength> have been deprecated. The rule |NcssCount| <https://pmd.github.io/pmd-6.53.0/pmd_rules_java_design.html#ncsscount> can be used instead. The deprecated rules will be removed with PMD 7.0.0. * The Java rule |EmptyStatementNotInLoop| <https://pmd.github.io/pmd-6.53.0/pmd_rules_java_errorprone.html#emptystatementnotinloop> is deprecated. Use the rule |UnnecessarySemicolon| <https://pmd.github.io/pmd-6.53.0/pmd_rules_java_codestyle.html#unnecessarysemicolon> instead. Note: Actually it was announced to be deprecated since 6.46.0 but the rule was not marked as deprecated yet. This has been done now. Fixed Issues * core o #4248 <https://github.com/pmd/pmd/issues/4248>: [core] Can't analyze sources in zip files * apex-security o #4146 <https://github.com/pmd/pmd/issues/4146>: [apex] ApexCRUDViolation: Recognize User Mode in SOQL + DML * java o #4266 <https://github.com/pmd/pmd/issues/4266>: [java] PMD fails to process a record with lambda in compact constructor * java-bestpractices o #4166 <https://github.com/pmd/pmd/issues/4166>: [java] UnusedPrivateField doesn't find annotated unused private fields anymore o #4250 <https://github.com/pmd/pmd/issues/4250>: [java] WhileLoopWithLiteralBoolean - false negative with complex expressions still occurs in PMD 6.52.0 * java-design o #2127 <https://github.com/pmd/pmd/issues/2127>: [java] Deprecate rules ExcessiveClassLength and ExcessiveMethodLength * java-errorprone o #4164 <https://github.com/pmd/pmd/issues/4164>: [java][doc] AvoidAssertAsIdentifier and AvoidEnumAsIdentifier - clarify use case * java-multithreading o #4210 <https://github.com/pmd/pmd/issues/4210>: [java] DoNotUseThreads report duplicate warnings API Changes Deprecated APIs For removal These classes / APIs have been deprecated and will be removed with PMD 7.0.0. * |ExcessiveLengthRule| <https://docs.pmd-code.org/apidocs/pmd-java/6.53.0/net/sourceforge/pmd/lang/java/rule/design/ExcessiveLengthRule.html#> (Java) External Contributions * #4244 <https://github.com/pmd/pmd/pull/4244>: [apex] ApexCRUDViolation: user mode and system mode with test cases added - Tarush Singh <https://github.com/Tarush-Singh35> (@Tarush-Singh35) * #4274 <https://github.com/pmd/pmd/pull/4274>: [java] Fix finding lambda scope in record compact constructor - kdebski85 <https://github.com/kdebski85> (@kdebski85) Stats * 43 commits * 17 closed tickets & PRs * Days since last release: 35 |
|
From: David D. <dav...@or...> - 2022-12-12 11:12:05
|
Welcome to the final OpenJDK Quality Outreach update for 2022! JDK 20, scheduled for General Availability on March 21 2023, is now in Rampdown Phase One (RDP1) [1]. At this point, the overall JDK 20 [2] feature set is frozen (see below the final list of JEPs integrated into JDK 20) and only low-risk enhancements might still be considered. The coming weeks should be used to identify and resolve as many issues as possible, i.e. before JDK 20 enters the Release Candidates phase in early February 2023. ## JDK 20 Early-Access builds The latest Early-Access (builds 27) are 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 20: - 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) [1] https://mail.openjdk.org/pipermail/jdk-dev/2022-December/007233.html [2] https://jdk.java.net/20/ [3] https://jdk.java.net/20/release-notes ### Changes in recent JDK 20 builds that may be of interest: #### Build 27: - JDK-8297794: Deprecate JMX Management Applets for Removal - JDK-8297118: Change IncompatibleClassChangeError to MatchException for exhaustive switch statements and switch expressions - JDK-8294047: HttpResponseInputStream swallows interrupts - JDK-8281236: (D)TLS key exchange named groups - JDK-8280798: com.sun.jdi.ObjectReference::setValue spec should prohibit any final field modification - JDK-8295350: JFR: Add stop methods for recording streams - JDK-8295044: Implementation of Foreign Function and Memory API (2nd Preview) - JDK-8296896: Change virtual Thread.yield to use external submit - JDK-8297804: (tz) Update Timezone Data to 2022g - JDK-8295803: Console should be usable in jshell and other environments - JDK-8286666: Implementation of Scoped Values (Incubator) - JDK-8296672: Implementation of Virtual Threads (2nd Preview) #### Build 26: - JDK-8297276: Remove thread text from Subject.current - JDK-8297030: Reduce Default Keep-Alive Timeout Value for httpclient - JDK-8247645: ChaCha20 Intrinsics #### Build 25: - JDK-8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call - JDK-8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist - JDK-8288717: Add a means to close idle connections in HTTP/2 connection pool - JDK-8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions - JDK-8059632: Method reference compilation uses incorrect qualifying type - JDK-8297161: Add additional Service Attributes to Standard Algorithm Names guide - JDK-8294073: Performance improvement for message digest implementations #### Build 24: - JDK-8294731: Improve multiplicative inverse for secp256r1 implementation - JDK-8296715: CLDR v42 update for tzdata 2022f - JDK-8296958: [JVMCI] add API for retrieving ConstantValue attributes #### Build 23: - JDK-8296226: Add constructors (String,Throwable) and (Throwable) to InvalidParameterException - JDK-8295673: Deprecate and disable legacy parallel class loading workaround for non-parallel-capable class loaders - JDK-8294241: Deprecate URL public constructors - JDK-8289689: (fs) Re-examine the need for normalization to Unicode Normalization Format D (macOS) - JDK-8279164: Disable TLS_ECDH_* cipher suites - JDK-8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V) - JDK-8296108: (tz) Update Timezone Data to 2022f ## Heads-up - JDK 21: First Early-Access Builds When JDK 20 entered RDP1 [4], the JDK mainline [5] was (a) forked into a JDK 20 stabilization repository [6], and (b) set to JDK 21. As a consequence, the first JDK 21 Early-Access builds have been published [7]. [4] https://mail.openjdk.org/pipermail/jdk-dev/2022-December/007233.html [5] https://github.com/openjdk/jdk [6] https://github.com/openjdk/jdk20 [7] https://jdk.java.net/21/ ## Heads-up - Valhalla: LW4 Early-Access Builds Valhalla LW4 early-access builds have been published [8], those builds are primarily focused on implementing the Value Objects JEP draft [9]. For additional details on those EA builds, make sure to read these LW4 release notes [10]. For a more hands-on introduction to Value Object, you can watch the latest JEP Café: Java Value Objects in Action [11]. Interested developers are encouraged to explore the performance and migration impact of value objects on their applications, and to provide feedback to the valhalla-dev [12] mailing list. [8] https://jdk.java.net/valhalla/ [9] https://openjdk.org/jeps/8277163 [10] https://openjdk.org/projects/valhalla/early-access [11] https://inside.java/2022/12/06/jepcafe15/ [12] https://mail.openjdk.org/pipermail/valhalla-dev/ ## Heads-up - Generational ZGC: New Early-Access Builds New Generational ZGC [13] Early-Access Builds have been updated recently [14]. These EA builds are provided under the GNU GPL v2, with the Classpath Exception. ### Changes include : - Rebased on top of jdk-20+21 - Added macOS builds - Heuristics rewriten to deal with a problematic case where Generational ZGC spent too much focus on doing young generation collection when it’s more beneficial to spend resources to collect the old generation. - GC logging rewriten to easier see what log lines belong to what collection / generation, plus many additional changes that should make it easier to read and understand GC logs - Barrier elision enhanced to remove barriers from array access of newly allocated arrays - Enhanced the generated hs_err crash text file - Fixed and unified code quality and style For more information, make sure to watch this Inside Java Newscast [15] dedicated on Generational ZGC. Feedback should be sent to the zgc-dev mailing list [16]. [13] https://jdk.java.net/genzgc/ [14] https://bugs.openjdk.org/browse/JDK-8272979 [15] https://inside.java/2022/11/17/insidejava-newscast-037/ [16] https://mail.openjdk.org/pipermail/zgc-dev/ ## JavaFX 20 Early-Access Builds These are early access builds of the JavaFX 20 Runtime, built from openjdk/jfx [17]. They allow JavaFX application developers to build and test their applications with JavaFX 20 on JDK 20. The latest builds 10 (2022/12/5) are now available [18] with javadoc here [19]. Feedback should be forwarded to the openjfx-dev [19] mailing list. For more details, you might want to listen this Inside Java podcast episode [20]. [17] https://github.com/openjdk/jfx [18] https://jdk.java.net/javafx20/ [19] https://download.java.net/java/early_access/javafx20/docs/api/overview-summary.html [20] http://mail.openjdk.org/mailman/listinfo/openjfx-dev [21] https://inside.java/2022/11/18/podcast-027/ ## Topics of Interest: - Building and Deploying Java Client Desktop Applications with JDK 17 and Beyond https://inside.java/2022/12/08/building-java-desktop-app/ - Java Value Objects in Action with Valhalla - JEP Café #15 https://inside.java/2022/12/06/jepcafe15/ - Java 20 - Sneak Peek on the Foreign Function & Memory API https://minborgsjavapot.blogspot.com/2022/12/java-20-sneak-peek-on-panama-ffm-api.html - A Glimpse at Java 20 - Pattern Matching, Concurrent Programming and Valhalla - Inside Java Newscast #38 https://inside.java/2022/12/01/newscast-38/ - “JavaFX” - Inside Java Podcast #27 https://inside.java/2022/11/18/podcast-027/ - Generational ZGC - Inside Java Newscast #37 https://inside.java/2022/11/17/insidejava-newscast-037/ - Java 17 to 20 Pattern Matching full tutorial with Records, Instanceof and Switch - JEP Café #14 https://inside.java/2022/11/08/jepcafe14/ - Script Friendly JDK Download URLs https://inside.java/2022/11/14/sip072/ - Using the JShell API to improvement a Java Source Browser https://inside.java/2022/11/21/jshell-java-source-browser/ ~ As usual, let us know if you find any quirks while testing your project(s) on the latest JDK early-access builds. As 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 2023 with Java 20 and Java 21! --David |
|
From: Andreas D. <and...@pm...> - 2022-11-26 09:57:25
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.52.0 * Documentation: https://pmd.github.io/pmd-6.52.0/ 26-November-2022 - 6.52.0 The PMD team is pleased to announce PMD 6.52.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#new-and-noteworthy> o New rules <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#new-rules> o Renamed rules <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#renamed-rules> o Modified rules <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#modified-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#api-changes> o PMD CLI <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#pmd-cli> o CPD CLI <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#cpd-cli> o Linux run.sh parameters <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#linux-run.sh-parameters> o Deprecated API <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#deprecated-api> * External Contributions <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/11/pmd-6520-26-november-2022-released/#stats> New and noteworthy New rules * The new Java rule |InvalidJavaBean| <https://pmd.github.io/pmd-6.52.0/pmd_rules_java_design.html#invalidjavabean> identifies beans, that don't follow the JavaBeans API specification <https://download.oracle.com/otndocs/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/>, like beans with missing getters or setters. |<rule ref="category/java/design.xml/InvalidJavaBean"/> | Renamed rules * The Java rule |BeanMembersShouldSerialize| <https://pmd.github.io/pmd-6.52.0/pmd_rules_java_errorprone.html#beanmembersshouldserialize> has been renamed to |NonSerializableClass| <https://pmd.github.io/pmd-6.52.0/pmd_rules_java_errorprone.html#nonserializableclass>. It has been revamped to only check for classes that are marked with |Serializable| and reports each field in it, that is not serializable. The property |prefix| has been deprecated, since in a serializable class all fields have to be serializable regardless of the name. Modified rules * The rule |ClassNamingConventions| <https://pmd.github.io/pmd-6.52.0/pmd_rules_java_codestyle.html#classnamingconventions> has a new property |testClassPattern|, which is applied to test classes. By default, test classes should end with the suffix "Test". Test classes are top-level classes, that either inherit from JUnit 3 TestCase or have at least one method annotated with the Test annotations from JUnit4/5 or TestNG. * The property |ignoredAnnotations| of rule |ImmutableField| <https://pmd.github.io/pmd-6.52.0/pmd_rules_java_design.html#immutablefield> has been deprecated and doesn't have any effect anymore. Since PMD 6.47.0, the rule only considers fields, that are initialized once and never changed. If the field is just declared but never explicitly initialized, it won't be reported. That's the typical case when a framework sets the field value by reflection. Therefore, the property is not needed anymore. If there is a special case where this rule misidentifies fields as immutable, then the rule should be suppressed for these fields explicitly. Fixed Issues * cli o #4215 <https://github.com/pmd/pmd/discussions/4215>: NullPointerException when trying to open designer * doc o #4207 <https://github.com/pmd/pmd/pull/4207>: [doc] List all languages in rule doc * java o #3643 <https://github.com/pmd/pmd/issues/3643>: [java] More parser edge cases o #4152 <https://github.com/pmd/pmd/issues/4152>: [java] Parse error on array type annotations * java-codestyle o #2867 <https://github.com/pmd/pmd/issues/2867>: [java] Separate pattern for test classes in ClassNamingConventions rule for Java o #4201 <https://github.com/pmd/pmd/issues/4201>: [java] CommentDefaultAccessModifier should consider lombok's @Value * java-design o #4175 <https://github.com/pmd/pmd/issues/4175>: [java] ImmutableField - deprecate property |ignoredAnnotations| o #4177 <https://github.com/pmd/pmd/issues/4177>: [java] New Rule InvalidJavaBean o #4188 <https://github.com/pmd/pmd/issues/4188>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal false positive with Lombok's @NoArgsConstructor o #4189 <https://github.com/pmd/pmd/issues/4189>: [java] AbstractClassWithoutAnyMethod should consider lombok's @AllArgsConstructor o #4200 <https://github.com/pmd/pmd/issues/4200>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal should consider lombok's @Value * java-errorprone o #1668 <https://github.com/pmd/pmd/issues/1668>: [java] BeanMembersShouldSerialize is extremely noisy o #4172 <https://github.com/pmd/pmd/issues/4172>: [java] InvalidLogMessageFormat false positive on externally formatted strings o #4174 <https://github.com/pmd/pmd/issues/4174>: [java] MissingStaticMethodInNonInstantiatableClass does not consider nested builder class o #4176 <https://github.com/pmd/pmd/issues/4176>: [java] Rename BeanMembersShouldSerialize to NonSerializableClass o #4185 <https://github.com/pmd/pmd/issues/4185>: [java] InvalidLogMessageFormat rule produces a NPE o #4224 <https://github.com/pmd/pmd/issues/4224>: [java] MissingStaticMethodInNonInstantiatableClass should consider Lombok's @UtilityClass o #4225 <https://github.com/pmd/pmd/issues/4225>: [java] MissingStaticMethodInNonInstantiatableClass should consider Lombok's @NoArgsConstructor * java-performance o #4183 <https://github.com/pmd/pmd/issues/4183>: [java] AvoidArrayLoops regression: from false negative to false positive with final variables API Changes PMD CLI * PMD now supports a new |--use-version| flag, which receives a language-version pair (such as |java-8| or |apex-54|). This supersedes the usage of |-language| / |-l| and |-version| / |-v|, allowing for multiple versions to be set in a single run. PMD 7 will completely remove support for |-language| and |-version| in favor of this new flag. * Support for |-V| is being deprecated in favor of |--verbose| in preparation for PMD 7. In PMD 7, |-v| will enable verbose mode and |-V| will show the PMD version for consistency with most Unix/Linux tools. * Support for |-min| is being deprecated in favor of |--minimum-priority| for consistency with most Unix/Linux tools, where |-min| would be equivalent to |-m -i -n|. CPD CLI * CPD now supports using |-d| or |--dir| as an alias to |--files|, in favor of consistency with PMD. PMD 7 will remove support for |--files| in favor of these new flags. Linux run.sh parameters * Using |run.sh cpdgui| will now warn about it being deprecated. Use |run.sh cpd-gui| instead. * The old designer (|run.sh designerold|) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: |run.sh designer|. * The old visual AST viewer (|run.sh bgastviewer|) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: |run.sh designer| for a visual tool, or use |run.sh ast-dump| for a text-based alternative. Deprecated API * The following core APIs have been marked as deprecated for removal in PMD 7: * |PMD| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMD.html#> and |PMD.StatusCode| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMD.StatusCode.html#> - PMD 7 will ship with a revamped CLI split from pmd-core. To programmatically launch analysis you can use |PmdAnalysis| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PmdAnalysis.html#>. * |PMDConfiguration#getAllInputPaths| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getAllInputPaths()> - It is now superseded by |PMDConfiguration#getInputPathList| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPathList()> * |PMDConfiguration#setInputPaths| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(List)> - It is now superseded by |PMDConfiguration#setInputPathList| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPathList(List)> * |PMDConfiguration#addInputPath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(String)> - It is now superseded by |PMDConfiguration#addInputPath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(Path)> * |PMDConfiguration#getInputFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getInputFilePath()> - It is now superseded by |PMDConfiguration#getInputFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getInputFile()> * |PMDConfiguration#getIgnoreFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFilePath()> - It is now superseded by |PMDConfiguration#getIgnoreFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFile()> * |PMDConfiguration#setInputFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(String)> - It is now superseded by |PMDConfiguration#setInputFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(Path)> * |PMDConfiguration#setIgnoreFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(String)> - It is now superseded by |PMDConfiguration#setIgnoreFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(Path)> * |PMDConfiguration#getInputUri| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getInputUri()> - It is now superseded by |PMDConfiguration#getUri| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getUri()> * |PMDConfiguration#setInputUri| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(String)> - It is now superseded by |PMDConfiguration#setInputUri| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(URI)> * |PMDConfiguration#getReportFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFile()> - It is now superseded by |PMDConfiguration#getReportFilePath| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()> * |PMDConfiguration#setReportFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(String)> - It is now superseded by |PMDConfiguration#setReportFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(Path)> * |PMDConfiguration#isStressTest| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#isStressTest()> and |PMDConfiguration#setStressTest| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setStressTest(boolean)> - Will be removed with no replacement. * |PMDConfiguration#isBenchmark| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#isBenchmark()> and |PMDConfiguration#setBenchmark| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/PMDConfiguration.html#setBenchmark(boolean)> - Will be removed with no replacement, the CLI will still support it. * |CPD| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/cpd/CPD.html#> and |CPD.StatusCode| <https://docs.pmd-code.org/apidocs/pmd-core/6.52.0/net/sourceforge/pmd/cpd/CPD.StatusCode.html#> - PMD 7 will ship with a revamped CLI split from pmd-core. An alterative to programatically launch CPD analysis will be added in due time. * In order to reduce the dependency on Apex Jorje classes, the method |DataType#fromBasicType| <https://docs.pmd-code.org/apidocs/pmd-visualforce/6.52.0/net/sourceforge/pmd/lang/vf/DataType.html#fromBasicType(apex.jorje.semantic.symbol.type.BasicType)> has been deprecated. The equivalent method |fromTypeName| <https://docs.pmd-code.org/apidocs/pmd-visualforce/6.52.0/net/sourceforge/pmd/lang/vf/DataType.html#fromTypeName(java.lang.String)> should be used instead. External Contributions * #4184 <https://github.com/pmd/pmd/pull/4184>: [java][doc] TestClassWithoutTestCases - fix small typo in description - Valery Yatsynovich <https://github.com/valfirst> (@valfirst <https://sourceforge.net/u/valfirst/>) * #4198 <https://github.com/pmd/pmd/pull/4198>: [doc] Add supported CPD languages - Jeroen van Wilgenburg <https://github.com/jvwilge> (@jvwilge) * #4202 <https://github.com/pmd/pmd/pull/4202>: [java] Fix #4200 and #4201: ClassWithOnlyPrivateConstructorsShouldBeFinal, CommentDefaultAccessModifier: Exclude lombok @Value annotation - Lynn <https://github.com/LynnBroe> (@LynnBroe) * #4205 <https://github.com/pmd/pmd/pull/4205>: [doc] Clarify Scala support (no built-in rules) - Eldrick Wega <https://github.com/Eldrick19> (@Eldrick19) * #4226 <https://github.com/pmd/pmd/pull/4226>: [visualforce] Replace uses of Jorje types in pmd-visualforce - Aaron Hurst <https://github.com/aaronhurst-google> (@aaronhurst-google) * #4227 <https://github.com/pmd/pmd/pull/4227>: [java] Fix #4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @NoArgsConstructor annotation - Lynn <https://github.com/LynnBroe> (@LynnBroe) * #4228 <https://github.com/pmd/pmd/pull/4228>: [java] Fix #4224 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's UtilityClass - Lynn <https://github.com/LynnBroe> (@LynnBroe) * #4232 <https://github.com/pmd/pmd/pull/4232>: [doc] Fixing typos - Andreas Deininger <https://github.com/deining> (@deining <https://sourceforge.net/u/deining/>) Stats * 96 commits * 40 closed tickets & PRs * Days since last release: 28 |
|
From: David D. <dav...@or...> - 2022-11-07 16:59:59
|
Greetings, With JavaOne in Las Vegas, last month was epically busy! It was great to finally have the ability to meet and discuss the Quality Outreach program with some of you... face-to-face! This installment of the newsletter is packed as we have several heads-ups, including new Early-Access builds being made available. The JDK 20 schedule has been proposed [1]. The next major milestone is Rampdown Phase One which should happen in just a month on December 8! The next few weeks will be particularly interesting as we will see which from the candidate JEPs recently announced (see 'Topics of Interest' section below) will be proposed to target JDK 20 [2]. And given that JDK 20 is getting closer, we are eagerly waiting for your test feedback on your projects running with the latest JDK 20 EA builds. [1] https://mail.openjdk.org/pipermail/jdk-dev/2022-October/007108.html [2] https://openjdk.org/projects/jdk/20/ ### Heads-up - JDK 20: `java.net.URL` parsing fix & behavior change Before JDK 20, some of the parsing/validation performed by the JDK built-in `URLStreamHander` implementations were delayed until `URL::openConnection` or `URLConnection::connect` was called. Starting JDK 20, some of these parsing/validations are now performed early, i.e. within URL constructors. An exception caused by a malformed URL that would have been delayed until the connection was opened or connected may starting JDK 20, throw a `MalformedURLException` at URL construction time. We suggest testing your project(s) against this change. And for those who want to rely on the old behavior, a new system property has been introduced to revert, on the command line, to the previous behavior. For more details, please see JBS-8293590 [3] and the release notes [4]. [3] https://bugs.openjdk.org/browse/JDK-8293590 [4] https://bugs.openjdk.org/browse/JDK-8295750 ### Heads-up - JDK 20: Thread.stop(), Thread.suspend() and Thread.resume() degradation The ability to stop, suspend, or resume a thread with the corresponding Thread.stop(), Thread.suspend() or Thread.resume() methods have been removed in JDK 20. Those methods have been degraded to throw a UOE exception (UnsupportedOperationException). Using those methods was inherently unsafe. That is also why they were deprecated since JDK 1.2 (1998!) and were flagged 'forRemoval' in previous features release. We do not expect this behavior change to cause issues on well-maintained codebase. For more details please check JDK-8289610 [5], JDK-8249627 [6], and the Java Thread Primitive Deprecation FAQ [7]. [5] https://bugs.openjdk.org/browse/JDK-8289610 [6] https://bugs.openjdk.org/browse/JDK-8249627 [7] https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html ### Heads-up - JDK 20: Deprecate and disable the legacy parallel class loading workaround for non-parallel-capable class loaders. Prior to JDK 7, custom class loaders using non-hierarchical class delegation model were prone to deadlock. A workaround was added in the HotSpot VM (JDK 6) to allow parallel class loading for non-parallel-capable class loaders to avoid deadlocks. Parallel-capable class loaders were introduced in Java SE 7 [8] to support parallel class loading to implement a deadlock-free class loader using a non-hierarchical class delegation model. [8] and [9] describe how to migrate those class loaders depending on this workaround to be multi-threaded parallel-capable class loaders. This workaround was intended to allow those developers to migrate to the new mechanism. JDK 7 was released 11 years ago so it is now expected that those deadlock-prone custom class loaders have been migrated to the parallel-capable class loaders. As a consequence, this workaround is removed in JDK 20 as it impedes eliminating the object monitors from pinning for virtual threads. We suggest confirming that your codebase is not relying on this legacy workaround. If it still is, you should migrate away from it ASAP. Please note that the legacy behavior can be temporary re-enabled using a special flag. For additional details, please check [10] and [11]. [8] https://docs.oracle.com/javase/7/docs/technotes/guides/lang/cl-mt.html [9] https://openjdk.org/groups/core-libs/ClassLoaderProposal.html [10] https://bugs.openjdk.org/browse/JDK-8295848 [11] https://bugs.openjdk.org/browse/JDK-8296446 ### Heads-up - JavaFX builds Oracle is now publishing JavaFX builds, starting with early access builds of JavaFX 20, at jdk.java.net/javafx20 [12]. Developers are now able to download JavaFX and JDK builds from the same place, and use jlink to create a custom JDK that includes the JavaFX modules. The latest JavaFX 20 EA builds (b5-2022/10/28) are now available [12] along with the related javadoc [13]. 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 [14] mailing list. To learn more, stay tuned for an upcoming Inside Java Podcast episode that will cover this in detail. [12] https://jdk.java.net/javafx20/ [13] https://download.java.net/java/early_access/javafx20/docs/api/index.html [14] https://mail.openjdk.org/pipermail/openjfx-dev ### Heads-up - Generational ZGC Early-Access builds The first Early Access builds of Generational ZGC have been published at jdk.java.net/genzgc [15] and are also available via the oracle-actions/setup-java GitHub action [16]. ZGC is a low latency, i.e. sub-milliseconds, Garbage Collector. This effort aims to introduce support for generations in ZGC. For more information, you can check the draft JEP [17] and listen to this recent Inside Java Podcast episode [18]. We encourage you to try out GenZGC and provide feedback on the zgc-dev [19] mailing list. [15] https://jdk.java.net/genzgc/ [16] https://github.com/oracle-actions/setup-java [17] https://bugs.openjdk.org/browse/JDK-8272979 [18] https://inside.java/2022/06/29/podcast-024/ [19] https://mail.openjdk.org/pipermail/zgc-dev ## Heads-up - New Project Loom Early-Access Builds The latest Loom EA builds (20-loom+20-34) are now available [20]. These EA builds are provided under the GNU General Public License, version 2, with the Classpath Exception. These EA builds include a snapshot of the ScopedValue API, being developed in JEP 429 [21]. Feedback can be sent to the loo...@op... mailing list [22]. [20] https://jdk.java.net/loom/ [21] https://openjdk.org/jeps/429 [22] https://mail.openjdk.org/pipermail/loom-dev ## JDK 20 Early-Access Builds JDK 20 Early-Access builds 22 are now available [23], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [24]. [23] https://jdk.java.net/20/ [24] https://jdk.java.net/20/release-notes ### Changes in recent builds that may be of interest: #### Build 22: - JDK-8057113: (fs) Path should have a method to obtain the filename extension - JDK-8256660: Disable DTLS 1.0 by default - JDK-8291336: Add ideal rule to convert floating point multiply by 2 into addition #### Build 21: - JDK-8137022: Concurrent refinement thread adjustment and (de-)activation suboptimal - JDK-8134303: Introduce -XX:-G1UseConcRefinement - JDK-8295657: SA: Allow larger object alignments #### Build 20: - JDK-8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction - JDK-8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation - JDK-6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified - JDK-8292177: InitialSecurityProperty JFR event - JDK-8295173: (tz) Update Timezone Data to 2022e - JDK-8292698: Improve performance of DataInputStream #### Build 19: - JDK-8294821: Class load improvement for AES crypto engine - JDK-8295013: OopStorage should derive from CHeapObjBase - JDK-8283699: Improve the peephole mechanism of hotspot - JDK-8289552: Make intrinsic conversions between bit representations of half precision values and floats - JDK-8290036: Define and specify Runtime shutdown sequence #### Build 18: - JDK-8294609: C2: Improve inlining of methods with unloaded signature classes - JDK-8279283: BufferedInputStream should override transferTo - JDK-8294626: Improve URL protocol lower casing #### Build 17: - JDK-8289610: Thread.Stop changed to throw UnsupportedOperationException - JDK-8249627: Thread.suspend/resume changed to throw UnsupportedOperationException - JDK-8254711: Add java.security.Provider.getService JFR Event - JDK-8294062: Improve parsing performance of j.l.c.MethodTypeDesc - JDK-8255670: Improve C2's detection of modified nodes - JDK-8292296: Use multiple threads to process ParallelGC deferred updates ## Topics of Interest: - New candidate JEP: 431: Sequenced Collections https://openjdk.org/jeps/431 - New candidate JEP: 432: Record Patterns (2nd Preview) https://openjdk.org/jeps/432 - New candidate JEP: 433: Pattern Matching for switch (4th Preview) https://openjdk.org/jeps/433 - New candidate JEP: 434: Foreign Function & Memory API (2nd Preview) https://openjdk.org/jeps/434 - New candidate JEP: 435: Asynchronous Stack Trace VM API https://openjdk.org/jeps/435 - Selectively Shifting and Constraining Computation https://openjdk.org/projects/leyden/notes/02-shift-and-constrain - The Age of Virtual Threads https://inside.java/2022/10/13/the-age-of-virtual-threads/ - Dissecting Memory Sessions https://inside.java/2022/11/04/unifying-memory-addresses-and-memory-segments/ - GraalVM in OpenJDK and More JavaOne Announcements - Inside Java Newscast #36 https://inside.java/2022/11/03/newscast-036/ - Inside Java | JavaOne 2022 Technical Keynote https://inside.java/2022/10/24/inside-java-technical-keynote/ - Virtual Threads: New Foundations for High-Scale Java Applications https://www.infoq.com/articles/java-virtual-threads/ ## October 2022 Critical Patch Update Released As part of the October 2022 CPU, we released JDK 19.0.1, JDK 17.0.5 LTS, JDK 11.0.17 LTS and JDK 8u351 as well as OpenJDK 19.0.1. That's it for this time. As usual, let us know if you find any issues while testing your project(s) on the latest JDK early-access builds. Thanks for your support! --David |
|
From: Andreas D. <and...@pm...> - 2022-10-29 08:02:06
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.51.0 * Documentation: https://pmd.github.io/pmd-6.51.0/ 29-October-2022 - 6.51.0 The PMD team is pleased to announce PMD 6.51.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#new-and-noteworthy> o New Rules <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#new-rules> o Modified Rules <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#modified-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#api-changes> * External Contributions <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/10/pmd-6510-29-october-2022-released/#stats> New and noteworthy New Rules * The new Apex rule |ApexUnitTestClassShouldHaveRunAs| <https://pmd.github.io/pmd-6.51.0/pmd_rules_apex_bestpractices.html#apexunittestclassshouldhaverunas> ensures that unit tests use System.runAs() <https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_tools_runas.htm> at least once. This makes the tests more robust, and independent from the user running it. |<rule ref="category/apex/bestpractices.xml/ApexUnitTestClassShouldHaveRunAs"/> | The rule is part of the quickstart.xml ruleset. Modified Rules * The Java rule |TestClassWithoutTestCases| <https://pmd.github.io/pmd-6.51.0/pmd_rules_java_errorprone.html#testclasswithouttestcases> has a new property |testClassPattern|. This is used to detect empty test classes by name. Previously this rule could only detect empty JUnit3 test cases properly. To switch back to the old behavior, this property can be set to an empty value which disables the test class detection by pattern. Fixed Issues * apex o #4149 <https://github.com/pmd/pmd/issues/4149>: [apex] New rule: ApexUnitTestClassShouldHaveRunAs * doc o #4144 <https://github.com/pmd/pmd/pull/4144>: [doc] Update docs to reflect supported languages o #4163 <https://github.com/pmd/pmd/issues/4163>: [doc] Broken links on page "Architecture Decisions" * java-bestpractices o #4140 <https://github.com/pmd/pmd/issues/4140>: [java] [doc] AccessorClassGeneration violations hidden with Java 11 * java-codestyle o #4139 <https://github.com/pmd/pmd/issues/4139>: [java] UnnecessaryFullyQualifiedName FP when the same simple class name exists in the current package * java-documentation o #4141 <https://github.com/pmd/pmd/issues/4141>: [java] UncommentedEmptyConstructor FP when constructor annotated with @Autowired * java-performance o #1167 <https://github.com/pmd/pmd/issues/1167>: [java] AvoidArrayLoops false positive on double assignment o #2080 <https://github.com/pmd/pmd/issues/2080>: [java] StringToString rule false-positive with field access o #2692 <https://github.com/pmd/pmd/issues/2692>: [java] [doc] AvoidArrayLoops flags copy assignment in same array as sub-optimal o #3437 <https://github.com/pmd/pmd/issues/3437>: [java] StringToString doesn't trigger on Bar.class.getSimpleName().toString() o #3681 <https://github.com/pmd/pmd/issues/3681>: [java] StringToString doesn't trigger on string literals o #3847 <https://github.com/pmd/pmd/issues/3847>: [java] AvoidArrayLoops should consider final variables o #3977 <https://github.com/pmd/pmd/issues/3977>: [java] StringToString false-positive with local method name confusion o #4091 <https://github.com/pmd/pmd/issues/4091>: [java] AvoidArrayLoops false negative with do-while loops o #4148 <https://github.com/pmd/pmd/issues/4148>: [java] UseArrayListInsteadOfVector ignores Vector when other classes are imported * java-errorprone o #929 <https://github.com/pmd/pmd/issues/929>: [java] Inconsistent results with TestClassWithoutTestCases o #2636 <https://github.com/pmd/pmd/issues/2636>: [java] TestClassWithoutTestCases false positive with JUnit5 ParameterizedTest * javascript o #4165 <https://github.com/pmd/pmd/issues/4165>: [javascript] InaccurateNumericLiteral underscore separator notation false positive API Changes No changes. External Contributions * #4142 <https://github.com/pmd/pmd/pull/4142>: [java] fix #4141 Update UncommentedEmptyConstructor - ignore @Autowired annotations - Lynn <https://github.com/LynnBroe> (@LynnBroe) * #4147 <https://github.com/pmd/pmd/pull/4147>: [java] Added support for Do-While for AvoidArrayLoops - Yasar Shaikh <https://github.com/yasarshaikh> (@yasarshaikh) * #4150 <https://github.com/pmd/pmd/pull/4150>: [apex] New rule ApexUnitTestClassShouldHaveRunAs #4149 - Thomas Prouvot <https://github.com/tprouvot> (@tprouvot) Stats * 63 commits * 28 closed tickets & PRs * Days since last release: 28 |
|
From: Andreas D. <and...@pm...> - 2022-09-30 14:06:46
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.50.0 * Documentation: https://pmd.github.io/pmd-6.50.0/ 30-September-2022 - 6.50.0 The PMD team is pleased to announce PMD 6.50.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#new-and-noteworthy> o Lua now supports additionally Luau <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#lua-now-supports-additionally-luau> o Modified rules <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#modified-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#api-changes> o CPD CLI <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#cpd-cli> * Financial Contributions <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#financial-contributions> * External Contributions <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/09/pmd-6500-30-september-2022-released/#stats> New and noteworthy Lua now supports additionally Luau This release of PMD adds support for Luau <https://github.com/Roblox/luau>, a gradually typed language derived from Lua. This means, that the Lua language in PMD can now parse both Lua and Luau. Modified rules * The Java rule |UnusedPrivateField| <https://pmd.github.io/pmd-6.50.0/pmd_rules_java_bestpractices.html#unusedprivatefield> now ignores private fields, if the fields are annotated with any annotation or the enclosing class has any annotation. Annotations often enable a framework (such as dependency injection, mocking or e.g. Lombok) which use the fields by reflection or other means. This usage can't be detected by static code analysis. Previously these frameworks where explicitly allowed by listing their annotations in the property "ignoredAnnotations", but that turned out to be prone of false positive for any not explicitly considered framework. That's why the property "ignoredAnnotations" has been deprecated for this rule. * The Java rule |CommentDefaultAccessModifier| <https://pmd.github.io/pmd-6.50.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier> now by default ignores JUnit5 annotated methods. This behavior can be customized using the property |ignoredAnnotations|. Fixed Issues * cli o #4118 <https://github.com/pmd/pmd/issues/4118>: [cli] run.sh designer reports "integer expression expected" * core o #4116 <https://github.com/pmd/pmd/pull/4116>: [core] Missing --file arg in TreeExport CLI example * doc o #4072 <https://github.com/pmd/pmd/pull/4072>: [doc] Add architecture decision records o #4109 <https://github.com/pmd/pmd/pull/4109>: [doc] Add page for 3rd party rulesets o #4124 <https://github.com/pmd/pmd/pull/4124>: [doc] Fix typos in Java rule docs * java o #3431 <https://github.com/pmd/pmd/issues/3431>: [java] Add sample java project to regression-tester which uses new language constructs * java-bestpractices o #4033 <https://github.com/pmd/pmd/issues/4033>: [java] UnusedPrivateField - false positive with Lombok @ToString.Include o #4037 <https://github.com/pmd/pmd/issues/4037>: [java] UnusedPrivateField - false positive with Spring @SpyBean * java-codestyle o #3859 <https://github.com/pmd/pmd/issues/3859>: [java] CommentDefaultAccessModifier is triggered in JUnit5 test class o #4085 <https://github.com/pmd/pmd/issues/4085>: [java] UnnecessaryFullyQualifiedName false positive when nested and non-nested classes with the same name and in the same package are used together o #4133 <https://github.com/pmd/pmd/issues/4133>: [java] UnnecessaryFullyQualifiedName - FP for inner class pkg.ClassA.Foo implementing pkg.Foo * java-design o #4090 <https://github.com/pmd/pmd/issues/4090>: [java] FinalFieldCouldBeStatic false positive with non-static synchronized block (regression in 6.48, worked with 6.47) * java-errorprone o #1718 <https://github.com/pmd/pmd/issues/1718>: [java] ConstructorCallsOverridableMethod false positive when calling super method o #2348 <https://github.com/pmd/pmd/issues/2348>: [java] ConstructorCallsOverridableMethod occurs when unused overloaded method is defined o #4099 <https://github.com/pmd/pmd/issues/4099>: [java] ConstructorCallsOverridableMethod should consider method calls with var access * scala o #4138 <https://github.com/pmd/pmd/pull/4138>: [scala] Upgrade scala-library to 2.12.7 / 2.13.9 and scalameta to 4.6.0 API Changes CPD CLI * CPD now supports the |--ignore-literal-sequences| argument when analyzing Lua code. Financial Contributions Many thanks to our sponsors: * Oliver Siegmar <https://github.com/osiegmar> (@osiegmar) External Contributions * #4066 <https://github.com/pmd/pmd/pull/4066>: [lua] Add support for Luau syntax and skipping literal sequences in CPD - Matt Hargett <https://github.com/matthargett> (@matthargett) * #4100 <https://github.com/pmd/pmd/pull/4100>: [java] Update UnusedPrivateFieldRule - ignore any annotations - Lynn <https://github.com/LynnBroe> (@LynnBroe) * #4116 <https://github.com/pmd/pmd/pull/4116>: [core] Fix missing --file arg in TreeExport CLI example - mohan-chinnappan-n <https://github.com/mohan-chinnappan-n> (@mohan-chinnappan-n) * #4124 <https://github.com/pmd/pmd/pull/4124>: [doc] Fix typos in Java rule docs - Piotrek Żygieło <https://github.com/pzygielo> (@pzygielo) * #4128 <https://github.com/pmd/pmd/pull/4128>: [java] Fix False-positive UnnecessaryFullyQualifiedName when nested and non-nest… #4103 - Oleg Andreych <https://github.com/OlegAndreych> (@OlegAndreych) * #4130 <https://github.com/pmd/pmd/pull/4130>: [ci] GitHub Workflows security hardening - Alex <https://github.com/sashashura> (@sashashura) * #4131 <https://github.com/pmd/pmd/pull/4131>: [doc] TooFewBranchesForASwitchStatement - Use "if-else" instead of "if-then" - Suvashri <https://github.com/Suvashri> (@Suvashri) * #4137 <https://github.com/pmd/pmd/pull/4137>: [java] Fixes 3859: Exclude junit5 test methods from the commentDefaultAccessModifierRule - Luis Alcantar <https://github.com/lfalcantar> (@lfalcantar) Stats * 100 commits * 26 closed tickets & PRs * Days since last release: 29 |
|
From: David D. <dav...@or...> - 2022-09-23 09:21:20
|
Greetings! JDK 19 has been released (General Availability) on September 2Oth as planned, the release cadence is working like clockwork! You can find the "The Arrival of Java 19" announcement here [1], and some additional Java 19 material 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! With JDK 19 released, the focus should now shift to JDK 20 testing. As always, if you face any issues with early-access builds of JDK 20 please let us know. And do keep in mind that our GitHub Action [2] supports Early-Access builds, including JDK 20 EA. With Virtual Threads (preview), Structured Concurrency (Incubutor), Record Patterns (Preview), the Foreign Function & Memory API (Preview), etc. Java 19 is a rich feature release, to say the least! This release also paves the way for a bright future! To conclude with Java 19, all its features will be covered in great detail during JavaOne (Oct 17-20 Las Vegas) [3]. If you are planning to come and haven't registered yet, I suggest to ping me ASAP. [1] https://inside.java/2022/09/20/the-arrival-of-java-19/ [2] https://github.com/oracle-actions/setup-java [3] https://inside.java/javaone/ ## Heads-Up: JDK 19 - Double.toString() and Float.toString() change A bug affecting Double.toString(double) and Float.toString(float) has been fixed in Java 19 [4]. According to the Javadoc, Double.toString(double) should produce a string with a number of digits as small as possible, that still uniquely distinguishes this double from its adjacent double. That was not the case for many doubles. For example, whereas 1e23 and 9.999999999999999E22 are the same double, passing 1e23 to Double.toString(double) was returning “9.999999999999999E22”. The specification has been updated, and the implementation along with it. As a consequence and starting with JDK 19 some of the strings produced are now shorter than the ones produced in earlier releases. For example, passing 1e23 to this method in JDK 19 will return “1.0E23" instead of “9.999999999999999E22” in earlier JDK releases. Note that in JDK 19, passing 9.999999999999999E22 to this method also returns "1.0E23" because they are the same double. Many string representations of doubles and floats have changed to match the specification update. You can read the release notes [5] and some additional details here [4]. You can also learn more about floating point arithmetic in Joe Darcy's excellent "Floating-Point Arithmetic : What Every Java Programmer Should Know!" session [6]. [4] https://bugs.openjdk.org/browse/JDK-4511638 [5] https://bugs.openjdk.org/browse/JDK-8291475 [6] https://youtu.be/ajaHQ9S4uTA ## Heads-Up: JDK 20 - Drop support for -source/-target/--release 7 from javac JEP 182 (Policy for Retiring javac -source and -target Options) describes a policy to remove at a regular pace, from the javac compiler, support for obsolete versions. This is required to reduce compiler maintenance costs. JEP 182 still needs to be updated to reflect the 6-month release cadence but in that spirit and given that JDK 7 was released in July 2011, i.e. over a decade ago, support for -source/-target/--release 7 is dropped in JDK 20. All other supported values remain as such in JDK 20, 8 through 20 inclusive. For more information, you might want to check JDK-8173605 [7] and JEP 182: Policy for Retiring javac -source and -target Options [8]. [7] https://bugs.openjdk.org/browse/JDK-8173605 [8] https://openjdk.org/jeps/182 ## General Availability of Java 19 / JDK 19 JDK 19 is now Generally Available [9]. The OpenJDK builds, provided under the GNU General Public License v2 with the Classpath Exception, are available here [10]. The JDK 19 Release Notes are available here [11]. [9] https://mail.openjdk.org/pipermail/jdk-dev/2022-September/006933.html [10] https://jdk.java.net/19/ [11] https://jdk.java.net/19/release-notes JDK 19 includes seven JEPs: - JEP 405: Record Patterns (Preview) - JEP 422: Linux/RISC-V Port - JEP 424: Foreign Function & Memory API (Preview) - JEP 425: Virtual Threads (Preview) - JEP 426: Vector API (Fourth Incubator) - JEP 427: Pattern Matching for switch (Third Preview) - JEP 428: Structured Concurrency (Incubator) along with hundreds of smaller enhancements and over a thousand bug fixes. ## JDK 20 Early-Access builds JDK 20 Early-Access builds 16 are now 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://jdk.java.net/20/ [13] https://jdk.java.net/20/release-notes ### Changes in 20EA-b16 that may be of interest: - JDK-8293499: Provide jmod --compress option - JDK-8290367: Update default value and extend the scope of com.sun.jndi.ldap.object.trustSerialData system property - JDK-8244681: Add a warning for possibly lossy conversion in compound assignments - JDK-8256265: G1: Improve parallelism in regions that failed evacuation - JDK-8293861: G1: Disable preventive GCs by default - JDK-8293922: Extend barrier-less Java thread transitions to native transition - JDK-8290169: adlc: Improve child constraints for vector unary operations ### Additional changes that may be of interest: - JDK-8288933: Improve the implementation of Double/Float.isInfinite - JDK-8173605: Remove support for source and target 1.7 option in javac - JDK-8288966: Better handle very spiky promotion in G1 - JDK-8291753: Add JFR event for GC CPU Time - JDK-8292579: (tz) Update Timezone Data to 2022c - JDK-8282648: Weaken the InflaterInputStream specification in order to allow faster Zip implementations - JDK-8291660: Grapheme support in BreakIterator - JDK-8292240: CarrierThread.blocking not reset when spare not activated - JDK-8287908: Use non-cloning reflection methods where acceptable - JDK-8292628: x86: Improve handling of constants in trigonometric stubs - JDK-8292878: x86: Make scratch register usage explicit in assembler code - JDK-8290249: Vectorize signum on AArch64 - JDK-8292203: AArch64: Represent Registers as values - JDK-8292587: AArch64: Support SVE fabd instruction - JDK-8292575: risc-v: Represent Registers as values ## Topics of Interest: - Moving Java Forward with Java 19 https://inside.java/2022/09/20/moving-java-forward/ - “Java 19 is Here!” with Brian Goetz and Ron Pressler - Inside Java Podcast https://inside.java/2022/09/20/podcast-026/ - JDK 19 - Security Enhancements https://seanjmullan.org/blog/2022/09/22/jdk19 - JDK 19 - G1/Parallel/Serial GC improvements https://tschatzl.github.io/2022/09/16/jdk19-g1-parallel-gc-changes.html - “Java 19 in Action” - Inside Java Newscast https://inside.java/2022/09/08/insidejava-newscast-033/ - G1 Pre-Barrier Implementation https://albertnetymk.github.io/2022/07/22/g1_barrier/ - New candidate JEP: 430: String Templates (Preview) https://openjdk.org/jeps/430 - OpenJDK: Where the Magic Happens https://inside.java/2022/09/12/change-the-future-of-java/ That's it for this time. I hope to see some of you in a few weeks during JavaOne in Vegas. And again, if you haven't made your J1 plans yet, please ping me. --David |
|
From: Andreas D. <ad...@ap...> - 2022-09-05 17:28:34
|
The Maven team is pleased to announce the release of the Apache Maven PMD Plugin, version 3.19.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.19.0</version> </plugin> Release Notes - Maven PMD Plugin - Version 3.19.0 Bug * [MPMD-353] API incompatibility with jansi after upgrading m-shared-utils Task * [MPMD-354] Upgrade to PMD 6.49.0 Enjoy, -The Maven team |
|
From: Andreas D. <and...@pm...> - 2022-08-31 17:57:09
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.49.0 * Documentation: https://pmd.github.io/pmd-6.49.0/ 31-August-2022 - 6.49.0 The PMD team is pleased to announce PMD 6.49.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#new-and-noteworthy> o Updated PMD Designer <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#updated-pmd-designer> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#api-changes> o Deprecated API <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#deprecated-api> * External Contributions <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/08/pmd-6490-31-august-2022-released/#stats> New and noteworthy 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/6.49.0>. Fixed Issues * apex o #4096 <https://github.com/pmd/pmd/issues/4096>: [apex] ApexAssertionsShouldIncludeMessage and ApexUnitTestClassShouldHaveAsserts: support new Assert class (introduced with Apex v56.0) * core o #3970 <https://github.com/pmd/pmd/issues/3970>: [core] FileCollector.addFile ignores language parameter * java-codestyle o #4082 <https://github.com/pmd/pmd/issues/4082>: [java] UnnecessaryImport false positive for on-demand imports of nested classes API Changes Deprecated API * In order to reduce the dependency on Apex Jorje classes, the following methods have been deprecated. These methods all leaked internal Jorje enums. These enums have been replaced now by enums the PMD's AST package. o |ASTAssignmentExpression#getOperator| <https://docs.pmd-code.org/apidocs/pmd-apex/6.49.0/net/sourceforge/pmd/lang/apex/ast/ASTAssignmentExpression.html#getOperator()> o |ASTBinaryExpression#getOperator| <https://docs.pmd-code.org/apidocs/pmd-apex/6.49.0/net/sourceforge/pmd/lang/apex/ast/ASTBinaryExpression.html#getOperator()> o |ASTBooleanExpression#getOperator| <https://docs.pmd-code.org/apidocs/pmd-apex/6.49.0/net/sourceforge/pmd/lang/apex/ast/ASTBooleanExpression.html#getOperator()> o |ASTPostfixExpression#getOperator| <https://docs.pmd-code.org/apidocs/pmd-apex/6.49.0/net/sourceforge/pmd/lang/apex/ast/ASTPostfixExpression.html#getOperator()> o |ASTPrefixExpression#getOperator| <https://docs.pmd-code.org/apidocs/pmd-apex/6.49.0/net/sourceforge/pmd/lang/apex/ast/ASTPrefixExpression.html#getOperator()> All these classes have now a new |getOp()| method. Existing code should be refactored to use this method instead. It returns the new enums, like |AssignmentOperator| <https://docs.pmd-code.org/apidocs/pmd-apex/6.49.0/net/sourceforge/pmd/lang/apex/ast/AssignmentOperator.html#>, and avoids the dependency to Jorje. External Contributions * #4081 <https://github.com/pmd/pmd/pull/4081>: [apex] Remove Jorje leaks outside |ast| package - @eklimo <https://github.com/eklimo> * #4083 <https://github.com/pmd/pmd/pull/4083>: [java] UnnecessaryImport false positive for on-demand imports of nested classes (fix for #4082) - @abyss638 <https://github.com/abyss638> * #4092 <https://github.com/pmd/pmd/pull/4092>: [apex] Implement ApexQualifiableNode for ASTUserEnum - @aaronhurst-google <https://github.com/aaronhurst-google> * #4095 <https://github.com/pmd/pmd/pull/4095>: [core] CPD: Added begin and end token to XML reports - @pacvz <https://github.com/pacvz> * #4097 <https://github.com/pmd/pmd/pull/4097>: [apex] ApexUnitTestClassShouldHaveAssertsRule: Support new Assert class (Apex v56.0) - @tprouvot <https://github.com/tprouvot> * #4104 <https://github.com/pmd/pmd/pull/4104>: [doc] Add MegaLinter in the list of integrations - @nvuillam <https://github.com/nvuillam> Stats * 49 commits * 10 closed tickets & PRs * Days since last release: 32 |
|
From: David D. <dav...@or...> - 2022-08-22 14:05:57
|
Greetings! I hope you had a chance to take some time off. On our side, and despite the summer vacation, everything is on track for the Java 19 GA release on September 20th with JDK 19 now in the Release Candidate Phase [1]. If you haven't done so yet, it is time to start testing your project(s) using JDK 20 Early-Access builds. Speaking of Early-Access builds, there is now a new set of EA builds, i.e., the jextract EA builds. jextract is a tool developed under the Project Panama umbrella whose goal is to mechanically generates Java bindings from native library headers. If you are using the Foreign Function & Memory API (Preview Feature in JDK 19), make sure to check jextract too (see the jextract section below). [1] https://mail.openjdk.org/pipermail/jdk-dev/2022-August/006861.html ## Heads-up - New system properties for `System.out` and `System.err` in JDK 19 Two new system properties, `stdout.encoding` and `stderr.encoding`, have been introduced. The value of these system properties is the encoding used by the standard output (`System.out`) and standard error (`System.err`) streams. The default values of these system properties depend on the platform. The values take on the value of the `native.encoding` property when the platform does not provide streams for the console. The properties can be overridden on the launcher's command line option, with `-D`, to set them to UTF-8 where required. For more details see https://bugs.openjdk.org/browse/JDK-8283620 ## Heads-up - SSLSocketImpl finalizer implementation removed in JDK 19 The finalizer implementation in SSLSocket has been removed, with the underlying native resource releases now done by the Socket implementation. With this update, the TLS close_notify messages will no longer be emitted if SSLSocket is not explicitly closed. Not closing Sockets properly is an error condition that should be avoided. Applications should always close sockets and not rely on garbage collection. For more details see https://bugs.openjdk.org/browse/JDK-8212136 ## Heads-up - New providerPath jarsigner option in JDK 19 A new `-providerPath` option has been added to the jarsigner. This option is used to specify the class path of an alternate keystore implementation, it can be used together with the -providerClass option. For more details see https://bugs.openjdk.org/browse/JDK-8281175 ## JDK 19 Release Candidate builds JDK 19 first Release Candidates (builds 36) are now available [2], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [3]. [2] https://jdk.java.net/19/ [3] https://jdk.java.net/19/release-notes ## JDK 20 Early-Access builds JDK 20 Early-Access builds 11 are now available [4], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [5]. [4] https://jdk.java.net/20/ [5] https://jdk.java.net/20/release-notes ### Recent changes that maybe of interest: - JDK-8282730: LdapLoginModule throw NPE from logout method after login failure - JDK-8290706: Remove the support for inline contiguous allocations - JDK-8289551: Conversions between bit representations of half precision values and floats - JDK-8290485: [vector] REVERSE_BYTES for byte type should not emit any instructions - JDK-8289137: Automatically adapt Young/OldPLABSize and when setting only MinTLABSize - JDK-8290034: Auto vectorize reverse bit operations. - JDK-8290868: NMT: MallocSiteTable statistics improvements - JDK-8291822: ARM32: Build errors with GCC 11 in frame::saved_oop_result [Reported by JaCoCo] - JDK-8289249: Add methods to Elements for record constructors - JDK-8283232: x86: Improve vector broadcast operations - JDK-8288327: Executable.hasRealParameterData should not be volatile - JDK-8291360: Create entry points to expose low-level class file information - JDK-8290840: Refactor the "os" class - JDK-8292327: InflaterInputStream.read throws EOFException - JDK-8155246: Throw error if default java.security file is missing - JDK-8289332: Auto-generate ids for user-defined headings - JDK-8292153: x86: Represent Registers as values ## Jextract Early-Access Builds Early Access Builds 19-jextract+2-3 (2022/7/19) are now available [6]. These open-source builds are provided under the GNU General Public License, version 2, with the Classpath Exception. These builds are from the OpenJDK jextract project [7] which is part of Code Tools [8]. jextract is a tool developed under the Panama umbrealla whose goal is to mechanically generate Java bindings from native library headers. These EA builds are intended for advanced users, and are provided as a convenience so that they don't need to build it from the sources. Additional notes on builds, documentation and known issues are available at [6]. Please subscribe to the jextract mailing list [9] to share feedback. [6] https://jdk.java.net/jextract/ [7] https://github.com/openjdk/jextract [8] https://openjdk.org/projects/code-tools/ [9] http://mail.openjdk.org/mailman/listinfo/jextract-dev ## Topics of Interest * Podcast: “JavaOne is Back!” https://inside.java/2022/08/03/podcast-025/ * Sequenced Collections, Purity, and more at JavaOne https://inside.java/2022/08/11/insidejava-newscast-031/ * Concurrent Marking in G1 https://tschatzl.github.io/2022/08/04/concurrent-marking.html * Java Asynchronous Programming Full Tutorial with Loom and Structured Concurrency - JEP Café https://inside.java/2022/08/02/jepcafe13/ * New candidate JEP: 429: Extent-Local Variables (Incubator) https://openjdk.org/jeps/429 ## JDK Update Patch Release To fix a regression (JDK-8292260) in the C2 JIT compiler, we have produced update patch releases for the impacted supported Java SE versions. The new versions are JDK 18.0.2.1 (publicly available), 17.0.4.1 (publicly available), 11.0.16.1.1, and OpenJDK 18.0.2.1 (publicly available). As usual, let us know if you find any issues while testing your project(s) on the latest JDK early-access builds. Thanks for your support! --David |
|
From: Andreas D. <and...@pm...> - 2022-07-30 10:41:21
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.48.0 * Documentation: https://pmd.github.io/pmd-6.48.0/ 30-July-2022 - 6.48.0 The PMD team is pleased to announce PMD 6.48.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#new-and-noteworthy> o Java 19 Support <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#java-19-support> o Gherkin support <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#gherkin-support> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#api-changes> o CPD CLI <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#cpd-cli> o Rule Test Framework <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#rule-test-framework> o Deprecated API <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#deprecated-api> o Experimental APIs <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#experimental-apis> o Internal API <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#internal-api> * Financial Contributions <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#financial-contributions> * External Contributions <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/07/pmd-6480-30-july-2022-released/#stats> New and noteworthy Java 19 Support This release of PMD brings support for Java 19. There are no new standard language features. PMD supports JEP 427: Pattern Matching for switch (Third Preview) <https://openjdk.org/jeps/427> and JEP 405: Record Patterns (Preview) <https://openjdk.org/jeps/405> 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 |19-preview|: |exportPMD_JAVA_OPTS=--enable-preview./run.shpmd-languagejava-version19-preview...| Note: Support for Java 17 preview language features have been removed. The version "17-preview" is no longer available. Gherkin support Thanks to the contribution from Anne Brouwers <https://github.com/ASBrouwers> PMD now has CPD support for the Gherkin <https://cucumber.io/docs/gherkin/> language. It is used to defined test cases for the Cucumber <https://cucumber.io/> testing tool for behavior-driven development. Being based on a proper Antlr grammar, CPD can: * ignore comments * honor comment-based suppressions <https://sourceforge.net/p/pmd/news/2022/07/pmd_userdocs_cpd.html#suppression> Fixed Issues * apex o #4056 <https://github.com/pmd/pmd/pull/4056>: [apex] ApexSOQLInjection: Add support count query * core o #3796 <https://github.com/pmd/pmd/issues/3796>: [core] CPD should also provide a |--debug| flag o #4021 <https://github.com/pmd/pmd/pull/4021>: [core] CPD: Add total number of tokens to XML reports o #4031 <https://github.com/pmd/pmd/issues/4031>: [core] If report is written to stdout, stdout should not be closed o #4051 <https://github.com/pmd/pmd/issues/4051>: [doc] Additional rulesets are not listed in documentation o #4053 <https://github.com/pmd/pmd/pull/4053>: [core] Allow building PMD under Java 18+ * java o #4015 <https://github.com/pmd/pmd/issues/4015>: [java] Support JDK 19 * java-bestpractices o #3455 <https://github.com/pmd/pmd/issues/3455>: [java] WhileLoopWithLiteralBoolean - false negative with complex expressions * java-design o #3729 <https://github.com/pmd/pmd/issues/3729>: [java] TooManyMethods ignores "real" methods which are named like getters or setters o #3949 <https://github.com/pmd/pmd/issues/3949>: [java] FinalFieldCouldBeStatic - false negative with unnecessary parenthesis * java-performance o #3625 <https://github.com/pmd/pmd/issues/3625>: [java] AddEmptyString - false negative with empty var * lua o #4061 <https://github.com/pmd/pmd/pull/4061>: [lua] Fix several related Lua parsing issues found when using CPD * test o #3302 <https://github.com/pmd/pmd/pull/3302>: [test] Improve xml test schema o #3758 <https://github.com/pmd/pmd/issues/3758>: [test] Move pmd-test to java 8 o #3976 <https://github.com/pmd/pmd/pull/3976>: [test] Extract xml schema module API Changes CPD CLI * CPD has a new CLI option |--debug|. This option has the same behavior as in PMD. It enables more verbose logging output. Rule Test Framework * The module "pmd-test", which contains support classes to write rule tests, now *requires Java 8*. If you depend on this module for testing your own custom rules, you'll need to make sure to use at least Java 8. * The new module "pmd-test-schema" contains now the XSD schema and the code to parse the rule test XML files. The schema has been extracted in order to easily share it with other tools like the Rule Designer or IDE plugins. * Test schema changes: o The attribute |isRegressionTest| of |test-code| is deprecated. The new attribute |disabled| should be used instead for defining whether a rule test should be skipped or not. o The attributes |reinitializeRule| and |useAuxClasspath| of |test-code| are deprecated and assumed true. They will not be replaced. o The new attribute |focused| of |test-code| allows disabling all tests except the focused one temporarily. * More information about the rule test framework can be found in the documentation: Testing your rules <https://sourceforge.net/p/pmd/news/2022/07/pmd_userdocs_extending_testing.html> Deprecated API * The experimental Java AST class |ASTGuardedPattern| <https://docs.pmd-code.org/apidocs/pmd-java/6.48.0/net/sourceforge/pmd/lang/java/ast/ASTGuardedPattern.html#> has been deprecated and will be removed. It was introduced for Java 17 and Java 18 Preview as part of pattern matching for switch, but it is no longer supported with Java 19 Preview. * The interface |CPDRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/renderer/CPDRenderer.html#> is deprecated. For custom CPD renderers the new interface |CPDReportRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/renderer/CPDReportRenderer.html#> should be used. * The class |TestDescriptor| <https://docs.pmd-code.org/apidocs/pmd-test/6.48.0/net/sourceforge/pmd/testframework/TestDescriptor.html#> is deprecated, replaced with |RuleTestDescriptor| <https://docs.pmd-code.org/apidocs/pmd-test-schema/6.48.0/net/sourceforge/pmd/test/schema/RuleTestDescriptor.html#>. * Many methods of |RuleTst| <https://docs.pmd-code.org/apidocs/pmd-test/6.48.0/net/sourceforge/pmd/testframework/RuleTst.html#> have been deprecated as internal API. Experimental APIs * To support the Java preview language features "Pattern Matching for Switch" and "Record Patterns", the following AST nodes have been introduced as experimental: o |ASTSwitchGuard| <https://docs.pmd-code.org/apidocs/pmd-java/6.48.0/net/sourceforge/pmd/lang/java/ast/ASTSwitchGuard.html#> o |ASTRecordPattern| <https://docs.pmd-code.org/apidocs/pmd-java/6.48.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#> o |ASTComponentPatternList| <https://docs.pmd-code.org/apidocs/pmd-java/6.48.0/net/sourceforge/pmd/lang/java/ast/ASTComponentPatternList.html#> Internal API Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. You can identify them with the |@InternalApi| annotation. You'll also get a deprecation warning. * |CPDConfiguration#setRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setRenderer(net.sourceforge.pmd.cpd.Renderer)> * |CPDConfiguration#setCPDRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setCPDRenderer(net.sourceforge.pmd.cpd.renderer.CPDRenderer)> * |CPDConfiguration#getRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getRenderer()> * |CPDConfiguration#getCPDRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getCPDRenderer()> * |CPDConfiguration#getRendererFromString| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getRendererFromString(java.lang.String,java.lang.String)> * |CPDConfiguration#getCPDRendererFromString| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getCPDRendererFromString(java.lang.String,java.lang.String)> * |CPDRendererAdapter| <https://docs.pmd-code.org/apidocs/pmd-core/6.48.0/net/sourceforge/pmd/cpd/renderer/CPDRendererAdapter.html#> Financial Contributions Many thanks to our sponsors: * Matt Hargett <https://github.com/matthargett> (@matthargett) External Contributions * #3984 <https://github.com/pmd/pmd/pull/3984>: [java] Fix AddEmptyString false-negative issue - @LiGaOg <https://github.com/LiGaOg> * #3988 <https://github.com/pmd/pmd/pull/3988>: [java] Modify WhileLoopWithLiteralBoolean to meet the missing case #3455 - @VoidxHoshi <https://github.com/VoidxHoshi> * #3992 <https://github.com/pmd/pmd/pull/3992>: [java] FinalFieldCouldBeStatic - fix false negative with unnecessary parenthesis - @dalizi007 <https://github.com/dalizi007> * #3994 <https://github.com/pmd/pmd/pull/3994>: [java] TooManyMethods - improve getter/setter detection (#3729) - @341816041 <https://github.com/341816041> * #4017 <https://github.com/pmd/pmd/pull/4017>: Add Gherkin support to CPD - @ASBrouwers <https://github.com/ASBrouwers> * #4021 <https://github.com/pmd/pmd/pull/4021>: [core] CPD: Add total number of tokens to XML reports - @maikelsteneker <https://github.com/maikelsteneker> * #4056 <https://github.com/pmd/pmd/pull/4056>: [apex] ApexSOQLInjection: Add support count query - @gwilymatgearset <https://github.com/gwilymatgearset> * #4061 <https://github.com/pmd/pmd/pull/4061>: [lua] Fix several related Lua parsing issues found when using CPD - @matthargett <https://github.com/matthargett> Stats * 102 commits * 26 closed tickets & PRs * Days since last release: 35 |
|
From: David D. <dav...@or...> - 2022-07-25 15:49:10
|
Greetings! JDK 19 is now in Rampdown Phase Two [1]. The overall feature set is frozen. Per the JDK Release Process [2] we now turn 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]. Given the current state of affairs, it is a good time to start testing your project(s) on JDK 20 Early-Access builds. To conclude, please make sure to check the heads-up below, including the one covering JavaOne! [1] https://mail.openjdk.org/pipermail/jdk-dev/2022-July/006803.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 ## Heads-up - JavaOne is back! After a long hiatus, JavaOne is back! From October 17-20 in Las Vegas, JavaOne will be jam-packed with hundreds of valuable and actionable sessions directly from the experts: learning sessions, tutorials, hands-on labs, lightning talks, panels, an unconference, BoF's, etc. The full JavaOne content catalog will be released soon. In the meantime, make sure to check https://inside.java/javaone/ for more updates. And if you are planning to attend JavaOne, please ping me. I'd like to meet you in person to chat over OpenJDK and the Quality Outreach program. And the drinks will be on me! ## Heads-up - JavaFX Media enhancements survey The JavaFX team is conducting a short survey [5] to gather input on potential JavaFX Media enhancements. The process is quite simple as the feedback will be collected via the openjfx-dev [6] mailing list. So if you are using JavaFX, make sure to raise your voice. [5] https://mail.openjdk.org/pipermail/openjfx-dev/2022-July/034949.html [6] https://mail.openjdk.org/mailman/listinfo/openjfx-dev ## JDK 19 JDK 19 Early-Access builds 32 are now 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/19/ [8] https://jdk.java.net/19/release-notes ### JEPs integrated to JDK 19: - JEP 405: Record Patterns (Preview) - JEP 422: Linux/RISC-V Port - JEP 424: Foreign Function & Memory API (Preview) - JEP 425: Virtual Threads (Preview) - JEP 426: Vector API (4th Incubator) - JEP 427: Pattern Matching for switch (3rd Preview) - JEP 428: Structured Concurrency (Incubator) ### Recent changes that maybe of interest: - JDK-8289127: Apache Lucene triggers: DEBUG MESSAGE: duplicated predicate failed which is impossible - JDK-8290596: Update java.net.InetAddress to Detect Ambiguous IPv4 Address Literals - JDK-8290615: Remove the Alternate ThreadLocal Implementation of the Subject::current and Subject::callAs APIs - JDK-8290417: CDS cannot archive lamda proxy with useImplMethodHandle - JDK-8287809: Revisit implementation of memory session - JDK-8289278: Suspend/ResumeAllVirtualThreads need both can_suspend and can_support_virtual_threads - JDK-8288589: Files.readString ignores encoding errors for UTF-16 - JDK-8288425: Footprint regression due MH creation when initializing StringConcatFactory ## JDK 20 JDK 20 Early-Access builds 7 are now available [9], and are provided under the GNU General Public License v2, with the Classpath Exception. [9] https://jdk.java.net/20/ ### Recent changes that maybe of interest: - JDK-8264999: GeneralPath.lineTo() to itself produces jagged lines [Logged by Apache PDFBox] - JDK-8284997: arm32 build crashes since JDK-8283326 [Logged by JaCoCo] - JDK-8286101: Support formatting in @value tag - JDK-8289260: BigDecimal movePointLeft() and movePointRight() do not follow their API spec - JDK-8287835: Add support for additional float/double to integral conversion for x86 - JDK-8283091: Support type conversion between different data sizes in SLP - JDK-8288573: Make Executable.getParameterCount() actually abstract - JDK-8266670: Better modeling of access flags in core reflection - JDK-8290601: Update java.net.InetAddress to Detect Ambiguous IPv4 Address Literals - JDK-8290334: Update FreeType to 2.12.1 - JDK-8286030: Avoid JVM crash when containers share the same /tmp dir - JDK-8289743: AArch64: Clean up patching logic - JDK-8288107: Auto-vectorization for integer min/max - JDK-8274235: -Xshare:dump should not call vm_direct_exit ## Topics of Interest: * What is OpenJDK? - Inside Java Newscast https://inside.java/2022/06/30/insidejava-newscast-028/ * “Towards Generational ZGC!” - Inside Java Podcast https://inside.java/2022/06/29/podcast-024/ * HotSpot Deep Dive - Safepoint https://inside.java/2022/07/12/hotspot-deep-dive-safepoint/ * Introduction to Project Panama - Part 2: Variadic Functions https://inside.java/2022/06/27/introduction-to-project-panama-part-2/ * Data-Oriented Programming - Inside Java Newscast https://inside.java/2022/07/14/insidejava-newscast-029/ * Launching 10 millions virtual threads with Loom - JEP Café https://inside.java/2022/07/07/jepcafe12/ * Java 19 Virtual Threads - JEP Café https://inside.java/2022/06/08/jepcafe11/ ## July 2022 Critical Patch Update Released As part of the July 2022 CPU, we released JDK 18.0.2, JDK 17.0.4 LTS, JDK 11.0.16 LTS, JDK 8u341 and JDK 7u351 as well as OpenJDK 18.0.2 ~ As always, if you find an issue while testing your project(s), please let us know through the usual channels. Thanks for your support! -- David |
|
From: Andreas D. <and...@pm...> - 2022-06-25 08:20:31
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.47.0 * Documentation: https://pmd.github.io/pmd-6.47.0/ 25-June-2022 - 6.47.0 The PMD team is pleased to announce PMD 6.47.0. This is a minor release. Table Of Contents * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/06/pmd-6470-25-june-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/06/pmd-6470-25-june-2022-released/#api-changes> * External Contributions <https://sourceforge.net/p/pmd/news/2022/06/pmd-6470-25-june-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/06/pmd-6470-25-june-2022-released/#stats> Fixed Issues * core o #3999 <https://github.com/pmd/pmd/issues/3999>: [cli] All files are analyzed despite parameter |--file-list| o #4009 <https://github.com/pmd/pmd/issues/4009>: [core] Cannot build PMD with Temurin 17 * java-bestpractices o #3824 <https://github.com/pmd/pmd/issues/3824>: [java] UnusedPrivateField: Do not flag fields annotated with @Version o #3825 <https://github.com/pmd/pmd/issues/3825>: [java] UnusedPrivateField: Do not flag fields annotated with @Id or @EmbeddedId * java-design o #3823 <https://github.com/pmd/pmd/issues/3823>: [java] ImmutableField: Do not flag fields in @Entity o #3981 <https://github.com/pmd/pmd/issues/3981>: [java] ImmutableField reports fields annotated with @Value (Spring) o #3998 <https://github.com/pmd/pmd/issues/3998>: [java] ImmutableField reports fields annotated with @Captor (Mockito) o #4004 <https://github.com/pmd/pmd/issues/4004>: [java] ImmutableField reports fields annotated with @GwtMock (GwtMockito) and @Spy (Mockito) o #4008 <https://github.com/pmd/pmd/issues/4008>: [java] ImmutableField not reporting fields that are only initialized in the declaration o #4011 <https://github.com/pmd/pmd/issues/4011>: [java] ImmutableField: Do not flag fields annotated with @Inject o #4020 <https://github.com/pmd/pmd/issues/4020>: [java] ImmutableField reports fields annotated with @FindBy and @FindBys (Selenium) * java-errorprone o #3936 <https://github.com/pmd/pmd/issues/3936>: [java] AvoidFieldNameMatchingMethodName should consider enum class o #3937 <https://github.com/pmd/pmd/issues/3937>: [java] AvoidDuplicateLiterals - uncompilable test cases API Changes No changes. External Contributions * #3985 <https://github.com/pmd/pmd/pull/3985>: [java] Fix false negative problem about Enum in AvoidFieldNameMatchingMethodName #3936 - @Scrsloota <https://github.com/Scrsloota> * #3993 <https://github.com/pmd/pmd/pull/3993>: [java] AvoidDuplicateLiterals - Add the method "buz" definition to test cases - @dalizi007 <https://github.com/dalizi007> * #4002 <https://github.com/pmd/pmd/pull/4002>: [java] ImmutableField - Ignore fields annotated with @Value (Spring) or @Captor (Mockito) - @jjlharrison <https://sourceforge.net/u/jjlharrison/> * #4003 <https://github.com/pmd/pmd/pull/4003>: [java] UnusedPrivateField - Ignore fields annotated with @Id/@EmbeddedId/@Version (JPA) or @Mock/@Spy/@MockBean (Mockito/Spring) - @jjlharrison <https://sourceforge.net/u/jjlharrison/> * #4006 <https://github.com/pmd/pmd/pull/4006>: [doc] Fix eclipse plugin update site URL - @shiomiyan <https://github.com/shiomiyan> * #4010 <https://github.com/pmd/pmd/pull/4010>: [core] Bump kotlin to version 1.7.0 - @maikelsteneker <https://github.com/maikelsteneker> Stats * 45 commits * 23 closed tickets & PRs * Days since last release: 27 |
|
From: David D. <dav...@or...> - 2022-06-13 15:13:07
|
Greetings! JDK 19 has now entered Rampdown Phase One (RDP1) [1], which means that the main-line has been forked into a dedicated JDK 19 stabilization repository. At this point, the overall JDK 19 feature set is frozen and no additional JEPs will be targeted to JDK 19. The stabilization repository is open for select bug fixes and, with approval, late low-risk enhancements per the JDK Release Process [2]. Any change pushed to the main line is now bound for JDK 20, unless it is explicitly back-ported to JDK 19. The next few weeks should be leveraged to try to identify and resolve as many issues as possible, i.e. before JDK 19 enters the Release Candidates phase. Moreover, we encourage you to test your project with the `enable-preview` flag as described in this Quality Outreach Heads-up [3], and even if you don't intend to use Virtual Threads in the near future. [1] https://mail.openjdk.java.net/pipermail/jdk-dev/2022-June/006735.html [2] https://openjdk.java.net/jeps/3 [3] https://inside.java/2022/05/16/quality-heads-up/ ## Heads-up - openjdk.java.net ➜ openjdk.org DNS transition The OpenJDK infrastructure is moving from the old openjdk.java.net subdomain to the openjdk.org top-level domain. This will affect all active subdomains (i.e., bugs, cr, db, git, hg, mail, and wiki) and the old hostnames (*.openjdk.java.net) will now act as aliases for the new names. No actions are required as this transition should be transparent and is mostly done. It should be mentioned that https://jdk.java.net/ is not changing. More information can be found in the original proposal https://mail.openjdk.java.net/pipermail/discuss/2022-May/006089.html ## JDK 19 Early-Access builds JDK 19 Early-Access builds 26 are now available [4], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [5]. Given that JDK 19 is now in RDP1, the initial JDK 20 Early-Access builds are now also available [6]. [4] https://jdk.java.net/19/ [5] https://jdk.java.net/19/release-notes [6] https://jdk.java.net/20/ ### JEPs integrated to JDK 19: - JEP 405: Record Patterns (Preview) - JEP 422: Linux/RISC-V Port - JEP 424: Foreign Function & Memory API (Preview) - JEP 425: Virtual Threads (Preview) - JEP 426: Vector API (Fourth Incubator) - JEP 427: Pattern Matching for switch (Third Preview) - JEP 428: Structured Concurrency (Incubator) ### Recent changes that may be of interest: Build 26: - JDK-8284199: Implementation of Structured Concurrency (Incubator) - JDK-8282662: Use List.of() factory method to reduce memory consumption - JDK-8284780: Need methods to create pre-sized HashSet and LinkedHashSet - JDK-8250950: Allow per-user and system wide configuration of a jpackaged app - JDK-8236569: -Xss not multiple of 4K does not work for the main thread on macOS - JDK-4511638: Double.toString(double) sometimes produces incorrect results - JDK-8287714: Improve handling of JAVA_ARGS - JDK-8286850: [macos] Add support for signing user provided app image - JDK-8287425: Remove unnecessary register push for MacroAssembler::check_k… - JDK-8283694: Improve bit manipulation and boolean to integer conversion o… - JDK-8287522: StringConcatFactory: Add in prependers and mixers in batches Build 25: - JDK-8284960: Integration of JEP 426: Vector API (Fourth Incubator) - JDK-8287244: Add bound check in indexed memory access var handle - JDK-8287292: Improve TransformKey to pack more kinds of transforms effici… - JDK-8287003: InputStreamReader::read() can return zero despite writing a … - JDK-8287064: Modernize ProxyGenerator.PrimitiveTypeInfo Build 24: - JDK-8286908: ECDSA signature should not return parameters - JDK-8261768: SelfDestructTimer should accept seconds - JDK-8286304: Removal of diagnostic flag GCParallelVerificationEnabled - JDK-8267038: Update IANA Language Subtag Registry to Version 2022-03-02 - JDK-8285517: System.getenv() returns unexpected value if environment vari… - JDK-8285513: JFR: Add more static support for event classes - JDK-8287024: G1: Improve the API boundary between HeapRegionRemSet and G1… - JDK-8287139: aarch64 intrinsic for unsignedMultiplyHigh Build 23: - JDK-8282191: Implementation of Foreign Function & Memory API (Preview) - JDK-8286090: Add RC2/RC4 to jdk.security.legacyAlgorithms - JDK-8282080: Lambda deserialization fails for Object method references on interfaces - JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider - JDK-8282191: Implementation of Foreign Function & Memory API (Preview) - JDK-8284194: Allow empty subject fields in keytool - JDK-8209137: Add ability to bind to specific local address to HTTP client - JDK-8286841: Add BigDecimal.TWO - JDK-8287139: aarch64 intrinsic for unsignedMultiplyHigh - JDK-8282160: JShell circularly-required classes cannot be defined - JDK-8282280: Update Xerces to Version 2.12.2 ## Topics of Interest * Replacing Finalizers with Cleaners https://inside.java/2022/05/25/clean-cleaner/ * Testing Clean Cleaner Cleanup https://inside.java/2022/05/27/testing-clean-cleaner-cleanup/ * Improved JFR Ergonomics https://egahlin.github.io/2022/05/31/improved-ergonomics.html * Java 19 Virtual Threads - JEP Café https://inside.java/2022/06/08/jepcafe11/ * Deconstructing Records in Pattern Matching - Inside Java Newscast https://inside.java/2022/06/02/insidejava-newscast-026/ * Concurrent Thread-stack Processing in the Z Garbage Collector https://inside.java/2022/05/31/zgc-concurrent-thread-stack-processing/ As usual, let us know if you find any issues while testing your project(s) on the latest JDK early-access builds. Thanks for your support! --David |
|
From: Andreas D. <ad...@ap...> - 2022-06-04 16:39:18
|
The Maven team is pleased to announce the release of the Apache Maven PMD Plugin, version 3.17.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.17.0</version> </plugin> Release Notes - Maven PMD Plugin - Version 3.17.0 Bug * [MPMD-342] No debug log message issued when empty report shall be skipped and no issues have been found * [MPMD-334] Source Encoding parameter is ignored Improvement * [MPMD-333] Add release notes documentation * [MPMD-309] Add configuration option to show suppressed violations New Feature * [MPMD-332] Support Java 18 Task * [MPMD-343] Upgrade to PMD 6.46.0 * [MPMD-341] Upgrade Maven Plugin Test Harness to 3.3.0 * [MPMD-340] Upgrade Maven Reporting API/Impl to 3.1.0 * [MPMD-339] Upgrade plugins in ITs * [MPMD-338] Upgrade to Doxia/Doxia Sitetools to 1.11.1 * [MPMD-337] Upgrade Maven Parent to 36 * [MPMD-336] Replace deprecated calls to PMD * [MPMD-331] Require Maven 3.2.5+ * [MPMD-330] Upgrade Maven Parent to 35 * [MPMD-329] Upgrade to PMD 6.45.0 Enjoy, -The Maven team |
|
From: Andreas D. <and...@pm...> - 2022-05-28 09:50:52
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.46.0 * Documentation: https://pmd.github.io/pmd-6.46.0/ 28-May-2022 - 6.46.0 The PMD team is pleased to announce PMD 6.46.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#new-and-noteworthy> o CLI improvements <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#cli-improvements> o C# Improvements <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#c#-improvements> o New Rules <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#new-rules> o Deprecated Rules <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#deprecated-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#api-changes> o Deprecated ruleset references <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#deprecated-ruleset-references> o Deprecated API <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#deprecated-api> o Internal API <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#internal-api> * External Contributions <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/05/pmd-6460-28-may-2022-released/#stats> New and noteworthy CLI improvements The PMD CLI now allows repeating the |--dir| (|-d|) and |--rulesets| (|-R|) options, as well as providing several space-separated arguments to either of them. For instance: |pmd -d src/main/java src/test/java -R rset1.xml -R rset2.xml | This also allows globs to be used on the CLI if your shell supports shell expansion. For instance, the above can be written |pmd -d src/*/java -R rset*.xml | Please use theses new forms instead of using comma-separated lists as argument to these options. C# Improvements When executing CPD on C# sources, the option |--ignore-annotations| is now supported as well. It ignores C# attributes when detecting duplicated code. This option can also be enabled via the CPD GUI. See #3974 <https://github.com/pmd/pmd/pull/3974> for details. New Rules This release ships with 2 new Java rules. * |EmptyControlStatement| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_codestyle.html#emptycontrolstatement> reports many instances of empty things, e.g. control statements whose body is empty, as well as empty initializers. EmptyControlStatement also works for empty |for| and |do| loops, while there were previously no corresponding rules. This new rule replaces the rules EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, and EmptyWhileStmt. |<rule ref="category/java/codestyle.xml/EmptyControlStatement"/> | The rule is part of the quickstart.xml ruleset. * |UnnecessarySemicolon| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_codestyle.html#unnecessarysemicolon> reports semicolons that are unnecessary (so called "empty statements" and "empty declarations"). This new rule replaces the rule EmptyStatementNotInLoop. |<rule ref="category/java/codestyle.xml/UnnecessarySemicolon"/> | The rule is part of the quickstart.xml ruleset. Deprecated Rules * The following Java rules are deprecated and removed from the quickstart ruleset, as the new rule |EmptyControlStatement| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_codestyle.html#emptycontrolstatement> merges their functionality: o |EmptyFinallyBlock| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptyfinallyblock> o |EmptyIfStmt| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptyifstmt> o |EmptyInitializer| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptyinitializer> o |EmptyStatementBlock| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptystatementblock> o |EmptySwitchStatements| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptyswitchstatements> o |EmptySynchronizedBlock| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptysynchronizedblock> o |EmptyTryBlock| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptytryblock> o |EmptyWhileStmt| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptywhilestmt> * The Java rule |EmptyStatementNotInLoop| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_errorprone.html#emptystatementnotinloop> is deprecated and removed from the quickstart ruleset. Use the new rule |UnnecessarySemicolon| <https://pmd.github.io/pmd-6.46.0/pmd_rules_java_codestyle.html#unnecessarysemicolon> instead. Fixed Issues * cli o #1445 <https://github.com/pmd/pmd/issues/1445>: [core] Allow CLI to take globs as parameters * core o #2352 <https://github.com/pmd/pmd/issues/2352>: [core] Deprecate \<lang>-\<ruleset> hyphen notation for ruleset references o #3787 <https://github.com/pmd/pmd/issues/3787>: [core] Internalize some methods in Ant Formatter o #3835 <https://github.com/pmd/pmd/issues/3835>: [core] Deprecate system properties of CPDCommandLineInterface o #3942 <https://github.com/pmd/pmd/issues/3942>: [core] common-io path traversal vulnerability (CVE-2021-29425) * cs (c#) o #3974 <https://github.com/pmd/pmd/pull/3974>: [cs] Add option to ignore C# attributes (annotations) * go o #2752 <https://github.com/pmd/pmd/issues/2752>: [go] Error parsing unicode values * html o #3955 <https://github.com/pmd/pmd/pull/3955>: [html] Improvements for handling text and comment nodes o #3978 <https://github.com/pmd/pmd/pull/3978>: [html] Add additional file extensions htm, xhtml, xht, shtml * java o #3423 <https://github.com/pmd/pmd/issues/3423>: [java] Error processing identifiers with Unicode * java-bestpractices o #3954 <https://github.com/pmd/pmd/issues/3954>: [java] NPE in UseCollectionIsEmptyRule when .size() is called in a record * java-design o #3874 <https://github.com/pmd/pmd/issues/3874>: [java] ImmutableField reports fields annotated with @Autowired (Spring) and @Mock (Mockito) * java-errorprone o #3096 <https://github.com/pmd/pmd/issues/3096>: [java] EmptyStatementNotInLoop FP in 6.30.0 with IfStatement * java-performance o #3379 <https://github.com/pmd/pmd/issues/3379>: [java] UseArraysAsList must ignore primitive arrays o #3965 <https://github.com/pmd/pmd/issues/3965>: [java] UseArraysAsList false positive with non-trivial loops * javascript o #2605 <https://github.com/pmd/pmd/issues/2605>: [js] Support unicode characters o #3948 <https://github.com/pmd/pmd/issues/3948>: [js] Invalid operator error for method property in object literal * python o #2604 <https://github.com/pmd/pmd/issues/2604>: [python] Support unicode identifiers API Changes Deprecated ruleset references Ruleset references with the following formats are now deprecated and will produce a warning when used on the CLI or in a ruleset XML file: - |<lang-name>-<ruleset-name>|, eg |java-basic|, which resolves to |rulesets/java/basic.xml| - the internal release number, eg |600|, which resolves to |rulesets/releases/600.xml| Use the explicit forms of these references to be compatible with PMD 7. Deprecated API * |toString| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/RuleSetReferenceId.html#toString()> is now deprecated. The format of this method will remain the same until PMD 7. The deprecation is intended to steer users away from relying on this format, as it may be changed in PMD 7. * |getInputPaths| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPaths()> and |setInputPaths| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(java.lang.String)> are now deprecated. A new set of methods have been added, which use lists and do not rely on comma splitting. Internal API Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. You can identify them with the |@InternalApi| annotation. You'll also get a deprecation warning. * |CPDCommandLineInterface| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/cpd/CPDCommandLineInterface.html#> has been internalized. In order to execute CPD either |CPD#run| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/cpd/CPD.html#run(java.lang.String...)> or |CPD#main| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/cpd/CPD.html#main(java.lang.String[])> should be used. * Several members of |BaseCPDCLITest| <https://docs.pmd-code.org/apidocs/pmd-test/6.46.0/net/sourceforge/pmd/cli/BaseCPDCLITest.html#> have been deprecated with replacements. * The methods |Formatter#start| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/ant/Formatter.html#start(java.lang.String)>, |Formatter#end| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/ant/Formatter.html#end(net.sourceforge.pmd.Report)>, |Formatter#getRenderer| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/ant/Formatter.html#getRenderer()>, and |Formatter#isNoOutputSupplied| <https://docs.pmd-code.org/apidocs/pmd-core/6.46.0/net/sourceforge/pmd/ant/Formatter.html#isNoOutputSupplied()> have been internalized. External Contributions * #3961 <https://github.com/pmd/pmd/pull/3961>: [java] Fix #3954 - NPE in UseCollectionIsEmptyRule with record - @flyhard <https://github.com/flyhard> * #3964 <https://github.com/pmd/pmd/pull/3964>: [java] Fix #3874 - ImmutableField: fix mockito/spring false positives - @lukelukes <https://github.com/lukelukes> * #3974 <https://github.com/pmd/pmd/pull/3974>: [cs] Add option to ignore C# attributes (annotations) - @maikelsteneker <https://github.com/maikelsteneker> Stats * 92 commits * 30 closed tickets & PRs * Days since last release: 28 |
|
From: David D. <dav...@or...> - 2022-05-16 08:47:39
|
Welcome to a new OpenJDK Quality Outreach update! This time, we have one update but a major one: JEP 425 (Virtual Threads preview) has been integrated into the OpenJDK mainline! JDK 19 Early-Access builds 22 are the first mainline builds with Virtual Threads (preview) support. So, Project Loom is now getting closer and closer! Please make sure to check the Heads-up below even if you don’t intend to use virtual threads in the short future. ## Heads-up - JEP 425 Virtual Threads (preview) testing The goal of Project Loom is to introduce in the Java platform an easy-to-use, high-throughput lightweight concurrency model, and a related new concurrent programming model. Developed in Project Loom, JEP 425 introduces virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. Note that virtual threads are a preview API in JDK 19. Please make sure to read 'JEP 425: Virtual Threads (Preview)' for a detailed explanation. A lot of testing has already been done but we are asking, once again, your help to test your project(s) with the latest JDK 19 Early-Access builds, even if you don’t intend to use virtual threads any time soon. There are two approaches to test your project: 1. Update your code to use virtual threads …or 2. Simply test your existing unchanged code with the preview feature enabled. Both approaches should yield valuable feedback. If you choose to adapt your application to use virtual threads (cf. JavaDoc [2]), be aware that in some cases it’s not just about updating your code to use virtual threads instead of platform threads; there are some additional considerations. For example, virtual threads shouldn’t be pooled [3], code that relies heavily on thread locals [4] will require some work to move to a world where there is a new thread for each task, etc. Given that are some minor behavior changes and that `ThreadGroup` has been degraded, testing your code as-is, i.e., without using virtual threads but with the preview feature enabled at runtime, will also be useful. For more details, please check 'JEP 425 - Risks and Assumptions' [5]. One difference between to the EA builds published by Project Loom and the latest JDK 19 EA builds is that the `--enable-preview` flag is required at run-time to use the new APIs. It’s not possible to use the APIs with core reflection to avoid the need for `--enable-preview`. Finally, some tools especially tools relying on JVM TI agents might not be fully ready for virtual threads. Your help testing this important update is greatly appreciated, all feedback should be sent to the 'loom-dev' mailing list [6]. [1] https://openjdk.java.net/jeps/425 [2] https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/lang/Thread.html [3] https://openjdk.java.net/jeps/425#Do-not-pool-virtual-threads [4] https://openjdk.java.net/jeps/425#Thread-local-variables [5] https://openjdk.java.net/jeps/425#Risks-and-Assumptions [6] https://mail.openjdk.java.net/pipermail/loom-dev/ ## JDK 19 Early-Access builds JDK 19 Early-Access builds 22 are now available [7], and are provided under the GNU General Public License v2, with the Classpath Exception. Make sure to check the Release Notes [8] and the JavaDoc [9]. [7] https://jdk.java.net/19/ [8] https://jdk.java.net/19/release-notes [9] https://download.java.net/java/early_access/jdk19/docs/ ### Current JDK 19 JEPs - 405: Record Patterns (Preview) - Proposed to target - 422: Linux/RISC-V Port - Integrated - 424: Foreign Function & Memory API (Preview) - Integrated - 425: Virtual Threads (Preview) - Integrated - 426: Vector API (4th Incubator) - Targeted - 427: Pattern Matching for switch (3rd Preview) - Targeted ### Recent changes that may be of interest: Build 22: - JDK-8284161: Implementation of Virtual Threads (Preview) - JDK-8285947: Avoid redundant HashMap.containsKey calls in ZoneName - JDK-8212136: Remove finalizer implementation in SSLSocketImpl - JDK-8285872: JFR: Remove finalize() methods - JDK-8285914: AppCDS crash when using shared archive with old class file - JDK-8286163: micro-optimize Instant.plusSeconds - JDK-8282420: JFR: Remove event handlers - JDK-8282559: Allow multiple search terms in javadoc search Build 21: - JDK-8255552: Add DES/3DES/MD5 to jdk.security.legacyAlgorithms - JDK-8278370: [win] Disable side-by-side installations of multiple JDK updates in Windows JDK installers - JDK-8281010: [macos] Disable side-by-side installations of multiple JDK updates in macOS JDK installers - JDK-8236128: Allow jpackage create installers for services - JDK-8279598: provide adapter from RandomGenerator to Random Build 20: - JDK-8284553: Deprecate the DEFAULT static field of OAEPParameterSpec - JDK-8283620: System.out does not use the encoding/charset specified in the Javadoc - JDK-8285445: Enable Windows Alternate Data Streams by default - JDK-8284930: Re-examine FilterInputStream mark/reset - JDK-8284890: Support for Do not fragment IP socket options - JDK-8282823: javac should constrain more uses of preview APIs - JDK-8285477: Add a PRECISION public static field to j.l.Float and j.l.Double Build 19: - JDK-8186958: New Methods to Create Preallocated HashMaps - JDK-8284775: Simplify String.substring(_, length()) calls - JDK-8283892: Compress and expand bits - JDK-8280915: Better parallelization for AbstractSpliterator and IteratorS… - JDK-8284681: compiler/c2/aarch64/TestFarJump.java fails with "RuntimeExce… - JDK-8283790: G1: Remove redundant card/heap-address transition - JDK-8285001: Simplify StringLatin1.regionMatches - JDK-8284880: Re-examine sun.invoke.util.Wrapper hash tables - JDK-8278356: Improve file creation ## Topics of Interest - Java Cryptographic Roadmap update https://java.com/en/jre-jdk-cryptoroadmap.html - Virtual Thread Deep Dive https://inside.java/2022/04/07/insidejava-newscast-023/ - Why Write an Empty finalize() Method? https://stuartmarks.wordpress.com/2022/04/27/why-write-an-empty-finalize-method/ - WHEN and NULL In Pattern Matching https://inside.java/2022/05/05/insidejava-newscast-024/ - JDK 8 to JDK 18 in GC: 10 Releases, 2000+ Enhancements https://inside.java/2022/05/02/odl-jdk8-to-jdk18-gc/ - ZGC - What's new in JDK 18 https://malloc.se/blog/zgc-jdk18 - Java Next - From Amber to Loom, from Panama to Valhalla https://inside.java/2022/05/09/java-next/ ## JDK Update Patch Release As announced with the April 2022 CPU release, we have produced update patch releases for all Java SE supported versions. The new versions are JDK 18.0.1.1 (publicly available), 17.0.3.1 (publicly available), 11.0.15.1, 8u333, 7u343, and OpenJDK 18.0.1.1 (publicly available). As usual, let us know if you find any issues while testing your project(s) on the latest JDK early-access builds. Thanks for your support! --David |
|
From: Andreas D. <and...@pm...> - 2022-04-30 08:29:29
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.45.0 * Documentation: https://pmd.github.io/pmd-6.45.0/ 30-April-2022 - 6.45.0 The PMD team is pleased to announce PMD 6.45.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#new-and-noteworthy> o PMD User Survey <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#pmd-user-survey> o Support for HTML <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#support-for-html> o New rules <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#new-rules> o Modified rules <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#modified-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#api-changes> o Experimental APIs <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#experimental-apis> * External Contributions <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/04/pmd-6450-30-april-2022-released/#stats> New and noteworthy PMD User Survey Help shape the future of PMD by telling us how you use it. Our little survey is still open in case you didn't participate yet. Please participate in our survey at https://forms.gle/4d8r1a1RDzfixHDc7. Thank you! Support for HTML This version of PMD ships a new language module to support analyzing of HTML. Support for HTML is experimental and might change without notice. The language implementation is not complete yet and the AST doesn't look well for text nodes and comment nodes and might be changed in the future. You can write your own rules, but we don't guarantee that the rules work with the next (minor) version of PMD without adjustments. Please give us feedback about how practical this new language is in discussions <https://github.com/pmd/pmd/discussions>. Please report missing features or bugs as new issues <https://github.com/pmd/pmd/issues>. New rules * The HTML rule |AvoidInlineStyles| <https://pmd.github.io/pmd-6.45.0/pmd_rules_html_bestpractices.html#avoidinlinestyles> finds elements which use a style attribute. In order to help maintaining a webpage it is considered good practice to separate content and styles. Instead of inline styles one should use CSS files and classes. |<rule ref="category/html/bestpractices.xml/AvoidInlineStyles" /> | * The HTML rule |UnnecessaryTypeAttribute| <https://pmd.github.io/pmd-6.45.0/pmd_rules_html_bestpractices.html#unnecessarytypeattribute> finds "link" and "script" elements which still have a "type" attribute. This is not necessary anymore since modern browsers automatically use CSS and JavaScript. |<rule ref="category/html/bestpractices.xml/UnnecessaryTypeAttribute" /> | * The HTML rule |UseAltAttributeForImages| <https://pmd.github.io/pmd-6.45.0/pmd_rules_html_bestpractices.html#usealtattributeforimages> finds "img" elements without an "alt" attribute. An alternate text should always be provided in order to help screen readers. |<rule ref="category/html/bestpractices.xml/UseAltAttributeForImages" /> | Modified rules * The Java rule |UnusedPrivateField| <https://pmd.github.io/pmd-6.45.0/pmd_rules_java_bestpractices.html#unusedprivatefield> has a new property |ignoredFieldNames|. The default ignores serialization-specific fields (eg |serialVersionUID|). The property can be used to ignore more fields based on their name. Note that the rule used to ignore fields named |IDENT|, but doesn't anymore (add this value to the property to restore the old behaviour). Fixed Issues * core * #3792 <https://github.com/pmd/pmd/issues/3792>: [core] Allow to filter violations in Report * #3881 <https://github.com/pmd/pmd/issues/3881>: [core] SARIF renderer depends on platform default encoding * #3882 <https://github.com/pmd/pmd/pull/3882>: [core] Fix AssertionError about exhaustive switch * #3884 <https://github.com/pmd/pmd/issues/3884>: [core] XML report via ant task contains XML header twice * #3896 <https://github.com/pmd/pmd/pull/3896>: [core] Fix ast-dump CLI when reading from stdin * doc * #2505 <https://github.com/pmd/pmd/issues/2505>: [doc] Improve side bar to show release date * java * #3068 <https://github.com/pmd/pmd/issues/3068>: [java] Some tests should not depend on real rules * #3889 <https://github.com/pmd/pmd/pull/3889>: [java] Catch LinkageError in UselessOverridingMethodRule * java-bestpractices * #3910 <https://github.com/pmd/pmd/pull/3910>: [java] UnusedPrivateField - Allow the ignored fieldnames to be configurable * #1185 <https://github.com/pmd/pmd/issues/1185>: [java] ArrayIsStoredDirectly false positive with field access * #1474 <https://github.com/pmd/pmd/issues/1474>: [java] ArrayIsStoredDirectly false positive with method call * #3879 <https://github.com/pmd/pmd/issues/3879> [java] ArrayIsStoredDirectly reports duplicated violation * #3929 <https://github.com/pmd/pmd/issues/3929>: [java] ArrayIsStoredDirectly should report the assignment rather than formal parameter * java-design * #3603 <https://github.com/pmd/pmd/issues/3603>: [java] SimplifiedTernary: no violation for 'condition ? true : false' case * java-performance * #3867 <https://github.com/pmd/pmd/issues/3867>: [java] UseArraysAsList with method call * plsql * #3687 <https://github.com/pmd/pmd/issues/3687>: [plsql] Parsing exception EXECUTE IMMEDIATE l_sql BULK COLLECT INTO statement * #3706 <https://github.com/pmd/pmd/issues/3706>: [plsql] Parsing exception CURSOR statement with parenthesis groupings API Changes Experimental APIs * Report has two new methods which allow limited mutations of a given report: * |Report#filterViolations| <https://docs.pmd-code.org/apidocs/pmd-core/6.45.0/net/sourceforge/pmd/Report.html#filterViolations(net.sourceforge.pmd.util.Predicate)> creates a new report with some violations removed with a given predicate based filter. * |Report#union| <https://docs.pmd-code.org/apidocs/pmd-core/6.45.0/net/sourceforge/pmd/Report.html#union(net.sourceforge.pmd.Report)> can combine two reports into a single new Report. * |net.sourceforge.pmd.util.Predicate| <https://docs.pmd-code.org/apidocs/pmd-core/6.45.0/net/sourceforge/pmd/util/Predicate.html#> will be replaced in PMD7 with the standard Predicate interface from java8. * The module |pmd-html| is entirely experimental right now. Anything in the package |net.sourceforge.pmd.lang.html| should be used cautiously. External Contributions * #3883 <https://github.com/pmd/pmd/pull/3883>: [doc] Improve side bar by Adding Release Date - @jasonqiu98 <https://github.com/jasonqiu98> * #3910 <https://github.com/pmd/pmd/pull/3910>: [java] UnusedPrivateField - Allow the ignored fieldnames to be configurable - @laoseth <https://github.com/laoseth> * #3928 <https://github.com/pmd/pmd/pull/3928>: [plsql] Fix plsql parsing error in parenthesis groups - @LiGaOg <https://github.com/LiGaOg> * #3935 <https://github.com/pmd/pmd/pull/3935>: [plsql] Fix parser exception in EXECUTE IMMEDIATE BULK COLLECT #3687 - @Scrsloota <https://github.com/Scrsloota> * #3938 <https://github.com/pmd/pmd/pull/3938>: [java] Modify SimplifiedTernary to meet the missing case #3603 - @VoidxHoshi <https://github.com/VoidxHoshi> * #3943 <https://github.com/pmd/pmd/pull/3943>: chore: Set permissions for GitHub actions - @naveensrinivasan <https://github.com/naveensrinivasan> Stats * 97 commits * 31 closed tickets & PRs * Days since last release: 33 |
|
From: David D. <dav...@or...> - 2022-04-20 05:34:09
|
Greetings! The proposed schedule for JDK 19 is now known [1] with ‘Rampdown Phase One’ set for June 9th and ‘General Availability’ set for September 20th. The next several weeks will be interesting to watch as the scope of JDK 19 is revealed. You also play an important roll during these phases, which is your opportunity to share feedback . When developers such as yourself tell us of issues faced in the latest OpenJDK early-access (EA) builds, we then have a chance to fix them before that feature release reaches general availability (GA). We also enjoy when people tell us that all their tests are green! It gives us confidence ;-) So regardless of the tests color (red or green), please do not hesitate to send me a short mail as both types of feedback are useful. [1] https://mail.openjdk.java.net/pipermail/jdk-dev/2022-April/006481.html ## Heads-Up: Java Cryptographic Extension Survey The Java Cryptographic Extension (JCE) has been in Java SE for a long time and has made incremental changes over the years. The OpenJDK Security Team is conducting a survey [2] to know more about how projects are using JCE and what changes, features, and API enhancements would be useful going forward. The survey is closing on April 29 so if you have written or maintain code that uses the JCE API, please make sure to fill this short survey [2] as soon as possible. [2] https://www.questionpro.com/t/AUzP7ZrFWv ## Heads-Up: New macOS Rendering Pipeline on macOS JEP 382 [3] introduced in JDK 17 support for the new macOS Metal graphics pipeline for Swing and Java2D. JDK 19 starting build 18 is switching the default to be the new macOS Metal rendering pipeline instead of the old Apple OpenGL API. For more details please see JDK-8284378 [4]. Java applications running on macOS (10.14 or later) will not need to take any action, as they will automatically benefit from faster graphics with lower power consumption, and the use of a more modern stable graphics API which will be able to work better on current and future Apple systems. [3] https://openjdk.java.net/jeps/382 [4] https://bugs.openjdk.java.net/browse/JDK-8284378 ## JDK 19 Early-Access builds JDK 19 Early-Access builds 18 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]. [5] https://jdk.java.net/19/ [6] https://jdk.java.net/19/release-notes ### JEPs targeted to JDK 19, so far: - JEP 422: Linux/RISC-V Port https://openjdk.java.net/jeps/422 ### Recent changes that maybe of interest: Build 18: - JDK-8284378: Make Metal the default Java 2D rendering pipeline for macOS - JDK-8265315: Update CLDR to version 41 - JDK-8270090: C2: LCM may prioritize CheckCastPP nodes over projections [Reported by JaCoCo] - JDK-8284361: Updating ASM to 9.3 for JDK 19 - JDK-8284330: jcmd may not be able to find processes in the container - JDK-8284579: Improve VarHandle checks for interpreter Build 17: - JDK-8282819: Deprecate Locale class constructors - JDK-8254935: Deprecate the PSSParameterSpec(int) constructor - JDK-8283060: RawNativeLibraries should allow multiple clients to load/unload the same library Build 16: - JDK-8281561: Disable http DIGEST mechanism with MD5 and SHA-1 by default - JDK-8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS - JDK-8163327: Remove 3DES from the default enabled cipher suites list - JDK-8267319: Use larger default key sizes and algorithms based on CNSA - JDK-8283350: (tz) Update Timezone Data to 2022a ## Project Loom Updates The first Loom related JEP is now in Candidate phase, i.e. JEP: 425: Virtual Threads (Preview) [7]. As of now, JEP 425 doesn't yet 'propose to target' any particular feature release. [7] https://openjdk.java.net/jeps/425 In addition, Project Loom early-access builds 19-loom+5-429 (2022/4/4) are now available [8] with related Javadoc [9]. These builds are based on JDK 19 and are provided under the GNU General Public License, version 2, with the Classpath Exception and are produced for the purpose of gathering feedback. Use for any other purpose is at your own risk. Proper feedback should be sent to the `loom-dev` mailing list [10]. [8] https://jdk.java.net/loom/ [9] https://download.java.net/java/early_access/loom/docs/api/ [10] https://mail.openjdk.java.net/mailman/listinfo/loom-dev ## Topics of Interest: * New candidate JEP: 426: Vector API (4th Incubator) https://openjdk.java.net/jeps/426 * Virtual Thread Deep Dive - Inside Java Newscast #23 https://inside.java/2022/04/07/insidejava-newscast-023/ * Project Panama: Say Goodbye to JNI https://inside.java/2022/04/04/projectpanama/ * Java Cryptographic Extension Survey https://inside.java/2022/04/12/jce-survey/ As usual, let us know if you find any issues while testing your project(s) on the latest JDK early-access builds. Thanks for your support! --David |
|
From: David D. <dav...@or...> - 2022-03-28 13:00:41
|
Greetings! JDK 18 has been released (General Availability) on March 22nd as planned, the release cadence is working like clockwork! As a small token of gratitude, some of you have been specifically acknowledged in the "The Arrival of Java 18" announcement [1]. On behalf of the entire team, let me extend our thanks to all of you. With JDK 18 released, the focus should now be on making sure your project(s) compile and work on JDK 19. As always, if you face any issue with early-access builds of JDK 19 please let us know. To help you in this task, we have just released a GitHub action to install the OpenJDK Early-Access builds. For more information, please check the heads-up below. I'll conclude with a short teaser, i.e. JavaOne is Back! [2] Stay tuned for more details. [1] https://inside.java/2022/03/22/the-arrival-of-java18/ [2] https://www.oracle.com/cloudworld/javaone/ ## Heads-Up: oracle-actions/setup-java To help you test your project(s), we have released a GitHub Action [3] to download and install various JDK builds produced by Oracle. In addition to the latest OpenJDK GA builds (GPL v2 W/CPE) and the Oracle JDK builds (NFTC license), this action can also download and install OpenJDK early-access builds, and early-access builds of OpenJDK projects (ex. Project Loom, Project Valhalla, etc.). When doing tests using EA builds, it is key to always use the upstream EA builds from jdk.java.net as issues should be logged against those upstream builds, and ideally against a specific build version. This GitHub action is actively following the OpenJDK EA builds releases. Please make sure to check the announcement [4] for more details, and short FAQ. To help you isolate regression between different EA builds, we are working to add support for archived builds. If you have feedback, please either issue the Issue tracker [5] or just send me a mail. [3] https://github.com/marketplace/actions/setup-java-development-kits-built-by-oracle [4] https://inside.java/2022/03/11/setup-java/ [5] https://github.com/oracle-actions/setup-java/issues ## General Availability of Java 18 / JDK 18 JDK 18 is now Generally Available [6]. The OpenJDK builds which are provided under the GNU General Public License v2, with the Classpath Exception are available [7], the JDK 18 Release Notes are also available [8]. [6] https://mail.openjdk.java.net/pipermail/jdk-dev/2022-March/006458.html [7] https://jdk.java.net/18/ [8] https://jdk.java.net/18/release-notes Along with hundreds of smaller enhancements and over a thousand bug fixes, JDK 18 includes following JEPs: - JEP 400: UTF-8 by Default - JEP 408: Simple Web Server - JEP 413: Code Snippets in Java API Documentation - JEP 416: Reimplement Core Reflection with Method Handles - JEP 417: Vector API (Third Incubator) - JEP 418: Internet-Address Resolution SPI - JEP 419: Foreign Function & Memory API (Second Incubator) - JEP 420: Pattern Matching for switch (Second Preview) - JEP 421: Deprecate Finalization for Removal Thanks to everyone who contributed to JDK 18, whether by designing and implementing features or enhancements, by fixing bugs, or by downloading and testing the early-access builds. ## JDK 19 Early-Access builds JDK 19 Early-Access builds 15 are now available [9], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are also available [10]. [9] https://jdk.java.net/19/ [10] https://jdk.java.net/19/release-notes ### JEPs targeted to JDK 19, so far: - JEP 422: Linux/RISC-V Port https://openjdk.java.net/jeps/422 ### Recent changes that maybe of interest: - JDK-8283415: Update java.lang.ref to use sealed classes - JDK-8280494: (D)TLS signature schemes - JDK-8282081: java.time.DateTimeFormatter: wrong definition of symbol F - JDK-8281181: Do not use CPU Shares to compute active processor count - JDK-7192189: Support endpoint identification algorithm in RFC 6125 - JDK-8277474: jarsigner does not check if algorithm parameters are disabled - JDK-8280357: If the users home directory is invalid, system property user.home is set to $HOME - JDK-8277204: Implement PAC-RET branch protection on Linux/AArch64 - JDK-8282411: Add useful predicates to ElementKind - JDK-8282131: java.time.ZoneId should be a sealed abstract class - JDK-8281375: Accelerate bitCount operation for AVX2 and AVX512 target ## Topics of Interest: - “Java 18 is Here!” - Inside Java Podcast https://inside.java/2022/03/22/podcast-023/ - “The Simple Web Server” - Inside Java Podcast https://inside.java/2022/03/04/podcast-022/ - “Finalization Deprecation” - Inside Java Podcast https://inside.java/2022/01/12/podcast-021/ - All About JDK 18 - Inside Java Newscast https://inside.java/2022/03/10/insidejava-newscast-021/ - JDK 18 - Security Enhancements https://seanjmullan.org/blog/2022/03/23/jdk18 - JDK 18 - Programmer's Guide to Snippets https://docs.oracle.com/en/java/javase/18/code-snippet/index.html - JDK 18 - G1/Parallel/Serial GC improvements https://tschatzl.github.io/2022/03/14/jdk18-g1-parallel-gc-changes.html - “Java Language Futures: Spring 2022 Edition” (video) https://www.youtube.com/watch?v=m7Ypbw-xVRo - Project Panama : `jextract` Standalone Repository https://mail.openjdk.java.net/pipermail/panama-dev/2022-March/016632.html Again, let us know if you find any issues while testing your project(s) on the latest JDK Early Access builds. Thanks for your support! --David |
|
From: Andreas D. <and...@pm...> - 2022-03-27 15:49:38
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.44.0 * Documentation: https://pmd.github.io/pmd-6.44.0/ 27-March-2022 - 6.44.0 The PMD team is pleased to announce PMD 6.44.0. This is a minor release. Table Of Contents * New and noteworthy <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#new-and-noteworthy> o PMD User Survey <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#pmd-user-survey> o Java 18 Support <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#java-18-support> o Better XML XPath support <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#better-xml-xpath-support> o New XPath functions <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#new-xpath-functions> o New programmatic API <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#new-programmatic-api> * Fixed Issues <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#api-changes> o Deprecated API <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#deprecated-api> o Experimental APIs <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#experimental-apis> * External Contributions <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#external-contributions> * Stats <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#stats> New and noteworthy PMD User Survey Help shape the future of PMD by telling us how you use it. Please participate in our survey at https://forms.gle/4d8r1a1RDzfixHDc7. Thank you! Java 18 Support This release of PMD brings support for Java 18. There are no new standard language features. PMD also supports JEP 420: Pattern Matching for switch (Second Preview) <https://openjdk.java.net/jeps/420> as a preview language feature. In order to analyze a project with PMD that uses these language features, you'll need to enable it via the environment variable |PMD_JAVA_OPTS| and select the new language version |18-preview|: |export PMD_JAVA_OPTS=--enable-preview ./run.sh pmd -language java -version 18-preview ... | Note: Support for Java 16 preview language features have been removed. The version "16-preview" is no longer available. Better XML XPath support The new rule class |DomXPathRule| <https://docs.pmd-code.org/apidocs/pmd-xml/6.44.0/net/sourceforge/pmd/lang/xml/rule/DomXPathRule.html#> is intended to replace usage of the |XPathRule| for XML rules. This rule executes the XPath query in a different way, which sticks to the XPath specification. This means the expression is interpreted the same way in PMD as in all other XPath development tools that stick to the standard. You can for instance test the expression in an online XPath editor. Prefer using this class to define XPath rules: replace the value of the |class| attribute with |net.sourceforge.pmd.lang.xml.rule.DomXPathRule| like so: |<rule name="MyXPathRule" language="xml" message="A message" class="net.sourceforge.pmd.lang.xml.rule.DomXPathRule"> <properties> <property name="xpath"> <value><![CDATA[ /a/b/c[@attr = "5"] ]]></value> </property> <!-- Note: the property "version" is ignored, remove it. The query is XPath 2. --> </properties> </rule> | The rule is more powerful than |XPathRule|, as it can now handle XML namespaces, comments and processing instructions. Please refer to the Javadoc of |DomXPathRule| <https://docs.pmd-code.org/apidocs/pmd-xml/6.44.0/net/sourceforge/pmd/lang/xml/rule/DomXPathRule.html#> for information about the differences with |XPathRule| and examples. |XPathRule| is still perfectly supported for all other languages, including Apex and Java. New XPath functions The new XPath functions |pmd:startLine|, |pmd:endLine|, |pmd:startColumn|, and |pmd:endColumn| are now available in XPath rules for all languages. They replace the node attributes |@BeginLine|, |@EndLine| and such. These attributes will be deprecated in a future release. Please refer to the documentation <https://pmd.github.io/latest/pmd_userdocs_extending_writing_xpath_rules.html#pmd-extension-functions> of these functions for more information, including usage samples. Note that the function |pmd:endColumn| returns an exclusive index, while the attribute |@EndColumn| is inclusive. This is for forward compatibility with PMD 7, which uses exclusive end indices. New programmatic API This release introduces a new programmatic API to replace the inflexible |PMD| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMD.html#> class. Programmatic execution of PMD should now be done with a |PMDConfiguration| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#> and a |PmdAnalysis| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PmdAnalysis.html#>, for instance: |PMDConfiguration config = new PMDConfiguration(); config.setDefaultLanguageVersion(LanguageRegistry.findLanguageByTerseName("java").getVersion("11")); config.setInputPaths("src/main/java"); config.prependAuxClasspath("target/classes"); config.setMinimumPriority(RulePriority.HIGH); config.addRuleSet("rulesets/java/quickstart.xml"); config.setReportFormat("xml"); config.setReportFile("target/pmd-report.xml"); try (PmdAnalysis pmd = PmdAnalysis.create(config)) { // note: don't use `config` once a PmdAnalysis has been created. // optional: add more rulesets pmd.addRuleSet(pmd.newRuleSetLoader().loadFromResource("custom-ruleset.xml")); // optional: add more files pmd.files().addFile(Paths.get("src", "main", "more-java", "ExtraSource.java")); // optional: add more renderers pmd.addRenderer(renderer); // or just call PMD pmd.performAnalysis(); } | The |PMD| class still supports methods related to CLI execution: |runPmd| and |main|. All other members are now deprecated for removal. The CLI itself remains compatible, if you run PMD via command-line, no action is required on your part. Fixed Issues * apex o #3817 <https://github.com/pmd/pmd/pull/3817>: [apex] Add designer bindings to display main attributes * apex-performance o #3773 <https://github.com/pmd/pmd/pull/3773>: [apex] EagerlyLoadedDescribeSObjectResult false positives with SObjectField.getDescribe() * core o #2693 <https://github.com/pmd/pmd/issues/2693>: [ci] Add integration tests with real open-source projects o #3299 <https://github.com/pmd/pmd/issues/3299>: [core] Deprecate system properties of PMDCommandLineInterface * java o #3809 <https://github.com/pmd/pmd/issues/3809>: [java] Support JDK 18 * doc o #2504 <https://github.com/pmd/pmd/issues/2504>: [doc] Improve "Edit me on github" button o #3812 <https://github.com/pmd/pmd/issues/3812>: [doc] Documentation website table of contents broken on pages with many subheadings * java-design o #3850 <https://github.com/pmd/pmd/issues/3850>: [java] ImmutableField - false negative when field assigned in constructor conditionally o #3851 <https://github.com/pmd/pmd/issues/3851>: [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - false negative when a compilation unit contains two class declarations * xml o #2766 <https://github.com/pmd/pmd/issues/2766>: [xml] XMLNS prefix is not pre-declared in xpath query o #3863 <https://github.com/pmd/pmd/issues/3863>: [xml] Make XPath rules work exactly as in the XPath spec API Changes Deprecated API * Several members of |PMD| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMD.html#> have been newly deprecated, including: * |PMD#EOL|: use |System#lineSeparator()| * |PMD#SUPPRESS_MARKER|: use |DEFAULT_SUPPRESS_MARKER| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#DEFAULT_SUPPRESS_MARKER> * |PMD#processFiles|: use the new programmatic API <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#new-programmatic-api> * |PMD#getApplicableFiles|: is internal * |PMDConfiguration#prependClasspath| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#prependClasspath(java.lang.String)> is deprecated in favour of |prependAuxClasspath| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#prependAuxClasspath(java.lang.String)>. * |PMDConfiguration#setRuleSets| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.lang.String)> and |getRuleSets| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSets()> are deprecated. Use instead |setRuleSets| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.util.List)>, |addRuleSet| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#addRuleSet(java.lang.String)>, and |getRuleSetPaths| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSetPaths()>. * Several members of |BaseCLITest| <https://docs.pmd-code.org/apidocs/pmd-test/6.44.0/net/sourceforge/pmd/cli/BaseCLITest.html#> have been deprecated with replacements. * Several members of |PMDCommandLineInterface| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/cli/PMDCommandLineInterface.html#> have been explicitly deprecated. The whole class however was deprecated long ago already with 6.30.0. It is internal API and should not be used. * In modelica, the rule classes |AmbiguousResolutionRule| <https://docs.pmd-code.org/apidocs/pmd-modelica/6.44.0/net/sourceforge/pmd/lang/modelica/rule/AmbiguousResolutionRule.html#> and |ConnectUsingNonConnector| <https://docs.pmd-code.org/apidocs/pmd-modelica/6.44.0/net/sourceforge/pmd/lang/modelica/rule/ConnectUsingNonConnector.html#> have been deprecated, since they didn't comply to the usual rule class naming conventions yet. The replacements are in the subpackage |bestpractices|. Experimental APIs * Together with the new programmatic API <https://sourceforge.net/p/pmd/news/2022/03/pmd-6440-27-march-2022-released/#new-programmatic-api> the interface |TextFile| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/lang/document/TextFile.html#> has been added as /experimental/. It intends to replace |DataSource| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/util/datasource/DataSource.html#> and |SourceCode| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/cpd/SourceCode.html#> in the long term. This interface will change in PMD 7 to support read/write operations and other things. You don't need to use it in PMD 6, as |FileCollector| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/lang/document/FileCollector.html#> decouples you from this. A file collector is available through |PmdAnalysis#files| <https://docs.pmd-code.org/apidocs/pmd-core/6.44.0/net/sourceforge/pmd/PmdAnalysis.html#files()>. External Contributions * #3773 <https://github.com/pmd/pmd/pull/3773>: [apex] EagerlyLoadedDescribeSObjectResult false positives with SObjectField.getDescribe() - @filiprafalowicz <https://github.com/filiprafalowicz> * #3811 <https://github.com/pmd/pmd/pull/3811>: [doc] Improve "Edit me on github" button - @btjiong <https://github.com/btjiong> * #3836 <https://github.com/pmd/pmd/pull/3836>: [doc] Make TOC scrollable when too many subheadings - @JerritEic <https://github.com/JerritEic> Stats * 124 commits * 23 closed tickets & PRs * Days since last release: 29 |