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

8273402: Use derived NamingExceptions in com.sun.jndi.ldap.Connection#readReply #5456

Conversation

AlekseiEfimov
Copy link
Member

@AlekseiEfimov AlekseiEfimov commented Sep 9, 2021

Hi,
The following fix changes type of exception thrown when an LDAP operation fails for reasons like read timeout or connection closure/cancellation: instead of throwing a general NamingException, the internal LDAP connection class will throw a CommunicationException that better matches the reasons described.

Testing shows no problem with the proposed fix.


Progress

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

Issue

  • JDK-8273402: Use derived NamingExceptions in com.sun.jndi.ldap.Connection#readReply

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5456/head:pull/5456
$ git checkout pull/5456

Update a local copy of the PR:
$ git checkout pull/5456
$ git pull https://git.openjdk.java.net/jdk pull/5456/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5456

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5456.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 9, 2021

👋 Welcome back aefimov! 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 openjdk bot added the rfr label Sep 9, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 9, 2021

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

  • core-libs

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 core-libs label Sep 9, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 9, 2021

Webrevs

dfuch
dfuch approved these changes Sep 10, 2021
Copy link
Member

@dfuch dfuch left a comment

Thanks Aleksei. Using an IOException as the cause of CommunicationException, rather than a plain NamingException, to convey exceptional cases like "connection closed" seems to be the right choice to me.

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

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

8273402: Use derived NamingExceptions in com.sun.jndi.ldap.Connection#readReply

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

  • 2eaf374: 8272698: LoadNode::pin is unused
  • 792281d: 8264517: C2: make MachCallNode::return_value_is_used() only available for x86
  • 70c9e02: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel
  • 08f0be8: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag
  • 2e321dc: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String
  • 54dee13: 8273188: java/lang/instrument/BootClassPath/BootClassPathTest.sh fails with "FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed"
  • 4020a60: 8273550: Replace os::cgc_thread/pgc_thread with os::gc_thread
  • 185eaca: 8273545: Remove Thread::is_GC_task_thread()
  • dd1209e: 8268885: duplicate checkcast when destination type is not first type of intersection type
  • ef4a532: 8263773: Reenable German localization for builds at Oracle
  • ... and 33 more: https://git.openjdk.java.net/jdk/compare/a66629a464b97176bcdc2ca1150d12df6241dc1c...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Sep 10, 2021
@AlekseiEfimov
Copy link
Member Author

@AlekseiEfimov AlekseiEfimov commented Sep 10, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

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

  • 4e6de5f: 8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2
  • c1e39fa: 8273482: Remove "foreground work" concept from WorkGang
  • 2eaf374: 8272698: LoadNode::pin is unused
  • 792281d: 8264517: C2: make MachCallNode::return_value_is_used() only available for x86
  • 70c9e02: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel
  • 08f0be8: 8272608: java_lang_System::allow_security_manager() doesn't set its initialization flag
  • 2e321dc: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String
  • 54dee13: 8273188: java/lang/instrument/BootClassPath/BootClassPathTest.sh fails with "FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed"
  • 4020a60: 8273550: Replace os::cgc_thread/pgc_thread with os::gc_thread
  • 185eaca: 8273545: Remove Thread::is_GC_task_thread()
  • ... and 35 more: https://git.openjdk.java.net/jdk/compare/a66629a464b97176bcdc2ca1150d12df6241dc1c...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 10, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

@AlekseiEfimov Pushed as commit c464f09.

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

@michael-o
Copy link

@michael-o michael-o commented Sep 10, 2021

@AlekseiEfimov Thanks for making this happen so fast. Do you see any chance to have this backported to LTS releases where this is required? I have reported the issue initially and like to make this available in Tomcat 8.5+.

@AlekseiEfimov
Copy link
Member Author

@AlekseiEfimov AlekseiEfimov commented Sep 14, 2021

Hi @michael-o,
I'm not involved in the backporting process to older releases. You'll need to find the right contact for a particular release you need a backport for, and ask there.

@michael-o
Copy link

@michael-o michael-o commented Sep 14, 2021

Thanks, will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs integrated
3 participants