On Thu, 11 Aug 2022 15:57:30 GMT, Andy Goryachev <[email protected]> wrote:

>> modules/javafx.controls/src/main/java/javafx/scene/control/Skinnable.java 
>> line 60:
>> 
>>> 58:      * {@link Skin#getSkinnable()} against this Skinnable,
>>> 59:      * and may throw an IllegalArgumentException if it is not the same.
>>> 60:      *
>> 
>> `@throws` tag can be used
>
> In this case, a IllegalArgumentException is not a checked exception (not a 
> part of general contract).
> 
> Just like in TextInputControl.getText(int, int) : 457, for example.

Whether or not it is a checked exception, we should document exceptions that 
are thrown with `@throws`.

In this case, I see that it says the exception "might" be thrown, so if we add 
an `@throws` (which seems a good idea), it would need to describe the 
conditions under which it might be thrown.

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

PR: https://git.openjdk.org/jfx/pull/845

Reply via email to