Hello,

Please review this patch for 9.

NPE may occur if additional logging is enabled with "java.net.http.HttpClient.log" system property because AsyncSSLDelegate.logParams(SSLParameters) doesn't check for null values which were returned by SSLParameters instance.

I also noticed that setting "java.net.http.HttpClient.log" system property to "all" doesn't enable additional logging for "ssl". Not sure if that was done for some purpose.

Changes:
- added a couple of checks to AsyncSSLDelegate.logParams(SSLParameters) method to prevent NPEs - updated java/net/http/Log.java to enable logging for "ssl" if "java.net.http.HttpClient.log" system property was set to "all" - updated java/net/http/Http2TestServer.java to implement AutoCloseable, so that it's possible to use it in try-with-resource blocks (which simplifies tests a little bit) - added TLSConnection.java test which run HTTP/2 client with different SSL parameters, and checks that they were actually used
- a couple of cosmetic changes (unused imports, etc)

TLSConnection.java test also checks that https://bugs.openjdk.java.net/browse/JDK-8150769 was fixed (this bug has been fixed while HTTP/2 integration).

Bug: https://bugs.openjdk.java.net/browse/JDK-8157107
Webrev: http://cr.openjdk.java.net/~asmotrak/8157107/webrev.01/

Artem

Reply via email to