On Wed, 9 Nov 2022 10:14:45 GMT, Adam Sotona <asot...@openjdk.org> wrote:

> When `Class.getEnumConstants()` is called on a bad enum class where 
> `values()` is an instance method, or returns a non‑array, then it throws 
> `NullPointerException` or `ClassCastException` respectively. 
> 
> This patch fixes `Class.getEnumConstants()` method to handle above mentioned 
> bad enums and adds relevant tests.
> 
> Please review.
> 
> Thanks,
> Adam

Looks fine.

It is fine to use an old class file version, but I think using a new one would 
be fine too.

I don't know if using junit here pulls its weight.

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

Marked as reviewed by darcy (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11056

Reply via email to