On Wed, 24 Jan 2024 11:50:05 GMT, Aggelos Biboudis <abimpou...@openjdk.org> wrote:
>> Uh, I think this is a good catch. >> >> I am not completely sure what the policy is, but here we are enhancing a >> non-preview method with some preview-based behavior. I would feel better if >> the method would refuse to work in the preview way when preview is not >> enabled. I.e. my opinion is that this should either be initialized to >> `jdk.internal.misc.PreviewFeatures.isEnabled()`, or >> `jdk.internal.misc.PreviewFeatures.ensureEnabled()` should be used >> appropriately. > > Used the `jdk.internal.misc.PreviewFeatures.isEnabled()` and remove an > erroneous check in `typeSwitch`. Addressed in https://github.com/openjdk/jdk/pull/15638/commits/663c7a54cec9ffd6ca468080f4d084e5fa4c9c3d ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1465039116