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).

-------------

Commit messages:
 - add test
 - 8396120: Wrong comparison in LdapCtx causes NoSuchElementException

Changes: https://git.openjdk.org/jdk/pull/33838/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33838&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8396120
  Stats: 262 lines in 2 files changed: 259 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/33838.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33838/head:pull/33838

PR: https://git.openjdk.org/jdk/pull/33838

Reply via email to