jdk17u-dev
jdk17u-dev copied to clipboard
8348986: Improve coverage of enhanced exception messages
trafficstars
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
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [ ] JDK-8348986 needs maintainer approval
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [x] Change requires CSR request JDK-8366459 to be approved
Issues
- JDK-8348986: Improve coverage of enhanced exception messages (Enhancement - P3)
- JDK-8366459: Improve coverage of enhanced exception messages (CSR)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3989/head:pull/3989
$ git checkout pull/3989
Update a local copy of the PR:
$ git checkout pull/3989
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3989/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3989
View PR using the GUI difftool:
$ git pr show -t 3989
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3989.diff