On Wed, 18 Nov 2026 10:06:53 GMT, Jaikiran Pai <[email protected]> wrote:
>> Can I please get a review of this change which proposes to address the issue >> noted in https://bugs.openjdk.org/browse/JDK-8396120? >> >> The implementation of `LdapCtx.getSchema(name)` searches for the >> `subschemasubentry` attribute for the given name. The response to that >> search is allowed to return the attribute with no values associated with it. >> Because of what appears to be a typo in the current implementation of >> `LdapCtx.getSchema(...)`, for such cases where the attribute has no values, >> the implementation throws an unspecified `NoSuchElementException`. The >> commit in this PR addresses it by correctly detecting the absence of >> attribute values. >> >> A new jtreg test has been introduced to reproduce the issue and verify the >> fix. Existing tests in tier1, tier2, tier3 continue to pass too. >> >> I'm unsure if this change would require a CSR. The fix updates the >> implementation to match the specification, unlike previously where it would >> throw the unspecified exception. Should we file one? >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Jaikiran Pai has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains eight additional > commits since the last revision: > > - merge latest from master branch > - update the server in the test to be lenient to LDAP messages that it > doesn't process > - merge latest from master branch > - do not reattempt search for subschemasubentry when root DSE has already > been searched for > - update the test to test against base DN when constructing the DirContext > - merge latest from master branch > - add test > - 8396120: Wrong comparison in LdapCtx causes NoSuchElementException Thank you for the review, Volkan. One run in our CI saw this new test fail because it received an abandon request LDAP message in addition to the search request. The test was a bit too strict in handling those LDAP messages, so I updated it to be more lenient (like the handling done in `BaseLdapServer`). The test continues to pass after this change. On that note, the abandon request is sent by the client when there are outstanding requests and the connection is being closed. From the failing run it wasn't clear why that might have happened and I haven't been able to reproduce that issue either. I'll investigate that separately. ------------- PR Comment: https://git.openjdk.org/jdk/pull/33838#issuecomment-6975484008
