Fix NPE in toString

bug:2965739
Change-Id: Ic3f274cba8ac668d86a8f69f1b2b738d348b3977
This commit is contained in:
Robert Greenwalt 2010-09-01 09:12:38 -07:00
commit e422ad9819

View file

@ -75,8 +75,12 @@ public class ProxyProperties implements Parcelable {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(mProxy.getHostAddress()).append(":").append(mPort)
.append(" xl=").append(mExclusionList);
if (mProxy != null) {
sb.append(mProxy.getHostAddress()).append(":").append(mPort);
if (mExclusionList != null) {
sb.append(" xl=").append(mExclusionList);
}
}
return sb.toString();
}