[ofbiz-framework] branch trunk updated: Improved: Don't log warning when ObjectType converts from String to String

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: Don't log warning when ObjectType converts from String to String

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

danwatford pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c4d8f90  Improved: Don't log warning when ObjectType converts from String to String
c4d8f90 is described below

commit c4d8f904b7cf73d9f01415dad2a3ea45f30b9f61
Author: Daniel Watford <[hidden email]>
AuthorDate: Thu Jan 14 17:58:05 2021 +0000

    Improved: Don't log warning when ObjectType converts from String to
    String
   
    (OFBIZ-10710)
   
    Thanks: Benjamin Jugl for report and patch.
---
 .../base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java
index 71e5187..3ef59d0 100644
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java
@@ -355,7 +355,9 @@ public class ObjectType {
         }
         // we can pretty much always do a conversion to a String, so do that here
         if (targetClass.equals(String.class)) {
-            Debug.logWarning("No special conversion available for " + obj.getClass().getName() + " to String, returning object.toString().", MODULE);
+            if (Debug.infoOn()) {
+                Debug.logInfo("No special conversion required for " + obj.getClass().getName() + " to String, returning object.toString().", MODULE);
+            }
             return obj.toString();
         }
         if (noTypeFail) {