翻转""为equals调用方,防止空指针异常

This commit is contained in:
Sxile 2020-07-17 11:10:14 +08:00
parent 2211a75704
commit aad58640dc
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ public class HttpUtils
String ret = ""; String ret = "";
while ((ret = br.readLine()) != null) while ((ret = br.readLine()) != null)
{ {
if (ret != null && !ret.trim().equals("")) if (ret != null && !"".equals(ret.trim()))
{ {
result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8")); result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8"));
} }