groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 01/02: MetaClassImpl#invokeMissingProperty: Make content of if statement match indentation.
Date Fri, 27 Dec 2019 14:11:13 GMT
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 <pascalschumacher@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);
     }


Mime
View raw message