On Sat, 14 Sep 2024 07:50:22 GMT, ExE Boss <d...@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

Reply via email to