Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

无用代码 #4317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/main/java/com/alibaba/fastjson/JSONPath.java
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,8 @@ private static void paths(Map<Object, String> values, Map<String, Object> paths,
Map<String, Object> fieldValues = javaBeanSerializer.getFieldValuesMap(javaObject);
for (Map.Entry<String, Object> entry : fieldValues.entrySet()) {
String key = entry.getKey();

if (key instanceof String) {
String path = parent.equals("/") ? "/" + key : parent + "/" + key;
paths(values, paths, path, entry.getValue(), config);
}
String path = parent.equals("/") ? "/" + key : parent + "/" + key;
paths(values, paths, path, entry.getValue(), config);
}
} catch (Exception e) {
throw new JSONException("toJSON error", e);
Expand Down Expand Up @@ -4086,7 +4083,6 @@ protected void deepSet(final Object currentObject, final String propertyName, lo
Map map = (Map) currentObject;

if (map.containsKey(propertyName)) {
Object val = map.get(propertyName);
map.put(propertyName, value);
return;
}
Expand Down