Do not merge: Add some input checking to prevent problems
Adding nulls can cause unhappiness. It's suspected as a cause of 3495045. bug:3495045 Change-Id: I925c965ef64032fc57849bf15fe9b11f4bc99351
This commit is contained in:
committed by
Wink Saville
parent
b7c92c720f
commit
dab2c6223e
@@ -91,7 +91,7 @@ public class LinkProperties implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addLinkAddress(LinkAddress address) {
|
public void addLinkAddress(LinkAddress address) {
|
||||||
mLinkAddresses.add(address);
|
if (address != null) mLinkAddresses.add(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<LinkAddress> getLinkAddresses() {
|
public Collection<LinkAddress> getLinkAddresses() {
|
||||||
@@ -99,7 +99,7 @@ public class LinkProperties implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addDns(InetAddress dns) {
|
public void addDns(InetAddress dns) {
|
||||||
mDnses.add(dns);
|
if (dns != null) mDnses.add(dns);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<InetAddress> getDnses() {
|
public Collection<InetAddress> getDnses() {
|
||||||
@@ -107,7 +107,7 @@ public class LinkProperties implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addGateway(InetAddress gateway) {
|
public void addGateway(InetAddress gateway) {
|
||||||
mGateways.add(gateway);
|
if (gateway != null) mGateways.add(gateway);
|
||||||
}
|
}
|
||||||
public Collection<InetAddress> getGateways() {
|
public Collection<InetAddress> getGateways() {
|
||||||
return Collections.unmodifiableCollection(mGateways);
|
return Collections.unmodifiableCollection(mGateways);
|
||||||
|
|||||||
Reference in New Issue
Block a user