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

Commit f1b91b3c authored by Shai Barack's avatar Shai Barack
Browse files

Capture unused return value in `Message.sendToTarget()`.

The return value of `target.sendMessage(this)` is now assigned to an `unused` boolean variable. This suppresses an ErrorProne warning that we can safely ignore.

Flag: EXEMPT cleanup
Change-Id: Iab1a98b54d4019c65d12f2be314d182e459ac239
parent dc33f8b1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -557,7 +557,8 @@ public final class Message implements Parcelable {
     * Throws a null pointer exception if this field has not been set.
     */
    public void sendToTarget() {
        target.sendMessage(this);
        // We have no use for the return value, so ignore it.
        boolean unused = target.sendMessage(this);
    }

    /**