Re: RFR: 8286962: java/net/httpclient/ServerCloseTest.java failed once with ConnectException

2022-06-14 Thread Daniel Fuchs
On Tue, 14 Jun 2022 15:20:28 GMT, Conor Cleary wrote: > **Issue** > A failure in this test was observed whereby an unexpected connection from a > client that was not created by the test caused the test to unsucessfully > complete. > > **Solution** > When a connection is accepted by the Server

Re: HTTP/308 handling in HttpURLConnection

2022-06-13 Thread Robert Stupp
Yup, I have one. Created https://bugs.openjdk.org/browse/JDK-8288295 > Am 10.06.2022 um 14:13 schrieb Daniel Fuchs : > > Hi Robert, > > On 10/06/2022 11:54, Robert Stupp wrote: >> Does anyone recall why HTTP/308 was not implemented that time? I susp

Re: HTTP/308 handling in HttpURLConnection

2022-06-10 Thread Daniel Fuchs
Hi Robert, On 10/06/2022 11:54, Robert Stupp wrote: Does anyone recall why HTTP/308 was not implemented that time? I suspect that HTTP/308 was just not a thing 14/15 years ago, but no clue whether it’s just not been implemented all the time or whether there was a reason to not handle it at al

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v4]

2022-06-09 Thread Daniel Fuchs
On Thu, 9 Jun 2022 13:06:34 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:46:22 GMT, Jaikiran Pai wrote: >> Conor Cleary has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8286171: Package-protected access for method >> - 8286171: Added checks for correct response codes > > test/jdk/java/

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v4]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 13:06:34 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Daniel Fuchs
On Thu, 9 Jun 2022 12:05:43 GMT, Jaikiran Pai wrote: >> Its not needed for a GET request as the client is not sending a body in that >> case. In this test the GET serves only to complete the HTTP/2 upgrade before >> testing with a POST request. > > From what I understand, the HTTP version in th

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v4]

2022-06-09 Thread Conor Cleary
> **Issue** > It was observed that when the httpclient sends a POST request with the > `Expect: 100 Continue` header set and the server replies with a response code > `417 Expectation Failed` that the httpclient hangs indefinitely when the > version of Http used is HTTP/2. However, it was also s

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:51:13 GMT, Conor Cleary wrote: >> test/jdk/java/net/httpclient/ExpectContinueTest.java line 264: >> >>> 262: >>> 263: HttpRequest getRequest = HttpRequest.newBuilder(getUri) >>> 264: .GET() >> >> Is this missing an `.expectContinue(true)` here? > >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:27:47 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Conor Cleary
On Thu, 9 Jun 2022 11:49:52 GMT, Jaikiran Pai wrote: >> Conor Cleary has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8286171: Package-protected access for method >> - 8286171: Added checks for correct response codes > > test/jdk/java/

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:27:47 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:27:19 GMT, Daniel Fuchs wrote: > We need to close the stream after the exchange has terminated, but the > exchange will not be considered to be terminated if we have a request body > and the request body has not been sent. That answers it. Thank you. - PR: h

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:15:14 GMT, Jaikiran Pai wrote: >> Conor Cleary has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8286171: Added teardown method and comments > > src/java.net.http/share/classes/jdk/internal/net/http/Stream.java line 3

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Daniel Fuchs
On Thu, 9 Jun 2022 11:26:52 GMT, Jaikiran Pai wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/Stream.java line 308: >> >>> 306: // Have to mark request as sent, due to no request body being >>> sent >>> 307: // in the event of a 417 Expectation Failed >>> 308:

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:23:21 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Conor Cleary
On Thu, 9 Jun 2022 11:09:23 GMT, Conor Cleary wrote: >> Yes - good catch! > > Good suggestion, no need for it to be public. Will do. I made this change but added protected by mistake instead of just removing the modifier. Will fix in subsequent change - PR: https://git.openjdk.jav

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Conor Cleary
On Thu, 9 Jun 2022 11:06:11 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java >> line 424: >> >>> 422: } >>> 423: >>> 424: public void closeWhenFinished() { >> >> Hello Conor, do you think it might be better if we make this package pr

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Daniel Fuchs
On Thu, 9 Jun 2022 11:10:11 GMT, Jaikiran Pai wrote: >> Conor Cleary has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8286171: Added teardown method and comments > > src/java.net.http/share/classes/jdk/internal/net/http/Http1Exchange.java

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 11:19:04 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/Http1Exchange.java >> line 862: >> >>> 860: // Sets a flag which closes the connection locally when >>> 861: // onFinished() is called >>> 862: respo

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 10:31:31 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v3]

2022-06-09 Thread Conor Cleary
> **Issue** > It was observed that when the httpclient sends a POST request with the > `Expect: 100 Continue` header set and the server replies with a response code > `417 Expectation Failed` that the httpclient hangs indefinitely when the > version of Http used is HTTP/2. However, it was also s

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Jaikiran Pai
On Thu, 9 Jun 2022 10:31:31 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Daniel Fuchs
On Thu, 9 Jun 2022 10:31:31 GMT, Conor Cleary wrote: >> **Issue** >> It was observed that when the httpclient sends a POST request with the >> `Expect: 100 Continue` header set and the server replies with a response >> code `417 Expectation Failed` that the httpclient hangs indefinitely when >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100 [v2]

2022-06-09 Thread Conor Cleary
> **Issue** > It was observed that when the httpclient sends a POST request with the > `Expect: 100 Continue` header set and the server replies with a response code > `417 Expectation Failed` that the httpclient hangs indefinitely when the > version of Http used is HTTP/2. However, it was also s

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100

2022-06-09 Thread Daniel Fuchs
On Wed, 8 Jun 2022 18:29:10 GMT, Conor Cleary wrote: > **Issue** > It was observed that when the httpclient sends a POST request with the > `Expect: 100 Continue` header set and the server replies with a response code > `417 Expectation Failed` that the httpclient hangs indefinitely when the >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100

2022-06-09 Thread Daniel Fuchs
On Wed, 8 Jun 2022 18:29:10 GMT, Conor Cleary wrote: > **Issue** > It was observed that when the httpclient sends a POST request with the > `Expect: 100 Continue` header set and the server replies with a response code > `417 Expectation Failed` that the httpclient hangs indefinitely when the >

Re: RFR: 8286171: HttpClient/2 : Expect:100-Continue blocks indefinitely when response is not 100

2022-06-09 Thread Conor Cleary
On Wed, 8 Jun 2022 18:29:10 GMT, Conor Cleary wrote: > **Issue** > It was observed that when the httpclient sends a POST request with the > `Expect: 100 Continue` header set and the server replies with a response code > `417 Expectation Failed` that the httpclient hangs indefinitely when the >

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString [v2]

2022-06-08 Thread KIRIYAMA Takuya
On Wed, 1 Jun 2022 14:15:31 GMT, Daniel Fuchs wrote: >> KIRIYAMA Takuya has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8272702: Resolving URI relative path with no / may lead to incorrect >> toString > > src/java.base/share/classes/jav

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString [v2]

2022-06-08 Thread KIRIYAMA Takuya
> Consider an authority component without trailing "/" as a base URI. When > resolving a relative path against this base URI, the resulting URI is a > concatenated URI without "/". > This behaviour should be fixed, which is rationalized by > rfc3986#section-5.2.3. > Could you review this fix? K

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread Anthony Scarpino
On Wed, 8 Jun 2022 17:49:38 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > clean up Calendar I gave a quick look at the security files touched and seems straightforward. I didn't see any p

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread Stuart Marks
On Wed, 8 Jun 2022 17:49:38 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > clean up Calendar Running tests and awaiting review from security team. Our internal test system is backlogged an

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-08 Thread XenoAmess
On Wed, 1 Jun 2022 18:26:17 GMT, Naoto Sato wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> do it as naotoj said > > src/java.base/share/classes/java/util/Calendar.java line 2648: > >> 2646: set.add("greg

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: clean up Calendar - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/bacc9ca8..95d59b97

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v18]

2022-06-08 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - remove null check for Capacitiable in WhiteBoxResizeTest - Rename type variable per CSR request; minor spec wording change. - Changes: - all: https://git.open

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-08 Thread XenoAmess
On Wed, 1 Jun 2022 17:34:04 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> do it as naotoj said > > test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 441: > >> 439: } >> 440: } >>

Re: RFR: 8276798: HttpURLConnection sends invalid HTTP request

2022-06-08 Thread Daniel Fuchs
rks a `failedOnce` flag to `true` and attempts to write these again afresh > (after creating new connection to the server). This re-attempt is done just > once. > > As noted in the linked JBS issue, specifically this comment > https://bugs.openjdk.java.net/br

Re: RFR: 8276798: HttpURLConnection sends invalid HTTP request

2022-06-07 Thread Jaikiran Pai
On Mon, 6 Jun 2022 09:43:50 GMT, Jaikiran Pai wrote: > tier1, tier2 and tier3 tests have passed without issues. Additionally, the reproducer attached to the JBS issue has been run locally. The test fails regularly without this change and hasn't failed even once after this change. ---

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v2]

2022-06-07 Thread KIRIYAMA Takuya
> I fixed sun.net.www.ParseUtil.decode(). > > ParseUtil.decode() always tries to decode after parsing '%', so if '%' is > located at the end of the String, IndexOutOfBoundsException is thrown. Also, > if '%' is shown after decodable string and following string is not decodable > (e.g: "%25%s%G1

Re: RFR: 8282395: URL.openConnection can throw IOOBE

2022-06-07 Thread KIRIYAMA Takuya
On Fri, 8 Apr 2022 07:52:55 GMT, KIRIYAMA Takuya wrote: > I fixed sun.net.www.ParseUtil.decode(). > > ParseUtil.decode() always tries to decode after parsing '%', so if '%' is > located at the end of the String, IndexOutOfBoundsException is thrown. Also, > if '%' is shown after decodable strin

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-02 Thread Daniel Fuchs
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > do it as naotoj said Changes to `net` and `http` look good. - Marked as reviewed by dfuchs (Reviewe

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Brian Burkhalter
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > do it as naotoj said `java.io` and `java.nio` look all right. - Marked as reviewed by bpb (Reviewer

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Naoto Sato
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > do it as naotoj said Reviewed i18n-related changes and they look good. One minor suggestion in `Calendar`, but t

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Stuart Marks
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > do it as naotoj said Reviewers for i18n, net, nio, and security, please review call site changes in your areas.

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v4]

2022-06-01 Thread Brian Burkhalter
On Wed, 1 Jun 2022 07:28:11 GMT, Vyom Tewari wrote: > Looks ok, i tested on centos 7 and it is working as expected. To really verify it you would have to suppress `~/.mime.types` and `/etc/mime.types` before running the test. - PR: https://git.openjdk.java.net/jdk/pull/8909

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString

2022-06-01 Thread Daniel Fuchs
On Thu, 26 May 2022 09:18:56 GMT, KIRIYAMA Takuya wrote: > Consider an authority component without trailing "/" as a base URI. When > resolving a relative path against this base URI, the resulting URI is a > concatenated URI without "/". > This behaviour should be fixed, which is rationalized b

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Andrey Turbanov
> `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` > +`put` calls. > > https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java#L155-L165 > > Instead we can use the `HashMa

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Jaikiran Pai
On Wed, 1 Jun 2022 13:27:27 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java >> line 159: >> >>> 157: if (t == null || t == c) { >>> 158: assert cached == null; >>> 159: return cached; >> >>

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Jaikiran Pai
On Wed, 1 Jun 2022 13:32:28 GMT, Andrey Turbanov wrote: >> `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` >> +`put` calls. >> >> https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/Authent

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Andrey Turbanov
On Wed, 1 Jun 2022 04:08:53 GMT, Jaikiran Pai wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication >> remove obvious assert > > src/java.base/s

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication

2022-06-01 Thread Daniel Fuchs
On Sat, 30 Apr 2022 10:17:43 GMT, Andrey Turbanov wrote: > `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` > +`put` calls. > > https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/Authentica

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v4]

2022-06-01 Thread Vyom Tewari
On Tue, 31 May 2022 18:29:30 GMT, Brian Burkhalter wrote: >> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the >> file extension in the entire file name if it is not found in the portion of >> the name preceding the optional fragment beginning with a hash (`#`). > > B

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication

2022-05-31 Thread Jaikiran Pai
On Sat, 30 Apr 2022 10:17:43 GMT, Andrey Turbanov wrote: > `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` > +`put` calls. > > https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/Authentica

Re: RFR: 8287318: ConcurrentModificationException in sun.net.httpserver.ServerImpl$Dispatcher [v2]

2022-05-31 Thread Jaikiran Pai
On Tue, 31 May 2022 15:14:22 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses the issue noted in >> https://bugs.openjdk.java.net/browse/JDK-8287318? >> >> The `ServerImpl` has a `Dispatcher` thread which uses a `Selector` to select >> keys of interested. Th

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v4]

2022-05-31 Thread Jaikiran Pai
On Tue, 31 May 2022 18:29:30 GMT, Brian Burkhalter wrote: >> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the >> file extension in the entire file name if it is not found in the portion of >> the name preceding the optional fragment beginning with a hash (`#`). > > B

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v4]

2022-05-31 Thread Roger Riggs
On Tue, 31 May 2022 18:29:30 GMT, Brian Burkhalter wrote: >> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the >> file extension in the entire file name if it is not found in the portion of >> the name preceding the optional fragment beginning with a hash (`#`). > > B

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v4]

2022-05-31 Thread Brian Burkhalter
> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the > file extension in the entire file name if it is not found in the portion of > the name preceding the optional fragment beginning with a hash (`#`). Brian Burkhalter has updated the pull request incrementally with on

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v3]

2022-05-31 Thread Brian Burkhalter
> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the > file extension in the entire file name if it is not found in the portion of > the name preceding the optional fragment beginning with a hash (`#`). Brian Burkhalter has updated the pull request incrementally with on

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v2]

2022-05-31 Thread Brian Burkhalter
On Tue, 31 May 2022 16:41:57 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/sun/net/www/MimeTable.java line 188: >> >>> 186: int hashIndex = fname.lastIndexOf(HASH_MARK); >>> 187: if (hashIndex > 0) { >>> 188: String ext = getFileExtension(fname.substring

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v2]

2022-05-31 Thread Brian Burkhalter
On Sat, 28 May 2022 14:39:16 GMT, Jaikiran Pai wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8287237: Refactor and clean up > > src/java.base/share/classes/sun/net/www/MimeTable.java line 188: > >> 186:

Re: RFR: 8287318: ConcurrentModificationException in sun.net.httpserver.ServerImpl$Dispatcher [v2]

2022-05-31 Thread Jaikiran Pai
On Tue, 31 May 2022 14:51:48 GMT, Daniel Fuchs wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use Collection.toArray(...) instead of creating a copy of the collection > > src/jdk.httpserver/share/classes/sun/net/h

Re: RFR: 8287318: ConcurrentModificationException in sun.net.httpserver.ServerImpl$Dispatcher [v2]

2022-05-31 Thread Daniel Fuchs
On Tue, 31 May 2022 15:11:03 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses the issue noted in >> https://bugs.openjdk.java.net/browse/JDK-8287318? >> >> The `ServerImpl` has a `Dispatcher` thread which uses a `Selector` to select >> keys of interested. Th

Re: RFR: 8287318: ConcurrentModificationException in sun.net.httpserver.ServerImpl$Dispatcher [v2]

2022-05-31 Thread Jaikiran Pai
> Can I please get a review of this change which addresses the issue noted in > https://bugs.openjdk.java.net/browse/JDK-8287318? > > The `ServerImpl` has a `Dispatcher` thread which uses a `Selector` to select > keys of interested. The selected keys is then iterated over and each key is > remo

Re: CancelledKeyException during channel registration

2022-05-31 Thread Alan Bateman
Moving to the nio-dev list. Registration is not an atomic operation. The channel is registered (this creates the selection key) and then the key's interest set is changed. If I read your test case correctly, it is cancelling the key before the key's interest set is changed and this leads to

Re: RFR: 8287318: ConcurrentModificationException in sun.net.httpserver.ServerImpl$Dispatcher

2022-05-31 Thread Daniel Fuchs
On Thu, 26 May 2022 07:17:12 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which addresses the issue noted in > https://bugs.openjdk.java.net/browse/JDK-8287318? > > The `ServerImpl` has a `Dispatcher` thread which uses a `Selector` to select > keys of interested. The sel

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString

2022-05-29 Thread KIRIYAMA Takuya
On Thu, 26 May 2022 12:00:37 GMT, Alexey Ivanov wrote: > You're using the wrong bugid. > [JDK-8272707](https://bugs.openjdk.java.net/browse/JDK-8272707) has nothing > to do with URI. Please use the correct bugid. I'm sorry, I made a mistake. JDK-8272702 is correct. I fixed it. -

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v2]

2022-05-28 Thread Jaikiran Pai
On Fri, 27 May 2022 19:09:05 GMT, Brian Burkhalter wrote: >> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the >> file extension in the entire file name if it is not found in the portion of >> the name preceding the optional fragment beginning with a hash (`#`). > > B

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v2]

2022-05-27 Thread Brian Burkhalter
On Fri, 27 May 2022 12:15:07 GMT, Jaikiran Pai wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8287237: Refactor and clean up > > src/java.base/share/classes/sun/net/www/MimeTable.java line 164: > >> 162:

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux [v2]

2022-05-27 Thread Brian Burkhalter
> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the > file extension in the entire file name if it is not found in the portion of > the name preceding the optional fragment beginning with a hash (`#`). Brian Burkhalter has updated the pull request incrementally with on

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux

2022-05-27 Thread Jaikiran Pai
On Thu, 26 May 2022 23:03:05 GMT, Brian Burkhalter wrote: > Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the > file extension in the entire file name if it is not found in the portion of > the name preceding the optional fragment beginning with a hash (`#`). test/jd

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux

2022-05-27 Thread Jaikiran Pai
On Thu, 26 May 2022 23:03:05 GMT, Brian Burkhalter wrote: > Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the > file extension in the entire file name if it is not found in the portion of > the name preceding the optional fragment beginning with a hash (`#`). src/jav

Re: RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux

2022-05-27 Thread Jaikiran Pai
On Thu, 26 May 2022 23:03:05 GMT, Brian Burkhalter wrote: > Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the > file extension in the entire file name if it is not found in the portion of > the name preceding the optional fragment beginning with a hash (`#`). src/jav

Re: RFR: 8272707: Resolving URI relative path with no / may lead to incorrect toString

2022-05-26 Thread Alexey Ivanov
On Thu, 26 May 2022 09:18:56 GMT, KIRIYAMA Takuya wrote: > Consider an authority component without trailing "/" as a base URI. When > resolving a relative path against this base URI, the resulting URI is a > concatenated URI without "/". > This behaviour should be fixed, which is rationalized b

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v3]

2022-05-25 Thread Jaikiran Pai
On Wed, 25 May 2022 09:30:46 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8287104? >> >> The change in this commit now uses an `InnocuousThread` to create a thread >> with `null` context classloader. The `Runna

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v3]

2022-05-25 Thread Daniel Fuchs
On Wed, 25 May 2022 09:30:46 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8287104? >> >> The change in this commit now uses an `InnocuousThread` to create a thread >> with `null` context classloader. The `Runna

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v3]

2022-05-25 Thread Aleksei Efimov
On Wed, 25 May 2022 09:30:46 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8287104? >> >> The change in this commit now uses an `InnocuousThread` to create a thread >> with `null` context classloader. The `Runna

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v2]

2022-05-25 Thread Jaikiran Pai
On Tue, 24 May 2022 09:42:19 GMT, Daniel Fuchs wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Aleksei's review suggestion - use a better Thread name > > src/java.base/windows/classes/sun/net/dns/ResolverConfigurat

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v3]

2022-05-25 Thread Jaikiran Pai
> Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8287104? > > The change in this commit now uses an `InnocuousThread` to create a thread > with `null` context classloader. The `Runnable` task of this thread just > invokes a native method thro

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-24 Thread Bradford Wetmore
On Tue, 24 May 2022 16:20:10 GMT, Mark Powers wrote: > Mach5 tier1 and tier2 completed without any failures. I don't know what to > make of the pre-submit failures - lang and hotspot? IIUC, these are due to Loom failures in some of the other platforms supported by OpenJDK but not by Oracle. T

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-24 Thread Mark Powers
On Mon, 23 May 2022 18:58:34 GMT, Mark Powers wrote: >> JDK-6725221 Standardize obtaining boolean properties with defaults > > Mark Powers has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Alan and Jamil comments

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v2]

2022-05-24 Thread Daniel Fuchs
On Mon, 23 May 2022 12:31:40 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8287104? >> >> The change in this commit now uses an `InnocuousThread` to create a thread >> with `null` context classloader. The `Runna

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v3]

2022-05-23 Thread Alexey Ivanov
> Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Update copyright to 2022 ---

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Roger Riggs
On Mon, 23 May 2022 18:58:34 GMT, Mark Powers wrote: >> JDK-6725221 Standardize obtaining boolean properties with defaults > > Mark Powers has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Alan and Jamil comments

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Mark Powers
On Mon, 23 May 2022 18:34:41 GMT, Roger Riggs wrote: >> You are right. The old way maps the null string to true, and the new way >> maps it to false. I did not notice that. At this point, I see no value in >> making the "true".equals and "false".equals changes. Too much can break. >> I'll reve

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Mark Powers
> JDK-6725221 Standardize obtaining boolean properties with defaults Mark Powers has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - Alan and Jamil comments - Merge - reverse true.equals and false.equals changes - Merge

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-23 Thread Roger Riggs
On Tue, 10 May 2022 19:24:24 GMT, Mark Powers wrote: >> src/java.base/share/classes/java/lang/reflect/AccessibleObject.java line 777: >> >>> 775: if (!printStackPropertiesSet && VM.initLevel() >= 1) { >>> 776: printStackWhenAccessFails = GetBooleanAction. >>> 777:

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers

2022-05-23 Thread Jaikiran Pai
On Sun, 22 May 2022 08:20:21 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8287104? > > The change in this commit now uses an `InnocuousThread` to create a thread > with `null` context classloader. The `Runnable`

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v2]

2022-05-23 Thread Aleksei Efimov
On Mon, 23 May 2022 12:27:39 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8287104? >> >> The change in this commit now uses an `InnocuousThread` to create a thread >> with `null` context classloader. The `Runna

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers [v2]

2022-05-23 Thread Jaikiran Pai
> Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8287104? > > The change in this commit now uses an `InnocuousThread` to create a thread > with `null` context classloader. The `Runnable` task of this thread just > invokes a native method thro

Re: RFR: JDK-8280498: jdk/java/net/Inet4Address/PingThis.java fails on AIX [v7]

2022-05-23 Thread Aleksei Efimov
On Fri, 6 May 2022 09:18:33 GMT, Michael Felt wrote: >> Michael Felt has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Changes per review > > - Thx all for your assistance and patience. > - (Hoping you will consider this for backport as we

Re: RFR: 8287104: AddressChangeListener thread inherits CCL and can cause memory leak for webapp-servers

2022-05-23 Thread Aleksei Efimov
On Sun, 22 May 2022 08:20:21 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8287104? > > The change in this commit now uses an `InnocuousThread` to create a thread > with `null` context classloader. The `Runnable`

Re: RFR: 8285521: Minor improvements in java.net.URI [v2]

2022-05-20 Thread Сергей Цыпанов
> - use `String.equalsIgnoreCase()` instead of hand-written code relying on > `String.charAt()` > - use `String.compareToIgnoreCase()` instead of hand-written code relying on > `String.charAt()` > - drop branches that are never executed > - drop unused argument from `URI.resolvePath()` > - simpli

Re: RFR: 8285521: Minor improvements in java.net.URI

2022-05-20 Thread Сергей Цыпанов
On Tue, 26 Apr 2022 07:02:55 GMT, Сергей Цыпанов wrote: > - use `String.equalsIgnoreCase()` instead of hand-written code relying on > `String.charAt()` > - use `String.compareToIgnoreCase()` instead of hand-written code relying on > `String.charAt()` > - drop branches that are never executed >

Re: RFR: 8285521: Minor improvements in java.net.URI

2022-05-19 Thread ExE Boss
On Tue, 26 Apr 2022 07:02:55 GMT, Сергей Цыпанов wrote: > - use `String.equalsIgnoreCase()` instead of hand-written code relying on > `String.charAt()` > - use `String.compareToIgnoreCase()` instead of hand-written code relying on > `String.charAt()` > - drop branches that are never executed >

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v2]

2022-05-19 Thread Alexey Ivanov
On Thu, 19 May 2022 09:38:40 GMT, Kevin Walls wrote: >> Alexey Ivanov has updated the pull request incrementally with seven >> additional commits since the last revision: >> >> - ...set to the values... >> - ...will result in a Zip64 Extra (EXT) header >> - ...in addition to the main attribu

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v2]

2022-05-19 Thread Alexey Ivanov
On Thu, 19 May 2022 08:47:47 GMT, Kevin Walls wrote: >> Alexey Ivanov has updated the pull request incrementally with seven >> additional commits since the last revision: >> >> - ...set to the values... >> - ...will result in a Zip64 Extra (EXT) header >> - ...in addition to the main attribu

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v2]

2022-05-19 Thread Alexey Ivanov
> Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. Alexey Ivanov has updated the pull request incrementally with seven additional commits since the last revision: - ...set to the values... - ..

Re: RFR: 8285521: Minor improvements in java.net.URI

2022-05-19 Thread Сергей Цыпанов
On Thu, 19 May 2022 12:19:25 GMT, ExE Boss wrote: >> - use `String.equalsIgnoreCase()` instead of hand-written code relying on >> `String.charAt()` >> - use `String.compareToIgnoreCase()` instead of hand-written code relying on >> `String.charAt()` >> - drop branches that are never executed >>

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Xue-Lei Andrew Fan
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. The security/crypto parts look good to me. - Marked as reviewed by xuelei (

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Xue-Lei Andrew Fan
On Thu, 19 May 2022 09:31:07 GMT, Kevin Walls wrote: >> Replaces usages of articles that follow each other in all combinations: >> a/the, an?/an?, the/the… >> >> Also, I fixed a couple of spelling mistakes. > > test/jdk/sun/security/tools/jarsigner/OldSig.java line 32: > >> 30: /* >> 31: * Se

  1   2   3   4   5   6   7   8   9   10   >