Fix null qstring.

This commit is contained in:
Kavin 2023-11-20 06:09:26 +00:00
parent 8d04aca336
commit fdbeffaf37
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F

View File

@ -135,18 +135,16 @@ public class URLUtils {
StringBuilder qstring = null;
if (hasQuery) {
for (List<String> pair : queryPairs) {
if (qstring == null) {
qstring = new StringBuilder();
} else {
qstring.append("&");
}
qstring.append(pair.get(0));
qstring.append("=");
qstring.append(pair.get(1));
for (List<String> pair : queryPairs) {
if (qstring == null) {
qstring = new StringBuilder();
} else {
qstring.append("&");
}
qstring.append(pair.get(0));
qstring.append("=");
qstring.append(pair.get(1));
}
newUrl += "?" + qstring;