On Thu, 16 Oct 2025 18:26:32 GMT, Sergey Bylokhov <[email protected]> wrote:

> > This because if it isn't an exception in the method signature (as in foo() 
> > throws BarException), and instead you only have "@throws BarException" it 
> > will not be inherited.
> 
> May be it is better to add them to the "@throws" list instead of duplicating 
> the spec?

That would not help. In fact it makes it harder.
RuntimeExceptions aren't inherited in the method signature so I'd need to add 
them there in the subclass anyway in addition to what I am already doing with 
the @throws.

Then I'd feel obliged to change lots of similar things to be consistent and 
this is already big enough.

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

PR Comment: https://git.openjdk.org/jdk/pull/27754#issuecomment-3412518256

Reply via email to