Changed GraphSONMapper constructor
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3f89027f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3f89027f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3f89027f Branch: refs/heads/TINKERPOP-1274 Commit: 3f89027f439fcabe50479765680dc07aded384af Parents: 7309230 Author: Kevin Gallardo <kevin.galla...@datastax.com> Authored: Wed Jun 29 15:16:03 2016 +0100 Committer: Kevin Gallardo <kevin.galla...@datastax.com> Committed: Thu Jun 30 10:39:47 2016 +0100 ---------------------------------------------------------------------- .../structure/io/graphson/GraphSONMapper.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3f89027f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper.java index 8f20ef7..620855e 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper.java @@ -63,15 +63,13 @@ public class GraphSONMapper implements Mapper<ObjectMapper> { private final GraphSONVersion version; private final TypeInfo typeInfo; - private GraphSONMapper(final List<SimpleModule> customModules, final boolean loadCustomSerializers, - final boolean normalize, final boolean embedTypes, final GraphSONVersion version, - final TypeInfo typeInfo) { - this.customModules = customModules; - this.loadCustomSerializers = loadCustomSerializers; - this.normalize = normalize; - this.embedTypes = embedTypes; - this.version = version; - this.typeInfo = typeInfo; + private GraphSONMapper(final Builder builder) { + this.customModules = builder.customModules; + this.loadCustomSerializers = builder.loadCustomModules; + this.normalize = builder.normalize; + this.embedTypes = builder.embedTypes; + this.version = builder.version; + this.typeInfo = builder.typeInfo; } @Override @@ -240,7 +238,7 @@ public class GraphSONMapper implements Mapper<ObjectMapper> { simpleModules.stream().map(Pair::getValue1).forEach(this.customModules::add); }); - return new GraphSONMapper(customModules, loadCustomModules, normalize, embedTypes, version, typeInfo); + return new GraphSONMapper(this); } }