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/06/11 14:49:32 UTC

(commons-jelly) branch master updated: Use String.valueOf()

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-jelly.git


The following commit(s) were added to refs/heads/master by this push:
     new 83de062f Use String.valueOf()
83de062f is described below

commit 83de062f6aa2772554dcba928ffbf5c0e6653e92
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jun 11 10:49:27 2024 -0400

    Use String.valueOf()
---
 .../java/org/apache/commons/jelly/expression/ConstantExpression.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/commons/jelly/expression/ConstantExpression.java b/core/src/main/java/org/apache/commons/jelly/expression/ConstantExpression.java
index 0575c0b3..57a69628 100644
--- a/core/src/main/java/org/apache/commons/jelly/expression/ConstantExpression.java
+++ b/core/src/main/java/org/apache/commons/jelly/expression/ConstantExpression.java
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.jelly.expression;
 
+import java.util.Objects;
+
 import org.apache.commons.jelly.JellyContext;
 
 /** <p><code>ConstantExpression</code> represents a constant expression.</p>
@@ -47,7 +49,7 @@ public class ConstantExpression extends ExpressionSupport {
 
     @Override
     public String getExpressionText() {
-        return value == null ? "null" : value.toString();
+        return String.valueOf(value);
     }
 
     /**