JDK-8326748 : Class-File API transition to Second Preview
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang.classfile
  • Priority: P2
  • Status: Provisional
  • Resolution: Unresolved
  • Fix Versions: 23
  • Submitted: 2024-02-27
  • Updated: 2024-03-30
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Description
Summary
-------

Class-File API moves from JEP 457: Class-File API (Preview) to JEP 466: Class-File API (Second Preview)

Problem
-------

`PreviewFeature.Feature.CLASSFILE_API` `JEP` annotation number and status needs to be updated.

Solution
--------

Update `PreviewFeature.Feature.CLASSFILE_API` `JEP` annotation number to 466 and status to "Second Preview".

Specification
-------------

```
diff --git a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java
index 9404a5c6de5..5044c80c55e 100644
--- a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java
+++ b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java
@@ -77,7 +77,7 @@ public enum Feature {
         SCOPED_VALUES,
         @JEP(number=462, title="Structured Concurrency", status="Second Preview")
         STRUCTURED_CONCURRENCY,
-        @JEP(number=457, title="ClassFile API", status="Preview")
+        @JEP(number=466, title="ClassFile API", status="Second Preview")
         CLASSFILE_API,
         @JEP(number=461, title="Stream Gatherers", status="Preview")
         STREAM_GATHERERS,
```


Comments
[~asotona], as reminder, when you are ready to do so, please get a reviewer and advance this CSR to Finalized to request the second phase of CSR review.
30-03-2024

Each API change is discussed under individual CSR (linked). For information purposes I can attach here an aggregated spec diff of the all second preview changes when ready.
08-03-2024

Moving to Provisional, not Approved. Before the CSR is Finalized, it should have at least one reviewer and discussion of the scope of the API changes.
29-02-2024

[~darcy], yes, the API changes are handled under individual bugs and CSRs. I'll link them here.
29-02-2024

[~asotona], are there any technically substantive API changes planned for this API as part of its second preview, or are those expected to be handled under other bugs/RFes?
29-02-2024