You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/04/13 16:27:03 UTC
incubator-tinkerpop git commit: Move propertyRemovalNotSupported
execption from Element to Property. TINKERPOP3-621
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 8806a2704 -> fd5197d64
Move propertyRemovalNotSupported execption from Element to Property. TINKERPOP3-621
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fd5197d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fd5197d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fd5197d6
Branch: refs/heads/master
Commit: fd5197d644ec0624cb8559f8844bf938011e4be0
Parents: 8806a27
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 10:26:16 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 10:26:16 2015 -0400
----------------------------------------------------------------------
.../apache/tinkerpop/gremlin/structure/Element.java | 4 ----
.../apache/tinkerpop/gremlin/structure/Property.java | 4 ++++
.../structure/util/detached/DetachedProperty.java | 2 +-
.../util/detached/DetachedVertexProperty.java | 3 +--
.../structure/util/reference/ReferenceProperty.java | 2 +-
.../util/reference/ReferenceVertexProperty.java | 2 +-
.../gremlin/structure/util/star/StarGraph.java | 2 +-
.../gremlin/structure/FeatureSupportTest.java | 14 +++++++++-----
8 files changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Element.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Element.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Element.java
index a0130eb..72df6e7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Element.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Element.java
@@ -135,10 +135,6 @@ public abstract interface Element {
return new IllegalStateException("Property addition is not supported");
}
- public static IllegalStateException propertyRemovalNotSupported() {
- return new IllegalStateException("Property removal is not supported");
- }
-
public static IllegalArgumentException labelCanNotBeNull() {
return new IllegalArgumentException("Label can not be null");
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Property.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Property.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Property.java
index 96685fa..cf94618 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Property.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Property.java
@@ -162,6 +162,10 @@ public interface Property<V> {
public static IllegalArgumentException dataTypeOfPropertyValueNotSupported(final Object val) {
return new IllegalArgumentException(String.format("Property value [%s] is of type %s is not supported", val, val.getClass()));
}
+
+ public static IllegalStateException propertyRemovalNotSupported() {
+ return new IllegalStateException("Property removal is not supported");
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedProperty.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedProperty.java
index 2ebee47..1394f89 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedProperty.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedProperty.java
@@ -75,7 +75,7 @@ public class DetachedProperty<V> implements Property, Serializable, Attachable<P
@Override
public void remove() {
- throw Element.Exceptions.propertyRemovalNotSupported();
+ throw Property.Exceptions.propertyRemovalNotSupported();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexProperty.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexProperty.java
index ac01526..87b8178 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexProperty.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexProperty.java
@@ -18,7 +18,6 @@
*/
package org.apache.tinkerpop.gremlin.structure.util.detached;
-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.Vertex;
@@ -97,7 +96,7 @@ public class DetachedVertexProperty<V> extends DetachedElement<Property<V>> impl
@Override
public void remove() {
- throw Element.Exceptions.propertyRemovalNotSupported();
+ throw Property.Exceptions.propertyRemovalNotSupported();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceProperty.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceProperty.java
index 689ec3e..47850f5 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceProperty.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceProperty.java
@@ -106,6 +106,6 @@ public class ReferenceProperty<V> implements Attachable<Property>, Serializable,
@Override
public void remove() {
- throw Element.Exceptions.propertyRemovalNotSupported();
+ throw Property.Exceptions.propertyRemovalNotSupported();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java
index 073529c..c4cdcf4 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java
@@ -96,7 +96,7 @@ public class ReferenceVertexProperty<V> extends ReferenceElement<VertexProperty>
@Override
public void remove() {
- throw Element.Exceptions.propertyRemovalNotSupported();
+ throw Property.Exceptions.propertyRemovalNotSupported();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java
index 654332a..1f71986 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java
@@ -634,7 +634,7 @@ public final class StarGraph implements Graph {
@Override
public void remove() {
- throw Element.Exceptions.propertyRemovalNotSupported();
+ throw Exceptions.propertyRemovalNotSupported();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd5197d6/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
index 706c363..ed1df4e 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
@@ -160,7 +160,9 @@ public class FeatureSupportTest {
"vertexAdditionsNotSupported"
})
@ExceptionCoverage(exceptionClass = Element.Exceptions.class, methods = {
- "propertyAdditionNotSupported",
+ "propertyAdditionNotSupported"
+ })
+ @ExceptionCoverage(exceptionClass = Property.Exceptions.class, methods = {
"propertyRemovalNotSupported"
})
public static class VertexFunctionalityTest extends AbstractGremlinTest {
@@ -311,7 +313,7 @@ public class FeatureSupportTest {
v.property("name").remove();
fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexFeatures.class.getSimpleName(), VertexFeatures.FEATURE_REMOVE_PROPERTY));
} catch (Exception e) {
- validateException(Element.Exceptions.propertyRemovalNotSupported(), e);
+ validateException(Property.Exceptions.propertyRemovalNotSupported(), e);
}
}
}
@@ -329,7 +331,9 @@ public class FeatureSupportTest {
"userSuppliedIdsOfThisTypeNotSupported"
})
@ExceptionCoverage(exceptionClass = Element.Exceptions.class, methods = {
- "propertyAdditionNotSupported",
+ "propertyAdditionNotSupported"
+ })
+ @ExceptionCoverage(exceptionClass = Property.Exceptions.class, methods = {
"propertyRemovalNotSupported"
})
public static class EdgeFunctionalityTest extends AbstractGremlinTest {
@@ -502,7 +506,7 @@ public class FeatureSupportTest {
e.property("name").remove();
fail(String.format(INVALID_FEATURE_SPECIFICATION, EdgeFeatures.class.getSimpleName(), EdgeFeatures.FEATURE_REMOVE_PROPERTY));
} catch (Exception ex) {
- validateException(Element.Exceptions.propertyRemovalNotSupported(), ex);
+ validateException(Property.Exceptions.propertyRemovalNotSupported(), ex);
}
}
}
@@ -737,7 +741,7 @@ public class FeatureSupportTest {
p.property("test").remove();
fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexPropertyFeatures.class.getSimpleName(), VertexPropertyFeatures.FEATURE_REMOVE_PROPERTY));
} catch (Exception ex) {
- validateException(Element.Exceptions.propertyRemovalNotSupported(), ex);
+ validateException(Property.Exceptions.propertyRemovalNotSupported(), ex);
}
}