JDK-8308040 : Evaluate new public types in non-public classes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 21
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2023-05-13
  • Updated: 2023-08-29
  • Resolved: 2023-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b25Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
As reported by Marc Hoffman of  javaalmanac.io, in a recent JDK 21 build there are new public types nested in non-public interfaces:

java.lang.runtime.ReferenceKey.SoftKey
java.lang.runtime.ReferenceKey.StrongKey
java.lang.runtime.ReferenceKey.WeakKey
java.util.Digits.DecimalDigits
java.util.Digits.HexDigits
java.util.Digits.OctalDigits
Comments
Changeset: b44fa365 Author: Jim Laskey <jlaskey@openjdk.org> Date: 2023-05-24 19:08:39 +0000 URL: https://git.openjdk.org/jdk/commit/b44fa365cacce0ae3f9e576a52c08d9ed6258185
24-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14039 Date: 2023-05-17 19:14:20 +0000
24-05-2023

FYI, java/lang/FdLibm$Cbrt java/lang/FdLibm$Hypot java/lang/FdLibm$Pow were resolved in JDK-8308049 and java/lang/invoke/ClassSpecializer$Factory java/lang/invoke/ClassSpecializer$SpeciesData in JDK-8308239.
17-05-2023

These are all affected types in 21-ea+22: java/awt/EventFilter$FilterAction java/lang/FdLibm$Cbrt java/lang/FdLibm$Hypot java/lang/FdLibm$Pow java/lang/LiveStackFrame$PrimitiveSlot java/lang/WeakPairMap$Pair$Lookup java/lang/WeakPairMap$Pair$Weak java/lang/invoke/ClassSpecializer$Factory java/lang/invoke/ClassSpecializer$SpeciesData java/lang/runtime/ReferenceKey$SoftKey java/lang/runtime/ReferenceKey$StrongKey java/lang/runtime/ReferenceKey$WeakKey java/util/Digits$DecimalDigits java/util/Digits$HexDigits java/util/Digits$OctalDigits java/util/FormatItem$FormatItemModifier java/util/stream/Node$Builder java/util/stream/Node$Builder$OfDouble java/util/stream/Node$Builder$OfInt java/util/stream/Node$Builder$OfLong java/util/stream/Node$OfDouble java/util/stream/Node$OfInt java/util/stream/Node$OfLong java/util/stream/Node$OfPrimitive java/util/stream/Sink$ChainedDouble java/util/stream/Sink$ChainedInt java/util/stream/Sink$ChainedLong java/util/stream/Sink$ChainedReference java/util/stream/Sink$OfDouble java/util/stream/Sink$OfInt java/util/stream/Sink$OfLong javax/swing/MultiUIDefaults$MultiUIDefaultsEnumerator$Type javax/swing/plaf/basic/DragRecognitionSupport$BeforeDrag javax/swing/plaf/metal/MetalSplitPaneDivider$MetalDividerLayout javax/swing/plaf/nimbus/Effect$ArrayCache javax/swing/text/html/AccessibleHTML$HTMLAccessibleContext javax/swing/text/html/AccessibleHTML$IconElementInfo$IconAccessibleContext javax/swing/text/html/AccessibleHTML$TableElementInfo$TableAccessibleContext javax/swing/text/html/AccessibleHTML$TableElementInfo$TableAccessibleContext$AccessibleHeadersTable javax/swing/text/html/AccessibleHTML$TextElementInfo$TextAccessibleContext javax/swing/text/html/TableView$RowView javax/xml/catalog/GroupEntry$PreferType javax/xml/catalog/GroupEntry$ResolveType
14-05-2023

WeakPairMap.Pair.Lookup and WeakPairMap.Pair.Weak are other examples of this.
14-05-2023

Per JLS 9.5: "Every member class or interface declaration in the body of an interface declaration is implicitly public and static (ยง9.1.1.3). It is permitted to redundantly specify either or both of these modifiers. " https://docs.oracle.com/javase/specs/jls/se20/html/jls-9.html#jls-9.5
13-05-2023