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 32ec816c86a278ed68b18cf8019a731703c0187a
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Aug 31 09:15:02 2024 -0400

    BeanUtils.initCause(Throwable, Throwable) for removal, use
    Throwable.initCause(Throwable)
---
 src/changes/changes.xml                                   | 1 +
 src/main/java/org/apache/commons/beanutils/BeanUtils.java | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8387b11b..69cb1410 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -40,6 +40,7 @@
       <action dev="ggregory" type="update" due-to="Gary Gregory">Bump 
commons-logging:commons-logging from 1.2 to 1.3.4.</action>
       <!-- REMOVE -->
       <action dev="ggregory" type="update" due-to="Gary Gregory">Deprecate 
BeanUtilsBean.initCause(Throwable, Throwable) for removal, use 
Throwable.initCause(Throwable).</action>
+      <action dev="ggregory" type="update" due-to="Gary Gregory">Deprecate 
BeanUtils.initCause(Throwable, Throwable) for removal, use 
Throwable.initCause(Throwable).</action>
     </release>
     <release version="1.9.4" date="2019-06-12" description="The primary reason 
for this release is a bugfix for
 CVE-2014-0114. More specifically, our goal with BEANUTILS-520
diff --git a/src/main/java/org/apache/commons/beanutils/BeanUtils.java 
b/src/main/java/org/apache/commons/beanutils/BeanUtils.java
index 8707804a..ab8f6751 100644
--- a/src/main/java/org/apache/commons/beanutils/BeanUtils.java
+++ b/src/main/java/org/apache/commons/beanutils/BeanUtils.java
@@ -426,9 +426,13 @@ public class BeanUtils {
      * @param  cause     The cause of the throwable.
      * @return  true if the cause was initialized, otherwise false.
      * @since 1.8.0
+     * @deprecated Use {@link Throwable#initCause(Throwable)}.
+     * @see Throwable#initCause(Throwable)
      */
+    @Deprecated
     public static boolean initCause(final Throwable throwable, final Throwable 
cause) {
-        return BeanUtilsBean.getInstance().initCause(throwable, cause);
+        throwable.initCause(cause);
+        return true;
     }
 
     /**

Reply via email to