RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set [v4]
Chen Liang
liach at openjdk.org
Sat Sep 14 20:38:04 UTC 2024
On Sat, 14 Sep 2024 07:50:22 GMT, ExE Boss <duke at openjdk.org> wrote:
>> I started out adding the .clone() as a standard precaution, analyzed to make sure it wasn't needed then removed it in one out of two places. Now both removed.
>
> The public methods used to throw `IllegalArgumentException` when duplicate class options were passed though, as a result of using [`Set.of(…)`].
>
> [`Set.of(…)`]: https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Set.html#of(E...)
Good note, we might check the option bit is unset before bitwise-or the option bit, or remove this check (this behavior is not specified by this API and might not be relied on)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21002#discussion_r1759808331
More information about the core-libs-dev
mailing list