On Tue, 14 Jan 2025 09:17:59 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> I believe an `@implSpec` only restricts the implementation of this immediate >> method, such as those seen on default methods, and has no impact on the >> overrides. If we need to specify something for overrides to abide to, I >> believe they usually stay in the API specification itself. > >> I wonder if the note for subclasses should move to the end method as >> implSpec, it looks out of place in the class API note. > > Stuart, in his inputs here > https://github.com/openjdk/jdk/pull/19675#issuecomment-2172433871 and here > https://github.com/openjdk/jdk/pull/19675#discussion_r1848945718 had noted > that it would be useful to add this guidance to subclasses. But I see that he > wasn't fully convinced whether it must be a apiNote or something else. Given > what you note about moving this detail for subclasses to a `@implSpec` on the > end() method, I have now updated the PR accordingly. Hello Chen, > I believe an @implSpec only restricts the implementation of this immediate > method, such as those seen on default methods, and has no impact on the > overrides. Based on the details about these tags here https://openjdk.org/jeps/8068562, I think the `@implSpec` is the most relevant one for this text: > Interface implementors or class subclassers use the information here in order > to decide whether it is sensible or necessary to override a particular method ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19675#discussion_r1914491835