RFR: 8273544: Increase test coverage for snippets [v3]
Pavel Rappo
prappo at openjdk.java.net
Fri Nov 19 20:12:12 UTC 2021
On Fri, 19 Nov 2021 19:54:49 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> I vaguely remember that at some stage I seem to have realized that while `sealed` works for Style, it does not work for Attribute. This is because the attribute is typically queried by the most specific `Class<T extends Attribute>`, which means that the client knows the exact type of the attribute upon return from Attributes.get (note plural attributeS).
>>
>> Here's another issue that might have contributed to this mess: although the [sealed classes](https://openjdk.java.net/jeps/409) are available, the [exhaustive switch for sealed hierarchies](https://openjdk.java.net/jeps/420) is not.
>>
>> That said, here's what I will do. I will push a commit to make Style `sealed`, which seems a reasonable thing to do. Do you have any objections, Jon? (Asking because you have already reviewed the change.)
>
> Thanks for the explanation. Mostly, I was curious about what had happened in your thinking in this area. I have no strong preferences either way, with a mild preference for leaving it alone, and improve it later when you may be able to make better use of the declaration.
Please clarify: do you want me to revert 93f01b9, push the PR as it is now, or do something else?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6359
More information about the javadoc-dev
mailing list