TINKERPOP-1408 Removed deprecated Io.Builder#registry()

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

Branch: refs/heads/TINKERPOP-1682
Commit: 578a93cfcc330acf2e3f766a64934e3b3eb545af
Parents: 89653bb
Author: Stephen Mallette <[email protected]>
Authored: Fri Jun 9 11:52:07 2017 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Fri Jun 9 11:52:07 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                  |  1 +
 docs/src/upgrade/release-3.3.x.asciidoc             |  1 +
 .../apache/tinkerpop/gremlin/structure/io/Io.java   | 15 +--------------
 .../gremlin/structure/io/graphml/GraphMLIo.java     | 10 ----------
 .../gremlin/structure/io/graphson/GraphSONIo.java   | 16 +---------------
 .../tinkerpop/gremlin/structure/io/gryo/GryoIo.java | 16 +---------------
 .../tinkergraph/structure/TinkerGraphTest.java      | 12 +-----------
 7 files changed, 6 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ad08fe1..e43531f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -32,6 +32,7 @@ TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 * Added "attachment requisite" `VertexProperty.element()` and 
`Property.element()` data in GraphSON serialization.
 * GraphSON 3.0 is now the default serialization format in TinkerGraph and 
Gremlin Server.
 * Established the GraphSON 3.0 format.
+* Removed previously deprecated `Io.Builder#registry(IoRegistry)` method.
 * Removed previously deprecated `GryoMessageSerializerV1d0(GryoMapper)` 
constructor.
 * Removed previously deprecated `TinkerIoRegistry`.
 * Removed previously deprecated `getInstance()` methods on all TinkerPop 
classes.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc 
b/docs/src/upgrade/release-3.3.x.asciidoc
index 85a4f53..b3617e7 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -199,6 +199,7 @@ The following deprecated classes, methods or fields have 
been removed in this ve
 ** 
`org.apache.tinkerpop.gremlin.structure.Graph.OptIn#SUITE_GROOVY_PROCESS_COMPUTER`
 ** 
`org.apache.tinkerpop.gremlin.structure.Graph.OptIn#SUITE_GROOVY_ENVIRONMENT`
 ** 
`org.apache.tinkerpop.gremlin.structure.Graph.OptIn#SUITE_GROOVY_ENVIRONMENT_INTEGRATE`
+** `org.apache.tinkerpop.gremlin.structure.io.Io.Builder#registry(IoRegistry)`
 * `gremlin-driver`
 ** 
`org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0(GryoMapper)`
 * `gremlin-groovy`

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java
index 820f474..0a04979 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java
@@ -85,23 +85,10 @@ public interface Io<R extends GraphReader.ReaderBuilder, W 
extends GraphWriter.W
      * that class will be passed to {@link Graph#io(Io.Builder)} by the user.
      */
     public interface Builder<I extends Io> {
-
-        /**
-         * Providers use this method to supply an {@link IoRegistry} to the 
{@link Io} implementation.  End-users
-         * should not use this method directly.  If a user wants to register 
custom serializers, then such things
-         * can be done via calls to {@link Io#mapper()} after the {@link Io} 
is constructed via
-         * {@link Graph#io(Io.Builder)}.
-         * @deprecated As of release 3.2.2, replaced by {@link 
#onMapper(Consumer)}.
-         */
-        @Deprecated
-        public Builder<? extends Io> registry(final IoRegistry registry);
-
         /**
          * Allows a {@link Graph} implementation to have full control over the 
{@link Mapper.Builder} instance.
          * Typically, the implementation will just pass in its {@link 
IoRegistry} implementation so that the
-         * {@link Mapper} that gets built will have knowledge of any custom 
classes and serializers it may have. Note
-         * that if {@link #registry(IoRegistry)} is also set on a {@code 
Builder} instance it will be applied first
-         * prior to that instance being passed to {@code Consumer}.
+         * {@link Mapper} that gets built will have knowledge of any custom 
classes and serializers it may have.
          * <p/>
          * End-users should not use this method directly.  If a user wants to 
register custom serializers, then such
          * things can be done via calls to {@link Io#mapper()} after the 
{@link Io} is constructed via

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
index f595fbe..8f3dab3 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
@@ -102,16 +102,6 @@ public final class GraphMLIo implements 
Io<GraphMLReader.Builder, GraphMLWriter.
         private Graph graph;
         private Consumer<Mapper.Builder> onMapper = null;
 
-        /**
-         * @deprecated As of release 3.2.2, replaced by {@link 
#onMapper(Consumer)}.
-         */
-        @Deprecated
-        @Override
-        public Io.Builder<GraphMLIo> registry(final IoRegistry registry) {
-            // GraphML doesn't make use of a registry but the contract should 
simply exist
-            return this;
-        }
-
         @Override
         public Io.Builder<? extends Io> onMapper(final 
Consumer<Mapper.Builder> onMapper) {
             this.onMapper = onMapper;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
index 0c92e1c..82ffdad 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
@@ -38,13 +38,11 @@ import java.util.function.Consumer;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public final class GraphSONIo implements Io<GraphSONReader.Builder, 
GraphSONWriter.Builder, GraphSONMapper.Builder> {
-    private final IoRegistry registry;
     private final Graph graph;
     private final Optional<Consumer<Mapper.Builder>> onMapper;
     private final GraphSONVersion version;
 
     private GraphSONIo(final Builder builder) {
-        this.registry = builder.registry;
         this.graph = builder.graph;
         this.onMapper = Optional.ofNullable(builder.onMapper);
         this.version = builder.version;
@@ -71,8 +69,7 @@ public final class GraphSONIo implements 
Io<GraphSONReader.Builder, GraphSONWrit
      */
     @Override
     public GraphSONMapper.Builder mapper() {
-        final GraphSONMapper.Builder builder = (null == this.registry) ?
-                GraphSONMapper.build().version(version) : 
GraphSONMapper.build().version(version).addRegistry(this.registry);
+        final GraphSONMapper.Builder builder = 
GraphSONMapper.build().version(version);
         onMapper.ifPresent(c -> c.accept(builder));
         return builder;
     }
@@ -113,7 +110,6 @@ public final class GraphSONIo implements 
Io<GraphSONReader.Builder, GraphSONWrit
 
     public final static class Builder implements Io.Builder<GraphSONIo> {
 
-        private IoRegistry registry = null;
         private Graph graph;
         private Consumer<Mapper.Builder> onMapper = null;
         private final GraphSONVersion version;
@@ -122,16 +118,6 @@ public final class GraphSONIo implements 
Io<GraphSONReader.Builder, GraphSONWrit
             this.version = version;
         }
 
-        /**
-         * @deprecated As of release 3.2.2, replaced by {@link 
#onMapper(Consumer)}.
-         */
-        @Deprecated
-        @Override
-        public Io.Builder<GraphSONIo> registry(final IoRegistry registry) {
-            this.registry = registry;
-            return this;
-        }
-
         @Override
         public Io.Builder<? extends Io> onMapper(final 
Consumer<Mapper.Builder> onMapper) {
             this.onMapper = onMapper;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoIo.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoIo.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoIo.java
index 86d96c9..9ce4cbe 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoIo.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoIo.java
@@ -39,12 +39,10 @@ import java.util.function.Consumer;
  */
 public final class GryoIo implements Io<GryoReader.Builder, 
GryoWriter.Builder, GryoMapper.Builder> {
 
-    private final IoRegistry registry;
     private final Graph graph;
     private Optional<Consumer<Mapper.Builder>> onMapper;
 
     private GryoIo(final Builder builder) {
-        this.registry = builder.registry;
         this.graph = builder.graph;
         this.onMapper = Optional.ofNullable(builder.onMapper);
     }
@@ -69,7 +67,7 @@ public final class GryoIo implements Io<GryoReader.Builder, 
GryoWriter.Builder,
      */
     @Override
     public GryoMapper.Builder mapper() {
-        final GryoMapper.Builder builder = (null == this.registry) ? 
GryoMapper.build() : GryoMapper.build().addRegistry(this.registry);
+        final GryoMapper.Builder builder = GryoMapper.build();
         onMapper.ifPresent(c -> c.accept(builder));
         return builder;
     }
@@ -99,21 +97,9 @@ public final class GryoIo implements Io<GryoReader.Builder, 
GryoWriter.Builder,
     }
 
     public final static class Builder implements Io.Builder<GryoIo> {
-
-        private IoRegistry registry = null;
         private Graph graph;
         private Consumer<Mapper.Builder> onMapper = null;
 
-        /**
-         * @deprecated As of release 3.2.2, replaced by {@link 
#onMapper(Consumer)}.
-         */
-        @Deprecated
-        @Override
-        public Io.Builder<GryoIo> registry(final IoRegistry registry) {
-            this.registry = registry;
-            return this;
-        }
-
         @Override
         public Io.Builder<? extends Io> onMapper(final 
Consumer<Mapper.Builder> onMapper) {
             this.onMapper = onMapper;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/578a93cf/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
----------------------------------------------------------------------
diff --git 
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
 
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
index a85b0ee..edf2127 100644
--- 
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
+++ 
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
@@ -32,7 +32,6 @@ import org.apache.tinkerpop.gremlin.structure.io.Io;
 import org.apache.tinkerpop.gremlin.structure.io.GraphReader;
 import org.apache.tinkerpop.gremlin.structure.io.GraphWriter;
 import org.apache.tinkerpop.gremlin.structure.io.IoCore;
-import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.IoTest;
 import org.apache.tinkerpop.gremlin.structure.io.Mapper;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader;
@@ -518,7 +517,6 @@ public class TinkerGraphTest {
 
         //Test write graph
         graph.close();
-        assertEquals(TestIoBuilder.calledRegistry, 0);
         assertEquals(TestIoBuilder.calledOnMapper, 1);
         assertEquals(TestIoBuilder.calledGraph, 1);
         assertEquals(TestIoBuilder.calledCreate, 1);
@@ -531,7 +529,6 @@ public class TinkerGraphTest {
 
         //Test read graph
         final TinkerGraph readGraph = TinkerGraph.open(conf);
-        assertEquals(TestIoBuilder.calledRegistry, 0);
         assertEquals(TestIoBuilder.calledOnMapper, 1);
         assertEquals(TestIoBuilder.calledGraph, 1);
         assertEquals(TestIoBuilder.calledCreate, 1);
@@ -672,23 +669,16 @@ public class TinkerGraphTest {
 
     public static class TestIoBuilder implements Io.Builder {
 
-        static int calledRegistry, calledGraph, calledCreate, calledOnMapper;
+        static int calledGraph, calledCreate, calledOnMapper;
 
         public TestIoBuilder(){
             //Looks awkward to reset static vars inside a constructor, but 
makes sense from testing perspective
-            calledRegistry = 0;
             calledGraph = 0;
             calledCreate = 0;
             calledOnMapper = 0;
         }
 
         @Override
-        public Io.Builder<? extends Io> registry(final IoRegistry registry) {
-            calledRegistry++;
-            return this;
-        }
-
-        @Override
         public Io.Builder<? extends Io> onMapper(final Consumer onMapper) {
             calledOnMapper++;
             return this;

Reply via email to