Deprecate mutable API of PrimitiveSet.
Some package-private methods that are not used anymore in the package can be removed completely:
- newPrimitiveSetWithAnnotations: Now annotations can only be set with the builder API.
- makeImmutable: Immutable objects can now only be created with the builder API. And we can make the isMutable variable final.
Also, annotate getPrimary with @Nullable, and add a test that shows that indeed null is returned when no primary is set.
PiperOrigin-RevId: 455380275
Change-Id: If208f869b0418e14c653001f5f0263c0b136db6d
3 files changed