Skip to content

Commit

Permalink
Merge pull request #2 from Apaq/clean
Browse files Browse the repository at this point in the history
Cleans up type defs.
  • Loading branch information
michaelkrog authored Oct 20, 2023
2 parents 2c1ac0d + 17bb03c commit 746b5ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class JacksonTreeNodeMapper extends ObjectMapper {

@Override
protected Object _readMapAndClose(JsonParser jp, JavaType valueType) throws IOException {
TreeNode node = jp.readValueAsTree();
var node = jp.readValueAsTree();
TreeNodeHolder.set(node);
return super._readMapAndClose(node.traverse(), valueType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public class TreeNodePropertyReferenceConverter implements PropertyReferenceConv

@Override
public Collection<String> translate(TreeNode input) {
List<String> refs = new ArrayList<>();
var refs = new ArrayList<String>();
if(input.isObject()) {
traverseObject(input, refs, new ArrayList());
traverseObject(input, refs, new ArrayList<>());
}
return refs;
}
Expand Down Expand Up @@ -58,7 +58,7 @@ private void traverse(TreeNode child, List<String> fields, List<String> path) {
}

private void traverseValue(List<String> path, List<String> fields) {
String strPath = String.join("", path);
var strPath = String.join("", path);
if(strPath.startsWith(".")) {
strPath = strPath.substring(1);
}
Expand Down

0 comments on commit 746b5ed

Please sign in to comment.