Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46a0da8e authored by François Degros's avatar François Degros
Browse files

Ensure that ArchiveHandle.getInputStream() cannot return null

Simplify ArchiveEntryInputStream.create() by using more modern Java
constructs. This makes the structure of this method more obvious.
Ensure that it cannot return a null value.
Mark the return type of this method as @NonNull.
Throw an IllegalArgumentException if the passed archive has an
unexpected type. Note that this condition can never happen with the
current implementation of ArchiveHandle.
Mark the return type of ArchiveHandle.getInputStream() as @NonNull.

This guaranteed non-null return value will simplify the implementation
of the upcoming UnpackJob class.

Bug: 406328303
Flag: EXEMPT no functional change with the current code
Test: atest DocumentsUIGoogleTests:com.android.documentsui.archives
Change-Id: Iefa02e7301b607b0d1396d9f84c5d979670b7d42
parent 25240f01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment