1becd5
diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java
1becd5
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java	2021-02-23 14:41:06.962127389 +0000
1becd5
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java	2021-02-23 14:48:18.016328356 +0000
1becd5
@@ -19,8 +19,7 @@
1becd5
 
1becd5
 import java.io.Serializable;
1becd5
 
1becd5
-import org.apache.commons.logging.Log;
1becd5
-import org.apache.commons.logging.LogFactory;
1becd5
+import java.util.logging.Logger;
1becd5
 import org.pentaho.reporting.libraries.formula.lvalues.LValue;
1becd5
 import org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair;
1becd5
 import org.pentaho.reporting.libraries.formula.parser.FormulaParseException;
1becd5
@@ -40,7 +39,7 @@
1becd5
  */
1becd5
 public class Formula implements Serializable, Cloneable
1becd5
 {
1becd5
-  private static final Log logger = LogFactory.getLog(Formula.class);
1becd5
+  private static final Logger logger = Logger.getLogger(Formula.class.getName());
1becd5
   private LValue rootReference;
1becd5
   private static final long serialVersionUID = -1176925812499923546L;
1becd5
 
1becd5
@@ -105,7 +104,7 @@
1becd5
       final Type type = typeValuePair.getType();
1becd5
       if (type.isFlagSet(Type.ERROR_TYPE))
1becd5
       {
1becd5
-        logger.debug("Error: " + typeValuePair.getValue());
1becd5
+        logger.config("Error: " + typeValuePair.getValue());
1becd5
       }
1becd5
       else if (type.isFlagSet(Type.ARRAY_TYPE))
1becd5
       {
1becd5
@@ -131,7 +130,7 @@
1becd5
     }
1becd5
     catch (Exception e)
1becd5
     {
1becd5
-      logger.warn("Evaluation failed unexpectedly: ", e);
1becd5
+      logger.warning("Evaluation failed unexpectedly: " + e);
1becd5
       return new TypeValuePair(ErrorType.TYPE, LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
1becd5
     }
1becd5
   }
1becd5
diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java
1becd5
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java	2021-02-23 14:41:06.980127564 +0000
1becd5
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java	2021-02-23 14:48:29.995445103 +0000
1becd5
@@ -25,9 +25,7 @@
1becd5
 import org.pentaho.reporting.libraries.base.util.HashNMap;
1becd5
 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
1becd5
 import org.pentaho.reporting.libraries.base.config.Configuration;
1becd5
-import org.apache.commons.logging.Log;
1becd5
-import org.apache.commons.logging.LogFactory;
1becd5
-
1becd5
+import java.util.logging.Logger;
1becd5
 
1becd5
 /**
1becd5
  * Creation-Date: 02.11.2006, 12:48:32
1becd5
@@ -36,7 +34,7 @@
1becd5
  */
1becd5
 public class DefaultFunctionRegistry implements FunctionRegistry
1becd5
 {
1becd5
-  private static final Log logger = LogFactory.getLog(DefaultFunctionRegistry.class);
1becd5
+  private static final Logger logger = Logger.getLogger(DefaultFunctionRegistry.class.getName());
1becd5
   
1becd5
   private static final String FUNCTIONS_PREFIX = "org.pentaho.reporting.libraries.formula.functions.";
1becd5
   private static final String[] EMPTY_ARRAY = new String[0];
1becd5
@@ -72,7 +70,7 @@
1becd5
       final Function function = createFunction(aName);
1becd5
       if (function == null)
1becd5
       {
1becd5
-        logger.debug ("There is no such function: " + aName);
1becd5
+        logger.config ("There is no such function: " + aName);
1becd5
       }
1becd5
       else
1becd5
       {
1becd5
@@ -132,7 +130,7 @@
1becd5
         (functionClass, DefaultFunctionRegistry.class, Function.class);
1becd5
     if (function == null)
1becd5
     {
1becd5
-      logger.debug ("There is no such function: " + name);
1becd5
+      logger.config ("There is no such function: " + name);
1becd5
     }
1becd5
     else
1becd5
     {
1becd5
diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java
1becd5
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java	2021-02-23 14:41:06.983127594 +0000
1becd5
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java	2021-02-23 14:48:54.904687864 +0000
1becd5
@@ -27,8 +27,7 @@
1becd5
 import org.pentaho.reporting.libraries.formula.typing.Type;
1becd5
 import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
1becd5
 import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
1becd5
-import org.apache.commons.logging.Log;
1becd5
-import org.apache.commons.logging.LogFactory;
1becd5
+import java.util.logging.Logger;
1becd5
 
1becd5
 /**
1becd5
  * This function returns true if the parameter is of error and not of error type NA.
1becd5
@@ -37,7 +36,7 @@
1becd5
  */
1becd5
 public class IsErrFunction implements Function
1becd5
 {
1becd5
-  private static final Log logger = LogFactory.getLog(IsErrFunction.class); 
1becd5
+  private static final Logger logger = Logger.getLogger(IsErrFunction.class.getName());
1becd5
   private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
1becd5
   private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
1becd5
   private static final long serialVersionUID = 6749192734608313367L;
1becd5
@@ -61,7 +60,7 @@
1becd5
 
1becd5
       if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
1becd5
       {
1becd5
-        logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
1becd5
+        logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
1becd5
         final ErrorValue na = (ErrorValue) value;
1becd5
         if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
1becd5
         {
1becd5
diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java
1becd5
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java	2021-02-23 14:41:06.984127603 +0000
1becd5
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java	2021-02-23 14:49:05.917795194 +0000
1becd5
@@ -27,8 +27,7 @@
1becd5
 import org.pentaho.reporting.libraries.formula.typing.Type;
1becd5
 import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
1becd5
 import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
1becd5
-import org.apache.commons.logging.Log;
1becd5
-import org.apache.commons.logging.LogFactory;
1becd5
+import java.util.logging.Logger;
1becd5
 
1becd5
 /**
1becd5
  * This function returns true if the parameter is of error type NA.
1becd5
@@ -39,7 +38,7 @@
1becd5
 {
1becd5
   private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
1becd5
   private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
1becd5
-  private static final Log logger = LogFactory.getLog(IsNaFunction.class);
1becd5
+  private static final Logger logger = Logger.getLogger(IsNaFunction.class.getName());
1becd5
   private static final long serialVersionUID = 1205462839536368718L;
1becd5
 
1becd5
   public IsNaFunction()
1becd5
@@ -61,7 +60,7 @@
1becd5
 
1becd5
       if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
1becd5
       {
1becd5
-        logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
1becd5
+        logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
1becd5
         final ErrorValue na = (ErrorValue) value;
1becd5
         if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
1becd5
         {
1becd5
diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java
1becd5
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java	2021-02-23 14:41:06.988127642 +0000
1becd5
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java	2021-02-23 14:50:26.354579111 +0000
1becd5
@@ -17,8 +17,8 @@
1becd5
 
1becd5
 package org.pentaho.reporting.libraries.formula.lvalues;
1becd5
 
1becd5
-import org.apache.commons.logging.Log;
1becd5
-import org.apache.commons.logging.LogFactory;
1becd5
+import java.util.logging.Level;
1becd5
+import java.util.logging.Logger;
1becd5
 import org.pentaho.reporting.libraries.formula.EvaluationException;
1becd5
 import org.pentaho.reporting.libraries.formula.FormulaContext;
1becd5
 import org.pentaho.reporting.libraries.formula.LibFormulaErrorValue;
1becd5
@@ -44,7 +44,7 @@
1becd5
  */
1becd5
 public class FormulaFunction extends AbstractLValue
1becd5
 {
1becd5
-  private static final Log logger = LogFactory.getLog(FormulaFunction.class);
1becd5
+  private static final Logger logger = Logger.getLogger(FormulaFunction.class.getName());
1becd5
 
1becd5
   private static class FormulaParameterCallback implements ParameterCallback
1becd5
   {
1becd5
@@ -74,9 +74,9 @@
1becd5
         final TypeValuePair converted = typeRegistry.convertTo(paramType, result);
1becd5
         if (converted == null)
1becd5
         {
1becd5
-          if (logger.isDebugEnabled())
1becd5
+          if (logger.isLoggable(Level.CONFIG))
1becd5
           {
1becd5
-            logger.debug("Failed to evaluate parameter " + pos + " on function " + function);
1becd5
+            logger.config("Failed to evaluate parameter " + pos + " on function " + function);
1becd5
           }
1becd5
           throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_AUTO_ARGUMENT_VALUE);
1becd5
         }
1becd5
@@ -228,7 +228,7 @@
1becd5
     }
1becd5
     catch (Exception e)
1becd5
     {
1becd5
-      logger.error("Unexpected exception while evaluating", e);
1becd5
+      logger.severe("Unexpected exception while evaluating: " + e);
1becd5
       throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
1becd5
     }
1becd5
   }
1becd5
diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java
1becd5
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java	2021-02-23 14:41:06.961127380 +0000
1becd5
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java	2021-02-23 14:47:11.376678905 +0000
1becd5
@@ -35,8 +35,7 @@
1becd5
 import java.util.Locale;
1becd5
 import java.util.Collection;
1becd5
 
1becd5
-import org.apache.commons.logging.Log;
1becd5
-import org.apache.commons.logging.LogFactory;
1becd5
+import java.util.logging.Logger;
1becd5
 import org.pentaho.reporting.libraries.base.config.Configuration;
1becd5
 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
1becd5
 import org.pentaho.reporting.libraries.formula.EvaluationException;
1becd5
@@ -66,7 +65,7 @@
1becd5
  */
1becd5
 public class DefaultTypeRegistry implements TypeRegistry
1becd5
 {
1becd5
-  private static final Log logger = LogFactory.getLog(DefaultTypeRegistry.class);
1becd5
+  private static final Logger logger = Logger.getLogger(DefaultTypeRegistry.class.getName());
1becd5
 
1becd5
   private static class ArrayConverterCallback implements ArrayCallback
1becd5
   {
1becd5
@@ -599,7 +598,7 @@
1becd5
       }
1becd5
       else
1becd5
       {
1becd5
-        logger.warn("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
1becd5
+        logger.warning("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
1becd5
         throw TypeConversionException.getInstance();
1becd5
       }
1becd5
     }
1becd5
@@ -612,7 +611,7 @@
1becd5
       }
1becd5
       else
1becd5
       {
1becd5
-        logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
1becd5
+        logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
1becd5
         throw TypeConversionException.getInstance();
1becd5
       }
1becd5
     }
1becd5
@@ -651,7 +650,7 @@
1becd5
       }
1becd5
       else
1becd5
       {
1becd5
-        logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
1becd5
+        logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
1becd5
         throw TypeConversionException.getInstance();
1becd5
       }
1becd5
     }