Cole-Greer commented on code in PR #3209:
URL: https://github.com/apache/tinkerpop/pull/3209#discussion_r2377241248
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/GValueConstantTraversal.java:
##########
@@ -57,6 +57,17 @@ public boolean equals(final Object other) {
return constantTraversal.equals(other);
}
+ @Override
+ public GValueConstantTraversal<S, E> clone() {
+ GValueConstantTraversal<S, E> clone = new
GValueConstantTraversal<>(GValue.of(this.end.getName(), this.end.get()));
+ try {
+ clone.setGValueManager(this.getGValueManager().clone());
+ } catch (CloneNotSupportedException e) { //TODO:: handle properly
Review Comment:
I'm still leaving this scope to a followup on cloning, although
`AbstractLambdaTraversal.clone()` does not throw `CloneNotSupportedException`
so adding it to the try does not have any effect. There's actually no way for
`GValue` or `GValueManager` to throw `CloneNotSupportedException` either given
the current implementation, so in the followup this will be corrected and the
try-catch will go away altogether.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]