Merge "Fix NPE in toString"

This commit is contained in:
Robert Greenwalt
2010-09-01 16:18:01 -07:00
committed by Android (Google) Code Review

View File

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