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 19:10:47 UTC
[1/4] incubator-tinkerpop git commit: Move
propertyRemovalNotSupported execption from Element to Property.
TINKERPOP3-621
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/TINKERPOP3-581 4a06aaf1c -> 9716d379d
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/TINKERPOP3-581
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);
}
}
[2/4] incubator-tinkerpop git commit: Removed the Graph.Helper
annotation and related infrastructure given TINKERPOP3-412
Posted by sp...@apache.org.
Removed the Graph.Helper annotation and related infrastructure given TINKERPOP3-412
Since GraphStrategy is no longer present and wrappers are not the go-to method for introducing "strategy" there isn't cause for confusion here anymore.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5f1d8ecc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5f1d8ecc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5f1d8ecc
Branch: refs/heads/TINKERPOP3-581
Commit: 5f1d8ecce811f0363bbf1203db067bc6c143944f
Parents: fd5197d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 11:35:04 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 11:35:04 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/structure/Element.java | 2 -
.../tinkerpop/gremlin/structure/Graph.java | 14 ----
.../tinkerpop/gremlin/structure/Property.java | 4 --
.../gremlin/structure/VertexProperty.java | 2 -
.../tinkerpop/gremlin/AbstractGremlinSuite.java | 71 --------------------
5 files changed, 93 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5f1d8ecc/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 72df6e7..d2e94b9 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
@@ -90,7 +90,6 @@ public abstract interface Element {
*
* @throws NoSuchElementException if the property does not exist on the {@code Element}.
*/
- @Graph.Helper
public default <V> V value(final String key) throws NoSuchElementException {
return this.<V>property(key).orElseThrow(() -> Property.Exceptions.propertyDoesNotExist(key));
}
@@ -104,7 +103,6 @@ public abstract interface Element {
/**
* Get the values of properties as an {@link Iterator}.
*/
- @Graph.Helper
public default <V> Iterator<V> values(final String... propertyKeys) {
return IteratorUtils.map(this.<V>properties(propertyKeys), property -> property.value());
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5f1d8ecc/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index 9cbdba4..fef8517 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -132,7 +132,6 @@ public interface Graph extends AutoCloseable {
* @param label the label of the vertex
* @return The newly created labeled vertex
*/
- @Graph.Helper
public default Vertex addVertex(final String label) {
return this.addVertex(T.label, label);
}
@@ -373,7 +372,6 @@ public interface Graph extends AutoCloseable {
/**
* Gets the variables of the {@link Graph} as a {@code Map}.
*/
- @Graph.Helper
public default Map<String, Object> asMap() {
final Map<String, Object> map = keys().stream()
.map(key -> Pair.with(key, get(key).get()))
@@ -1145,16 +1143,4 @@ public interface Graph extends AutoCloseable {
public @interface OptOuts {
OptOut[] value();
}
-
- /**
- * Defines a method as a "helper method". These methods will usually be default methods in the
- * core structure interfaces. Any method marked with this annotation represent methods that should not
- * be implemented by vendors. The test suite will enforce this convention and create a failure situation
- * if violated.
- */
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.METHOD)
- @Inherited
- public @interface Helper {
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5f1d8ecc/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 cf94618..7cd17ed 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
@@ -62,7 +62,6 @@ public interface Property<V> {
*
* @param consumer The consumer to process the existing value.
*/
- @Graph.Helper
public default void ifPresent(final Consumer<? super V> consumer) {
if (this.isPresent())
consumer.accept(this.value());
@@ -74,7 +73,6 @@ public interface Property<V> {
* @param otherValue The value to return if the property is not present
* @return A value
*/
- @Graph.Helper
public default V orElse(final V otherValue) {
return this.isPresent() ? this.value() : otherValue;
}
@@ -85,7 +83,6 @@ public interface Property<V> {
* @param valueSupplier The supplier to use to generate a value if the property is not present
* @return A value
*/
- @Graph.Helper
public default V orElseGet(final Supplier<? extends V> valueSupplier) {
return this.isPresent() ? this.value() : valueSupplier.get();
}
@@ -98,7 +95,6 @@ public interface Property<V> {
* @return A value
* @throws E if the property is not present, the exception is thrown
*/
- @Graph.Helper
public default <E extends Throwable> V orElseThrow(final Supplier<? extends E> exceptionSupplier) throws E {
if (this.isPresent()) return this.value();
else
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5f1d8ecc/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
index 4bdad8f..bf641da 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
@@ -53,7 +53,6 @@ public interface VertexProperty<V> extends Property<V>, Element {
* {@inheritDoc}
*/
@Override
- @Graph.Helper
public default Graph graph() {
return this.element().graph();
}
@@ -62,7 +61,6 @@ public interface VertexProperty<V> extends Property<V>, Element {
* {@inheritDoc}
*/
@Override
- @Graph.Helper
public default String label() {
return this.key();
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5f1d8ecc/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
index 4ab600f..f988add 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
@@ -59,18 +59,6 @@ import java.util.stream.Stream;
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
public abstract class AbstractGremlinSuite extends Suite {
-
- // todo: perhaps there is a test that validates against the implementations to be sure that the Graph constructed matches what's defined???
- private static final Set<Class> STRUCTURE_INTERFACES = new HashSet<Class>() {{
- add(Edge.class);
- add(Element.class);
- add(Graph.class);
- add(Graph.Variables.class);
- add(Property.class);
- add(Vertex.class);
- add(VertexProperty.class);
- }};
-
/**
* The GraphProvider instance that will be used to generate a Graph instance.
*/
@@ -127,9 +115,6 @@ public abstract class AbstractGremlinSuite extends Suite {
try {
final GraphProvider graphProvider = pair.getValue0().newInstance();
- validateStructureInterfacesRegistered(graphProvider);
- validateHelpersNotImplemented(graphProvider);
-
GraphManager.setGraphProvider(graphProvider);
GraphManager.setTraversalEngineType(traversalEngineType);
} catch (Exception ex) {
@@ -137,50 +122,6 @@ public abstract class AbstractGremlinSuite extends Suite {
}
}
- /**
- * Need to validate that structure interfaces are implemented so that checks to {@link Graph.Helper} can be
- * properly enforced.
- */
- private void validateStructureInterfacesRegistered(final GraphProvider graphProvider) throws Exception {
- final Set<Class> implementations = graphProvider.getImplementations();
- final Set<Class> noImplementationRegistered = new HashSet<>();
-
- final Configuration conf = graphProvider.newGraphConfiguration("prototype", AbstractGremlinSuite.class, "validateStructureInterfacesRegistered");
- final Graph graph = graphProvider.openTestGraph(conf);
- final Set<Class> structureInterfaces = new HashSet<>(STRUCTURE_INTERFACES);
-
- // not all graphs implement all features and therefore may not have implementations of certain "core" interfaces
- if (!graph.features().graph().variables().supportsVariables()) structureInterfaces.remove(Graph.Variables.class);
-
- graphProvider.clear(graph, conf);
-
- final boolean missingImplementations = structureInterfaces.stream().anyMatch(iface -> {
- final boolean noneMatch = implementations.stream().noneMatch(c -> iface.isAssignableFrom(c));
- if (noneMatch) noImplementationRegistered.add(iface);
- return noneMatch;
- });
-
- if (missingImplementations)
- throw new RuntimeException(String.format(
- "Implementations must register their implementations for the following interfaces %s",
- String.join(",", noImplementationRegistered.stream().map(Class::getName).collect(Collectors.toList()))));
- }
-
- private void validateHelpersNotImplemented(final GraphProvider graphProvider) {
- final List<String> overridenMethods = new ArrayList<>();
- graphProvider.getImplementations().forEach(clazz ->
- Stream.of(clazz.getDeclaredMethods())
- .filter(AbstractGremlinSuite::isHelperMethodOverriden)
- .map(m -> m.getDeclaringClass().getName() + "." + m.getName())
- .forEach(overridenMethods::add)
- );
-
- if (overridenMethods.size() > 0)
- throw new RuntimeException(String.format(
- "Implementations cannot override methods marked by @Helper annotation - check the following methods [%s]",
- String.join(",", overridenMethods)));
- }
-
private void validateOptInToSuite(final Class<? extends Graph> klass) throws InitializationError {
final Graph.OptIn[] optIns = klass.getAnnotationsByType(Graph.OptIn.class);
if (!gremlinFlavorSuite && !Arrays.stream(optIns).anyMatch(optIn -> optIn.value().equals(this.getClass().getCanonicalName())))
@@ -217,18 +158,6 @@ public abstract class AbstractGremlinSuite extends Suite {
return testsToExecute;
}
- public static boolean isHelperMethodOverriden(final Method myMethod) {
- final Class<?> declaringClass = myMethod.getDeclaringClass();
- for (Class<?> iface : declaringClass.getInterfaces()) {
- try {
- return iface.getMethod(myMethod.getName(), myMethod.getParameterTypes()).isAnnotationPresent(Graph.Helper.class);
- } catch (NoSuchMethodException ignored) {
- }
- }
-
- return false;
- }
-
public static Pair<Class<? extends GraphProvider>, Class<? extends Graph>> getGraphProviderClass(final Class<?> klass) throws InitializationError {
final GraphProviderClass annotation = klass.getAnnotation(GraphProviderClass.class);
if (null == annotation)
[4/4] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/master' into TINKERPOP3-581
Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/master' into TINKERPOP3-581
Conflicts:
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9716d379
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9716d379
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9716d379
Branch: refs/heads/TINKERPOP3-581
Commit: 9716d379df5742dbf3cf1bf681bea0b5043c7d7f
Parents: 4a06aaf c906ee2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 13:10:36 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 13:10:36 2015 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 +
.../tinkerpop/gremlin/structure/Element.java | 6 --
.../tinkerpop/gremlin/structure/Graph.java | 14 ----
.../tinkerpop/gremlin/structure/Property.java | 8 +--
.../gremlin/structure/VertexProperty.java | 2 -
.../util/detached/DetachedProperty.java | 2 +-
.../util/detached/DetachedVertexProperty.java | 3 +-
.../util/reference/ReferenceProperty.java | 2 +-
.../util/reference/ReferenceVertexProperty.java | 2 +-
.../gremlin/structure/util/star/StarGraph.java | 2 +-
.../tinkerpop/gremlin/AbstractGremlinSuite.java | 71 --------------------
.../gremlin/structure/FeatureSupportTest.java | 14 ++--
12 files changed, 20 insertions(+), 108 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9716d379/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9716d379/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9716d379/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
----------------------------------------------------------------------
[3/4] incubator-tinkerpop git commit: Update changelog.
Posted by sp...@apache.org.
Update changelog.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c906ee25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c906ee25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c906ee25
Branch: refs/heads/TINKERPOP3-581
Commit: c906ee2558286be117fc09184fcf9590857a4162
Parents: 5f1d8ec
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 11:38:48 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 11:38:48 2015 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c906ee25/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 793b91a..d3345c2 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,8 @@ TinkerPop 3.0.0.M9 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Removed `back()`-step as `select()`-step provides the same behavior with more intelligent optimizations and `by()`-modulation.
+* Removed `Graph.Helper` method annotation and related infrastructure in tests.
+* Moved `Exceptions.propertyRemovalNotSupported` from `Element` to `Property` for consistency.
* `DetachedXXX` now uses the standard `structure/` exceptions for unsupported operations.
* Added private constructors to all `Exceptions` inner classes in the respective `structure/` interfaces.
* Re-introduced `ReferenceXXX` to ensure a smaller data footprint in OLAP situation (`DetachedXXX` uses too much data).