RFR: 8374149: [bworld] Define and use new null checking API [v4]
Vicente Romero
vromero at openjdk.org
Wed Jan 7 15:10:30 UTC 2026
On Wed, 7 Jan 2026 14:32:56 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java line 145:
>>
>>> 143: allowValueClasses = (!preview.isPreview(Source.Feature.VALUE_CLASSES) || preview.isEnabled()) &&
>>> 144: Source.Feature.VALUE_CLASSES.allowedInSource(source);
>>> 145: String opt = Options.instance(context).get("useRuntimeChecks");
>>
>> In principle this could be simplified to:
>>
>>
>> hasRuntimeChecks = target.hasRuntimeChecks() && options.getBoolean("useRuntimeChecks", true);
>>
>>
>> Right? E.g. emitting an error for the case where `useRuntimeChecks` is set, but the target is not compatible doesn't seem super important? (Also, how is this hidden flag used? Do we really need it?)
>
> I don't think we super need it but could be useful for testing, but I can remove it
removed
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1859#discussion_r2668836870
More information about the valhalla-dev
mailing list