抽离部分java代码中的字符串,equals判断常量放在前面
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user