fix: minor fix in move function, issue
@@ -76,12 +76,16 @@ public abstract class OSQLFunctionMove extends OSQLFunctionConfigurableAbstract
final OIdentifiable iRecord,
final ODirection iDirection,
final String[] iLabels) {
+ if (iRecord != null) {
OElement rec = iRecord.getRecord();
if (rec != null && rec.isVertex()) {
return rec.asVertex().get().getVertices(iDirection, iLabels);
} else {
return null;
}
+ } else {
+ return null;
+ }
}
protected Object v2e(
@@ -89,12 +93,16 @@ public abstract class OSQLFunctionMove extends OSQLFunctionConfigurableAbstract
final OIdentifiable iRecord,
final ODirection iDirection,
final String[] iLabels) {
+ if (iRecord != null) {
OElement rec = iRecord.getRecord();
if (rec != null && rec.isVertex()) {
return rec.asVertex().get().getEdges(iDirection, iLabels);
} else {
return null;
}
+ } else {
+ return null;
+ }
}
protected Object e2v(
@@ -102,6 +110,7 @@ public abstract class OSQLFunctionMove extends OSQLFunctionConfigurableAbstract
final OIdentifiable iRecord,
final ODirection iDirection,
final String[] iLabels) {
+ if (iRecord != null) {
OElement rec = iRecord.getRecord();
if (rec.isEdge()) {
if (iDirection == ODirection.BOTH) {
@@ -114,5 +123,8 @@ public abstract class OSQLFunctionMove extends OSQLFunctionConfigurableAbstract
} else {
return null;
}
+ } else {
+ return null;
+ }
}
}
