RFR: 8308281: Java snippets in the FFM API need to be updated

Maurizio Cimadamore mcimadamore at openjdk.org
Wed May 17 12:01:43 UTC 2023


On Wed, 17 May 2023 11:46:39 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> As the API has improved over the recent releases, not all `{@snippet ..}` sections have been kept in sync.
> 
> This PR suggests all snippets used should be verified against real code that is placed in a new `snippet-files` folder and erroneous snippets are updated.
> 
> In this PR, it is suggested duplicating code in the `Snippets.java` class and in the JavaDocs. The benefit of this is that code is directly visible in the code and not only in the generated javadoc.
> 
> Another thing to think about is if there should be on single `Snippets.java` class or separate ones for each FFM class.

The fixes all are great - thanks for going over it. I'm not sure about the snippet-file folder - e.g. if we're not using it, is there value in having it? I suppose (but I might be wrong) that the IDE cannot perform refactors on such a file, so it will become yet another thing that might go out of date?

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

PR Review: https://git.openjdk.org/jdk/pull/14030#pullrequestreview-1430500747


More information about the core-libs-dev mailing list