RFR: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException

2025-02-10 Thread Xiaolong Peng
java.net.URI.scanIPv4Address is a private method, it is only called by java.net.URI.takeIPv4Address and java.net.URI.parseIPv4Address, the URISyntaxException("Malformed IPv4 address") is not necessary, returning -1 should be good. In one of our systems, we noticed the exception consumes ~0.3% C

Re: RFR: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException

2025-02-10 Thread Xiaolong Peng
On Mon, 10 Feb 2025 10:53:12 GMT, Daniel Fuchs wrote: > What tests did you run against those changes? You will need to run at least > tier2 tests. I have run tier2 tests, all tests passed except DirectIOTest.java which is a known issue and not relevant I believe. - PR Comment: ht

Re: RFR: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException [v2]

2025-02-10 Thread Xiaolong Peng
the exception consumes > ~0.3% CPU. > > Additional test: > - [x] make test TEST=jdk/java/net Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: Address PR comments - Changes: - all: https://git.openjdk.org/j

Re: RFR: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException [v2]

2025-02-10 Thread Xiaolong Peng
On Mon, 10 Feb 2025 10:49:34 GMT, Daniel Fuchs wrote: >> Xiaolong Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address PR comments > > src/java.base/share/classes/java/net/URI.java line 3469: >

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number

2025-04-11 Thread Xiaolong Peng
On Fri, 28 Mar 2025 15:19:46 GMT, Rohitash wrote: > `scanByte` throws `NumberFormatException` for URIs that start with numbers, > e.g., https://.x.y/ > The current flow is `parseIPv4Address` → `scanIPv4Address` → `scanByte`. > `parseIPv4Address` uses `NumberFormatException` for control

Integrated: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException

2025-03-08 Thread Xiaolong Peng
On Mon, 10 Feb 2025 08:47:36 GMT, Xiaolong Peng wrote: > java.net.URI.scanIPv4Address is a private method, it is only called by > java.net.URI.takeIPv4Address and java.net.URI.parseIPv4Address, the > URISyntaxException("Malformed IPv4 address") is not necessary, returning -

Re: RFR: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException [v2]

2025-03-05 Thread Xiaolong Peng
On Wed, 5 Mar 2025 15:06:37 GMT, Daniel Fuchs wrote: > Hi, sorry for the late reply. I have imported your PR branch on my local repo > and am testing it in our CI. I will approve if my tests come back green. No worries, thank you so much for helping running the test. - PR Comment:

Re: RFR: 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException

2025-02-19 Thread Xiaolong Peng
On Mon, 10 Feb 2025 10:53:12 GMT, Daniel Fuchs wrote: >> java.net.URI.scanIPv4Address is a private method, it is only called by >> java.net.URI.takeIPv4Address and java.net.URI.parseIPv4Address, the >> URISyntaxException("Malformed IPv4 address") is not necessary, returning -1 >> should be goo