On Mon, 4 May 2026 12:13:01 GMT, Hannes Wallnöfer <[email protected]> wrote:
> Please review a refactoring 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). Passing `null` as `src` argument implements the old behavior of > the `find` method, while passing a non-null reference implements the old > `search` call. Additionally, `find` is renamed to `searchInherited` to make > its relation to 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). This pull request has now been integrated. Changeset: 06df892e Author: Hannes Wallnöfer <[email protected]> URL: https://git.openjdk.org/jdk/commit/06df892e8cf4be18a62d3ab7dd21726a58f2ff3b Stats: 84 lines in 6 files changed: 32 ins; 27 del; 25 mod 8383792: Simplify internal DocFinder API Reviewed-by: nbenalla ------------- PR: https://git.openjdk.org/jdk/pull/31022
