Repository navigation
Fix Java.Util documentation errors (R059, pass 3) - #1940
Conversation
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.
🔵 Needs a closer look
Human review is needed to resolve the Calendar.Builder timezone boundary conflict between Android 14 and Android 13 because the pinned AOSP method bodies were unavailable for independent verification.
No open issues 🎉
What changed in this PR
This documentation-only follow-up to #1751 corrects Java.Util API descriptions for .NET for Android, aligning them with Android-version behavior and managed bindings without changing API metadata.
Changes:
- Corrects version-specific locale, calendar, and map behavior.
- Clarifies managed collection views, shuffle behavior, JNI reference handling, and spliterator contracts.
- Removes invalid generic parameter documentation and corrects managed names and links.
| File | Description |
|---|---|
| docs/xml/Java.Util/Vector.xml | Clarifies action exception propagation. |
| docs/xml/Java.Util/Spliterators+AbstractSpliterator+InterfaceConsts.xml | Directs users to the characteristics enum. |
| docs/xml/Java.Util/Spliterators+AbstractSpliterator.xml | Clarifies characteristics, estimates, traversal, and JNI handling. |
| docs/xml/Java.Util/Spliterators+AbstractLongSpliterator.xml | Clarifies characteristics, estimates, and JNI handling. |
| docs/xml/Java.Util/Spliterators+AbstractIntSpliterator.xml | Clarifies characteristics, estimates, and JNI handling. |
| docs/xml/Java.Util/Spliterators+AbstractDoubleSpliterator.xml | Clarifies characteristics, estimates, and JNI handling. |
| docs/xml/Java.Util/SpliteratorCharacteristics.xml | Refines characteristic contracts and managed links. |
| docs/xml/Java.Util/Spliterator.xml | Directs users away from obsolete constants. |
| docs/xml/Java.Util/ResourceBundle+Control.xml | Clarifies format-list requirements and singleton controls. |
| docs/xml/Java.Util/ResourceBundle.xml | Clarifies the keys enumeration description. |
| docs/xml/Java.Util/Random.xml | Documents delegating wrapper restrictions. |
| docs/xml/Java.Util/Properties.xml | Removes the XML-storage version restriction. |
| docs/xml/Java.Util/PriorityQueue.xml | Uses the managed maximum-integer name. |
| docs/xml/Java.Util/LongSummaryStatistics.xml | Corrects JNI reference-handling documentation. |
| docs/xml/Java.Util/Locale+IsoCountryCode.xml | Clarifies country-code options and Java enum names. |
| docs/xml/Java.Util/Locale+FilteringMode.xml | Documents empty-input filtering and Java enum names. |
| docs/xml/Java.Util/Locale+Category.xml | Specifies Java enum lookup names. |
| docs/xml/Java.Util/Locale+Builder.xml | Documents version-specific parsing, validation, and removal. |
| docs/xml/Java.Util/Locale.xml | Describes country-code returns as a collection. |
| docs/xml/Java.Util/LinkedList.xml | Removes Java-specific reverse-view return wording. |
| docs/xml/Java.Util/LinkedHashSet.xml | Removes Java-specific reverse-view return wording. |
| docs/xml/Java.Util/LinkedHashMap.xml | Clarifies eviction and backed sequenced views. |
| docs/xml/Java.Util/ISortedMap.xml | Simplifies reverse-view return documentation. |
| docs/xml/Java.Util/IntSummaryStatistics.xml | Corrects JNI reference-handling documentation. |
| docs/xml/Java.Util/INavigableMap.xml | Clarifies managed exceptions for out-of-range inserts. |
| docs/xml/Java.Util/IMapEntry.xml | Links copied-entry behavior to the managed factory. |
| docs/xml/Java.Util/IList.xml | Refines reverse-view and sorting descriptions. |
| docs/xml/Java.Util/Hashtable.xml | Documents version-specific null handling and modification checks. |
| docs/xml/Java.Util/HashMap.xml | Qualifies callback modification checks by Android version. |
| docs/xml/Java.Util/Formatter+BigDecimalLayoutForm.xml | Specifies Java enum lookup names. |
| docs/xml/Java.Util/DoubleSummaryStatistics.xml | Corrects JNI reference-handling documentation. |
| docs/xml/Java.Util/Collections.xml | Clarifies shuffle marshalling and Java collection views. |
| docs/xml/Java.Util/CalendarStyle.xml | Uses managed calendar member names. |
| docs/xml/Java.Util/Calendar+Builder.xml | Corrects defaults, ISO week rules, and managed names. |
| docs/xml/Java.Util/Calendar.xml | Describes partial field synchronization. |
| docs/xml/Java.Util/Base64+Encoder.xml | Corrects JNI reference-handling documentation. |
| docs/xml/Java.Util/Base64+Decoder.xml | Corrects JNI reference-handling documentation. |
| docs/xml/Java.Util/Base64.xml | Corrects JNI reference-handling documentation. |
| docs/xml/Java.Util/Arrays.xml | Removes 27 invalid generic parameter tags. |
| docs/xml/Java.Util/AbstractMap.xml | Clarifies collection returns and unsupported base insertion. |
| docs/xml/Java.Util/AbstractList.xml | Documents unsupported base indexed mutations. |
Review effort: Balanced
|
For the Calendar.Builder time-zone boundary noted in the Copilot review: Android 13 r1 and r84 assign |
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: The Android 13/14 Calendar.Builder default-time-zone call sites and the pinned Object.SetHandle/JNIEnv.DeleteRef transfer semantics check out. My remaining source checks include Locale.Builder on Android 5/6 versus 7+, Collections.Shuffle marshalling, LinkedHashMap eviction, ResourceBundle.Control, and the changed Spliterator contracts, plus managed cref/Arrays signature validation. These are reviewer coverage gaps, not defects found in this PR; there was no source-tool failure. I have retained the completed checks and will resume the remaining checks before the final review. |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed all 41 changed files, the Android version boundaries, managed return types and current discussion. No blocking issues found.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
893a0befd7396eb417824fddab6f5c484b3d5d56↑ Independent
gemini-4-argonreview found no actionable issues.↓ Historical Android device behavior and published rendering were not tested.
↓ Historical device execution was not performed.
Scope
Pass 3 for review item R059,
Java.Util. Reviewed 137 assigned files and 1,252 of 1,252 in-scope AI-changed documentation channels. The diff changes 169 channels in 41 files; two are pre-AICalendar.AreFieldsSetchannels that contradicted an AI-added value and the implementation. It does not change API metadata.Rechecked pass-2 #1751, its review and its uncertain findings. Copilot had no open issues and
dalexsotoapproved that PR.Fixes and evidence
Locale.Builderbehavior for Android 5 and 6 versus Android 7 through 17: extension and keyword removal, retained Unicode state, null and empty tags, trailing separators, locale validation and legacy variants. The old parser drops trailing empty split tokens; the newer parser validates them. See Android 5 builder, Android 5 tag parser, Android 6 builder, Android 7 variant validation, and Android 17 tag parsing.Locale.Ofis available from API 36; the older constructor also accepts unchecked variants.HashMapandHashtablecallback modification-check boundaries, and the Android 7 versus 8-and-laterHashtablenull handling. See Android 8 HashMap, Android 14 HashMap, Android 7 Map defaults, Android 8 Hashtable, and Android 14 Hashtable.Calendar.Builderdefault locale and time zone, ISO week rules, and managed field and day names. CorrectAreFieldsSetto allow partially synchronized fields. See Android 13 defaults, Android 14 defaults and week rules, and field synchronization.Arrayssignatures. For example, the managedAsListdeclaration has only theaparameter.AbstractListindexed mutations andAbstractMap.Putthrow, while subclasses can override them; describeAbstractMapentry and key returns as managed collection views. See AbstractList, AbstractMap, and its managed return type.Collections.Shufflebinding: it reuses aJavaList<object>peer, but copies other managed lists and does not copy the shuffled order back. Also correct the backing-call claim forNewSequencedSetFromMapand distinguish Java wrapper exceptions from managed behavior for unmodifiable views. See the collection generator, JavaList marshalling, and Java collection implementations.LinkedHashMap.PutFirstandPutLastfor an overridden eldest-entry eviction policy, and describe its sequenced views. See LinkedHashMap.INavigableMapview can produce a managedArgumentExceptionwhenJavaDictionarywraps Java exceptions. See JavaDictionary.Put.Properties.StoreToXML. See ResourceBundle.Control and XMLUtils.Random.Fromwrapper: random generation delegates, but protectedNextandSetSeedthrow. See Random.Vector.ForEachsummary for concurrent modification. See LocaleMatcher, Java enum lookup, and Vector.ForEach.transferdescriptions for the affected constructors: the flags control release of the incoming reference and peer registration. See Object.SetHandle and JNIEnv.DeleteRef.Uncertain findings
None in scope.
Checks
Docs, API metadata, retained source and attribution anchors, exact new DocIds, scoped changes, andgit diff --check.gemini-4-argonindependent review of both fix commits found no actionable issues; model use was verified in localassistant_usage_events.The Android SDK source archive used for the current review is
source-37.2_r01.zip, SHA-2569d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84. The bindings are based on platform 37.2 r02; r01 was not used to override contradictory r02 facts.