groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: trivial formatting (side effect: closes #299)
Date Wed, 13 Apr 2016 05:42:38 GMT
Repository: groovy
Updated Branches:
  refs/heads/master f6fa65069 -> 049f7d7af


trivial formatting (side effect: closes #299)


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

Branch: refs/heads/master
Commit: 049f7d7af8a081bf940026e30f19872c5eda3a5d
Parents: f6fa650
Author: paulk <paulk@asert.com.au>
Authored: Wed Apr 13 15:41:37 2016 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Wed Apr 13 15:41:37 2016 +1000

----------------------------------------------------------------------
 .../TupleConstructorASTTransformation.java        | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/049f7d7a/src/main/org/codehaus/groovy/transform/TupleConstructorASTTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/TupleConstructorASTTransformation.java
b/src/main/org/codehaus/groovy/transform/TupleConstructorASTTransformation.java
index 9d8a800..b31cc8e 100644
--- a/src/main/org/codehaus/groovy/transform/TupleConstructorASTTransformation.java
+++ b/src/main/org/codehaus/groovy/transform/TupleConstructorASTTransformation.java
@@ -112,13 +112,13 @@ public class TupleConstructorASTTransformation extends AbstractASTTransformation
             boolean useSetters = memberHasValue(anno, "useSetters", true);
             List<String> excludes = getMemberStringList(anno, "excludes");
             List<String> includes = getMemberStringList(anno, "includes");
-            boolean allNames = memberHasValue(anno, "allNames", true);
+            boolean allNames = memberHasValue(anno, "allNames", true);
             if (!checkIncludeExcludeUndefinedAware(anno, excludes, includes, MY_TYPE_NAME))
return;
             if (!checkPropertyList(cNode, includes, "includes", anno, MY_TYPE_NAME, includeFields))
return;
             if (!checkPropertyList(cNode, excludes, "excludes", anno, MY_TYPE_NAME, includeFields))
return;
             // if @Immutable is found, let it pick up options and do work so we'll skip
             if (hasAnnotation(cNode, ImmutableASTTransformation.MY_TYPE)) return;
-            createConstructor(this, cNode, includeFields, includeProperties, includeSuperFields,
includeSuperProperties, callSuper, force, excludes, includes, useSetters, defaults, allNames);
+            createConstructor(this, cNode, includeFields, includeProperties, includeSuperFields,
includeSuperProperties, callSuper, force, excludes, includes, useSetters, defaults, allNames);
         }
     }
 
@@ -127,10 +127,10 @@ public class TupleConstructorASTTransformation extends AbstractASTTransformation
     }
 
     public static void createConstructor(AbstractASTTransformation xform, ClassNode cNode,
boolean includeFields, boolean includeProperties, boolean includeSuperFields, boolean includeSuperProperties,
boolean callSuper, boolean force, List<String> excludes, List<String> includes,
boolean useSetters, boolean defaults) {
-        createConstructor(xform, cNode, includeFields, includeProperties, includeSuperFields,
includeSuperProperties, callSuper, force, excludes, includes, useSetters, defaults, false);
-    }
-
-    public static void createConstructor(AbstractASTTransformation xform, ClassNode cNode,
boolean includeFields, boolean includeProperties, boolean includeSuperFields, boolean includeSuperProperties,
boolean callSuper, boolean force, List<String> excludes, List<String> includes,
boolean useSetters, boolean defaults, boolean allNames) {
+        createConstructor(xform, cNode, includeFields, includeProperties, includeSuperFields,
includeSuperProperties, callSuper, force, excludes, includes, useSetters, defaults, false);
+    }
+
+    public static void createConstructor(AbstractASTTransformation xform, ClassNode cNode,
boolean includeFields, boolean includeProperties, boolean includeSuperFields, boolean includeSuperProperties,
boolean callSuper, boolean force, List<String> excludes, List<String> includes,
boolean useSetters, boolean defaults, boolean allNames) {
         // no processing if existing constructors found
         if (!cNode.getDeclaredConstructors().isEmpty() && !force) return;
 
@@ -155,7 +155,7 @@ public class TupleConstructorASTTransformation extends AbstractASTTransformation
         final BlockStatement body = new BlockStatement();
         for (FieldNode fNode : superList) {
             String name = fNode.getName();
-            if (shouldSkipUndefinedAware(name, excludes, includes, allNames)) continue;
+            if (shouldSkipUndefinedAware(name, excludes, includes, allNames)) continue;
             params.add(createParam(fNode, name, defaults, xform));
             boolean hasSetter = cNode.getProperty(name) != null && !fNode.isFinal();
             if (callSuper) {
@@ -173,7 +173,7 @@ public class TupleConstructorASTTransformation extends AbstractASTTransformation
         }
         for (FieldNode fNode : list) {
             String name = fNode.getName();
-            if (shouldSkipUndefinedAware(name, excludes, includes, allNames)) continue;
+            if (shouldSkipUndefinedAware(name, excludes, includes, allNames)) continue;
             Parameter nextParam = createParam(fNode, name, defaults, xform);
             params.add(nextParam);
             boolean hasSetter = cNode.getProperty(name) != null && !fNode.isFinal();
@@ -212,7 +212,7 @@ public class TupleConstructorASTTransformation extends AbstractASTTransformation
 
     private static Parameter createParam(FieldNode fNode, String name, boolean defaults,
AbstractASTTransformation xform) {
         Parameter param = new Parameter(fNode.getType(), name);
-        if (defaults){
+        if (defaults) {
             param.setInitialExpression(providedOrDefaultInitialValue(fNode));
         } else {
             if (fNode.getInitialExpression() != null) {


Mime
View raw message