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

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


The following commit(s) were added to refs/heads/master by this push:
     new cfa7297  Use Objects.toString()
cfa7297 is described below

commit cfa7297e33c4441a9515d66db3d1a057f6d3a896
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Jun 11 10:55:02 2024 -0400

    Use Objects.toString()
---
 .../java/org/apache/commons/logging/LogConfigurationException.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/logging/LogConfigurationException.java 
b/src/main/java/org/apache/commons/logging/LogConfigurationException.java
index 1612fac..e132ad4 100644
--- a/src/main/java/org/apache/commons/logging/LogConfigurationException.java
+++ b/src/main/java/org/apache/commons/logging/LogConfigurationException.java
@@ -17,6 +17,8 @@
 
 package org.apache.commons.logging;
 
+import java.util.Objects;
+
 /**
  * An exception that is thrown only if a suitable {@code LogFactory} or {@code 
Log} instance cannot be created by the corresponding factory methods.
  */
@@ -65,7 +67,7 @@ public class LogConfigurationException extends 
RuntimeException {
      * @param cause The underlying cause
      */
     public LogConfigurationException(final Throwable cause) {
-        this(cause == null ? null : cause.toString(), cause);
+        this(Objects.toString(cause, null), cause);
     }
 
 }

Reply via email to