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

Commit 85e2b01a authored by Felipe Leme's avatar Felipe Leme
Browse files

Checks for null id on LocusId constructor.

Test: atest CtsContentTestCases:LocusIdTest

Bug: 126945732

Change-Id: Ifbffae6cc287861f78d19921b35a26e624038168
parent 35a827b9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -37,9 +37,11 @@ public final class LocusId implements Parcelable {

    /**
     * Default constructor.
     *
     * @throws IllegalArgumentException if {@code id} is empty or {@code null}.
     */
    public LocusId(@NonNull String id) {
        mId = Preconditions.checkNotNull(id);
        mId = Preconditions.checkStringNotEmpty(id, "id cannot be empty");
    }

    /**