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

ggregory pushed a commit to branch 1.X
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git


The following commit(s) were added to refs/heads/1.X by this push:
     new 227583d3 Fix typo in exception message throws from 
org.apache.commons.beanutils.PropertyUtilsBean.setMappedProperty(Object, 
String, String, Object)
227583d3 is described below

commit 227583d3e8c4bb41f28bc9e5636b057756caa37d
Author: Gary D. Gregory <[email protected]>
AuthorDate: Sun Jul 20 16:28:14 2025 -0400

    Fix typo in exception message throws from
    org.apache.commons.beanutils.PropertyUtilsBean.setMappedProperty(Object,
    String, String, Object)
---
 src/changes/changes.xml                                             | 1 +
 src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java   | 6 +++---
 .../commons/beanutils/memoryleaktests/MemoryLeakTestCase.java       | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index efd2c8cf..4f1c8e08 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -30,6 +30,7 @@
   <body>
     <release version="1.11.1" date="YYYY-MM-DD" description="This is a 
maintenance release and requires Java 8.">
       <!-- FIX -->
+      <action dev="ggregory" type="update" due-to="Gary Gregory">Fix typo in 
exception message throws from 
org.apache.commons.beanutils.PropertyUtilsBean.setMappedProperty(Object, 
String, String, Object).</action>
       <!-- ADD -->
       <!-- UPDATE -->
       <action dev="ggregory" type="update" due-to="Gary Gregory">Bump 
org.apache.commons:commons-parent from 84 to 85.</action>
diff --git a/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java 
b/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
index f7b1509b..05fbf604 100644
--- a/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
+++ b/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
@@ -1280,7 +1280,7 @@ public class PropertyUtilsBean {
     /** This just catches and wraps IllegalArgumentException. */
     private Object invokeMethod(final Method method, final Object bean, final 
Object[] values) throws IllegalAccessException, InvocationTargetException {
         if (bean == null) {
-            throw new IllegalArgumentException("No bean specified " + "- this 
should have been checked before reaching this method");
+            throw new IllegalArgumentException("No bean specified - this 
should have been checked before reaching this method");
         }
         try {
             return method.invoke(bean, values);
@@ -1707,7 +1707,7 @@ public class PropertyUtilsBean {
             Method mappedWriteMethod = ((MappedPropertyDescriptor) 
descriptor).getMappedWriteMethod();
             mappedWriteMethod = 
MethodUtils.getAccessibleMethod(bean.getClass(), mappedWriteMethod);
             if (mappedWriteMethod == null) {
-                throw new NoSuchMethodException("Property '" + name + "' has 
no mapped setter method" + "on bean class '" + bean.getClass() + "'");
+                throw new NoSuchMethodException("Property '" + name + "' has 
no mapped setter method on bean class '" + bean.getClass() + "'");
             }
             final Object[] params = new Object[2];
             params[0] = key;
@@ -1860,7 +1860,7 @@ public class PropertyUtilsBean {
         }
 
         if (resolver.isIndexed(propertyName) || 
resolver.isMapped(propertyName)) {
-            throw new IllegalArgumentException("Indexed or mapped properties 
are not supported on" + " objects of type Map: " + propertyName);
+            throw new IllegalArgumentException("Indexed or mapped properties 
are not supported on objects of type Map: " + propertyName);
         }
 
         bean.put(propertyName, value);
diff --git 
a/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
 
b/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
index 529844e9..27d9f745 100644
--- 
a/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
+++ 
b/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
@@ -145,8 +145,8 @@ public class MemoryLeakTestCase {
         final long free = runtime.freeMemory() / 1024;
         final long total = runtime.totalMemory() / 1024;
         final long used = total - free;
-        return "MEMORY - Total: " + fmt.format(total) + "k " + "Used: "
-                + fmt.format(used) + "k " + "Free: "
+        return "MEMORY - Total: " + fmt.format(total) + "k Used: "
+                + fmt.format(used) + "k Free: "
                 + fmt.format(free) + "k";
     }
 

Reply via email to