Skip to content

Commit 91dc097

Browse files
committed
chore: minor changes
1 parent 6c58085 commit 91dc097

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

engine/src/main/java/com/arcadedb/graph/ImmutableEdge.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,15 @@ public synchronized JSONObject toJSON(final boolean includeMetadata) {
167167

168168
@Override
169169
public synchronized String toString() {
170-
final StringBuilder buffer = new StringBuilder();
171-
buffer.append(out != null ? out.toString() : "?");
172-
buffer.append("<->");
173-
buffer.append(in != null ? in.toString() : "?");
174-
return buffer.toString();
170+
if (out == null && in == null)
171+
return rid.toString();
172+
else {
173+
final StringBuilder buffer = new StringBuilder();
174+
buffer.append(out != null ? out.toString() : "?");
175+
buffer.append("<->");
176+
buffer.append(in != null ? in.toString() : "?");
177+
return buffer.toString();
178+
}
175179
}
176180

177181
@Override

engine/src/test/java/com/arcadedb/TransactionIsolationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void testRepeatableRead() throws InterruptedException {
229229
assertThat(
230230
database.query("sql", "select from Node where id = 0")
231231
.nextIfAvailable()
232-
.<String>getProperty("modified")
232+
.<Boolean>getProperty("modified")
233233
).isNull();
234234

235235
sem3.await();
@@ -238,7 +238,7 @@ public void testRepeatableRead() throws InterruptedException {
238238
assertThat(
239239
database.query("sql", "select from Node where id = 0")
240240
.nextIfAvailable()
241-
.<String>getProperty("modified")
241+
.<Boolean>getProperty("modified")
242242
).isNull();
243243

244244
} catch (InterruptedException e) {

0 commit comments

Comments
 (0)