Commit aad58640dcaab7bed4f9720b57bb7f0cc2c4e343
1 parent
2211a757
翻转""为equals调用方,防止空指针异常
Showing
1 changed file
with
1 additions
and
1 deletions
ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
| @@ -204,7 +204,7 @@ public class HttpUtils | @@ -204,7 +204,7 @@ public class HttpUtils | ||
| 204 | String ret = ""; | 204 | String ret = ""; |
| 205 | while ((ret = br.readLine()) != null) | 205 | while ((ret = br.readLine()) != null) |
| 206 | { | 206 | { |
| 207 | - if (ret != null && !ret.trim().equals("")) | 207 | + if (ret != null && !"".equals(ret.trim())) |
| 208 | { | 208 | { |
| 209 | result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8")); | 209 | result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8")); |
| 210 | } | 210 | } |