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 been closed without being integrated.

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

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

Reply via email to