Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException #23538

Closed
wants to merge 2 commits into from

Conversation

pengxiaolong
Copy link

@pengxiaolong pengxiaolong commented Feb 10, 2025

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% CPU.

Additional test:

  • make test TEST=jdk/java/net
  • all tier2 tests(except DirectIOTest.java which is a known issue)

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23538/head:pull/23538
$ git checkout pull/23538

Update a local copy of the PR:
$ git checkout pull/23538
$ git pull https://git.openjdk.org/jdk.git pull/23538/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23538

View PR using the GUI difftool:
$ git pr show -t 23538

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23538.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 10, 2025

👋 Welcome back xpeng! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 10, 2025

@pengxiaolong This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

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

Reviewed-by: dfuchs

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 290 new commits pushed to the master branch:

  • 61d9ab9: 8350854: Include thread counts in safepoint logging
  • ea9e3cf: 8281511: java/net/ipv6tests/UdpTest.java fails with checkTime failed
  • caaf409: 8350546: Several java/net/InetAddress tests fails UnknownHostException
  • 062b7c7: 8351115: Test AOTClassLinkingVMOptions.java fails after JDK-8348322
  • a88e8cd: 8350952: Remove some non present files from OPT_SPEED_SRC list
  • de29ef3: 8343191: Cgroup v1 subsystem fails to set subsystem path
  • 75f028b: 8348657: compiler/loopopts/superword/TestEquivalentInvariants.java timed out
  • b1a21b5: 8351101: RISC-V: C2: Small improvement to MacroAssembler::revb
  • 62fa33a: 8351158: Incorrect APX EGPR register save ordering
  • 20ea218: 8336042: Caller/callee param size mismatch in deoptimization causes crash
  • ... and 280 more: https://git.openjdk.org/jdk/compare/8f6ccde9829ea0e4fe1c087e68bec4d9efb55c64...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dfuch) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@pengxiaolong pengxiaolong changed the title java.net.URI.scanIPv4Address throws unnecessary URISyntaxException 8349705: java.net.URI.scanIPv4Address throws unnecessary URISyntaxException Feb 10, 2025
@openjdk
Copy link

openjdk bot commented Feb 10, 2025

@pengxiaolong The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@pengxiaolong pengxiaolong marked this pull request as ready for review February 10, 2025 09:48
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 10, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 10, 2025

Webrevs

@dfuch
Copy link
Member

dfuch commented Feb 10, 2025

What tests did you run against those changes? You will need to run at least tier2 tests.

@pengxiaolong
Copy link
Author

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.

@pengxiaolong pengxiaolong requested a review from dfuch February 19, 2025 15:56
@pengxiaolong
Copy link
Author

@dfuch
Hi Daniel, thank you for the review of the changes, do you have other concerns on the PR?

@dfuch
Copy link
Member

dfuch commented Mar 5, 2025

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.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 5, 2025
@pengxiaolong
Copy link
Author

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.

@pengxiaolong
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 5, 2025
@openjdk
Copy link

openjdk bot commented Mar 5, 2025

@pengxiaolong
Your change (at version be5bedd) is now ready to be sponsored by a Committer.

@sendaoYan
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 8, 2025

Going to push as commit a90f323.
Since your change was applied there have been 319 commits pushed to the master branch:

  • 7ec2e14: 8349932: PSPrinterJob sometimes generates unnecessary PostScript commands
  • 76e0f30: 8350460: org.openjdk.bench.vm.floatingpoint.DremFrem JMH fails with -ea
  • 4e67ac4: 8350909: [JMH] test ThreadOnSpinWaitShared failed for 2 threads config
  • 8ed6c1d: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant
  • f6a8db2: 8348261: assert(n->is_Mem()) failed: memory node required
  • 5cd4fe6: 8348309: MultiNST tests need more debugging and timing
  • 7c22b81: 8350811: [JMH] test foreign.StrLenTest failed with StringIndexOutOfBoundsException for size=451
  • 54fe643: 8347433: Deprecate XML interchange in java.management/javax/management/modelmbean/DescriptorSupport for removal
  • 155697f: 8349623: [ASAN] Gtest os_linux.glibc_mallinfo_wrapper_vm fails
  • 4066f33: 8350565: NMT: remaining memory flag/type to be replaced with memory tag
  • ... and 309 more: https://git.openjdk.org/jdk/compare/8f6ccde9829ea0e4fe1c087e68bec4d9efb55c64...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 8, 2025
@openjdk openjdk bot closed this Mar 8, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 8, 2025
@openjdk
Copy link

openjdk bot commented Mar 8, 2025

@sendaoYan @pengxiaolong Pushed as commit a90f323.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated net [email protected]
Development

Successfully merging this pull request may close these issues.

3 participants