eclipse-jdt / eclipse-jdt/eclipse.jdt.core

[BETA_JAVA28] Devise a clean way to consume JDK28 runtime classes with and without preview mode.

Open
#5,304 1 comment 0 reactions 1 assignee Claimed by @srikanth-sankaran View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

https://github.com/eclipse-jdt/eclipse.jdt.core/pull/5303 implements a quick and not particularly dirty solution to a new and tricky situation that arises with JDK28 and JEP401 support.

Some 31 classes that were \@ValueBased earlier are now value classes IFF preview mode is on. These default to their old identity versions if preview mode is off. (essentially, JDK bundles two class files for each of these 31 classes)

Thus, apart from the compiler and the VM, now jdk.internal.jrtfs.JrtFileSystem also is interested in knowing whether it is being asked to serve files in preview mode or standard mode. By passing "previewMode" as "true" to the factory method we tell it whether to operate in preview mode or not.

This is going to involve either tunneling parameters through several intermediate methods or some sort of shared state. I have in https://github.com/eclipse-jdt/eclipse.jdt.core/pull/5303 implemented a simple scheme so we can make progress rather than get bogged down in incidental detail.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.