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
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();
}