RFR: JDK-8315248: AssertionError in Name.compareTo

Jonathan Gibbons jjg at openjdk.org
Wed Aug 30 18:02:26 UTC 2023


On Wed, 30 Aug 2023 15:10:40 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>     NameImpl name;
>     try {
>         name = (NameImpl)name0;
>     } catch (ClassCastException e) {
>         return super.compareTo(name0);
>     }

See the updated code for a revised, more concise, suggestion using `instanceof` pattern.

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

PR Comment: https://git.openjdk.org/jdk/pull/15478#issuecomment-1699615531


More information about the compiler-dev mailing list