[jdk21u-dev] RFR: 8348986: Improve coverage of enhanced exception messages
Alexey Bakhtin
abakhtin at openjdk.org
Mon Sep 29 21:19:48 UTC 2025
On Tue, 9 Sep 2025 02:15:17 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:
>> I'd like to backport JDK-8348986 to control sensitive information in Exception messages.
>>
>> Backport is not clean. The following changes were applied manually:
>> - src/java.base/share/classes/module-info.java
>> - exports jdk.internal.util updated manually because JDK25 has more dependencies
>> - src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java
>> - copyright year
>> - src/java.base/share/classes/sun/nio/ch/SocketAdaptor.java
>> - changes discarded. JDK21 does not have JDK-8343791 and related changes (Socket::connect() does not throw UnknownHostException)
>> - src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java
>> - trivial merge in the import section, copyright year is updated
>> - src/java.base/unix/classes/sun/nio/fs/UnixUserPrincipals.java
>> - trivial merge in the lookupName() method. JDK21 version still has SecurityManager related code
>> - copyright year
>> - src/java.base/share/classes/sun/net/util/IPAddressUtil.java
>> - JDK21 does not have JDK-8272215 It can not be backported because of API changes. validateNumericFormatV4() method is changed instead of invalidIpAddressLiteral
>> - copyright year
>> - src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java
>> - setEnhancedExceptions method was added manually because of a context difference
>> - src/java.base/share/classes/java/net/HostPortrange.java
>> - copyright year
>> - src/java.base/share/classes/java/net/Inet6Address.java
>> - changes discarded. JDK21 does not have JDK-8272215 and related functionality.
>> - src/java.base/share/classes/java/net/InetAddress.java
>> - UnknownHostException in the getLocalHost method is updated manually because of a context difference
>> - copyright year
>> - src/java.base/share/classes/java/net/Proxy.java
>> - copyright year
>> - import section
>> - src/java.base/share/classes/java/net/SocketPermission.java
>> - copyright year
>> - src/java.base/share/classes/java/net/SocksSocketImpl.java
>> - copyright year
>> - import section
>> - src/java.base/share/classes/java/net/URL.java
>> - copyright year
>> - import section
>> - src/java.net.http/share/classes/jdk/internal/net/http/websocket/OpeningHandshake.java
>> - copyright year
>> - src/java.base/share/native/libnet/net_util.c
>> - copyright year
>> - src/java.base/share/native/libnet/net_util.h
>> - copyright year
>> - src/java.base/unix/native/libnet/net_util_md.c
>> - copyright year
>> - src/java.base/windows/classes/sun/nio/ch/Win...
>
> java/lang/SecurityManager/CheckAccessClassInPackagePermissions test failure is not related to the current changes
> @alexeybakhtin I highly doubt that. We don't see the failure anywhere else in JDK 21u. See https://github.com/openjdk/jdk21u-dev/pulls for other PRs which have clean CI. Also this patch touches the `java.net.http` module in a very relevant way. This needs to be fixed.
Thank you. You are right. I've added `accessClassInPackage.jdk.internal.util` permission to the java `java.net.http` module
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2132#issuecomment-3349080450
More information about the jdk-updates-dev
mailing list