-
CSR
-
Resolution: Approved
-
P2
-
None
-
behavioral
-
minimal
-
Changes to preview APIs and behavior have minimal compatibility risk.
-
Java API
-
SE
Summary
Fix out-of-spec behavior (with|transform)(Field|Method(Body)?|Code)
on Class-File API builders supplied to chained transforms.
Problem
Some Class-File API builders (ChainedXxxBuilder
s) accessible to transforms (after they are composed with ClassFileTransform.andThen()
) are incorrectly implemented: components produced by those problematic methods are skipped from the next transform. The problematic methods do not return the builder itself, but return another builder intended for another transform in the chain.
There is no easy way to bypass component skipping issue: users have to commit and re-parse the whole class for every single transform to get the right behavior.
Solution
Fix these bug and out-of-spec behaviors, despite that it's possible users have accidentally relied on these bugs. Components will be passed to the next transform, and the methods will return the builder itself for chaining.
Backport this fix to 23 despite there has been some API renames made in 24, given this significantly affects usability of the transformation API.
Specification
No change.
- csr of
-
JDK-8335935 Chained builders not sending transformed models to next transforms
-
- Closed
-
- relates to
-
JDK-8334712 JEP 484: Class-File API
-
- Closed
-