On Mon, Jul 3, 2023 at 12:20 AM Gary Gregory <garydgreg...@gmail.com> wrote:
>
> Hi Elliotte:
>
> Might you be looking at some old code in the PR?
>

Just looking at what was posted in the email thread. It's a weird
corner case not everyone thinks of.

> The current code is:
>
>     /**
>      * Checks if a throwable represents a checked exception
>      *
>      * @param throwable
>      *            The throwable to check.
>      * @return True if the given Throwable is a checked exception.
>      * @since 3.13.0
>      */
>     public static boolean isChecked(final Throwable throwable) {
>         return throwable != null && !(throwable instanceof Error) &&
> !(throwable instanceof RuntimeException);
>     }

This also looks wrong. This might work:

public static boolean isChecked(final Throwable throwable) {
         return throwable != null && throwable instanceof Exception &&
 !(throwable instanceof RuntimeException);
    }



-- 
Elliotte Rusty Harold
elh...@ibiblio.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to