抽离部分java代码中的字符串,equals判断常量放在前面

This commit is contained in:
kehaoyuan
2017-10-14 15:52:15 +08:00
parent 4290846698
commit 52433ba347
36 changed files with 75 additions and 60 deletions

View File

@ -249,7 +249,7 @@ public class CommentUtils {
if (exception.code() == 403) {
try {
String detail = new JSONObject(exception.response().errorBody().string()).getString("detail");
if (detail.equals("voted")) {
if ("voted".equals(detail)) {
Utils.toast(context, "已经点过赞啦!");
}
} catch (Exception ex) {