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

Commit fb440c2c authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Remove usage of hidden InetSocketAddress constructor

The constructor is a hidden API, and used in a code path that can
never happen.
Replace it with a thrown exception (which should never be thrown either).

Bug: 170598012
Change-Id: Ie2c671c1a75accb8e94b08de9901d14b72caaf7e
Test: m
parent 7a46c3c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -114,10 +114,10 @@ public final class QosSocketInfo implements Parcelable {
        try {
            return new InetSocketAddress(InetAddress.getByAddress(address), port);
        } catch (final UnknownHostException e) {
            /* The catch block was purposely left empty.  UnknownHostException will never be thrown
            /* This can never happen. UnknownHostException will never be thrown
               since the address provided is numeric and non-null. */
            throw new RuntimeException("UnknownHostException on numeric address", e);
        }
        return new InetSocketAddress();
    }

    @Override