Code Review request: 8047186: jdk.net.Sockets throws InvocationTargetException instead of original runtime exceptions

2014-06-18 Thread Artem Smotrakov
Hello, Please review this fix for 8u: https://bugs.openjdk.java.net/browse/JDK-8047186 http://cr.openjdk.java.net/~asmotrak/so_flow_sla/sockets_exceptions/webrev.01/ getOption() and setOption() methods of jdk.net.Sockets class throw InvocationTargetException instead of actual runtime exception

Re: Code Review request: 8047186: jdk.net.Sockets throws InvocationTargetException instead of original runtime exceptions

2014-06-18 Thread Artem Smotrakov
Hi Michael, Yes, I think it is better to throw the original runtime exception. Artem On 06/18/2014 06:28 PM, Michael McMahon wrote: On 18/06/14 13:53, Artem Smotrakov wrote: Hello, Please review this fix for 8u: https://bugs.openjdk.java.net/browse/JDK-8047186 http://cr.openjdk.java.net

[9] RFR: 8129444: "socksProxyVersion" system property is ignored if Socket(Proxy) constructor is used

2015-06-26 Thread Artem Smotrakov
Hello, Please review this fix for 9. If a socket was created with Socket(Proxy) constructor [1], then it doesn't take into account "socksProxyVersion" system property. As a result, it is not possible to use SOCKS v4 (v5 is used by default [2]). Currently the property is checked only in SocksS

[9] RFR 8137174: NTLM impl should use doPrivileged when it reads system properties

2015-09-30 Thread Artem Smotrakov
Hello, Please review this small fix which updates NTLM implementation to use doPrivileged() methods when it reads system properties. Currently it requires property permissions to read "ntlm.debug" and "ntlm.version" system properties. Also added a test which runs NTLM auth if security manager

[9] RFR 8138953: HttpURLConnection doesn't fallback to another auth scheme if negotiate process failed

2015-10-07 Thread Artem Smotrakov
Hello, Please review this for 9. According to [1], an HTTP client should try to use another HTTP authentication scheme if negotiate process failed for some reason, and a user didn't specify SPNEGO or Kerberos in "http.auth.preference" system property. But no fallback happens if, for example:

Re: [9] RFR 8138953: HttpURLConnection doesn't fallback to another auth scheme if negotiate process failed

2015-10-07 Thread Artem Smotrakov
t the AuthenticationHeader.authPref string out with the "Negotiate process failed, fallback" logger message. It's a useful variable to capture. Regards, Sean. On 07/10/2015 12:19, Artem Smotrakov wrote: Hello, Please review this for 9. According to [1], an HTTP client should try

Re: [9] RFR 8138953: HttpURLConnection doesn't fallback to another auth scheme if negotiate process failed

2015-10-07 Thread Artem Smotrakov
ss for a long time and I could be wrong. Thanks Max On Oct 7, 2015, at 7:19 PM, Artem Smotrakov wrote: Hello, Please review this for 9. According to [1], an HTTP client should try to use another HTTP authentication scheme if negotiate process failed for some reason, and a user didn't specif

Re: [9] RFR 8138953: HttpURLConnection doesn't fallback to another auth scheme if negotiate process failed

2015-10-07 Thread Artem Smotrakov
Please see updated webrev http://cr.openjdk.java.net/~asmotrak/8138953/webrev.01/ Artem On 10/07/2015 06:51 PM, Artem Smotrakov wrote: Hi Max, HttpURLConnection obtains credentials for HTTP authentication from Authenticator [1] implementation. Only one authenticator can be set in JVM

Re: [9] RFR 8138953: HttpURLConnection doesn't fallback to another auth scheme if negotiate process failed

2015-10-15 Thread Artem Smotrakov
On 10/08/2015 11:41 AM, Wang Weijun wrote: On Oct 7, 2015, at 11:51 PM, Artem Smotrakov wrote: Hi Max, HttpURLConnection obtains credentials for HTTP authentication from Authenticator [1] implementation. Only one authenticator can be set in JVM instance. It can have built-in crede

Re: [9] RFR 8138953: HttpURLConnection doesn't fallback to another auth scheme if negotiate process failed

2015-10-16 Thread Artem Smotrakov
Hi Max, Please see inline. On 10/16/2015 05:18 AM, Wang Weijun wrote: Let's go back to the bug description: But no fallback happens if: 1. an HTTP server supports both Negotiate (via Kerberos) and Basic authentication schemes 2. first, a user provides correct Kerberos credentials, and a conn

Re: RFR: JDK-8134577 - Eliminate or standardize a replacement for sun.net.spi.nameservice.NameServiceDescriptor

2015-10-25 Thread Artem Smotrakov
Hi Mark, I am not a reviewer, just have a couple of comments about InetAddress.java 1. It may be better to create an instance of Scanner in try-with-resource block to be sure that Scanner.close() method is called. 2. Lines 909-923: There are two similar "if" blocks in the loop. Looks like th

Re: RFR [9] 8143554: UnsupportedOperationException is not thrown for unsupported options

2015-12-03 Thread Artem Smotrakov
Hi Svetlana, I'll leave the mail review to official reviewers, a couple of minor comments about your test. It seems to work fine, but you may want to use "else if" in UnsupportedOptionsTest.getOption() method because "Unsupported socket type" error can occure in case of supported socket type

[9] RFR: 8138990: Implementation of HTTP Digest authentication may be more flexible

2015-12-04 Thread Artem Smotrakov
Hello, Please review this small fix for DigestAuthentication class. 1. Added a check in DigestAuthentication.setNonce(String) that nonce is not null. NPE may happen if a buggy HTTP server returns "WWW-Authenticate" header which doesn't contain a "nonce" field. According to RFCs 2069 [1] and 2

Re: [9] RFR: 8138990: Implementation of HTTP Digest authentication may be more flexible

2015-12-29 Thread Artem Smotrakov
digest/webrev.01/ Artem On 12/22/2015 05:59 AM, Michael McMahon wrote: Hi Artem, On 04/12/15 11:41, Artem Smotrakov wrote: Hello, Please review this small fix for DigestAuthentication class. 1. Added a check in DigestAuthentication.setNonce(String) that nonce is not null. NPE may happen

Re: [9] RFR: 8138990: Implementation of HTTP Digest authentication may be more flexible

2016-01-04 Thread Artem Smotrakov
Hi Michael, On 01/04/2016 02:28 AM, Michael McMahon wrote: On 30/12/15 03:22, Artem Smotrakov wrote: Hi Michael, Thanks for review, it looks like BNF notation uses only a comma as a separator http://www.w3.org/Notation.html ... #element indicating at least l and at most m elements, each

[9] RFR: 8156710: HttpTimeoutException should be thrown if server doesn't respond

2016-05-12 Thread Artem Smotrakov
Hello, Please review this for 9. Stream.getResponse() method can hang because it calls join() method without any timeout. It would be better if it took into account a timeout value specified for a connection, and threw HttpTimeoutException if timeout was reached. The patch updates Stream.ge

[9] RFR: 8157107: HTTP/2 client may fail with NPE if additional logging enabled

2016-05-17 Thread Artem Smotrakov
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 settin

Re: RFR 8136933: Additional tests for Solaris SO_FLOW_SLA socket option in JDK 9

2016-05-19 Thread Artem Smotrakov
Hi Svetlana, Please see a couple of comments below. I'll leave the final review to official reviewers. 1. You may use test/lib/testlibrary/jdk/testlibrary/OSInfo.java to check OS type. I think it also may be good to add getSolarisVersion() to OSInfo.java (see getWindowsVersion() method) Yo

Re: RFR 8022580: sun.net.ftp.impl.FtpClient.nameList(null)

2016-07-05 Thread Artem Smotrakov
Hi Svetlana, I am not an official reviewer, but I have a couple comments below. TestFtpClientNameListWithNull.java: 1. Shouldn't "commandHasArgs" be volatile? Looks like it may cause intermittent failures. As a sanity check, you may want to run the test in a loop to make sure it is stable.

Re: RFR 8022580: sun.net.ftp.impl.FtpClient.nameList(null)

2016-07-06 Thread Artem Smotrakov
our replay. I believe I addressed all your comments. Please see updated diff: http://cr.openjdk.java.net/~snikandrova/8022580/webrev.01/ <http://cr.openjdk.java.net/%7Esnikandrova/8022580/webrev.01/> Thank you, Svetlana On 05.07.2016 20:54, Artem Smotrakov wrote: Hi Svetlana, I am not an official reviewe

Re: RFR 8022580: sun.net.ftp.impl.FtpClient.nameList(null)

2016-07-07 Thread Artem Smotrakov
ke you have already looked into that issue before. May be you can find some time to review this fix? Thank you, Svetlana On 06.07.2016 20:35, Artem Smotrakov wrote: Hi Svetlana, Thanks for addressing my comments. Could you please take a look at a couple of comments about TestFtpClientNameListWi

[9] RFR: 8164592: java/net/MulticastSocket/NoLoopbackPackets.java tests may leave a daemon thread

2016-08-22 Thread Artem Smotrakov
Hello, Please review the following patch for NoLoopbackPackets.java test. The test starts a daemon thread which has an infinite loop. If jtreg uses the same JVM to run multiple tests (agent VM), then this thread will be keep running until the agent VM stops. This is not good, it would be bett

Re: [9] RFR: 8164591: sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java failed with SSLHandshakeException

2016-09-07 Thread Artem Smotrakov
Sending to net-dev@openjdk.java.net as well. Artem On 09/07/2016 12:28 PM, Artem Smotrakov wrote: Hello, Please review the following patch for sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java The test has been observed to fail a couple of times, but it's still not clea

Re: [9] RFR: 8164591: sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java failed with SSLHandshakeException

2016-09-14 Thread Artem Smotrakov
Not urgent, but I would appreciate if someone can get a chance to look at this. Artem On 09/07/2016 03:17 PM, Artem Smotrakov wrote: Sending to net-dev@openjdk.java.net as well. Artem On 09/07/2016 12:28 PM, Artem Smotrakov wrote: Hello, Please review the following patch for sun/net

Re: [9] RFR: 8164591: sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java failed with SSLHandshakeException

2016-09-14 Thread Artem Smotrakov
SSLSocketSample.java template as the comment in JDK-8163924 review thread. Thanks, Xuelei On 9/15/2016 9:13 AM, Artem Smotrakov wrote: Not urgent, but I would appreciate if someone can get a chance to look at this. Artem On 09/07/2016 03:17 PM, Artem Smotrakov wrote: Sending to net-dev

Re: [9] RFR: 8164591: sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java failed with SSLHandshakeException

2016-09-14 Thread Artem Smotrakov
it's going to help, so I would like to keep debug output on. Artem On 09/14/2016 06:39 PM, Xuelei Fan wrote: On 9/15/2016 9:23 AM, Artem Smotrakov wrote: Hi Xuelei, For this one, I am not sure that it would help here since the test failed after it already had started handshaking. I

Re: [9] RFR: 8164591: sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java failed with SSLHandshakeException

2016-09-15 Thread Artem Smotrakov
Hi Xuelei, Chris, Thank you for looking into it. Please see inline. On 09/15/2016 12:53 AM, Chris Hegarty wrote: On 15 Sep 2016, at 02:55, Xuelei Fan wrote: On 9/15/2016 9:45 AM, Artem Smotrakov wrote: Well, in this particular case it's not clear that it has the same issue with free

Re: [9] RFR: 8164591: sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java failed with SSLHandshakeException

2016-09-20 Thread Artem Smotrakov
Artem Smotrakov wrote: Hi Xuelei, Chris, Thank you for looking into it. Please see inline. On 09/15/2016 12:53 AM, Chris Hegarty wrote: On 15 Sep 2016, at 02:55, Xuelei Fan wrote: On 9/15/2016 9:45 AM, Artem Smotrakov wrote: Well, in this particular case it's not clear that it has the s

[9] RFR: 8166530: sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java fails intermittently

2016-10-07 Thread Artem Smotrakov
Hello, Please review the patch below for sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java test. The test has been observed to fail intermittently, but the failure is not reproducible standalone. The patch updates the test to follow the approach from SSLSocketSample.java http://hg.

Re: [9] RFR: 8166530: sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java fails intermittently

2016-10-17 Thread Artem Smotrakov
Hello, Please take a look. Artem On 10/07/2016 01:33 PM, Artem Smotrakov wrote: Hello, Please review the patch below for sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java test. The test has been observed to fail intermittently, but the failure is not reproducible standalone. The