Merge "Add some input checking to prevent problems" am: 0efe4aa812

Original change: undetermined

Change-Id: I4325bf00071f4319cbcec678ce7937915ab44a6a
This commit is contained in:
Robert Greenwalt
2021-05-31 04:13:19 +00:00
committed by Automerger Merge Worker

View File

@@ -91,7 +91,7 @@ public class LinkProperties implements Parcelable {
}
public void addLinkAddress(LinkAddress address) {
mLinkAddresses.add(address);
if (address != null) mLinkAddresses.add(address);
}
public Collection<LinkAddress> getLinkAddresses() {
@@ -99,7 +99,7 @@ public class LinkProperties implements Parcelable {
}
public void addDns(InetAddress dns) {
mDnses.add(dns);
if (dns != null) mDnses.add(dns);
}
public Collection<InetAddress> getDnses() {
@@ -107,7 +107,7 @@ public class LinkProperties implements Parcelable {
}
public void addGateway(InetAddress gateway) {
mGateways.add(gateway);
if (gateway != null) mGateways.add(gateway);
}
public Collection<InetAddress> getGateways() {
return Collections.unmodifiableCollection(mGateways);