tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [23/50] [abbrv] tinkerpop git commit: TINKERPOP-1622 Removed deprecated G functions
Date Wed, 01 Mar 2017 21:23:34 GMT
TINKERPOP-1622 Removed deprecated G functions


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

Branch: refs/heads/TINKERPOP-1612
Commit: eb9425734ede4096b6f60a54ed37fa3cdc9b1040
Parents: 7910360
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Thu Feb 2 11:05:51 2017 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Wed Mar 1 16:06:15 2017 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 docs/src/upgrade/release-3.3.x.asciidoc         |  3 +-
 .../AbstractImportCustomizerProvider.java       |  2 -
 .../groovy/function/GBinaryOperator.java        | 57 --------------------
 .../gremlin/groovy/function/GComparator.java    | 56 -------------------
 .../gremlin/groovy/function/GFunction.java      | 56 -------------------
 .../gremlin/groovy/function/GSupplier.java      | 56 -------------------
 .../gremlin/groovy/function/GUnaryOperator.java | 56 -------------------
 8 files changed, 4 insertions(+), 284 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 5f65c37..1dd298b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,8 @@ 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 `gremlin-groovy-test`.
+* Removed previously deprecated "G" functions in `gremlin-groovy` (i.e. `GFunction`).
 * Added `Vertex`, `Edge`, `VertexProperty`, and `Property` serializers to Gremlin-Python
and exposed tests that use graph object arguments.
 * `Bytecode.getSourceInstructions()` and `Bytecode.getStepInstructions()` now returns `List<Instruction>`
instead of `Iterable<Instruction>`.
 * Added various `TraversalStrategy` registrations with `GryoMapper`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/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 5f89c63..a9a70f7 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -191,6 +191,7 @@ The following deprecated classes, methods or fields have been removed
in this ve
 ** `org.apache.tinkerpop.gremlin.structure.Graph.OptIn#SUITE_GROOVY_ENVIRONMENT_INTEGRATE`
 * `gremlin-groovy`
 ** `org.apache.tinkerpop.gremlin.groovy.engine.ConcurrentBindings`
+** `org.apache.tinkerpop.gremlin.groovy.function.*`
 ** `org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine(ImportCustomizerProvider)`
 ** `org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine#plugins()`
 ** `org.apache.tinkerpop.gremlin.groovy.jsr223.ScriptExecutor`
@@ -205,7 +206,7 @@ understand how to resolve this breaking change.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1283[TINKERPOP-1283], link:https://issues.apache.org/jira/browse/TINKERPOP-1420[TINKERPOP-1420],
 link:https://issues.apache.org/jira/browse/TINKERPOP-833[TINKERPOP-833], link:https://issues.apache.org/jira/browse/TINKERPOP-1040[TINKERPOP-1040],
-link:https://issues.apache.org/jira/browse/TINKERPOP-1612[TINKERPOP-1612]
+link:https://issues.apache.org/jira/browse/TINKERPOP-1612[TINKERPOP-1612], link:https://issues.apache.org/jira/browse/TINKERPOP-1622[TINKERPOP-1622]
 
 Upgrading for Providers
 ~~~~~~~~~~~~~~~~~~~~~~~

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
index 131216e..47709f2 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
@@ -21,7 +21,6 @@ package org.apache.tinkerpop.gremlin.groovy;
 import groovy.grape.Grape;
 import groovy.json.JsonBuilder;
 import org.apache.commons.configuration.Configuration;
-import org.apache.tinkerpop.gremlin.groovy.function.GFunction;
 import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyTranslator;
 import org.apache.tinkerpop.gremlin.process.computer.Computer;
@@ -131,7 +130,6 @@ public abstract class AbstractImportCustomizerProvider implements ImportCustomiz
         imports.add(Gremlin.class.getPackage().getName() + DOT_STAR);
         imports.add(GremlinLoader.class.getPackage().getName() + DOT_STAR);
         imports.add(FunctionUtils.class.getPackage().getName() + DOT_STAR);
-        imports.add(GFunction.class.getPackage().getName() + DOT_STAR);
         imports.add(TraversalMetrics.class.getPackage().getName() + DOT_STAR);
         staticImports.add(TimeUtil.class.getCanonicalName() + DOT_STAR);
         staticImports.add(Computer.class.getCanonicalName() + DOT_STAR);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GBinaryOperator.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GBinaryOperator.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GBinaryOperator.java
deleted file mode 100644
index 445622a..0000000
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GBinaryOperator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tinkerpop.gremlin.groovy.function;
-
-import groovy.lang.Closure;
-import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder;
-
-import java.util.function.BinaryOperator;
-
-/**
- * @deprecated  As of release 3.1.0, use {@code as BinaryOperator} in Groovy.
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@Deprecated
-public final class GBinaryOperator<A> implements BinaryOperator<A>, LambdaHolder
{
-
-    private final Closure closure;
-
-    public GBinaryOperator(final Closure closure) {
-        this.closure = closure;
-    }
-
-    public static GBinaryOperator[] make(final Closure... closures) {
-        final GBinaryOperator[] functions = new GBinaryOperator[closures.length];
-        for (int i = 0; i < closures.length; i++) {
-            functions[i] = new GBinaryOperator(closures[i]);
-        }
-        return functions;
-    }
-
-    @Override
-    public String toString() {
-        return "lambda";
-    }
-
-    @Override
-    public A apply(final A a, final A b) {
-        return (A) closure.call(a, b);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GComparator.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GComparator.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GComparator.java
deleted file mode 100644
index 76cf619..0000000
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GComparator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.groovy.function;
-
-import groovy.lang.Closure;
-import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder;
-
-import java.util.Comparator;
-
-/**
- * @deprecated As of release 3.1.0, use {@code as Comparator} in Groovy.
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@Deprecated
-public final class GComparator<A> implements Comparator<A>, LambdaHolder {
-
-    private final Closure closure;
-
-    public GComparator(final Closure closure) {
-        this.closure = closure;
-    }
-
-    @Override
-    public int compare(A first, A second) {
-        return (int) this.closure.call(first, second);
-    }
-
-    public static GComparator[] make(final Closure... closures) {
-        final GComparator[] comparators = new GComparator[closures.length];
-        for (int i = 0; i < closures.length; i++) {
-            comparators[i] = new GComparator(closures[i]);
-        }
-        return comparators;
-    }
-
-    @Override
-    public String toString() {
-        return "lambda";
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GFunction.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GFunction.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GFunction.java
deleted file mode 100644
index 9dd5d9d..0000000
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GFunction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.groovy.function;
-
-import groovy.lang.Closure;
-import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder;
-
-import java.util.function.Function;
-
-/**
- * @deprecated As of release 3.1.0, use {@code as Function} in Groovy.
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@Deprecated
-public final class GFunction<A, B> implements Function<A, B>, LambdaHolder {
-
-    private final Closure closure;
-
-    public GFunction(final Closure closure) {
-        this.closure = closure;
-    }
-
-    @Override
-    public B apply(A a) {
-        return (B) this.closure.call(a);
-    }
-
-    public static GFunction[] make(final Closure... closures) {
-        final GFunction[] functions = new GFunction[closures.length];
-        for (int i = 0; i < closures.length; i++) {
-            functions[i] = new GFunction(closures[i]);
-        }
-        return functions;
-    }
-
-    @Override
-    public String toString() {
-        return "lambda";
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GSupplier.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GSupplier.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GSupplier.java
deleted file mode 100644
index 0f38bc5..0000000
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GSupplier.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.groovy.function;
-
-import groovy.lang.Closure;
-import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder;
-
-import java.util.function.Supplier;
-
-/**
- * @deprecated As of release 3.1.0, use {@code as Supplier} in Groovy.
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@Deprecated
-public final class GSupplier<A> implements Supplier<A>, LambdaHolder {
-
-    private final Closure closure;
-
-    public GSupplier(final Closure closure) {
-        this.closure = closure;
-    }
-
-    @Override
-    public A get() {
-        return (A) this.closure.call();
-    }
-
-    public static GSupplier[] make(final Closure... closures) {
-        final GSupplier[] functions = new GSupplier[closures.length];
-        for (int i = 0; i < closures.length; i++) {
-            functions[i] = new GSupplier(closures[i]);
-        }
-        return functions;
-    }
-
-    @Override
-    public String toString() {
-        return "lambda";
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb942573/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GUnaryOperator.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GUnaryOperator.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GUnaryOperator.java
deleted file mode 100644
index 202b29d..0000000
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/function/GUnaryOperator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.groovy.function;
-
-import groovy.lang.Closure;
-import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder;
-
-import java.util.function.UnaryOperator;
-
-/**
- * @deprecated As of release 3.1.0, use {@code as UnaryOperator} in Groovy.
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@Deprecated
-public final class GUnaryOperator<A> implements UnaryOperator<A>, LambdaHolder
{
-
-    private final Closure closure;
-
-    public GUnaryOperator(final Closure closure) {
-        this.closure = closure;
-    }
-
-    public static GUnaryOperator[] make(final Closure... closures) {
-        final GUnaryOperator[] functions = new GUnaryOperator[closures.length];
-        for (int i = 0; i < closures.length; i++) {
-            functions[i] = new GUnaryOperator(closures[i]);
-        }
-        return functions;
-    }
-
-    @Override
-    public String toString() {
-        return "lambda";
-    }
-
-    @Override
-    public A apply(final A a) {
-        return (A) closure.call(a);
-    }
-}


Mime
View raw message