Skip to content
Permalink
Browse files

Fixed: Down the log level to inform when a property number is empty

When you call a property number undefined, UtilProperty return the default value and you have in console a warning :

    UtilProperties |W| Error converting String  to Integer; using defaultNumber 60.

Or in general if you call and resolve an empty value for a property, they is no reason to inform it as error.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868580 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Oct 18, 2019
1 parent ce26d03 commit 193280addbecfbbdcad6ccfe4068b3e082aa61a9
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
@@ -142,7 +142,7 @@ public static double getPropertyNumber(String resource, String name) {
private static Number getPropertyNumber(String resource, String name, Number defaultNumber, String type) {
String str = getPropertyValue(resource, name);
if (UtilValidate.isEmpty(str)) {
Debug.logWarning("Error converting String \"" + str + "\" to " + type + "; using defaultNumber " + defaultNumber + ".", module);
if (Debug.verboseOn()) Debug.logVerbose("The property " + resource + ":" + name + " is empty, using defaultNumber " + defaultNumber + ".", module);
return defaultNumber;
}
try {

0 comments on commit 193280a

Please sign in to comment.
You can’t perform that action at this time.