Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a3c6ee0
Redundant condition: "(o == null || !(o instanceof X))" is always th…
Jan 27, 2022
ca7beac
Updated dependency ?
Jan 27, 2022
df54488
Redundant condition: "(o == null || !(o instanceof X))" is always th…
Jan 27, 2022
49bafa3
Replace loop with Arrays.fill
Jan 27, 2022
e227a94
Use Math.min/max
Jan 27, 2022
8cd75af
Replace duplicate code.
Jan 27, 2022
9dd0c6a
Replace duplicate code.
Jan 27, 2022
2bc79d7
Redundant null check, can never be NULL. Error?
Jan 27, 2022
1dca191
Optional API
Jan 27, 2022
c1934e8
Redundant explicit array creation.
Jan 27, 2022
f3eaf59
Unnecessary String.length()
Jan 27, 2022
7357a84
Redundant cast removed.
Jan 27, 2022
9f67cf9
Simplified stream usage.
Jan 27, 2022
dbe682c
Use String instead
Jan 27, 2022
72157ed
Improved type declaration avoids class casts.
Jan 27, 2022
0659287
Use empty <> instead.
Jan 27, 2022
db489c3
Collapse catch blocks.
Jan 27, 2022
3bfed20
Use modern try with resource management
Jan 27, 2022
e42243c
Replace with lambda.
Jan 27, 2022
2ca93b1
Use List.sort(...)
Jan 27, 2022
7f8e26a
Use Comparator.comparing
Jan 27, 2022
3342a8c
Replace lambda with method reference (better readability)
Jan 27, 2022
cd4b7de
Replace lambda with method reference (better readability)
Jan 27, 2022
2b52cad
Use modern Map api.
Jan 27, 2022
dcf0340
Use expression lambda.
Jan 27, 2022
e54888f
Use enhanced for loop
Jan 27, 2022
48bbe80
Remove unnecessary boxing.
Jan 27, 2022
8162b8e
Remove unnecessary unboxing.
Jan 27, 2022
7c9b7ac
USe contains(...)
Jan 27, 2022
bf6ecec
Use modern, enhanced for-loop.
Jan 27, 2022
acb0f9b
Inner class can be static
Jan 27, 2022
696a0bf
Use parametrized constructor.
Jan 27, 2022
5e0e1fe
Use System.arraycopy
Jan 27, 2022
6699e15
Use Collections.addAll
Jan 27, 2022
d85d84e
Replace unpredictable constructor call
Jan 27, 2022
590b02f
Fixed compile error
Jan 27, 2022
67cd45e
Undo 'redundant cast removed'
Jan 27, 2022
c40f373
Fixed compile error.
Jan 27, 2022
cbf2864
Fixed compile error.
Jan 27, 2022
651976b
Undo 'Redundant cast removed'.
Jan 27, 2022
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
Prev Previous commit
Next Next commit
Use String instead
  • Loading branch information
hr.stoyanov committed Jan 27, 2022
commit dbe682cd2283f832b61970a2564054c5b530b191
9 changes: 4 additions & 5 deletions engine/src/main/java/com/arcadedb/graph/ImmutableEdge.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,9 @@ protected boolean checkForLazyLoading() {

@Override
public synchronized String toString() {
final StringBuilder buffer = new StringBuilder();
buffer.append(out.toString());
buffer.append("<->");
buffer.append(in.toString());
return buffer.toString();
String buffer = out.toString() +
"<->" +
in.toString();
return buffer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ public synchronized JSONObject toJSON() {

@Override
public synchronized String toString() {
final StringBuilder buffer = new StringBuilder();
buffer.append(out.toString());
buffer.append("<->");
buffer.append(in.toString());
return buffer.toString();
String buffer = out.toString() +
"<->" +
in.toString();
return buffer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,34 +103,31 @@ public void testLongPath2() {

@Test
public void testFilterTypes() {
StringBuilder query = new StringBuilder();
query.append("MATCH {");
query.append(" type: 'v', ");
query.append(" as: foo, ");
query.append(" where: (name = 'foo' and surname = 'bar' or aaa in [1,2,3]), ");
query.append(" maxDepth: 10 ");
query.append("} return foo");
checkRightSyntax(query.toString());
String query = "MATCH {" +
" type: 'v', " +
" as: foo, " +
" where: (name = 'foo' and surname = 'bar' or aaa in [1,2,3]), " +
" maxDepth: 10 " +
"} return foo";
checkRightSyntax(query);
}

@Test
public void testFilterTypes2() {
StringBuilder query = new StringBuilder();
query.append("MATCH {");
query.append(" types: ['V', 'E'], ");
query.append(" as: foo, ");
query.append(" where: (name = 'foo' and surname = 'bar' or aaa in [1,2,3]), ");
query.append(" maxDepth: 10 ");
query.append("} return foo");
checkRightSyntax(query.toString());
String query = "MATCH {" +
" types: ['V', 'E'], " +
" as: foo, " +
" where: (name = 'foo' and surname = 'bar' or aaa in [1,2,3]), " +
" maxDepth: 10 " +
"} return foo";
checkRightSyntax(query);
}

@Test
public void testMultiPath() {
StringBuilder query = new StringBuilder();
query.append("MATCH {}");
query.append(" .(out().in(){type:'v'}.both('Foo')){maxDepth: 3}.out() return foo");
checkRightSyntax(query.toString());
String query = "MATCH {}" +
" .(out().in(){type:'v'}.both('Foo')){maxDepth: 3}.out() return foo";
checkRightSyntax(query);
}

@Test
Expand Down