diff options
| author | Tobias Thierer <tobiast@google.com> | 2018-12-11 17:14:44 +0000 |
|---|---|---|
| committer | Tobias Thierer <tobiast@google.com> | 2018-12-11 18:12:27 +0000 |
| commit | 66b2b00a657c6a568991f80350a15206419208ee (patch) | |
| tree | 054ce6194c72a169c22d76b35aeeb888c5dcbfe7 /annotations/generate_annotated_java_files.py | |
| parent | d853723d63578925added878ba66d52a4651e382 (diff) | |
Disallow construction of DexPathList.Element with path == dexFile == null.
Before this CL, the constructor invocations:
new Element(null, null)
new Element(null, false, null, null)
would have resulted in an Element with path == dexFile == null.
Such an element would make no sense and would have thrown NPE
during toString().
This CL changes the constructor behavior to throw NPE at construction
time instead. For the legacy constructor, this error condition is
checked ahead of other unsupported invocations. The behavior change
should only affect invalid uses that we do not want to support.
The guarantee that at least one of { path, dexFile } is != null
allowed a slight simplification of the toString() implementation.
Test: CtsLibcoreTestCases
Change-Id: I3ff513f82cdc62ff39b59c60a84cf8b4b83b6ce4
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions
