Skip to content

Document JNI reference metadata - #559

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-document-java-interop-apis
Open

Document JNI reference metadata#559
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-document-java-interop-apis

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

Documents JNI reference kinds, array-element release behavior, and supported JNI versions.

Refs #193

Sources

Validation

  • Parsed all changed XML files with PowerShell's XML parser.
  • Verified CRLF line endings and zero lone LF bytes in all changed files.
  • Ran git diff --check.

Refs #193

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Java.Interop XML reference documentation to replace “To be added.” placeholders with concrete JNI reference information, aligning the docs with the Oracle JNI specification and improving the quality of generated API docs.

Changes:

  • Added summary + reference links to the relevant Oracle JNI spec sections for GetVersion, GetObjectRefType, and ReleasePrimitiveTypeArrayElements.
  • Documented enum member meanings for JNI versions, object reference kinds, and array-elements release modes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/xml/Java.Interop/JniVersion.xml Documents the meaning of JniVersion and its enum values, including a link to the JNI GetVersion spec.
docs/xml/Java.Interop/JniReleaseArrayElementsMode.xml Documents how array element buffers are released (copy/free behavior), with a link to the relevant JNI spec.
docs/xml/Java.Interop/JniObjectReferenceType.xml Documents JNI object reference kinds (local/global/weak), with a link to the GetObjectRefType spec.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

1 similar comment
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two JNI contract issues remain:

  • JniReleaseArrayElementsMode describes copy/free effects unconditionally, but JNI says the mode has no effect when the pointer is not a copy; Abort cannot roll back direct/pinned mutations, and Commit still requires a final release.
  • The new JNI specification links use nonexistent, case-sensitive fragments, so they do not navigate to GetObjectRefType, release-mode, or GetVersion sections.

Please correct the mode semantics and exact fragments in JniReleaseArrayElementsMode.xml and the related reference files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants