paulk-asert commented on a change in pull request #994: GROOVY-9075: The 
exception message should be more clear when a Groovy…
URL: https://github.com/apache/groovy/pull/994#discussion_r314558063
 
 

 ##########
 File path: src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java
 ##########
 @@ -1016,4 +1018,21 @@ public static String convertPropertyName(String prop) {
         }
         return BeanUtils.decapitalize(prop);
     }
+
+    // GROOVY-9075
+    public static void checkMetaClassProperty(MetaClass oldValue, Object 
newValue) {
+        if (null == newValue) return;
+
+        if (!(newValue instanceof MetaClass)) {
+            throw new IllegalArgumentException("the new metaClass[" + 
newValue.getClass() + "] is not an instance of " + MetaClass.class);
 
 Review comment:
   I think the common convention is upper case for first letter.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to