-
Sub-task
-
Resolution: Delivered
-
P4
-
9
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8167178 | 9 | Vyom Tewari | P3 | Resolved | Fixed | b156 |
The `javax.naming.CompoundName`, an extensible type, has a protected member, `impl` whose type, `javax.naming.NameImpl`, is package-private. This is a long standing issue where an inaccessible implementation type has mistakenly made its way into the public Java SE API.
The new `javac` lint option `javac -Xlint` helped identify this issue. In Java SE 9, this protected member has been removed from the public API.
Compatibility:
-----------------
Since the type of the member is package-private it cannot be directly referenced by non-JDK code. The member type does not implement or extend any super type directly, therefore any non-JDK subtype of `javax.naming.CompoundName` could only refer to this member as Object. It is possible that such a subtype might invoke the `toString`, or any of `Object`'s methods on this member, or even synchronize on it. In such a case such subtypes of `javax.naming.CompoundName` will require updating.
Source incompatible:
---------------------------
Code making a static reference to the member will fail to compile, e.g. `error: impl has private access in CompoundName`
Binary incompatible:
---------------------------
Previously compiled code executed with JDK 9, accessing the member directly will fail, e.g. `java.lang.IllegalAccessError: tried to access field javax.naming.CompoundName.impl from class CompoundName$MyCompoundName`
The new `javac` lint option `javac -Xlint` helped identify this issue. In Java SE 9, this protected member has been removed from the public API.
Compatibility:
-----------------
Since the type of the member is package-private it cannot be directly referenced by non-JDK code. The member type does not implement or extend any super type directly, therefore any non-JDK subtype of `javax.naming.CompoundName` could only refer to this member as Object. It is possible that such a subtype might invoke the `toString`, or any of `Object`'s methods on this member, or even synchronize on it. In such a case such subtypes of `javax.naming.CompoundName` will require updating.
Source incompatible:
---------------------------
Code making a static reference to the member will fail to compile, e.g. `error: impl has private access in CompoundName`
Binary incompatible:
---------------------------
Previously compiled code executed with JDK 9, accessing the member directly will fail, e.g. `java.lang.IllegalAccessError: tried to access field javax.naming.CompoundName.impl from class CompoundName$MyCompoundName`
- backported by
-
JDK-8167178 Exported elements referring to inaccessible types in java.naming
-
- Resolved
-