Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236780

static field in implementation class erroneously leaking in memory access javadoc

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P2 P2
    • 14
    • core-libs
    • None
    • source
    • minimal
    • This field was never meant to be used by the end user in the first place. As such, reducing visibility does not impact any of the user code.
    • Java API
    • JDK

      Summary

      A static field in an implementation class of the memory access API, namely AbstractLayout::BSM_GET_STATIC_FINAL, is accidentally leaking in the API javadoc.

      Problem

      A static field in an implementation class of the memory access API, namely AbstractLayout::BSM_GET_STATIC_FINAL, is declared with public visibility. As such, this field leaks in the javadoc for all the concrete memory layout classes - such as ValueLayout, SequenceLayout and GroupLayout - as can be seen in the following links:

      https://download.java.net/java/early_access/jdk14/docs/api/jdk.incubator.foreign/jdk/incubator/foreign/ValueLayout.html#BSM_GET_STATIC_FINAL

      https://download.java.net/java/early_access/jdk14/docs/api/jdk.incubator.foreign/jdk/incubator/foreign/SequenceLayout.html#BSM_GET_STATIC_FINAL

      https://download.java.net/java/early_access/jdk14/docs/api/jdk.incubator.foreign/jdk/incubator/foreign/GroupLayout.html#BSM_GET_STATIC_FINAL

      Solution

      The solution is to make the field package-private - which is what should have been in the first place.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: