Repository navigation
Fix Java.Interop documentation errors (R072, pass 3) - #1953
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the documentation-only API contract clarifications.
No open issues 🎉
What changed in this PR
This documentation-only PR refines Java.Interop API contracts following the prior review pass. It corrects version-specific behavior and clarifies marshaling, reference handling, and runtime lifecycle guarantees without changing API metadata or runtime code.
Changes:
- Distinguish .NET 9, 10, and 11 behavior for runtime setup, type lookup, and marshal-member building.
- Clarify base-implementation guarantees, null results, reference cleanup, and activation behavior.
- Correct attribute defaults, wrapper-generation guidance, and type-registration documentation.
| File | Description |
|---|---|
docs/xml/Java.Interop/TypeManager.xml |
Corrects type-registration behavior. |
docs/xml/Java.Interop/JniValueMarshalerState.xml |
Documents the reference returned for a null peer. |
docs/xml/Java.Interop/JniValueMarshalerAttribute.xml |
Clarifies accepted marshaler types. |
docs/xml/Java.Interop/JniValueMarshaler`1.xml |
Qualifies generic base-implementation behavior. |
docs/xml/Java.Interop/JniValueMarshaler.xml |
Clarifies conversion expressions and invalid-reference results. |
docs/xml/Java.Interop/JniTypeSignatureAttribute.xml |
Explains wrapper-generation defaults and version-specific invokers. |
docs/xml/Java.Interop/JniTypeSignature.xml |
Documents a JNI-name exception condition. |
docs/xml/Java.Interop/JniRuntime+ReflectionJniValueManager.xml |
Refines activation, conversion, and cleanup contracts. |
docs/xml/Java.Interop/JniRuntime+JniValueManager.xml |
Clarifies version-specific delegation and peer disposal. |
docs/xml/Java.Interop/JniRuntime+JniTypeManager.xml |
Corrects version-specific lookup and registration behavior. |
docs/xml/Java.Interop/JniRuntime+JniMarshalMemberBuilder.xml |
Distinguishes supported operations from .NET 11 obsolescence. |
docs/xml/Java.Interop/JniRuntime+CreationOptions.xml |
Corrects runtime-option defaults and version-specific usage. |
docs/xml/Java.Interop/JniRuntime.xml |
Refines runtime selection, disposal, and service-property contracts. |
Review effort: Balanced
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: My review needs another scheduled pass: I captured the current discussion and the 13-file change list, but the tick budget ended before I read the changed documentation or implementation source. The missing coverage is the 106 edited channels in |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed all 13 changed documentation files and their relevant source behavior. The version-qualified JNI behavior, reference ownership and cleanup guarantees, and defaults are consistent with the reviewed implementation and surrounding member documentation. No blocking issues found.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
e8b6e37e92cf7bc0cd0f58b1dbf2490aa3359762↑ Independent Gemini reviews found no concrete issues, including in the invoker correction.
↓ Runtime execution was not performed; the current Android 36 index has a separate unresolved metadata conflict.
↓ The documented runtime behavior was checked by source inspection rather than on a device.
Scope
Third-pass review of 333 AI-changed documentation blocks and 1,031 channels across 23 assigned Java.Interop XML files. This PR corrects 106 channels in 64 blocks across 13 files. It also rechecks the fixes and findings in #1762; that PR had no uncertain findings.
Corrections and evidence
GenerateJavaPeerdefaults and wrapper-generation behavior using the attribute and the callable-wrapper metadata reader. CorrectTypeManager.RegisterTypeusing its implementation.The .NET 9 evidence uses dotnet/android
bf2cefd89217847ec180263106c68b9308d0c699, submodule03cb8e258735a5e0b8a5c703832639fb6b65f3c7; the .NET 10 Android 36.1 evidence uses dotnet/android659cd98e7fb9dcd359d6fa9f2f9aaa806d117695, submodule33992194b9373e9322244612c94ed9941b9bc2fd. The later .NET 10 servicing source is dotnet/android8fa045dbb0f405201c2ccc68ba11284abd54ee27, submodule5c085cfd61c3c687391961082002dd2998066c7f.Uncertain findings
The two unchanged
JniTypeManager.TryRegisterNativeMembersoverloads, forReadOnlySpan<char>andstring, have conflicting Android 36 availability evidence. The historical 36 index lists them in Java.Interop 1.0.0.0. #644 identifies the exact659cd98e7fb9dcd359d6fa9f2f9aaa806d117695source used to generate those docs, so their documented behavior was checked against that source. The current 36 index instead omits the base overloads and identifies a different assembly version. Their current framework availability remains uncertain; no generated index or metadata was changed.Checks
git diff --checkpasses.gemini-4-argonreviews of all three commits found no concrete issues; model usage was verified in local usage events.