On Tue, Jul 18, 2023 at 10:54 PM Phil Steitz <[email protected]> wrote: > > I am going through now and comparing diffs of 2.11.1 and head of 2.x to > make sure that me and sed did not do anything wrong and I am seeing a bunch > of things like this: > > - void addObject() throws Exception, IllegalStateException, > - UnsupportedOperationException; > + void addObject() throws Exception; > > Where the new version is the 2.x code. I am inclined to leave as is, maybe > adding comments in some places indicating when the unchecked exceptions > might be thrown. Any objections? >
That sounds good. This is generally best practice for runtime exceptions. Don't include them in throws clauses but do include @throws Javadoc for each one. -- Elliotte Rusty Harold [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
