tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/3] tinkerpop git commit: Removed some unneeded semi-colons from groovy script CTR
Date Fri, 29 Jun 2018 19:22:00 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/master ec7e27ea0 -> 734b01f35


Removed some unneeded semi-colons from groovy script CTR


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

Branch: refs/heads/master
Commit: 34a648b1bb36475beddbad4d673f5bed9c77ed4a
Parents: 4160b04
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Fri Jun 29 15:21:21 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Fri Jun 29 15:21:21 2018 -0400

----------------------------------------------------------------------
 gremlin-dotnet/glv/generate.groovy | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/34a648b1/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 8f5fa44..29f9ec7 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -61,7 +61,7 @@ def toCSharpTypeMap = ["Long": "long",
                        "Comparator": "IComparator",
                        "VertexProgram": "object"]
 
-def useE2 = ["E2", "E2"];
+def useE2 = ["E2", "E2"]
 def methodsWithSpecificTypes = ["constant": useE2,
                                 "limit": useE2,
                                 "mean": useE2,
@@ -92,17 +92,17 @@ def getCSharpGenericTypeParam = { typeName ->
 }
 
 def toCSharpType = { name ->
-    String typeName = toCSharpTypeMap.getOrDefault(name, name);
+    String typeName = toCSharpTypeMap.getOrDefault(name, name)
     if (typeName.equals(name) && (typeName.contains("? extends") || typeName.equals("Tree")))
{
         typeName = "E2"
     }
-    return typeName;
+    return typeName
 }
 
 def toCSharpMethodName = { symbol -> (String) Character.toUpperCase(symbol.charAt(0))
+ symbol.substring(1) }
 
 def getJavaGenericTypeParameterTypeNames = { method ->
-    def typeArguments = method.genericReturnType.actualTypeArguments;
+    def typeArguments = method.genericReturnType.actualTypeArguments
     return typeArguments.
             collect { (it instanceof Class) ? ((Class)it).simpleName : it.typeName }.
             collect { name ->
@@ -110,7 +110,7 @@ def getJavaGenericTypeParameterTypeNames = { method ->
                     name = "object"
                 }
                 else if (name.equals("B")) {
-                    name = "E2";
+                    name = "E2"
                 }
                 name
             }
@@ -124,18 +124,18 @@ def getJavaParameterTypeNames = { method ->
 }
 
 def toCSharpParamString = { param, genTypeName ->
-    String csharpParamTypeName = genTypeName;
+    String csharpParamTypeName = genTypeName
     if (csharpParamTypeName == null){
         csharpParamTypeName = toCSharpType(param.type.simpleName)
     }
     else if (csharpParamTypeName == "M") {
-        csharpParamTypeName = "object";
+        csharpParamTypeName = "object"
     }
     else if (csharpParamTypeName == "A[]") {
-        csharpParamTypeName = "object[]";
+        csharpParamTypeName = "object[]"
     }
     else if (csharpParamTypeName == "A" || csharpParamTypeName == "B") {
-        csharpParamTypeName = "E2";
+        csharpParamTypeName = "E2"
     }
     "${csharpParamTypeName} ${param.name}"
     }
@@ -152,11 +152,11 @@ def getCSharpParamTypeString = { method ->
 }
 
 def getCSharpParamString = { method, useGenericParams ->
-    def parameters = method.parameters;
+    def parameters = method.parameters
     if (parameters.length == 0)
         return ""
 
-    def genericTypes = method.getGenericParameterTypes();
+    def genericTypes = method.getGenericParameterTypes()
     def csharpParameters = parameters.
             toList().indexed().
             collect { index, param ->
@@ -174,11 +174,11 @@ def getCSharpParamString = { method, useGenericParams ->
                 }
                 toCSharpParamString(param, genTypeName)
             }.
-            toArray();
+            toArray()
 
     if (method.isVarArgs()) {
-        def lastIndex = csharpParameters.length-1;
-        csharpParameters[lastIndex] = "params " + csharpParameters[lastIndex];
+        def lastIndex = csharpParameters.length-1
+        csharpParameters[lastIndex] = "params " + csharpParameters[lastIndex]
     }
 
     csharpParameters.join(", ")


Mime
View raw message