[foreign-preview] RFR: More javadoc cleanup.

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Mar 14 21:32:38 UTC 2022


I noticed more inconsistencies in the foreogn API javadoc. For instance, the text saying that a class is value-based was in some cases repeated twice, once inside the main javadoc, and another as an `@implSpec`. I've removed all duplicates, and opted for the `@implSpec` version, that is more succint and more separated from the main javadoc text.

I have also reworked the javadoc of `MemorySession` and `MemorySegment`. The `MemorySession` javadoc contained a big list of all the possible things that can be associated with a session and what happens to them once the session is closed. I found this to be redundant and I've decided to streamline the text a little.

As for `MemorySegment`, the javadoc has evolved into many different small subsections. I've consolidated the text, by quickly listing all types of memory segments at the top. I've also dropped the section on "views" (which is something that is far less important in this iteraton of the API) and created a new session on slicing, which covers both slices and stream support. The result makes, I think, a lot more sense.

Finally, I've tweaked some text in `SegmentAllocator` where we're still referring to `array` event though the signatures of the methods take a varargs.

-------------

Commit messages:
 - Fix whitespace
 - Initial push

Changes: https://git.openjdk.java.net/panama-foreign/pull/670/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=670&range=00
  Stats: 225 lines in 9 files changed: 56 ins; 119 del; 50 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/670.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/670/head:pull/670

PR: https://git.openjdk.java.net/panama-foreign/pull/670


More information about the panama-dev mailing list