summaryrefslogtreecommitdiff
path: root/ojluni/annotations/sdk/nullability/java/util/Set.annotated.java
Commit message (Collapse)AuthorAgeFilesLines
* Add nullability annotations for Map's and Set's copyOf methodNikita Iashchenko2021-03-031-0/+2
| | | | | Test: m update-api Change-Id: I5139d8c8063976e7e2e35a970e21c90b8bb96567
* Update misc java.util classes to OpenJDK 9+181 and immediately expose APITobias Thierer2020-01-171-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This covers - integration of all changes from OpenJDK 9+181 into java.util.{AbstractList,List,Map,Objects,Set}. - Map, List, Set gain static of() / ofEntries() factory methods. - Objects gains misc static checker methods. - When implementing RandomAccess, AbstractList.spliterator() as well as subList.spliterator() is now built on top of random-access List.get(int) rather than List.iterator(). - addition of various new files that are needed by those. - addition of Nullablity annotations for the new APIs. Changes to reference upstream versions -------------------------------------- While the other files were previously derived from OpenJDK 8u121-b13, Map.java was previously derived from OpenJDK 9b113+. After this CL, all of the touched files derive from OpenJDK 9+181 with no further changes waiting to be integrated; Android-changed and similar markers note where Android carries local patches. Notes on test coverage ---------------------- This CL adds test coverage for the new APIs/behavior. The test coverage for Set.of() duplicates a bunch of logic from the List.of() coverage. I experimented with ways to reuse code but that reduced clarity and I didn't want to spend a lot of effort on a major rearchitecture of the tests. AbstractListTest asserts that iterator() is not called while exercising basic existing Android spliterator, and checks the fail-fast behavior guaranteed by the documentation. Bug: 147483640 Test: atest CtsLibcoreTestCases:libcore.java.util.{Map,List,Set}OfTest Test: atest CtsLibcoreTestCases:libcore.java.util.{AbstractList,Objects}Test Test: atest CtsLibcoreTestCases Test: Checked how the added @implSpec appear in generated docs: they appear under headings "Implementation Requirements:". Change-Id: I362ec405b270ba00fe3176dc19f08943b7d350d5
* Move .annotated.java files into an 'sdk' subdirectory.Pete Gillin2018-09-181-0/+65
All of the current annotations are intended for use in the SDK build, and live at ojluni/annotations. In order to make room for annotated stubs for other purposes, this change moves them. There is a README that describes the intended directory structure. (N.B. Validation of the nullability stubs is not landed yet but is described here in anticipation.) Bug: 115746226 Test: `make api-stubs-docs` Change-Id: I7cfbdb5dc9888f796eb1f384155fce33125a7d9e