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 2018/04/18 19:48:48 UTC

tinkerpop git commit: TINKERPOP-1941 Removed deprecated structure api exception

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1941 [created] 22c18441e


TINKERPOP-1941 Removed deprecated structure api exception

These were related to elements not being found and were deprecated a long long time ago.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/22c18441
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/22c18441
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/22c18441

Branch: refs/heads/TINKERPOP-1941
Commit: 22c18441e9909b9cb4a6e24bfeef3661eb7030f1
Parents: 82b7acc
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 18 15:28:54 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 18 15:28:54 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/upgrade/release-3.4.x.asciidoc         |  3 +++
 .../tinkerpop/gremlin/structure/Element.java    |  9 -------
 .../tinkerpop/gremlin/structure/Graph.java      | 28 --------------------
 4 files changed, 4 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/22c18441/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 532d24f..fbadbc0 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,7 @@ This release also includes changes from <<release-3-3-3, 3.3.3>>.
 * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available.
 * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths.
 * Moved `TraversalEngine` to `gremlin-test` as it has long been only used in testing infrastructure.
+* Removed previously deprecated Structure API exceptions related to "element not found" situations.
 * Removed previously deprecated `rebindings` options from the Java driver API.
 * Removed support for Giraph.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/22c18441/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 5a3da78..0cccd90 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -84,6 +84,9 @@ The following deprecated classes, methods or fields have been removed in this ve
 * `gremlin-core`
 ** `org.apache.tinkerpop.gremlin.process.traversal.engine.*`
 ** `org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine`
+** `org.apache.tinkerpop.gremlin.structure.Element.Exceptions.elementAlreadyRemoved(Class, Object)`
+** `org.apache.tinkerpop.gremlin.structure.Graph.Exceptions.elementNotFound(Class, Object)`
+** `org.apache.tinkerpop.gremlin.structure.Graph.Exceptions.elementNotFound(Class, Object, Exception)`
 * `gremlin-driver`
 ** `org.apache.tinkerpop.gremlin.driver.Client#rebind(String)`
 ** `org.apache.tinkerpop.gremlin.driver.Client.ReboundClusterdClient`

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/22c18441/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 2f752a3..761e3ba 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
@@ -144,14 +144,5 @@ public abstract interface Element {
         public static IllegalArgumentException labelCanNotBeAHiddenKey(final String label) {
             return new IllegalArgumentException("Label can not be a hidden key: " + label);
         }
-
-        /**
-         * @deprecated As of release 3.1.0, not replaced - this exception is no longer enforced by the test suite.
-         * @see <a href="https://issues.apache.org/jira/browse/TINKERPOP-297">TINKERPOP-297</a>
-         */
-        @Deprecated
-        public static IllegalStateException elementAlreadyRemoved(final Class<? extends Element> clazz, final Object id) {
-            return new IllegalStateException(String.format("%s with id %s was removed.", clazz.getSimpleName(), id));
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/22c18441/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 b1d3f27..b142a9a 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
@@ -1141,34 +1141,6 @@ public interface Graph extends AutoCloseable, Host {
         public static IllegalArgumentException argumentCanNotBeNull(final String argument) {
             return new IllegalArgumentException(String.format("The provided argument can not be null: %s", argument));
         }
-
-        /**
-         * Deprecated as of 3.2.3, not replaced.
-         *
-         * @see <a href="https://issues.apache.org/jira/browse/TINKERPOP-944">TINKERPOP-944</a>
-         */
-        @Deprecated
-        public static NoSuchElementException elementNotFound(final Class<? extends Element> elementClass, final Object id) {
-            return (null == id) ?
-                    new NoSuchElementException("The " + elementClass.getSimpleName().toLowerCase() + " with id null does not exist in the graph") :
-                    new NoSuchElementException("The " + elementClass.getSimpleName().toLowerCase() + " with id " + id + " of type " + id.getClass().getSimpleName() + " does not exist in the graph");
-        }
-
-        /**
-         * Deprecated as of 3.2.3, not replaced.
-         *
-         * @see <a href="https://issues.apache.org/jira/browse/TINKERPOP-944">TINKERPOP-944</a>
-         */
-        @Deprecated
-        public static NoSuchElementException elementNotFound(final Class<? extends Element> elementClass, final Object id, final Exception rootCause) {
-            NoSuchElementException elementNotFoundException;
-            if (null == id)
-                elementNotFoundException = new NoSuchElementException("The " + elementClass.getSimpleName().toLowerCase() + " with id null does not exist in the graph");
-            else
-                elementNotFoundException = new NoSuchElementException("The " + elementClass.getSimpleName().toLowerCase() + " with id " + id + " of type " + id.getClass().getSimpleName() + " does not exist in the graph");
-            elementNotFoundException.initCause(rootCause);
-            return elementNotFoundException;
-        }
     }
 
     /**