Skip to content
Snippets Groups Projects
Commit 937adfe0 authored by KB Sriram's avatar KB Sriram Committed by Thai Duong
Browse files

Fix mutable bytearrays returned/used by some APIs.

Certain APIs and classes retain or return bytearrays
which can be mutated by the callers.

1. Use @Immutable annotations to statically check
   if a class exposes any mutable data.
2. Add an ImmutableByteArray class that prevents mutable
   bytearrays by making or returning a copy of an underlying
   set of bytes.

Change-Id: I2c5804eeb3d2e736eb45bb3283979b2874b5d7b4
ORIGINAL_AUTHOR=KB Sriram <kbsriram@google.com>
GitOrigin-RevId: 1c9804a2101360ddf41db719eef1d763e965d9ed
parent f157bd17
No related branches found
No related tags found
Loading
Showing with 182 additions and 16 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment