Java Platform, Standard Edition API Specification¶
Oracle Corporation. (2021). Java Platform, Standard Edition API Specification: java.util.Arrays.asList and java.util.Collections.unmodifiableList (optional operations).
Cited by¶
1 citation across 1 artifact.
Each citation links to the sentence it supports in the citing article.
Domain-specific¶
- Liskov Substitution Principle
- But
Arrays.asList(...)returns a fixed-size list, andCollections.unmodifiableList(...)an immutable view; both implementListyet throwUnsupportedOperationExceptionfromaddThis sourceThe Java SE API specification for Arrays.asList, Collections.unmodifiableList and List.add, where add is an optional operation and unmodifiable views throw UnsupportedOperationException on any attempt to modify.
- But
Verification¶
This reference passed the adversarial substantiation pipeline: it was checked to exist and to support the claim it is attached to. See how references were verified.
Registry ID ref:e5d36ef31666 · see in the full table