You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/05/29 19:07:10 UTC
incubator-tinkerpop git commit: fixed a bug in Exception throwing.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/neo4j-gremlin-apache 364a24345 -> 24c88a0b9
fixed a bug in Exception throwing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/24c88a0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/24c88a0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/24c88a0b
Branch: refs/heads/neo4j-gremlin-apache
Commit: 24c88a0b94042f0e3c243e42bf7d24c8bdcbb974
Parents: 364a243
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri May 29 11:07:22 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri May 29 11:07:22 2015 -0600
----------------------------------------------------------------------
.../structure/trait/MultiMetaNeo4jTrait.java | 21 ++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/24c88a0b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/trait/MultiMetaNeo4jTrait.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/trait/MultiMetaNeo4jTrait.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/trait/MultiMetaNeo4jTrait.java
index 9133921..6b4b2a3 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/trait/MultiMetaNeo4jTrait.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/trait/MultiMetaNeo4jTrait.java
@@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jHelper;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jProperty;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jVertex;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jVertexProperty;
+import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.gremlin.structure.T;
@@ -216,19 +217,19 @@ public class MultiMetaNeo4jTrait implements Neo4jTrait {
@Override
public <V> Property<V> getProperty(final Neo4jVertexProperty vertexProperty, final String key) {
- //try {
- final Neo4jNode vertexPropertyNode = Neo4jHelper.getVertexPropertyNode(vertexProperty);
- if (null != vertexPropertyNode && vertexPropertyNode.hasProperty(key))
- return new Neo4jProperty<>(vertexProperty, key, (V) vertexPropertyNode.getProperty(key));
- else
- return Property.empty();
- /*} catch (IllegalStateException ex) {
- throw Element.Exceptions.elementAlreadyRemoved(this.getClass(), this.id());
+ try {
+ final Neo4jNode vertexPropertyNode = Neo4jHelper.getVertexPropertyNode(vertexProperty);
+ if (null != vertexPropertyNode && vertexPropertyNode.hasProperty(key))
+ return new Neo4jProperty<>(vertexProperty, key, (V) vertexPropertyNode.getProperty(key));
+ else
+ return Property.empty();
+ } catch (IllegalStateException ex) {
+ throw Element.Exceptions.elementAlreadyRemoved(vertexProperty.getClass(), vertexProperty.id());
} catch (RuntimeException ex) {
if (Neo4jHelper.isNotFound(ex))
- throw Element.Exceptions.elementAlreadyRemoved(this.getClass(), this.id());
+ throw Element.Exceptions.elementAlreadyRemoved(vertexProperty.getClass(), vertexProperty.id());
throw ex;
- }*/
+ }
}
@Override