Skip to content

Commit 4beced4

Browse files
authored
Update AbstractObjectParser.java
简化字符串判断
1 parent 07bc899 commit 4beced4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ else if ((method == POST || method == PUT) && value instanceof JSONArray
261261
&& JSONRequest.isTableArray(key)) { // JSONArray,批量新增或修改,往下一级提取
262262
onTableArrayParse(key, (JSONArray) value);
263263
}
264-
else if (method == PUT && value instanceof JSONArray && (whereList == null || whereList.contains(key) == false) && (StringUtil.isName(key) || ((key.endsWith("+") || key.endsWith("-")) && StringUtil.isName(key.substring(0, key.length()-1)))))
264+
else if (method == PUT && value instanceof JSONArray && (whereList == null || whereList.contains(key) == false) && StringUtil.isName(key.replaceFirst("[+-]$", "")))
265265
{ // PUT JSONArray
266266
onPUTArrayParse(key, (JSONArray) value);
267267
}

0 commit comments

Comments
 (0)