Merge "Remove usage of hidden InetSocketAddress constructor" am: 7e8db8aed8

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0e2bc5128658973dc873aa3f6eb41593d8d9a308
This commit is contained in:
Remi NGUYEN VAN
2021-03-12 09:30:30 +00:00
committed by Automerger Merge Worker

View File

@@ -114,10 +114,10 @@ public final class QosSocketInfo implements Parcelable {
try { try {
return new InetSocketAddress(InetAddress.getByAddress(address), port); return new InetSocketAddress(InetAddress.getByAddress(address), port);
} catch (final UnknownHostException e) { } 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. */ since the address provided is numeric and non-null. */
throw new RuntimeException("UnknownHostException on numeric address", e);
} }
return new InetSocketAddress();
} }
@Override @Override