[jdk17u-dev] RFR: 8348986: Improve coverage of enhanced exception messages
Alexey Bakhtin
abakhtin at openjdk.org
Tue Sep 23 19:55:54 UTC 2025
I'd like to backport JDK-8348986 to control sensitive information in Exception messages.
Backport from https://github.com/openjdk/jdk21u-dev/pull/2132 is not clean. The following changes were applied manually:
- src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java
- copyright year
- src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java
- Throwing IOException from the connect() method is updated manually because of a context difference
- src/java.base/share/classes/module-info.java
- exports sun.security.util updated manually
- src/java.base/share/classes/java/net/Inet4AddressImpl.java
- changes discarded. JDK17 does not have JDK-8244202 and related changes : lookupAllHostAddr(String hostname, LookupPolicy lookupPolicy)
- src/java.base/share/classes/java/net/InetAddress.java
- throwing UnknownHostException from NameServiceAddresses::get is updated manually because of context differences
- import section
- no CachecdLookup and ValidCachedLookup classes in JDK17. changes discarded
- src/java.base/share/classes/java/net/Proxy.java
- copyright year
- src/java.base/share/classes/java/net/SocketPermission.java
- copyright year
- src/java.base/share/classes/java/net/SocksSocketImpl.java
- copyright year
- src/java.base/share/classes/java/net/URI.java
- import section
- src/java.base/share/classes/java/net/URL.java
- copyright year
- src/java.base/share/classes/java/net/URLStreamHandler.java
- copyright year
- src/java.base/share/classes/sun/net/www/protocol/jar/Handler.java
- copyright year
- src/java.base/windows/native/libnet/Inet4AddressImpl.c
- copyright year
- src/java.base/windows/native/libnet/Inet6AddressImpl.c
- copyright year
- src/java.base/share/native/libnet/net_util.h
- copyright year
- getEnhancedExceptionsAllowed() declaration added manually because of context difference
- src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java
- parseCompat method is updated manually because of context differences
- src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java
- copyright year
- src/java.base/windows/classes/sun/nio/fs/WindowsUserPrincipals.java
- copyright year
- lookup method is updated manually because of context differences
- src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java
- no such class in JDK17
Modified and related JTREG tests are passed
-------------
Commit messages:
- Backport b6f827ef054959662190e21ce63fc3d3c45b92f3
Changes: https://git.openjdk.org/jdk17u-dev/pull/3989/files
Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3989&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8348986
Stats: 948 lines in 41 files changed: 683 ins; 109 del; 156 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/3989.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3989/head:pull/3989
PR: https://git.openjdk.org/jdk17u-dev/pull/3989
More information about the jdk-updates-dev
mailing list