Please review a change to simplify use of the internal `DocFinder` class. Previously, users of the class had to call the `search` or `find` method when looking up documentation in an overridden method, depending on whether an explicit orverridden source method was provided.
The `find` method is updated to handle both cases (which are always used together, but passing `null` for the `src` argument restores the old behavior of the `find` method). Additionally, `find` is renamed to `searchInherited` to make its relation the `search` method clearer (`searchInherited` searches in overridden methods only while `search` starts in the method itself). The internal `search0` method loses a redundant boolean parameter, the new `overriddenMethodsOnly` parameter is the same as `not(includeMethodInSearch)` and `throwExceptionIfDoesNotOverride`. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8383792: Simplify internal DocFinder API Changes: https://git.openjdk.org/jdk/pull/31022/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31022&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8383792 Stats: 84 lines in 6 files changed: 32 ins; 27 del; 25 mod Patch: https://git.openjdk.org/jdk/pull/31022.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31022/head:pull/31022 PR: https://git.openjdk.org/jdk/pull/31022
