-
CSR
-
Resolution: Approved
-
P4
-
None
-
source
-
minimal
-
Preview API changes entail minimal compatibility risk.
-
Java API
-
SE
Summary
AttributeMapper's type parameter A
is now bounded by Attribute<A>
.
Problem
AttributeMapper's type parameter A
is supposed to be bounded by Attribute<A>
but is not declared so.
Solution
Make it bounded by Attribute<A>
. This only affects one use site in implementation that it no longer needs to cast a user AttributeMapper return value to Attribute<?>
; other places that can access AttributeMapper, such as Attribute::attributeMapper
, already bounds the returned type argument.
Note this change affects method descriptors, so technically the readAttribute
and writeAttribute
methods are now removed and re-added due to descriptor update from Object
to Attribute
.
Specification
-public interface AttributeMapper<A> {
+public interface AttributeMapper<A extends Attribute<A>> {
- csr of
-
JDK-8338700 AttributeMapper type parameter should be bounded by Attribute
-
- Resolved
-
- relates to
-
JDK-8334712 JEP 484: Class-File API
-
- Closed
-