You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/10/10 10:54:38 UTC

(commons-beanutils) branch 1.X updated (aacc9be6 -> a4d861f2)

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

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


    from aacc9be6 Run on branch 1.X
     new c2ea21e7 The static method getInstance(Locale) from the type NumberFormat should be accessed directly in DecimalLocaleConverter
     new 56c5214a Redundant superinterface DynaClass for the type ResultSetDynaClass, already defined by JDBCDynaClass in ResultSetDynaClass
     new 16b60266 Statement unnecessarily nested within else clause
     new b260d84f Redundant superinterface DynaClass for the type RowSetDynaClass, already defined by JDBCDynaClass
     new e4fbd810 Redundant superinterface Serializable for the type RowSetDynaClass, already defined by JDBCDynaClass
     new b8e8d1f1 Unnecessary cast from PropertyDescriptor to PropertyDescriptor
     new a9a83600 The declared exception IllegalAccessException is not actually thrown by the method testArrayProperty() from type Jira465TestCase
     new 41a3f255 The declared exception IllegalAccessException is not actually thrown by the method testArrayProperty() from type Jira465TestCase
     new 6627fad0 Whitespace
     new a4d861f2 Port to Java 1.4 Throwable APIs (!)

The 10 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/changes/changes.xml                            |   1 +
 .../java/org/apache/commons/beanutils/BeanMap.java |  50 +-
 .../beanutils/BeanPropertyValueChangeClosure.java  |  15 +-
 .../BeanPropertyValueEqualsPredicate.java          |  16 +-
 .../beanutils/BeanToPropertyValueTransformer.java  |  16 +-
 .../commons/beanutils/ConversionException.java     |  45 +-
 .../commons/beanutils/ConvertingWrapDynaBean.java  |  12 +-
 .../commons/beanutils/PropertyUtilsBean.java       | 554 +++++++--------------
 .../commons/beanutils/ResultSetDynaClass.java      |   2 +-
 .../apache/commons/beanutils/RowSetDynaClass.java  |   3 +-
 .../apache/commons/beanutils/WeakFastHashMap.java  |  35 +-
 .../beanutils/converters/AbstractConverter.java    |   1 -
 .../locale/converters/DecimalLocaleConverter.java  |   3 +-
 .../commons/beanutils/BeanUtilsTestCase.java       |   6 +-
 .../commons/beanutils/IndexedPropertyTestCase.java |  10 +-
 .../commons/beanutils/bugs/Jira465TestCase.java    |   4 +-
 16 files changed, 248 insertions(+), 525 deletions(-)


(commons-beanutils) 03/10: Statement unnecessarily nested within else clause

Posted by gg...@apache.org.
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

commit 16b602660c66b83d32e84dcb87302f3dab286d9b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:33:55 2024 -0400

    Statement unnecessarily nested within else clause
---
 .../apache/commons/beanutils/WeakFastHashMap.java  | 35 ++++++++++------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/src/main/java/org/apache/commons/beanutils/WeakFastHashMap.java b/src/main/java/org/apache/commons/beanutils/WeakFastHashMap.java
index e42a7afc..9ff37bbb 100644
--- a/src/main/java/org/apache/commons/beanutils/WeakFastHashMap.java
+++ b/src/main/java/org/apache/commons/beanutils/WeakFastHashMap.java
@@ -217,10 +217,9 @@ class WeakFastHashMap<K, V> extends HashMap<K, V> {
                     map = temp;
                     return r;
                 }
-            } else {
-                synchronized (map) {
-                    return get(map).remove(o);
-                }
+            }
+            synchronized (map) {
+                return get(map).remove(o);
             }
         }
 
@@ -233,10 +232,9 @@ class WeakFastHashMap<K, V> extends HashMap<K, V> {
                     map = temp;
                     return r;
                 }
-            } else {
-                synchronized (map) {
-                    return get(map).removeAll(o);
-                }
+            }
+            synchronized (map) {
+                return get(map).removeAll(o);
             }
         }
 
@@ -249,10 +247,9 @@ class WeakFastHashMap<K, V> extends HashMap<K, V> {
                     map = temp;
                     return r;
                 }
-            } else {
-                synchronized (map) {
-                    return get(map).retainAll(o);
-                }
+            }
+            synchronized (map) {
+                return get(map).retainAll(o);
             }
         }
 
@@ -665,10 +662,9 @@ class WeakFastHashMap<K, V> extends HashMap<K, V> {
                 map = temp;
                 return result;
             }
-        } else {
-            synchronized (map) {
-                return map.put(key, value);
-            }
+        }
+        synchronized (map) {
+            return map.put(key, value);
         }
     }
 
@@ -712,10 +708,9 @@ class WeakFastHashMap<K, V> extends HashMap<K, V> {
                 map = temp;
                 return result;
             }
-        } else {
-            synchronized (map) {
-                return map.remove(key);
-            }
+        }
+        synchronized (map) {
+            return map.remove(key);
         }
     }
 


(commons-beanutils) 01/10: The static method getInstance(Locale) from the type NumberFormat should be accessed directly in DecimalLocaleConverter

Posted by gg...@apache.org.
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

commit c2ea21e7f05c51be630cbe833f511bf982141fb8
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:31:26 2024 -0400

    The static method getInstance(Locale) from the type NumberFormat should
    be accessed directly in DecimalLocaleConverter
---
 .../commons/beanutils/locale/converters/DecimalLocaleConverter.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java b/src/main/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
index 3adef33f..3174efa9 100644
--- a/src/main/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
+++ b/src/main/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
@@ -18,6 +18,7 @@
 package org.apache.commons.beanutils.locale.converters;
 
 import java.text.DecimalFormat;
+import java.text.NumberFormat;
 import java.text.ParseException;
 import java.util.Locale;
 
@@ -232,7 +233,7 @@ public class DecimalLocaleConverter extends BaseLocaleConverter {
         // fact that objects returned from this method have the same toString
         // representation, each call to getInstance actually returns a new
         // object.
-        final DecimalFormat formatter = (DecimalFormat) DecimalFormat.getInstance(locale);
+        final DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(locale);
 
         // if some constructors default pattern to null, it makes only sense
         // to handle null pattern gracefully


(commons-beanutils) 07/10: The declared exception IllegalAccessException is not actually thrown by the method testArrayProperty() from type Jira465TestCase

Posted by gg...@apache.org.
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

commit a9a83600f8bf1076c37a921c256cb78997b7f02f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:36:40 2024 -0400

    The declared exception IllegalAccessException is not actually thrown by
    the method testArrayProperty() from type Jira465TestCase
---
 src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java b/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java
index f303d244..2054d4fa 100644
--- a/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java
+++ b/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.beanutils.bugs;
 
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -108,8 +107,7 @@ public class Jira465TestCase extends TestCase {
         assertEquals("Wrong value", NEW_VALUE, bean.getFoo(0));
     }
 
-    public void testArrayProperty() throws InvocationTargetException,
-            IllegalAccessException {
+    public void testArrayProperty() throws IllegalAccessException {
         final ArrayProp bean = new ArrayProp();
         changeValue(bean);
         assertEquals("Wrong value", NEW_VALUE, bean.getFoo()[0]);


(commons-beanutils) 09/10: Whitespace

Posted by gg...@apache.org.
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

commit 6627fad0792a3e2e35e316205e11e7658f58dd09
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:40:54 2024 -0400

    Whitespace
---
 .../apache/commons/beanutils/ConversionException.java   | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/src/main/java/org/apache/commons/beanutils/ConversionException.java b/src/main/java/org/apache/commons/beanutils/ConversionException.java
index 21e2854a..e6949c9d 100644
--- a/src/main/java/org/apache/commons/beanutils/ConversionException.java
+++ b/src/main/java/org/apache/commons/beanutils/ConversionException.java
@@ -15,22 +15,16 @@
  * limitations under the License.
  */
 
-
 package org.apache.commons.beanutils;
 
-
 /**
  * <p>A <strong>ConversionException</strong> indicates that a call to
  * <code>Converter.convert()</code> has failed to complete successfully.
  *
  * @since 1.3
  */
-
 public class ConversionException extends RuntimeException {
 
-
-
-
     private static final long serialVersionUID = 1L;
 
     /**
@@ -39,19 +33,15 @@ public class ConversionException extends RuntimeException {
      */
     protected Throwable cause = null;
 
-
     /**
      * Construct a new exception with the specified message.
      *
      * @param message The message describing this exception
      */
     public ConversionException(final String message) {
-
         super(message);
-
     }
 
-
     /**
      * Construct a new exception with the specified message and root cause.
      *
@@ -59,22 +49,16 @@ public class ConversionException extends RuntimeException {
      * @param cause The root cause of this exception
      */
     public ConversionException(final String message, final Throwable cause) {
-
         super(message);
         this.cause = cause;
-
     }
 
-
-
-
     /**
      * Construct a new exception with the specified root cause.
      *
      * @param cause The root cause of this exception
      */
     public ConversionException(final Throwable cause) {
-
         super(cause.getMessage());
         this.cause = cause;
 
@@ -89,5 +73,4 @@ public class ConversionException extends RuntimeException {
         return this.cause;
     }
 
-
 }


(commons-beanutils) 08/10: The declared exception IllegalAccessException is not actually thrown by the method testArrayProperty() from type Jira465TestCase

Posted by gg...@apache.org.
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

commit 41a3f25559fea84c8262d91269dfac551543a68f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:37:01 2024 -0400

    The declared exception IllegalAccessException is not actually thrown by
    the method testArrayProperty() from type Jira465TestCase
---
 src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java b/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java
index 2054d4fa..3a51b9d7 100644
--- a/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java
+++ b/src/test/java/org/apache/commons/beanutils/bugs/Jira465TestCase.java
@@ -107,7 +107,7 @@ public class Jira465TestCase extends TestCase {
         assertEquals("Wrong value", NEW_VALUE, bean.getFoo(0));
     }
 
-    public void testArrayProperty() throws IllegalAccessException {
+    public void testArrayProperty() {
         final ArrayProp bean = new ArrayProp();
         changeValue(bean);
         assertEquals("Wrong value", NEW_VALUE, bean.getFoo()[0]);


(commons-beanutils) 02/10: Redundant superinterface DynaClass for the type ResultSetDynaClass, already defined by JDBCDynaClass in ResultSetDynaClass

Posted by gg...@apache.org.
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

commit 56c5214a286948dac1b83d39121c2e393e24dfb7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:32:31 2024 -0400

    Redundant superinterface DynaClass for the type ResultSetDynaClass,
    already defined by JDBCDynaClass in ResultSetDynaClass
---
 src/main/java/org/apache/commons/beanutils/ResultSetDynaClass.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/beanutils/ResultSetDynaClass.java b/src/main/java/org/apache/commons/beanutils/ResultSetDynaClass.java
index 3af175f5..4e820986 100644
--- a/src/main/java/org/apache/commons/beanutils/ResultSetDynaClass.java
+++ b/src/main/java/org/apache/commons/beanutils/ResultSetDynaClass.java
@@ -79,7 +79,7 @@ import java.util.Iterator;
  *
  */
 
-public class ResultSetDynaClass extends JDBCDynaClass implements DynaClass {
+public class ResultSetDynaClass extends JDBCDynaClass {
 
 
 


(commons-beanutils) 04/10: Redundant superinterface DynaClass for the type RowSetDynaClass, already defined by JDBCDynaClass

Posted by gg...@apache.org.
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

commit b260d84f6999c956703fe34c1e9d9eea6e09b8a6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:34:29 2024 -0400

    Redundant superinterface DynaClass for the type RowSetDynaClass, already
    defined by JDBCDynaClass
---
 src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java b/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java
index 6e6239f4..35c6ad92 100644
--- a/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java
+++ b/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java
@@ -64,7 +64,7 @@ import java.util.List;
  *
  */
 
-public class RowSetDynaClass extends JDBCDynaClass implements DynaClass, Serializable {
+public class RowSetDynaClass extends JDBCDynaClass implements Serializable {
 
 
 


(commons-beanutils) 10/10: Port to Java 1.4 Throwable APIs (!)

Posted by gg...@apache.org.
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

commit a4d861f26a5d2b944ddf5588392810b9602defa4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:54:31 2024 -0400

    Port to Java 1.4 Throwable APIs (!)
---
 src/changes/changes.xml                            |   1 +
 .../java/org/apache/commons/beanutils/BeanMap.java |  50 +-
 .../beanutils/BeanPropertyValueChangeClosure.java  |  15 +-
 .../BeanPropertyValueEqualsPredicate.java          |  16 +-
 .../beanutils/BeanToPropertyValueTransformer.java  |  16 +-
 .../commons/beanutils/ConversionException.java     |  28 +-
 .../commons/beanutils/ConvertingWrapDynaBean.java  |  12 +-
 .../commons/beanutils/PropertyUtilsBean.java       | 554 +++++++--------------
 .../beanutils/converters/AbstractConverter.java    |   1 -
 .../commons/beanutils/BeanUtilsTestCase.java       |   6 +-
 10 files changed, 223 insertions(+), 476 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 1ba88645..0f8cb82a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -33,6 +33,7 @@
       <action type="fix" issue="BEANUTILS-541" dev="ggregory" due-to="Sergey Chernov">FluentPropertyBeanIntrospector caches corrupted writeMethod (1.x backport) #69.</action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Replace internal use of Locale.ENGLISH with Locale.ROOT.</action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Replace Maven CLIRR plugin with JApiCmp.</action>
+      <action type="fix" dev="ggregory" due-to="Gary Gregory">Port to Java 1.4 Throwable APIs (!).</action>
       <!-- UPDATE -->
       <action dev="ggregory" type="update" due-to="Gary Gregory">Bump org.apache.commons:commons-parent from 47 to 73.</action>
       <action dev="ggregory" type="update" due-to="Gary Gregory">Bump Java requirement from Java 6 to 8.</action>
diff --git a/src/main/java/org/apache/commons/beanutils/BeanMap.java b/src/main/java/org/apache/commons/beanutils/BeanMap.java
index aef97ba9..b789a85d 100644
--- a/src/main/java/org/apache/commons/beanutils/BeanMap.java
+++ b/src/main/java/org/apache/commons/beanutils/BeanMap.java
@@ -235,20 +235,15 @@ public class BeanMap extends AbstractMap<Object, Object> implements Cloneable {
      */
     @Override
     public void clear() {
-        if(bean == null) {
+        if (bean == null) {
             return;
         }
-
         Class<? extends Object> beanClass = null;
         try {
             beanClass = bean.getClass();
             bean = beanClass.getConstructor().newInstance();
-        }
-        catch (final Exception e) {
-            final UnsupportedOperationException uoe =
-                new UnsupportedOperationException("Could not create new instance of class: " + beanClass);
-            BeanUtils.initCause(uoe, e);
-            throw uoe;
+        } catch (final Exception e) {
+            throw new UnsupportedOperationException("Could not create new instance of class: " + beanClass, e);
         }
     }
 
@@ -281,48 +276,39 @@ public class BeanMap extends AbstractMap<Object, Object> implements Cloneable {
      */
     @Override
     public Object clone() throws CloneNotSupportedException {
-        final BeanMap newMap = (BeanMap)super.clone();
-
-        if(bean == null) {
-            // no bean, just an empty bean map at the moment.  return a newly
+        final BeanMap newMap = (BeanMap) super.clone();
+        if (bean == null) {
+            // no bean, just an empty bean map at the moment. return a newly
             // cloned and empty bean map.
             return newMap;
         }
-
         Object newBean = null;
         final Class<? extends Object> beanClass = bean.getClass(); // Cannot throw Exception
         try {
             newBean = beanClass.getConstructor().newInstance();
         } catch (final Exception e) {
             // unable to instantiate
-            final CloneNotSupportedException cnse = new CloneNotSupportedException
-                ("Unable to instantiate the underlying bean \"" +
-                 beanClass.getName() + "\": " + e);
-            BeanUtils.initCause(cnse, e);
+            final CloneNotSupportedException cnse = new CloneNotSupportedException(
+                    "Unable to instantiate the underlying bean \"" + beanClass.getName() + "\": " + e);
+            cnse.initCause(e);
             throw cnse;
         }
-
         try {
             newMap.setBean(newBean);
         } catch (final Exception exception) {
-            final CloneNotSupportedException cnse = new CloneNotSupportedException
-                ("Unable to set bean in the cloned bean map: " +
-                 exception);
-            BeanUtils.initCause(cnse, exception);
+            final CloneNotSupportedException cnse = new CloneNotSupportedException("Unable to set bean in the cloned bean map: " + exception);
+            cnse.initCause(exception);
             throw cnse;
         }
-
         try {
             for (final Object key : readMethods.keySet()) {
-                if(getWriteMethod(key) != null) {
+                if (getWriteMethod(key) != null) {
                     newMap.put(key, get(key));
                 }
             }
         } catch (final Exception exception) {
-            final CloneNotSupportedException cnse = new CloneNotSupportedException
-                ("Unable to copy bean values to cloned bean map: " +
-                 exception);
-            BeanUtils.initCause(cnse, exception);
+            final CloneNotSupportedException cnse = new CloneNotSupportedException("Unable to copy bean values to cloned bean map: " + exception);
+            cnse.initCause(exception);
             throw cnse;
         }
 
@@ -446,9 +432,7 @@ public class BeanMap extends AbstractMap<Object, Object> implements Cloneable {
             return new Object[] { value };
         }
         catch ( final InvocationTargetException | InstantiationException e ) {
-            final IllegalArgumentException iae = new IllegalArgumentException(e.getMessage());
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(e.getMessage(), e);
         }
     }
 
@@ -750,9 +734,7 @@ public class BeanMap extends AbstractMap<Object, Object> implements Cloneable {
                 firePropertyChange( name, oldValue, newValue );
             }
             catch ( final InvocationTargetException | IllegalAccessException e ) {
-                final IllegalArgumentException iae = new IllegalArgumentException(e.getMessage());
-                BeanUtils.initCause(iae, e);
-                throw iae;
+                throw new IllegalArgumentException(e.getMessage(), e);
             }
             return oldValue;
         }
diff --git a/src/main/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosure.java b/src/main/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosure.java
index 27729721..31ea15f6 100644
--- a/src/main/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosure.java
+++ b/src/main/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosure.java
@@ -165,26 +165,19 @@ public class BeanPropertyValueChangeClosure implements Closure {
             final String errorMsg = "Unable to execute Closure. Null value encountered in property path...";
 
             if (!ignoreNull) {
-                final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-                BeanUtils.initCause(iae, e);
+                final IllegalArgumentException iae = new IllegalArgumentException(errorMsg, e);
                 throw iae;
             }
             log.warn("WARNING: " + errorMsg + e);
         } catch (final IllegalAccessException e) {
             final String errorMsg = "Unable to access the property provided.";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         } catch (final InvocationTargetException e) {
             final String errorMsg = "Exception occurred in property's getter";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         } catch (final NoSuchMethodException e) {
             final String errorMsg = "Property not found";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         }
     }
 
diff --git a/src/main/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicate.java b/src/main/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicate.java
index a15d0f6b..20db8344 100644
--- a/src/main/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicate.java
+++ b/src/main/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicate.java
@@ -200,26 +200,18 @@ public class BeanPropertyValueEqualsPredicate implements Predicate {
             final String errorMsg = "Problem during evaluation. Null value encountered in property path...";
 
             if (!ignoreNull) {
-                final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-                BeanUtils.initCause(iae, e);
-                throw iae;
+                throw new IllegalArgumentException(errorMsg, e);
             }
             log.warn("WARNING: " + errorMsg + e);
         } catch (final IllegalAccessException e) {
             final String errorMsg = "Unable to access the property provided.";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         } catch (final InvocationTargetException e) {
             final String errorMsg = "Exception occurred in property's getter";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         } catch (final NoSuchMethodException e) {
             final String errorMsg = "Property not found.";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         }
 
         return evaluation;
diff --git a/src/main/java/org/apache/commons/beanutils/BeanToPropertyValueTransformer.java b/src/main/java/org/apache/commons/beanutils/BeanToPropertyValueTransformer.java
index c21c47cd..0427f613 100644
--- a/src/main/java/org/apache/commons/beanutils/BeanToPropertyValueTransformer.java
+++ b/src/main/java/org/apache/commons/beanutils/BeanToPropertyValueTransformer.java
@@ -178,27 +178,19 @@ public class BeanToPropertyValueTransformer implements Transformer {
             final String errorMsg = "Problem during transformation. Null value encountered in property path...";
 
             if (!ignoreNull) {
-                final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-                BeanUtils.initCause(iae, e);
-                throw iae;
+                throw new IllegalArgumentException(errorMsg, e);
             }
             log.warn("WARNING: " + errorMsg + e);
         } catch (final IllegalAccessException e) {
             final String errorMsg = "Unable to access the property provided.";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         } catch (final InvocationTargetException e) {
             final String errorMsg = "Exception occurred in property's getter";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         } catch (final NoSuchMethodException e) {
             final String errorMsg = "No property found for name [" +
                 propertyName + "]";
-            final IllegalArgumentException iae = new IllegalArgumentException(errorMsg);
-            BeanUtils.initCause(iae, e);
-            throw iae;
+            throw new IllegalArgumentException(errorMsg, e);
         }
 
         return propertyValue;
diff --git a/src/main/java/org/apache/commons/beanutils/ConversionException.java b/src/main/java/org/apache/commons/beanutils/ConversionException.java
index e6949c9d..da055ef7 100644
--- a/src/main/java/org/apache/commons/beanutils/ConversionException.java
+++ b/src/main/java/org/apache/commons/beanutils/ConversionException.java
@@ -28,13 +28,7 @@ public class ConversionException extends RuntimeException {
     private static final long serialVersionUID = 1L;
 
     /**
-     * The root cause of this <code>ConversionException</code>, compatible with
-     * JDK 1.4's extensions to <code>java.lang.Throwable</code>.
-     */
-    protected Throwable cause = null;
-
-    /**
-     * Construct a new exception with the specified message.
+     * Constructs a new exception with the specified message.
      *
      * @param message The message describing this exception
      */
@@ -43,34 +37,22 @@ public class ConversionException extends RuntimeException {
     }
 
     /**
-     * Construct a new exception with the specified message and root cause.
+     * Constructs a new exception with the specified message and root cause.
      *
      * @param message The message describing this exception
      * @param cause The root cause of this exception
      */
     public ConversionException(final String message, final Throwable cause) {
-        super(message);
-        this.cause = cause;
+        super(message, cause);
     }
 
     /**
-     * Construct a new exception with the specified root cause.
+     * Constructs a new exception with the specified root cause.
      *
      * @param cause The root cause of this exception
      */
     public ConversionException(final Throwable cause) {
-        super(cause.getMessage());
-        this.cause = cause;
-
-    }
-
-    /**
-     * Return the root cause of this conversion exception.
-     * @return the root cause of this conversion exception
-     */
-    @Override
-    public Throwable getCause() {
-        return this.cause;
+        super(cause);
     }
 
 }
diff --git a/src/main/java/org/apache/commons/beanutils/ConvertingWrapDynaBean.java b/src/main/java/org/apache/commons/beanutils/ConvertingWrapDynaBean.java
index 7b45c8fa..192e15dc 100644
--- a/src/main/java/org/apache/commons/beanutils/ConvertingWrapDynaBean.java
+++ b/src/main/java/org/apache/commons/beanutils/ConvertingWrapDynaBean.java
@@ -64,21 +64,13 @@ public class ConvertingWrapDynaBean extends WrapDynaBean {
      */
     @Override
     public void set(final String name, final Object value) {
-
         try {
             BeanUtils.copyProperty(instance, name, value);
         } catch (final InvocationTargetException ite) {
             final Throwable cause = ite.getTargetException();
-            throw new IllegalArgumentException
-                    ("Error setting property '" + name +
-                              "' nested exception - " + cause);
+            throw new IllegalArgumentException("Error setting property '" + name + "' nested exception - " + cause);
         } catch (final Throwable t) {
-            final IllegalArgumentException iae = new IllegalArgumentException
-                    ("Error setting property '" + name +
-                              "', exception - " + t);
-            BeanUtils.initCause(iae, t);
-            throw iae;
+            throw new IllegalArgumentException("Error setting property '" + name + "', exception - " + t, t);
         }
-
     }
 }
diff --git a/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java b/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
index 11d2ac94..59d9cc41 100644
--- a/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
+++ b/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
@@ -1336,30 +1336,19 @@ 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");
+    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");
         }
-
         try {
-
             return method.invoke(bean, values);
-
         } catch (final NullPointerException | IllegalArgumentException cause) {
             final StringBuilder valueString = new StringBuilder();
             if (values != null) {
                 for (int i = 0; i < values.length; i++) {
-                    if (i>0) {
-                        valueString.append(", ") ;
+                    if (i > 0) {
+                        valueString.append(", ");
                     }
                     if (values[i] == null) {
                         valueString.append("<null>");
@@ -1378,28 +1367,22 @@ public class PropertyUtilsBean {
                     expectedString.append(parTypes[i].getName());
                 }
             }
-            final IllegalArgumentException e = new IllegalArgumentException(
-                "Cannot invoke " + method.getDeclaringClass().getName() + "." + method.getName() + " on bean class '" + bean.getClass() + "' - " + cause.getMessage() + " - had objects of type \"" + valueString.append("\" but expected signature \"").append(expectedString.toString()).append("\"").toString()
-                );
-            BeanUtils.initCause(e, cause);
-            throw e;
+            throw new IllegalArgumentException("Cannot invoke " + method.getDeclaringClass().getName() + "." + method.getName() + " on bean class '" +
+                    bean.getClass() + "' - " + cause.getMessage() + " - had objects of type \"" +
+                    valueString.append("\" but expected signature \"").append(expectedString.toString()).append("\"").toString(), cause);
 
         }
     }
 
-
     /**
-     * <p>Return <code>true</code> if the specified property name identifies
-     * a readable property on the specified bean; otherwise, return
-     * <code>false</code>.
+     * <p>
+     * Return <code>true</code> if the specified property name identifies a readable property on the specified bean; otherwise, return <code>false</code>.
      *
      * @param bean Bean to be examined (may be a {@link DynaBean}
      * @param name Property name to be evaluated
-     * @return <code>true</code> if the property is readable,
-     * otherwise <code>false</code>
+     * @return <code>true</code> if the property is readable, otherwise <code>false</code>
      *
-     * @throws IllegalArgumentException if <code>bean</code>
-     *  or <code>name</code> is <code>null</code>
+     * @throws IllegalArgumentException if <code>bean</code> or <code>name</code> is <code>null</code>
      *
      * @since BeanUtils 1.6
      */
@@ -1410,8 +1393,7 @@ public class PropertyUtilsBean {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
 
         // Resolve nested references
@@ -1424,9 +1406,7 @@ public class PropertyUtilsBean {
                 return false;
             }
             if (nestedBean == null) {
-                throw new NestedNullException
-                        ("Null property value for '" + next +
-                        "' on bean class '" + bean.getClass() + "'");
+                throw new NestedNullException("Null property value for '" + next + "' on bean class '" + bean.getClass() + "'");
             }
             bean = nestedBean;
             name = resolver.remove(name);
@@ -1438,7 +1418,7 @@ public class PropertyUtilsBean {
         // Treat WrapDynaBean as special case - may be a write-only property
         // (see Jira issue# BEANUTILS-61)
         if (bean instanceof WrapDynaBean) {
-            bean = ((WrapDynaBean)bean).getInstance();
+            bean = ((WrapDynaBean) bean).getInstance();
         }
 
         // Return the requested result
@@ -1447,8 +1427,7 @@ public class PropertyUtilsBean {
             return ((DynaBean) bean).getDynaClass().getDynaProperty(name) != null;
         }
         try {
-            final PropertyDescriptor desc =
-                getPropertyDescriptor(bean, name);
+            final PropertyDescriptor desc = getPropertyDescriptor(bean, name);
             if (desc == null) {
                 return false;
             }
@@ -1468,19 +1447,15 @@ public class PropertyUtilsBean {
 
     }
 
-
     /**
-     * <p>Return <code>true</code> if the specified property name identifies
-     * a writeable property on the specified bean; otherwise, return
-     * <code>false</code>.
+     * <p>
+     * Return <code>true</code> if the specified property name identifies a writeable property on the specified bean; otherwise, return <code>false</code>.
      *
      * @param bean Bean to be examined (may be a {@link DynaBean}
      * @param name Property name to be evaluated
-     * @return <code>true</code> if the property is writeable,
-     * otherwise <code>false</code>
+     * @return <code>true</code> if the property is writeable, otherwise <code>false</code>
      *
-     * @throws IllegalArgumentException if <code>bean</code>
-     *  or <code>name</code> is <code>null</code>
+     * @throws IllegalArgumentException if <code>bean</code> or <code>name</code> is <code>null</code>
      *
      * @since BeanUtils 1.6
      */
@@ -1491,8 +1466,7 @@ public class PropertyUtilsBean {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
 
         // Resolve nested references
@@ -1505,9 +1479,7 @@ public class PropertyUtilsBean {
                 return false;
             }
             if (nestedBean == null) {
-                throw new NestedNullException
-                        ("Null property value for '" + next +
-                        "' on bean class '" + bean.getClass() + "'");
+                throw new NestedNullException("Null property value for '" + next + "' on bean class '" + bean.getClass() + "'");
             }
             bean = nestedBean;
             name = resolver.remove(name);
@@ -1519,7 +1491,7 @@ public class PropertyUtilsBean {
         // Treat WrapDynaBean as special case - may be a read-only property
         // (see Jira issue# BEANUTILS-61)
         if (bean instanceof WrapDynaBean) {
-            bean = ((WrapDynaBean)bean).getInstance();
+            bean = ((WrapDynaBean) bean).getInstance();
         }
 
         // Return the requested result
@@ -1528,8 +1500,7 @@ public class PropertyUtilsBean {
             return ((DynaBean) bean).getDynaClass().getDynaProperty(name) != null;
         }
         try {
-            final PropertyDescriptor desc =
-                getPropertyDescriptor(bean, name);
+            final PropertyDescriptor desc = getPropertyDescriptor(bean, name);
             if (desc == null) {
                 return false;
             }
@@ -1549,23 +1520,20 @@ public class PropertyUtilsBean {
 
     }
 
-
     /**
      * Removes the specified <code>BeanIntrospector</code>.
      *
      * @param introspector the <code>BeanIntrospector</code> to be removed
-     * @return <b>true</b> if the <code>BeanIntrospector</code> existed and
-     *         could be removed, <b>false</b> otherwise
+     * @return <b>true</b> if the <code>BeanIntrospector</code> existed and could be removed, <b>false</b> otherwise
      * @since 1.9
      */
     public boolean removeBeanIntrospector(final BeanIntrospector introspector) {
         return introspectors.remove(introspector);
     }
 
-
     /**
-     * Resets the {@link BeanIntrospector} objects registered at this instance. After this
-     * method was called, only the default {@code BeanIntrospector} is registered.
+     * Resets the {@link BeanIntrospector} objects registered at this instance. After this method was called, only the default {@code BeanIntrospector} is
+     * registered.
      *
      * @since 1.9
      */
@@ -1575,33 +1543,23 @@ public class PropertyUtilsBean {
         introspectors.add(SuppressPropertiesBeanIntrospector.SUPPRESS_CLASS);
     }
 
-
     /**
-     * Set the value of the specified indexed property of the specified
-     * bean, with no type conversions.  In addition to supporting the JavaBeans
-     * specification, this method has been extended to support
-     * <code>List</code> objects as well.
+     * Set the value of the specified indexed property of the specified bean, with no type conversions. In addition to supporting the JavaBeans specification,
+     * this method has been extended to support <code>List</code> objects as well.
      *
-     * @param bean Bean whose property is to be set
-     * @param name Simple property name of the property value to be set
+     * @param bean  Bean whose property is to be set
+     * @param name  Simple property name of the property value to be set
      * @param index Index of the property value to be set
      * @param value Value to which the indexed property element is to be set
      *
-     * @throws IndexOutOfBoundsException if the specified index
-     *  is outside the valid range for the underlying property
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws IllegalArgumentException if <code>bean</code> or
-     *  <code>name</code> is null
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * @throws IndexOutOfBoundsException if the specified index is outside the valid range for the underlying property
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws IllegalArgumentException  if <code>bean</code> or <code>name</code> is null
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
-    public void setIndexedProperty(final Object bean, final String name,
-                                          final int index, final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
+    public void setIndexedProperty(final Object bean, final String name, final int index, final Object value)
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
@@ -1618,34 +1576,28 @@ public class PropertyUtilsBean {
             }
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
 
         // Handle DynaBean instances specially
         if (bean instanceof DynaBean) {
-            final DynaProperty descriptor =
-                    ((DynaBean) bean).getDynaClass().getDynaProperty(name);
+            final DynaProperty descriptor = ((DynaBean) bean).getDynaClass().getDynaProperty(name);
             if (descriptor == null) {
-                throw new NoSuchMethodException("Unknown property '" +
-                        name + "' on bean class '" + bean.getClass() + "'");
+                throw new NoSuchMethodException("Unknown property '" + name + "' on bean class '" + bean.getClass() + "'");
             }
             ((DynaBean) bean).set(name, index, value);
             return;
         }
 
         // Retrieve the property descriptor for the specified property
-        final PropertyDescriptor descriptor =
-                getPropertyDescriptor(bean, name);
+        final PropertyDescriptor descriptor = getPropertyDescriptor(bean, name);
         if (descriptor == null) {
-            throw new NoSuchMethodException("Unknown property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new NoSuchMethodException("Unknown property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
 
         // Call the indexed setter method if there is one
         if (descriptor instanceof IndexedPropertyDescriptor) {
-            Method writeMethod = ((IndexedPropertyDescriptor) descriptor).
-                    getIndexedWriteMethod();
+            Method writeMethod = ((IndexedPropertyDescriptor) descriptor).getIndexedWriteMethod();
             writeMethod = MethodUtils.getAccessibleMethod(bean.getClass(), writeMethod);
             if (writeMethod != null) {
                 final Object[] subscript = new Object[2];
@@ -1653,20 +1605,14 @@ public class PropertyUtilsBean {
                 subscript[1] = value;
                 try {
                     if (log.isTraceEnabled()) {
-                        final String valueClassName =
-                            value == null ? "<null>"
-                                          : value.getClass().getName();
-                        log.trace("setSimpleProperty: Invoking method "
-                                  + writeMethod +" with index=" + index
-                                  + ", value=" + value
-                                  + " (class " + valueClassName+ ")");
+                        final String valueClassName = value == null ? "<null>" : value.getClass().getName();
+                        log.trace("setSimpleProperty: Invoking method " + writeMethod + " with index=" + index + ", value=" + value + " (class " +
+                                valueClassName + ")");
                     }
                     invokeMethod(writeMethod, bean, subscript);
                 } catch (final InvocationTargetException e) {
-                    if (e.getTargetException() instanceof
-                            IndexOutOfBoundsException) {
-                        throw (IndexOutOfBoundsException)
-                                e.getTargetException();
+                    if (e.getTargetException() instanceof IndexOutOfBoundsException) {
+                        throw (IndexOutOfBoundsException) e.getTargetException();
                     }
                     throw e;
                 }
@@ -1677,16 +1623,14 @@ public class PropertyUtilsBean {
         // Otherwise, the underlying property must be an array or a list
         final Method readMethod = getReadMethod(bean.getClass(), descriptor);
         if (readMethod == null) {
-            throw new NoSuchMethodException("Property '" + name +
-                    "' has no getter method on bean class '" + bean.getClass() + "'");
+            throw new NoSuchMethodException("Property '" + name + "' has no getter method on bean class '" + bean.getClass() + "'");
         }
 
         // Call the property getter to get the array or list
         final Object array = invokeMethod(readMethod, bean, EMPTY_OBJECT_ARRAY);
         if (!array.getClass().isArray()) {
             if (!(array instanceof List)) {
-                throw new IllegalArgumentException("Property '" + name +
-                        "' is not indexed on bean class '" + bean.getClass() + "'");
+                throw new IllegalArgumentException("Property '" + name + "' is not indexed on bean class '" + bean.getClass() + "'");
             }
             // Modify the specified value in the List
             final List<Object> list = toObjectList(array);
@@ -1699,41 +1643,28 @@ public class PropertyUtilsBean {
     }
 
     /**
-     * Set the value of the specified indexed property of the specified
-     * bean, with no type conversions.  The zero-relative index of the
-     * required value must be included (in square brackets) as a suffix to
-     * the property name, or <code>IllegalArgumentException</code> will be
-     * thrown.  In addition to supporting the JavaBeans specification, this
-     * method has been extended to support <code>List</code> objects as well.
-     *
-     * @param bean Bean whose property is to be modified
-     * @param name <code>propertyname[index]</code> of the property value
-     *  to be modified
-     * @param value Value to which the specified property element
-     *  should be set
-     *
-     * @throws IndexOutOfBoundsException if the specified index
-     *  is outside the valid range for the underlying property
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws IllegalArgumentException if <code>bean</code> or
-     *  <code>name</code> is null
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * Set the value of the specified indexed property of the specified bean, with no type conversions. The zero-relative index of the required value must be
+     * included (in square brackets) as a suffix to the property name, or <code>IllegalArgumentException</code> will be thrown. In addition to supporting the
+     * JavaBeans specification, this method has been extended to support <code>List</code> objects as well.
+     *
+     * @param bean  Bean whose property is to be modified
+     * @param name  <code>propertyname[index]</code> of the property value to be modified
+     * @param value Value to which the specified property element should be set
+     *
+     * @throws IndexOutOfBoundsException if the specified index is outside the valid range for the underlying property
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws IllegalArgumentException  if <code>bean</code> or <code>name</code> is null
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
-    public void setIndexedProperty(final Object bean, String name,
-                                          final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
+    public void setIndexedProperty(final Object bean, String name, final Object value)
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
 
         // Identify the index of the requested individual property
@@ -1741,12 +1672,10 @@ public class PropertyUtilsBean {
         try {
             index = resolver.getIndex(name);
         } catch (final IllegalArgumentException e) {
-            throw new IllegalArgumentException("Invalid indexed property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Invalid indexed property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
         if (index < 0) {
-            throw new IllegalArgumentException("Invalid indexed property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Invalid indexed property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
 
         // Isolate the name
@@ -1757,53 +1686,37 @@ public class PropertyUtilsBean {
 
     }
 
-
-
     /**
-     * Set the value of the specified mapped property of the
-     * specified bean, with no type conversions.  The key of the
-     * value to set must be included (in brackets) as a suffix to
-     * the property name, or <code>IllegalArgumentException</code> will be
-     * thrown.
+     * Set the value of the specified mapped property of the specified bean, with no type conversions. The key of the value to set must be included (in
+     * brackets) as a suffix to the property name, or <code>IllegalArgumentException</code> will be thrown.
      *
-     * @param bean Bean whose property is to be set
-     * @param name <code>propertyname(key)</code> of the property value
-     *  to be set
+     * @param bean  Bean whose property is to be set
+     * @param name  <code>propertyname(key)</code> of the property value to be set
      * @param value The property value to be set
      *
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
-    public void setMappedProperty(final Object bean, String name,
-                                         final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
+    public void setMappedProperty(final Object bean, String name, final Object value)
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
 
         // Identify the key of the requested individual property
-        String key  = null;
+        String key = null;
         try {
             key = resolver.getKey(name);
         } catch (final IllegalArgumentException e) {
-            throw new IllegalArgumentException
-                    ("Invalid mapped property '" + name +
-                    "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Invalid mapped property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
         if (key == null) {
-            throw new IllegalArgumentException
-                    ("Invalid mapped property '" + name +
-                    "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Invalid mapped property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
 
         // Isolate the name
@@ -1814,142 +1727,108 @@ public class PropertyUtilsBean {
 
     }
 
-
     /**
-     * Set the value of the specified mapped property of the specified
-     * bean, with no type conversions.
+     * Set the value of the specified mapped property of the specified bean, with no type conversions.
      *
-     * @param bean Bean whose property is to be set
-     * @param name Mapped property name of the property value to be set
-     * @param key Key of the property value to be set
+     * @param bean  Bean whose property is to be set
+     * @param name  Mapped property name of the property value to be set
+     * @param key   Key of the property value to be set
      * @param value The property value to be set
      *
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
-    public void setMappedProperty(final Object bean, final String name,
-                                         final String key, final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
+    public void setMappedProperty(final Object bean, final String name, final String key, final Object value)
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
         if (key == null) {
-            throw new IllegalArgumentException("No key specified for property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("No key specified for property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
 
         // Handle DynaBean instances specially
         if (bean instanceof DynaBean) {
-            final DynaProperty descriptor =
-                    ((DynaBean) bean).getDynaClass().getDynaProperty(name);
+            final DynaProperty descriptor = ((DynaBean) bean).getDynaClass().getDynaProperty(name);
             if (descriptor == null) {
-                throw new NoSuchMethodException("Unknown property '" +
-                        name + "' on bean class '" + bean.getClass() + "'");
+                throw new NoSuchMethodException("Unknown property '" + name + "' on bean class '" + bean.getClass() + "'");
             }
             ((DynaBean) bean).set(name, key, value);
             return;
         }
 
         // Retrieve the property descriptor for the specified property
-        final PropertyDescriptor descriptor =
-                getPropertyDescriptor(bean, name);
+        final PropertyDescriptor descriptor = getPropertyDescriptor(bean, name);
         if (descriptor == null) {
-            throw new NoSuchMethodException("Unknown property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new NoSuchMethodException("Unknown property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
 
         if (descriptor instanceof MappedPropertyDescriptor) {
             // Call the keyed setter method if there is one
-            Method mappedWriteMethod =
-                    ((MappedPropertyDescriptor) descriptor).
-                    getMappedWriteMethod();
+            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;
             params[1] = value;
             if (log.isTraceEnabled()) {
-                final String valueClassName =
-                    value == null ? "<null>" : value.getClass().getName();
-                log.trace("setSimpleProperty: Invoking method "
-                          + mappedWriteMethod + " with key=" + key
-                          + ", value=" + value
-                          + " (class " + valueClassName +")");
+                final String valueClassName = value == null ? "<null>" : value.getClass().getName();
+                log.trace("setSimpleProperty: Invoking method " + mappedWriteMethod + " with key=" + key + ", value=" + value + " (class " + valueClassName +
+                        ")");
             }
             invokeMethod(mappedWriteMethod, bean, params);
         } else {
-          /* means that the result has to be retrieved from a map */
-          final Method readMethod = getReadMethod(bean.getClass(), descriptor);
-          if (readMethod == null) {
-            throw new NoSuchMethodException("Property '" + name +
-                    "' has no mapped getter method on bean class '" +
-                    bean.getClass() + "'");
-          }
-        final Object invokeResult = invokeMethod(readMethod, bean, EMPTY_OBJECT_ARRAY);
-        /* test and fetch from the map */
-        if (invokeResult instanceof java.util.Map) {
-          final java.util.Map<String, Object> map = toPropertyMap(invokeResult);
-          map.put(key, value);
-        }
+            /* means that the result has to be retrieved from a map */
+            final Method readMethod = getReadMethod(bean.getClass(), descriptor);
+            if (readMethod == null) {
+                throw new NoSuchMethodException("Property '" + name + "' has no mapped getter method on bean class '" + bean.getClass() + "'");
+            }
+            final Object invokeResult = invokeMethod(readMethod, bean, EMPTY_OBJECT_ARRAY);
+            /* test and fetch from the map */
+            if (invokeResult instanceof java.util.Map) {
+                final java.util.Map<String, Object> map = toPropertyMap(invokeResult);
+                map.put(key, value);
+            }
         }
 
     }
 
     /**
-     * Set the value of the (possibly nested) property of the specified
-     * name, for the specified bean, with no type conversions.
+     * Set the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
      * <p>
      * Example values for parameter "name" are:
      * <ul>
-     * <li> "a" -- sets the value of property a of the specified bean </li>
-     * <li> "a.b" -- gets the value of property a of the specified bean,
-     * then on that object sets the value of property b.</li>
-     * <li> "a(key)" -- sets a value of mapped-property a on the specified
-     * bean. This effectively means bean.setA("key").</li>
-     * <li> "a[3]" -- sets a value of indexed-property a on the specified
-     * bean. This effectively means bean.setA(3).</li>
+     * <li>"a" -- sets the value of property a of the specified bean</li>
+     * <li>"a.b" -- gets the value of property a of the specified bean, then on that object sets the value of property b.</li>
+     * <li>"a(key)" -- sets a value of mapped-property a on the specified bean. This effectively means bean.setA("key").</li>
+     * <li>"a[3]" -- sets a value of indexed-property a on the specified bean. This effectively means bean.setA(3).</li>
      * </ul>
      *
-     * @param bean Bean whose property is to be modified
-     * @param name Possibly nested name of the property to be modified
+     * @param bean  Bean whose property is to be modified
+     * @param name  Possibly nested name of the property to be modified
      * @param value Value to which the property is to be set
      *
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws IllegalArgumentException if <code>bean</code> or
-     *  <code>name</code> is null
-     * @throws IllegalArgumentException if a nested reference to a
-     *  property returns null
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws IllegalArgumentException  if <code>bean</code> or <code>name</code> is null
+     * @throws IllegalArgumentException  if a nested reference to a property returns null
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
-    public void setNestedProperty(Object bean,
-                                         String name, final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
+    public void setNestedProperty(Object bean, String name, final Object value)
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
 
         // Resolve nested references
@@ -1957,7 +1836,7 @@ public class PropertyUtilsBean {
             final String next = resolver.next(name);
             Object nestedBean = null;
             if (bean instanceof Map) {
-                nestedBean = getPropertyOfMapBean((Map<?, ?>)bean, next);
+                nestedBean = getPropertyOfMapBean((Map<?, ?>) bean, next);
             } else if (resolver.isMapped(next)) {
                 nestedBean = getMappedProperty(bean, next);
             } else if (resolver.isIndexed(next)) {
@@ -1966,9 +1845,7 @@ public class PropertyUtilsBean {
                 nestedBean = getSimpleProperty(bean, next);
             }
             if (nestedBean == null) {
-                throw new NestedNullException
-                        ("Null property value for '" + name +
-                         "' on bean class '" + bean.getClass() + "'");
+                throw new NestedNullException("Null property value for '" + name + "' on bean class '" + bean.getClass() + "'");
             }
             bean = nestedBean;
             name = resolver.remove(name);
@@ -1987,91 +1864,64 @@ public class PropertyUtilsBean {
     }
 
     /**
-     * Set the value of the specified property of the specified bean,
-     * no matter which property reference format is used, with no
-     * type conversions.
+     * Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
      *
-     * @param bean Bean whose property is to be modified
-     * @param name Possibly indexed and/or nested name of the property
-     *  to be modified
+     * @param bean  Bean whose property is to be modified
+     * @param name  Possibly indexed and/or nested name of the property to be modified
      * @param value Value to which this property is to be set
      *
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws IllegalArgumentException if <code>bean</code> or
-     *  <code>name</code> is null
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws IllegalArgumentException  if <code>bean</code> or <code>name</code> is null
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
     public void setProperty(final Object bean, final String name, final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         setNestedProperty(bean, name, value);
 
     }
 
     /**
-     * This method is called by method setNestedProperty when the current bean
-     * is found to be a Map object, and defines how to deal with setting
-     * a property on a Map.
+     * This method is called by method setNestedProperty when the current bean is found to be a Map object, and defines how to deal with setting a property on a
+     * Map.
      * <p>
      * The standard implementation here is to:
      * <ul>
      * <li>call bean.set(propertyName) for all propertyName values.</li>
-     * <li>throw an IllegalArgumentException if the property specifier
-     * contains MAPPED_DELIM or INDEXED_DELIM, as Map entries are essentially
-     * simple properties; mapping and indexing operations do not make sense
-     * when accessing a map (even thought the returned object may be a Map
-     * or an Array).</li>
+     * <li>throw an IllegalArgumentException if the property specifier contains MAPPED_DELIM or INDEXED_DELIM, as Map entries are essentially simple properties;
+     * mapping and indexing operations do not make sense when accessing a map (even thought the returned object may be a Map or an Array).</li>
      * </ul>
      * <p>
-     * The default behaviour of beanutils 1.7.1 or later is for assigning to
-     * "a.b" to mean a.put(b, obj) always. However the behaviour of beanutils
-     * version 1.6.0, 1.6.1, 1.7.0 was for "a.b" to mean a.setB(obj) if such
-     * a method existed, and a.put(b, obj) otherwise. In version 1.5 it meant
-     * a.put(b, obj) always (ie the same as the behaviour in the current version).
-     * In versions prior to 1.5 it meant a.setB(obj) always. [yes, this is
-     * all <em>very</em> unfortunate]
+     * The default behaviour of beanutils 1.7.1 or later is for assigning to "a.b" to mean a.put(b, obj) always. However the behaviour of beanutils version
+     * 1.6.0, 1.6.1, 1.7.0 was for "a.b" to mean a.setB(obj) if such a method existed, and a.put(b, obj) otherwise. In version 1.5 it meant a.put(b, obj) always
+     * (ie the same as the behaviour in the current version). In versions prior to 1.5 it meant a.setB(obj) always. [yes, this is all <em>very</em> unfortunate]
      * <p>
-     * Users who would like to customise the meaning of "a.b" in method
-     * setNestedProperty when a is a Map can create a custom subclass of
-     * this class and override this method to implement the behaviour of
-     * their choice, such as restoring the pre-1.4 behaviour of this class
-     * if they wish. When overriding this method, do not forget to deal
-     * with MAPPED_DELIM and INDEXED_DELIM characters in the propertyName.
+     * Users who would like to customise the meaning of "a.b" in method setNestedProperty when a is a Map can create a custom subclass of this class and
+     * override this method to implement the behaviour of their choice, such as restoring the pre-1.4 behaviour of this class if they wish. When overriding this
+     * method, do not forget to deal with MAPPED_DELIM and INDEXED_DELIM characters in the propertyName.
      * <p>
-     * Note, however, that the recommended solution for objects that
-     * implement Map but want their simple properties to come first is
-     * for <em>those</em> objects to override their get/put methods to implement
-     * that behaviour, and <em>not</em> to solve the problem by modifying the
-     * default behaviour of the PropertyUtilsBean class by overriding this
-     * method.
+     * Note, however, that the recommended solution for objects that implement Map but want their simple properties to come first is for <em>those</em> objects
+     * to override their get/put methods to implement that behaviour, and <em>not</em> to solve the problem by modifying the default behaviour of the
+     * PropertyUtilsBean class by overriding this method.
      *
-     * @param bean Map bean
+     * @param bean         Map bean
      * @param propertyName The property name
-     * @param value the property value
+     * @param value        the property value
      *
-     * @throws IllegalArgumentException when the propertyName is regarded as
-     * being invalid.
+     * @throws IllegalArgumentException  when the propertyName is regarded as being invalid.
      *
-     * @throws IllegalAccessException just in case subclasses override this
-     * method to try to access real setter methods and find permission is denied.
+     * @throws IllegalAccessException    just in case subclasses override this method to try to access real setter methods and find permission is denied.
      *
-     * @throws InvocationTargetException just in case subclasses override this
-     * method to try to access real setter methods, and find it throws an
-     * exception when invoked.
+     * @throws InvocationTargetException just in case subclasses override this method to try to access real setter methods, and find it throws an exception when
+     *                                   invoked.
      *
-     * @throws NoSuchMethodException just in case subclasses override this
-     * method to try to access real setter methods, and want to fail if
-     * no simple method is available.
+     * @throws NoSuchMethodException     just in case subclasses override this method to try to access real setter methods, and want to fail if no simple method
+     *                                   is available.
      * @since 1.8.0
      */
     protected void setPropertyOfMapBean(final Map<String, Object> bean, String propertyName, final Object value)
-        throws IllegalArgumentException, IllegalAccessException,
-        InvocationTargetException, NoSuchMethodException {
+            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
 
         if (resolver.isMapped(propertyName)) {
             final String name = resolver.getProperty(propertyName);
@@ -2080,11 +1930,8 @@ 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);
+        if (resolver.isIndexed(propertyName) || resolver.isMapped(propertyName)) {
+            throw new IllegalArgumentException("Indexed or mapped properties are not supported on" + " objects of type Map: " + propertyName);
         }
 
         bean.put(propertyName, value);
@@ -2093,10 +1940,8 @@ public class PropertyUtilsBean {
     /**
      * Configure the {@link Resolver} implementation used by BeanUtils.
      * <p>
-     * The {@link Resolver} handles the <em>property name</em>
-     * expressions and the implementation in use effectively
-     * controls the dialect of the <em>expression language</em>
-     * that BeanUtils recongnises.
+     * The {@link Resolver} handles the <em>property name</em> expressions and the implementation in use effectively controls the dialect of the <em>expression
+     * language</em> that BeanUtils recongnises.
      * <p>
      * {@link DefaultResolver} is the default implementation used.
      *
@@ -2112,90 +1957,61 @@ public class PropertyUtilsBean {
     }
 
     /**
-     * Set the value of the specified simple property of the specified bean,
-     * with no type conversions.
+     * Set the value of the specified simple property of the specified bean, with no type conversions.
      *
-     * @param bean Bean whose property is to be modified
-     * @param name Name of the property to be modified
+     * @param bean  Bean whose property is to be modified
+     * @param name  Name of the property to be modified
      * @param value Value to which the property should be set
      *
-     * @throws IllegalAccessException if the caller does not have
-     *  access to the property accessor method
-     * @throws IllegalArgumentException if <code>bean</code> or
-     *  <code>name</code> is null
-     * @throws IllegalArgumentException if the property name is
-     *  nested or indexed
-     * @throws InvocationTargetException if the property accessor method
-     *  throws an exception
-     * @throws NoSuchMethodException if an accessor method for this
-     *  propety cannot be found
+     * @throws IllegalAccessException    if the caller does not have access to the property accessor method
+     * @throws IllegalArgumentException  if <code>bean</code> or <code>name</code> is null
+     * @throws IllegalArgumentException  if the property name is nested or indexed
+     * @throws InvocationTargetException if the property accessor method throws an exception
+     * @throws NoSuchMethodException     if an accessor method for this propety cannot be found
      */
-    public void setSimpleProperty(final Object bean,
-                                         final String name, final Object value)
-            throws IllegalAccessException, InvocationTargetException,
-            NoSuchMethodException {
-
+    public void setSimpleProperty(final Object bean, final String name, final Object value)
+            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
         if (name == null) {
-            throw new IllegalArgumentException("No name specified for bean class '" +
-                    bean.getClass() + "'");
+            throw new IllegalArgumentException("No name specified for bean class '" + bean.getClass() + "'");
         }
-
         // Validate the syntax of the property name
         if (resolver.hasNested(name)) {
-            throw new IllegalArgumentException
-                    ("Nested property names are not allowed: Property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Nested property names are not allowed: Property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
         if (resolver.isIndexed(name)) {
-            throw new IllegalArgumentException
-                    ("Indexed property names are not allowed: Property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Indexed property names are not allowed: Property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
         if (resolver.isMapped(name)) {
-            throw new IllegalArgumentException
-                    ("Mapped property names are not allowed: Property '" +
-                    name + "' on bean class '" + bean.getClass() + "'");
+            throw new IllegalArgumentException("Mapped property names are not allowed: Property '" + name + "' on bean class '" + bean.getClass() + "'");
         }
-
         // Handle DynaBean instances specially
         if (bean instanceof DynaBean) {
-            final DynaProperty descriptor =
-                    ((DynaBean) bean).getDynaClass().getDynaProperty(name);
+            final DynaProperty descriptor = ((DynaBean) bean).getDynaClass().getDynaProperty(name);
             if (descriptor == null) {
-                throw new NoSuchMethodException("Unknown property '" +
-                        name + "' on dynaclass '" +
-                        ((DynaBean) bean).getDynaClass() + "'" );
+                throw new NoSuchMethodException("Unknown property '" + name + "' on dynaclass '" + ((DynaBean) bean).getDynaClass() + "'");
             }
             ((DynaBean) bean).set(name, value);
             return;
         }
-
         // Retrieve the property setter method for the specified property
-        final PropertyDescriptor descriptor =
-                getPropertyDescriptor(bean, name);
+        final PropertyDescriptor descriptor = getPropertyDescriptor(bean, name);
         if (descriptor == null) {
-            throw new NoSuchMethodException("Unknown property '" +
-                    name + "' on class '" + bean.getClass() + "'" );
+            throw new NoSuchMethodException("Unknown property '" + name + "' on class '" + bean.getClass() + "'");
         }
         final Method writeMethod = getWriteMethod(bean.getClass(), descriptor);
         if (writeMethod == null) {
-            throw new NoSuchMethodException("Property '" + name +
-                    "' has no setter method in class '" + bean.getClass() + "'");
+            throw new NoSuchMethodException("Property '" + name + "' has no setter method in class '" + bean.getClass() + "'");
         }
-
         // Call the property setter method
         final Object[] values = new Object[1];
         values[0] = value;
         if (log.isTraceEnabled()) {
-            final String valueClassName =
-                value == null ? "<null>" : value.getClass().getName();
-            log.trace("setSimpleProperty: Invoking method " + writeMethod
-                      + " with value " + value + " (class " + valueClassName + ")");
+            final String valueClassName = value == null ? "<null>" : value.getClass().getName();
+            log.trace("setSimpleProperty: Invoking method " + writeMethod + " with value " + value + " (class " + valueClassName + ")");
         }
         invokeMethod(writeMethod, bean, values);
-
     }
 }
diff --git a/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java b/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
index 46d13d0a..2a9ea324 100644
--- a/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
+++ b/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
@@ -317,7 +317,6 @@ public abstract class AbstractConverter implements Converter {
                 log().debug("    Throwing ConversionException: " + msg);
                 log().debug("    " + DEFAULT_CONFIG_MSG);
             }
-            BeanUtils.initCause(cex, cause);
         }
 
         throw cex;
diff --git a/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java b/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
index a5d6d8cc..fab3a425 100644
--- a/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
@@ -149,7 +149,7 @@ public class BeanUtilsTestCase extends TestCase {
      * Use reflection to get the cause
      */
     private Throwable getCause(final Throwable t) throws Throwable {
-        return (Throwable)PropertyUtils.getProperty(t, "cause");
+        return (Throwable) PropertyUtils.getProperty(t, "cause");
     }
 
 
@@ -160,9 +160,7 @@ public class BeanUtilsTestCase extends TestCase {
         try {
             throwException(cause);
         } catch (final Throwable e) {
-            final Throwable t = new Exception(parent);
-            BeanUtils.initCause(t, e);
-            throw t;
+            throw new Exception(parent, e);
         }
     }
 


(commons-beanutils) 06/10: Unnecessary cast from PropertyDescriptor to PropertyDescriptor

Posted by gg...@apache.org.
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

commit b8e8d1f19acb64477a265a578bb608bfe381b33b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:36:11 2024 -0400

    Unnecessary cast from PropertyDescriptor to PropertyDescriptor
---
 .../org/apache/commons/beanutils/IndexedPropertyTestCase.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/beanutils/IndexedPropertyTestCase.java b/src/test/java/org/apache/commons/beanutils/IndexedPropertyTestCase.java
index 8ae0b464..12fd6628 100644
--- a/src/test/java/org/apache/commons/beanutils/IndexedPropertyTestCase.java
+++ b/src/test/java/org/apache/commons/beanutils/IndexedPropertyTestCase.java
@@ -158,7 +158,7 @@ public class IndexedPropertyTestCase {
     @Test
     public void testArrayListReadMethod() throws Exception {
         final PropertyDescriptor descriptor =
-             (PropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "arrayList");
+             propertyUtilsBean.getPropertyDescriptor(bean, "arrayList");
         assertNotNull("No ArrayList Read Method", descriptor.getReadMethod());
     }
 
@@ -178,7 +178,7 @@ public class IndexedPropertyTestCase {
     @Test
     public void testArrayReadMethod() throws Exception {
         final PropertyDescriptor descriptor =
-             (PropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringArray");
+             propertyUtilsBean.getPropertyDescriptor(bean, "stringArray");
         assertNotNull("No Array Read Method", descriptor.getReadMethod());
     }
 
@@ -188,7 +188,7 @@ public class IndexedPropertyTestCase {
     @Test
     public void testArrayWriteMethod() throws Exception {
         final PropertyDescriptor descriptor =
-             (PropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringArray");
+             propertyUtilsBean.getPropertyDescriptor(bean, "stringArray");
         assertNotNull("No Array Write Method", descriptor.getWriteMethod());
     }
 
@@ -335,7 +335,7 @@ public class IndexedPropertyTestCase {
     @Test
     public void testListReadMethod() throws Exception {
         final PropertyDescriptor descriptor =
-             (PropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringList");
+             propertyUtilsBean.getPropertyDescriptor(bean, "stringList");
         assertNotNull("No List Read Method", descriptor.getReadMethod());
     }
 
@@ -349,7 +349,7 @@ public class IndexedPropertyTestCase {
     @Test
     public void testListWriteMethod() throws Exception {
         final PropertyDescriptor descriptor =
-             (PropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringList");
+             propertyUtilsBean.getPropertyDescriptor(bean, "stringList");
         assertNotNull("No List Write Method", descriptor.getWriteMethod());
     }
 


(commons-beanutils) 05/10: Redundant superinterface Serializable for the type RowSetDynaClass, already defined by JDBCDynaClass

Posted by gg...@apache.org.
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

commit e4fbd8105c8ea314612a6aff34d1aec09ffda008
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 10 06:34:45 2024 -0400

    Redundant superinterface Serializable for the type RowSetDynaClass,
    already defined by JDBCDynaClass
---
 src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java b/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java
index 35c6ad92..e5b12bf0 100644
--- a/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java
+++ b/src/main/java/org/apache/commons/beanutils/RowSetDynaClass.java
@@ -19,7 +19,6 @@
 package org.apache.commons.beanutils;
 
 
-import java.io.Serializable;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
@@ -64,7 +63,7 @@ import java.util.List;
  *
  */
 
-public class RowSetDynaClass extends JDBCDynaClass implements Serializable {
+public class RowSetDynaClass extends JDBCDynaClass {