You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/12/27 14:11:12 UTC

[groovy] branch GROOVY_3_0_X updated (1677fb3 -> a6265b0)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a change to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from 1677fb3  Remove stray comma in StaticTypeCheckingSupport#buildParameter javadoc.
     new c79af8e  MetaClassImpl#invokeMissingProperty: Make content of if statement match indentation.
     new a6265b0  ConcurrentReaderHashMap#putAll: Make content of while statement match indentation.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/groovy/lang/MetaClassImpl.java                           | 3 ++-
 .../org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)


[groovy] 01/02: MetaClassImpl#invokeMissingProperty: Make content of if statement match indentation.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit c79af8e8734510bb769cf533a591e81e1e0dea38
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Thu Dec 26 21:21:42 2019 +0100

    MetaClassImpl#invokeMissingProperty: Make content of if statement match indentation.
    
    (cherry picked from commit 01259cb51e1cb88dfbdb10aea380f255227a121f)
---
 src/main/java/groovy/lang/MetaClassImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index 5e10569..66b842c 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -894,12 +894,13 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
         if (instance instanceof Class && theClass != Class.class) {
             final MetaProperty metaProperty = InvokerHelper.getMetaClass(Class.class).hasProperty(instance, propertyName);
-            if (metaProperty != null)
+            if (metaProperty != null) {
                 if (isGetter) {
                     return metaProperty.getProperty(instance);
                 }
                 metaProperty.setProperty(instance, optionalValue);
                 return null;
+            }
         }
         throw new MissingPropertyExceptionNoStack(propertyName, theClass);
     }


[groovy] 02/02: ConcurrentReaderHashMap#putAll: Make content of while statement match indentation.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit a6265b053758e4cd93cd9c9019011fa16486b93f
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Thu Dec 26 21:23:04 2019 +0100

    ConcurrentReaderHashMap#putAll: Make content of while statement match indentation.
    
    (cherry picked from commit d0fdb438104ef2bbb737ac87c02c84157c54703c)
---
 .../org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
index 4ca393a..a99f714 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
@@ -763,7 +763,7 @@ public class ConcurrentReaderHashMap
     // Expand enough to hold at least n elements without resizing.
     // We can only resize table by factor of two at a time.
     // It is faster to rehash with fewer elements, so do it now.
-    while (n >= threshold)
+    while (n >= threshold) {
       rehash();
 
       for (Object o : t.entrySet()) {
@@ -772,6 +772,7 @@ public class ConcurrentReaderHashMap
           Object value = entry.getValue();
           put(key, value);
       }
+    }
   }