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.
- csr of
-
JDK-8236779 static field in implementation class erroneously leaking in memory access javadoc
-
- Closed
-