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

8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref) #779

Closed
wants to merge 2 commits into from

Conversation

stsypanov
Copy link
Contributor

@stsypanov stsypanov commented Oct 21, 2020

Hello, while working with java.net.URL I've found unused package-private method URL.set(String protocol, String host, int port, String file, String ref) which can be safely removed from JDK. Testing: tier1, tier2

Could someone crate an issue for tracking of this simple change?


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Testing

Linux aarch64 Linux arm Linux ppc64le Linux s390x Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (6/6 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref)

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/779/head:pull/779
$ git checkout pull/779

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 21, 2020

👋 Welcome back stsypanov! 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 Oct 21, 2020

@stsypanov 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.

@openjdk openjdk bot added the net net-dev@openjdk.org label Oct 21, 2020
@shipilev
Copy link
Member

Submitted here, please try to update the PR title to "8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref)". Also, merge from master to get the test fixes, which should make the "Testing" all green.

@stsypanov stsypanov changed the title Remove unused method URL.set(String protocol, String host, int port, String file, String ref) 8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref) Oct 27, 2020
@stsypanov
Copy link
Contributor Author

@shipilev thanks for filing the issue! Done.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 27, 2020
@mlbridge
Copy link

mlbridge bot commented Oct 27, 2020

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 24, 2020

@stsypanov This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@shipilev
Copy link
Member

Please merge from master to get a fresh round of testing. @AlanBateman might want to look at it.

@stsypanov
Copy link
Contributor Author

Done!

@dfuch
Copy link
Member

dfuch commented Nov 25, 2020

I'll have a look at this when I can spare some cycles. @stsypanov did you run tier2 tests?

@stsypanov
Copy link
Contributor Author

@dfuch
Recent run has some errors:

java/net/MulticastSocket/SetOutgoingIf.java: Re-test IPv6 (and specifically MulticastSocket) with latest Linux & USAGI code
java/net/MulticastSocket/Test.java: IPv4 and IPv6 multicasting broken on Linux
java/time/test/java/time/format/TestDateTimeFormatterBuilder.java:
sun/security/pkcs11/Secmod/AddTrustedCert.java: make sure we can add a trusted cert to the NSS KeyStore module
sun/security/util/HostnameMatcher/NullHostnameCheck.java: Verify hostname returns an exception instead of null pointer when creating a new engine

First two are related to unavailable network, for them I have Unexpected exception for MulticastSender(wlp1s0): java.net.SocketException: Network is unreachable and java.net.SocketException: Network is unreachable

For the third I have

test test.java.time.format.TestDateTimeFormatterBuilder.test_dayPeriodParse(NARROW, en_US, 1, 30, "at night"): failure
java.time.format.DateTimeParseException: Text 'at night' could not be parsed, unparsed text found at index 1
	at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2055)
	at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1880)
	at test.java.time.format.TestDateTimeFormatterBuilder.test_dayPeriodParse(TestDateTimeFormatterBuilder.java:645)

Which also seems to be not related to URL.
For the forth I have

----------System.err:(21/1603)----------
java.security.KeyStoreException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_READ_ONLY
	at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1050)
	at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetCertificateEntry(P11KeyStore.java:516)
	at java.base/java.security.KeyStore.setCertificateEntry(KeyStore.java:1228)
	at AddTrustedCert.main(AddTrustedCert.java:106)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_READ_ONLY
	at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_CreateObject(Native Method)
	at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.storeCert(P11KeyStore.java:1568)
	at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1046)
	... 9 more

And the last one is

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
	at java.base/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:172)
	at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)
	at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)
	at java.base/sun.security.ssl.SSLEngineImpl.beginHandshake(SSLEngineImpl.java:107)
	at NullHostnameCheck.handshake(NullHostnameCheck.java:124)
	at NullHostnameCheck.main(NullHostnameCheck.java:100)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:831)

@dfuch
Copy link
Member

dfuch commented Nov 26, 2020

Thanks Sergey!

These errors are strange but I agree: they don't seem to be related to URL; Let me try to build & test your changes in our test system.

best regards,

-- daniel

@dfuch
Copy link
Member

dfuch commented Nov 27, 2020

I believe the errors are caused by the branch not being uptodate with the master. After rebasing my tests have come back green. Unless I hear objections, I'll sponsor this fix for you.

@openjdk
Copy link

openjdk bot commented Nov 27, 2020

⚠️ @stsypanov the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout url
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Nov 27, 2020

@stsypanov 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:

8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref)

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 150 new commits pushed to the master branch:

  • f6bfbb2: 8257208: Fix typo in doc/building.md
  • b4cba15: 8170432: Class java.util.UUID & @OverRide
  • 5be4de8: 8245058: improve presentation of annotations for modules and packages
  • d51e2ab: 8256986: [PPC64] C2 crashes when accessing nonexisting jvms of CallLeafDirectNode
  • 644271e: 8248566: Make API docs more usable on mobile browsers
  • 53d1444: 8244535: JavaDoc search is overly strict with letter case
  • 78fdb65: 8254893: Fix display of search tag results without holder information
  • 20525d2: 8257149: Improve G1 Service thread task scheduling to guarantee task delay
  • f2f3ba9: 8242652: Throw SkippedException if no JS engine availabe in TestSearchScript
  • ee99686: 8252645: Change time measurements in G1ServiceThread to only account remembered set work
  • ... and 140 more: https://git.openjdk.java.net/jdk/compare/ba721f5f2fbbf08e22a9993dce0087f46b1f5552...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).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 27, 2020
@stsypanov
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 27, 2020
@openjdk
Copy link

openjdk bot commented Nov 27, 2020

@stsypanov
Your change (at version 24d14e2) is now ready to be sponsored by a Committer.

@AlanBateman
Copy link
Contributor

I think Daniel is going to sponsor this.

@dfuch
Copy link
Member

dfuch commented Dec 11, 2020

Sorry - I lost track of this - thanks of reminding me. I will sponsor later today.

@dfuch
Copy link
Member

dfuch commented Dec 14, 2020

/sponsor

@openjdk openjdk bot closed this Dec 14, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 14, 2020
@openjdk
Copy link

openjdk bot commented Dec 14, 2020

@dfuch @stsypanov Since your change was applied there have been 414 commits pushed to the master branch:

  • e69ae07: 8257985: count_trailing_zeros doesn't handle 64-bit values on 32-bit JVM
  • 2ee795d: 8196092: javax/swing/JComboBox/8032878/bug8032878.java fails
  • c30fff7: 8257229: gtest death tests fail with unrecognized stderr output
  • e118292: 8258040: Reenable fixed problemlisted test
  • 74b79c6: 8257964: Broken Calendar#getMinimalDaysInFirstWeek with java.locale.providers=HOST
  • f9c9bf0: 8255583: Investigate creating a test to trigger the condition in KeepAliveStreamCleaner
  • 8273514: 8166026: Refactor java/lang shell tests to java
  • ff75ad5: 8258059: Clean up MethodData::profile_unsafe
  • b5592c0: 8257970: Remove julong types in os::limit_heap_by_allocatable_memory
  • b28b094: 8257145: Performance regression with -XX:-ResizePLAB after JDK-8079555
  • ... and 404 more: https://git.openjdk.java.net/jdk/compare/ba721f5f2fbbf08e22a9993dce0087f46b1f5552...master

Your commit was automatically rebased without conflicts.

Pushed as commit 1548104.

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

@stsypanov stsypanov deleted the url branch December 14, 2020 14:40
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 net-dev@openjdk.org
4 participants