-
Enhancement
-
Resolution: Fixed
-
P4
-
24
A few improperly exposed ClassFile transformation APIs can be hidden:
1. `ClassFileTransform$ResolvedTransform` and `ClassFileTransform::resolve`: This is supposed to allow users to optimize their transform by passing chained builders. However, users don't have access to chained builders to implement these, and the resolved transform is error-prone in actual usage as well, as there's nothing to ensure the start and end handlers are run.
2. `ClassFileBuilder` exposes meaningless `canWriteDirect` (only useful to attributes, which are the only ones that write CP indices) and method `transform`'s return type is not chained, and its name is a bit confusing.
1. `ClassFileTransform$ResolvedTransform` and `ClassFileTransform::resolve`: This is supposed to allow users to optimize their transform by passing chained builders. However, users don't have access to chained builders to implement these, and the resolved transform is error-prone in actual usage as well, as there's nothing to ensure the start and end handlers are run.
2. `ClassFileBuilder` exposes meaningless `canWriteDirect` (only useful to attributes, which are the only ones that write CP indices) and method `transform`'s return type is not chained, and its name is a bit confusing.
- blocks
-
JDK-8335937 ClassFile API transform documentation cleanup
- Open
- csr for
-
JDK-8336027 Hide Transform implementation for Class-File API
- Closed
- links to
-
Commit(master) openjdk/jdk/a253e0ff
-
Review(master) openjdk/jdk/20102