commit
bff1104e8d
@ -0,0 +1 @@
|
|||||||
|
SOURCES/libformula-1.1.3-jarsdeleted.zip
|
@ -0,0 +1 @@
|
|||||||
|
8851047b09a06aa2b58a409196d8d61afaca9ea9 SOURCES/libformula-1.1.3-jarsdeleted.zip
|
@ -0,0 +1,16 @@
|
|||||||
|
--- libformula-1.1.3/build.properties 2009-11-17 16:11:48.000000000 +0000
|
||||||
|
+++ libformula-1.1.3/build.properties 2009-11-17 16:12:05.000000000 +0000
|
||||||
|
@@ -1,8 +1,10 @@
|
||||||
|
-project.revision=TRUNK-SNAPSHOT
|
||||||
|
+project.revision=1.1.3
|
||||||
|
ivy.artifact.group=pentaho-library
|
||||||
|
ivy.artifact.id=libformula
|
||||||
|
impl.title=LibFormula
|
||||||
|
impl.productID=libformula
|
||||||
|
src.dir=${basedir}/source
|
||||||
|
dependency.libbase.revision=1.1.3
|
||||||
|
-testsrc.dir=${basedir}/test
|
||||||
|
\ No newline at end of file
|
||||||
|
+testsrc.dir=${basedir}/test
|
||||||
|
+antcontrib.available=true
|
||||||
|
+build.cache.dir=lib
|
@ -0,0 +1,13 @@
|
|||||||
|
--- libformula-1.1.3/common_build.xml 2020-05-05 19:51:29.901832133 +0100
|
||||||
|
+++ libformula-1.1.3/common_build.xml 2020-05-05 19:51:35.875883155 +0100
|
||||||
|
@@ -136,8 +136,8 @@
|
||||||
|
<property name="javac.deprecation"
|
||||||
|
value="true"
|
||||||
|
description="Indicates whether source should be compiled with deprecation information" />
|
||||||
|
- <property name="javac.source" value="1.5" description="Provide source compatibility with specified release" />
|
||||||
|
- <property name="javac.target" value="1.5" description="Generate class files for specific VM version" />
|
||||||
|
+ <property name="javac.source" value="1.6" description="Provide source compatibility with specified release" />
|
||||||
|
+ <property name="javac.target" value="1.6" description="Generate class files for specific VM version" />
|
||||||
|
|
||||||
|
<!-- Build Cache properties -->
|
||||||
|
<property name="build.cache.dir"
|
@ -0,0 +1,225 @@
|
|||||||
|
diff --git a/common_build.xml b/common_build.xml
|
||||||
|
index 3a42daa..5575f19 100644
|
||||||
|
--- a/common_build.xml
|
||||||
|
+++ b/common_build.xml
|
||||||
|
@@ -152,9 +152,6 @@
|
||||||
|
<property name="cobertura.build.cache.dir"
|
||||||
|
value="${build.cache.dir}/cobertura"
|
||||||
|
description="Directory where the Cobertura jar (and dependencies) is placed after it is auto-downloaded by the build" />
|
||||||
|
- <property name="antcontrib.build.cache.dir"
|
||||||
|
- value="${build.cache.dir}/ant-contrib"
|
||||||
|
- description="Directory where the Ant-Contrib jar (and dependencies) is placed after it is auto-downloaded by the build" />
|
||||||
|
<property name="pentaho.build.cache.dir"
|
||||||
|
value="${build.cache.dir}/pentaho"
|
||||||
|
description="Directory where the Pentaho ant tasks jar (and dependencies) is placed after it is auto-downloaded by the build" />
|
||||||
|
@@ -326,68 +323,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
<!--=======================================================================
|
||||||
|
- install-antcontrib
|
||||||
|
-
|
||||||
|
- (Fetches and) installs ant-contrib tasks.
|
||||||
|
- ====================================================================-->
|
||||||
|
- <target name="install-antcontrib"
|
||||||
|
- depends="antcontrib.download-check">
|
||||||
|
- <taskdef resource="net/sf/antcontrib/antlib.xml">
|
||||||
|
- <classpath>
|
||||||
|
- <fileset dir="${antcontrib.build.cache.dir}">
|
||||||
|
- <include name="*.jar" />
|
||||||
|
- </fileset>
|
||||||
|
- </classpath>
|
||||||
|
- </taskdef>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <!--=======================================================================
|
||||||
|
- antcontrib.download-check
|
||||||
|
-
|
||||||
|
- Fetches ant-contrib from sourceforge if it is not already present
|
||||||
|
- ====================================================================-->
|
||||||
|
- <target name="antcontrib.download-check">
|
||||||
|
- <condition property="antcontrib.available">
|
||||||
|
- <and>
|
||||||
|
- <available file="${antcontrib.build.cache.dir}" />
|
||||||
|
- <available classname="net.sf.antcontrib.logic.IfTask">
|
||||||
|
- <classpath>
|
||||||
|
- <fileset dir="${antcontrib.build.cache.dir}">
|
||||||
|
- <include name="*.jar" />
|
||||||
|
- </fileset>
|
||||||
|
- </classpath>
|
||||||
|
- </available>
|
||||||
|
- </and>
|
||||||
|
- </condition>
|
||||||
|
- <antcall target="antcontrib.download" />
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <!--=======================================================================
|
||||||
|
- antcontrib.download
|
||||||
|
-
|
||||||
|
- Fetches ant-contrib from sourceforge
|
||||||
|
- ====================================================================-->
|
||||||
|
- <target name="antcontrib.download" unless="antcontrib.available">
|
||||||
|
- <mkdir dir="${tmp.build.cache.dir}" />
|
||||||
|
- <get src="http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b3-bin.zip"
|
||||||
|
- dest="${tmp.build.cache.dir}/antcontrib.zip"
|
||||||
|
- usetimestamp="true" />
|
||||||
|
- <unzip src="${tmp.build.cache.dir}/antcontrib.zip" dest="${tmp.build.cache.dir}">
|
||||||
|
- <patternset>
|
||||||
|
- <include name="**/*.jar" />
|
||||||
|
- </patternset>
|
||||||
|
- </unzip>
|
||||||
|
- <copy todir="${antcontrib.build.cache.dir}">
|
||||||
|
- <fileset dir="${tmp.build.cache.dir}/ant-contrib">
|
||||||
|
- <include name="**/*.jar" />
|
||||||
|
- </fileset>
|
||||||
|
- </copy>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <!--=======================================================================
|
||||||
|
init
|
||||||
|
|
||||||
|
Ensures that all the required directories exist before processing
|
||||||
|
@@ -445,7 +380,7 @@
|
||||||
|
(Fetches and) installs the SVN ANT for use by this ant script
|
||||||
|
====================================================================-->
|
||||||
|
<target name="install-svnant"
|
||||||
|
- depends="install-antcontrib, svnant.download-check">
|
||||||
|
+ depends="svnant.download-check">
|
||||||
|
<if>
|
||||||
|
<istrue value="${svnant.isinstalled}" />
|
||||||
|
<then>
|
||||||
|
@@ -492,57 +427,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
<!--=======================================================================
|
||||||
|
- set-build.id
|
||||||
|
-
|
||||||
|
- Sets a property build.id to the either "development" or the svn revision
|
||||||
|
- if in release mode
|
||||||
|
- ====================================================================-->
|
||||||
|
- <target name="set-build.id" unless="build.id" depends="install-antcontrib">
|
||||||
|
- <if>
|
||||||
|
- <istrue value="${release}" />
|
||||||
|
- <then>
|
||||||
|
- <antcallback target="svn-revision" return="svn.revision" />
|
||||||
|
- <property name="build.id" value="${svn.revision}" />
|
||||||
|
- </then>
|
||||||
|
- <else>
|
||||||
|
- <property name="build.id" value="development" />
|
||||||
|
- </else>
|
||||||
|
- </if>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
- <!--=================================================================================
|
||||||
|
- version-properties: common Ant driven version file generation. Projects that produce
|
||||||
|
- a package or packages should run this target. Projects that produce
|
||||||
|
- jars only should NOT.
|
||||||
|
- ===================================================================================-->
|
||||||
|
- <target name="version-properties" depends="set-build.id">
|
||||||
|
- <tstamp>
|
||||||
|
- <format property="build.time" pattern="yyyy/MM/dd hh:mm aa"/>
|
||||||
|
- </tstamp>
|
||||||
|
- <propertyfile
|
||||||
|
- file="version.properties" comment="Release Build version info">
|
||||||
|
- <entry key="release.major.number" value="${release.major.number}" />
|
||||||
|
- <entry key="release.minor.number" value="${release.minor.number}" />
|
||||||
|
- <entry key="release.milestone.number" value="${release.milestone.number}" />
|
||||||
|
- <entry key="release.candidate.token" value="${release.candidate.token}" />
|
||||||
|
- <entry key="impl.vendor" value="${impl.vendor}" />
|
||||||
|
- <entry key="impl.version" value="${release.major.number}.${release.minor.number}.${release.milestone.number}.${build.id}" />
|
||||||
|
- <entry key="impl.title" value="${impl.title}" />
|
||||||
|
- <entry key="buildDate" value="${build.time}"/>
|
||||||
|
- <entry key="svn.revision" value="${build.id}"/>
|
||||||
|
- <entry key="release.build.number" default="0" type="int" operation="+" value="1" pattern="0000"/>
|
||||||
|
- </propertyfile>
|
||||||
|
- <property file="${basedir}/version.properties"/>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <!--=======================================================================
|
||||||
|
install-ivy
|
||||||
|
|
||||||
|
(Fetches and) installs the IVY jar for use by this ant script
|
||||||
|
====================================================================-->
|
||||||
|
<target name="install-ivy"
|
||||||
|
- depends="install-antcontrib,ivy.download-check">
|
||||||
|
+ depends="ivy.download-check">
|
||||||
|
<if>
|
||||||
|
<istrue value="${ivy.isinstalled}" />
|
||||||
|
<then>
|
||||||
|
@@ -602,7 +492,7 @@
|
||||||
|
Verifies that there are no SNAPSHOT dependencies defined in the ivy xml.
|
||||||
|
If there are SNAPSHOTS, fail the release build.
|
||||||
|
====================================================================-->
|
||||||
|
- <target name="ivy.check-releasable" depends="install-ivy, install-antcontrib">
|
||||||
|
+ <target name="ivy.check-releasable" depends="install-ivy">
|
||||||
|
<if>
|
||||||
|
<istrue value="${release}" />
|
||||||
|
<then>
|
||||||
|
@@ -769,7 +659,7 @@
|
||||||
|
Publishes the jar file for this project to a Maven2 repository.
|
||||||
|
====================================================================-->
|
||||||
|
<target name="publish-pentaho-nojar"
|
||||||
|
- depends="install-antcontrib,create-pom,ivy.deliver">
|
||||||
|
+ depends="create-pom,ivy.deliver">
|
||||||
|
<antcall target="maven-publish-dependencies">
|
||||||
|
<param name="publish.groupId" value="${ivy.artifact.group}" />
|
||||||
|
<param name="publish.artifactId" value="${ivy.artifact.id}" />
|
||||||
|
@@ -1082,26 +972,10 @@
|
||||||
|
duplicate copying of resources from src tree (handled by compile.src_copy
|
||||||
|
if jar.include.source is set.
|
||||||
|
====================================================================-->
|
||||||
|
- <target name="compile.res_copy" depends="install-antcontrib">
|
||||||
|
- <if>
|
||||||
|
- <available file="${res.dir}" />
|
||||||
|
- <then>
|
||||||
|
- <copy todir="${classes.dir}">
|
||||||
|
- <fileset dir="${res.dir}" />
|
||||||
|
- </copy>
|
||||||
|
- </then>
|
||||||
|
- </if>
|
||||||
|
-
|
||||||
|
- <if>
|
||||||
|
- <not>
|
||||||
|
- <isset property="jar.include.source" />
|
||||||
|
- </not>
|
||||||
|
- <then>
|
||||||
|
- <copy todir="${classes.dir}" flatten="false">
|
||||||
|
- <fileset dir="${src.dir}" excludes="**/*.java" />
|
||||||
|
- </copy>
|
||||||
|
- </then>
|
||||||
|
- </if>
|
||||||
|
+ <target name="compile.res_copy">
|
||||||
|
+ <copy todir="${classes.dir}" flatten="false">
|
||||||
|
+ <fileset dir="${src.dir}" excludes="**/*.java" />
|
||||||
|
+ </copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1151,7 +1025,7 @@
|
||||||
|
|
||||||
|
Creates a jar file from the bin directory
|
||||||
|
====================================================================-->
|
||||||
|
- <target name="jar" depends="compile,set-build.id,generate.manifest" description="Jars up the bin directory after a compile">
|
||||||
|
+ <target name="jar" depends="compile,generate.manifest" description="Jars up the bin directory after a compile">
|
||||||
|
<jar destfile="${dist.dir}/${ivy.artifact.id}-${project.revision}.jar" manifest="${dist.manifest.file}">
|
||||||
|
<fileset dir="${classes.dir}" />
|
||||||
|
</jar>
|
||||||
|
@@ -1164,7 +1038,7 @@
|
||||||
|
Creates a new manifest file if one is not specified, or updates
|
||||||
|
an existing manifest file if one is specified.
|
||||||
|
====================================================================-->
|
||||||
|
- <target name="generate.manifest" depends="init,set-build.id">
|
||||||
|
+ <target name="generate.manifest" depends="init">
|
||||||
|
<delete file="${dist.manifest.file}" />
|
||||||
|
<touch file="${dist.manifest.file}" />
|
||||||
|
<copy file="${manifest.file}" tofile="${dist.manifest.file}" overwrite="true" failonerror="false" />
|
||||||
|
@@ -1648,4 +1522,4 @@
|
||||||
|
</dot-classpath>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
-</project>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</project>
|
@ -0,0 +1,236 @@
|
|||||||
|
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
|
||||||
|
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java 2021-02-23 14:41:06.962127389 +0000
|
||||||
|
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java 2021-02-23 14:48:18.016328356 +0000
|
||||||
|
@@ -19,8 +19,7 @@
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
-import org.apache.commons.logging.Log;
|
||||||
|
-import org.apache.commons.logging.LogFactory;
|
||||||
|
+import java.util.logging.Logger;
|
||||||
|
import org.pentaho.reporting.libraries.formula.lvalues.LValue;
|
||||||
|
import org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair;
|
||||||
|
import org.pentaho.reporting.libraries.formula.parser.FormulaParseException;
|
||||||
|
@@ -40,7 +39,7 @@
|
||||||
|
*/
|
||||||
|
public class Formula implements Serializable, Cloneable
|
||||||
|
{
|
||||||
|
- private static final Log logger = LogFactory.getLog(Formula.class);
|
||||||
|
+ private static final Logger logger = Logger.getLogger(Formula.class.getName());
|
||||||
|
private LValue rootReference;
|
||||||
|
private static final long serialVersionUID = -1176925812499923546L;
|
||||||
|
|
||||||
|
@@ -105,7 +104,7 @@
|
||||||
|
final Type type = typeValuePair.getType();
|
||||||
|
if (type.isFlagSet(Type.ERROR_TYPE))
|
||||||
|
{
|
||||||
|
- logger.debug("Error: " + typeValuePair.getValue());
|
||||||
|
+ logger.config("Error: " + typeValuePair.getValue());
|
||||||
|
}
|
||||||
|
else if (type.isFlagSet(Type.ARRAY_TYPE))
|
||||||
|
{
|
||||||
|
@@ -131,7 +130,7 @@
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
- logger.warn("Evaluation failed unexpectedly: ", e);
|
||||||
|
+ logger.warning("Evaluation failed unexpectedly: " + e);
|
||||||
|
return new TypeValuePair(ErrorType.TYPE, LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java 2021-02-23 14:41:06.980127564 +0000
|
||||||
|
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java 2021-02-23 14:48:29.995445103 +0000
|
||||||
|
@@ -25,9 +25,7 @@
|
||||||
|
import org.pentaho.reporting.libraries.base.util.HashNMap;
|
||||||
|
import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
|
||||||
|
import org.pentaho.reporting.libraries.base.config.Configuration;
|
||||||
|
-import org.apache.commons.logging.Log;
|
||||||
|
-import org.apache.commons.logging.LogFactory;
|
||||||
|
-
|
||||||
|
+import java.util.logging.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creation-Date: 02.11.2006, 12:48:32
|
||||||
|
@@ -36,7 +34,7 @@
|
||||||
|
*/
|
||||||
|
public class DefaultFunctionRegistry implements FunctionRegistry
|
||||||
|
{
|
||||||
|
- private static final Log logger = LogFactory.getLog(DefaultFunctionRegistry.class);
|
||||||
|
+ private static final Logger logger = Logger.getLogger(DefaultFunctionRegistry.class.getName());
|
||||||
|
|
||||||
|
private static final String FUNCTIONS_PREFIX = "org.pentaho.reporting.libraries.formula.functions.";
|
||||||
|
private static final String[] EMPTY_ARRAY = new String[0];
|
||||||
|
@@ -72,7 +70,7 @@
|
||||||
|
final Function function = createFunction(aName);
|
||||||
|
if (function == null)
|
||||||
|
{
|
||||||
|
- logger.debug ("There is no such function: " + aName);
|
||||||
|
+ logger.config ("There is no such function: " + aName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -132,7 +130,7 @@
|
||||||
|
(functionClass, DefaultFunctionRegistry.class, Function.class);
|
||||||
|
if (function == null)
|
||||||
|
{
|
||||||
|
- logger.debug ("There is no such function: " + name);
|
||||||
|
+ logger.config ("There is no such function: " + name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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
|
||||||
|
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java 2021-02-23 14:41:06.983127594 +0000
|
||||||
|
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java 2021-02-23 14:48:54.904687864 +0000
|
||||||
|
@@ -27,8 +27,7 @@
|
||||||
|
import org.pentaho.reporting.libraries.formula.typing.Type;
|
||||||
|
import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
|
||||||
|
import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
|
||||||
|
-import org.apache.commons.logging.Log;
|
||||||
|
-import org.apache.commons.logging.LogFactory;
|
||||||
|
+import java.util.logging.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns true if the parameter is of error and not of error type NA.
|
||||||
|
@@ -37,7 +36,7 @@
|
||||||
|
*/
|
||||||
|
public class IsErrFunction implements Function
|
||||||
|
{
|
||||||
|
- private static final Log logger = LogFactory.getLog(IsErrFunction.class);
|
||||||
|
+ private static final Logger logger = Logger.getLogger(IsErrFunction.class.getName());
|
||||||
|
private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
|
||||||
|
private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
|
||||||
|
private static final long serialVersionUID = 6749192734608313367L;
|
||||||
|
@@ -61,7 +60,7 @@
|
||||||
|
|
||||||
|
if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
|
||||||
|
{
|
||||||
|
- logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
|
||||||
|
+ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
|
||||||
|
final ErrorValue na = (ErrorValue) value;
|
||||||
|
if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
|
||||||
|
{
|
||||||
|
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
|
||||||
|
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java 2021-02-23 14:41:06.984127603 +0000
|
||||||
|
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java 2021-02-23 14:49:05.917795194 +0000
|
||||||
|
@@ -27,8 +27,7 @@
|
||||||
|
import org.pentaho.reporting.libraries.formula.typing.Type;
|
||||||
|
import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
|
||||||
|
import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
|
||||||
|
-import org.apache.commons.logging.Log;
|
||||||
|
-import org.apache.commons.logging.LogFactory;
|
||||||
|
+import java.util.logging.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns true if the parameter is of error type NA.
|
||||||
|
@@ -39,7 +38,7 @@
|
||||||
|
{
|
||||||
|
private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
|
||||||
|
private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
|
||||||
|
- private static final Log logger = LogFactory.getLog(IsNaFunction.class);
|
||||||
|
+ private static final Logger logger = Logger.getLogger(IsNaFunction.class.getName());
|
||||||
|
private static final long serialVersionUID = 1205462839536368718L;
|
||||||
|
|
||||||
|
public IsNaFunction()
|
||||||
|
@@ -61,7 +60,7 @@
|
||||||
|
|
||||||
|
if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
|
||||||
|
{
|
||||||
|
- logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
|
||||||
|
+ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
|
||||||
|
final ErrorValue na = (ErrorValue) value;
|
||||||
|
if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
|
||||||
|
{
|
||||||
|
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
|
||||||
|
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java 2021-02-23 14:41:06.988127642 +0000
|
||||||
|
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java 2021-02-23 14:50:26.354579111 +0000
|
||||||
|
@@ -17,8 +17,8 @@
|
||||||
|
|
||||||
|
package org.pentaho.reporting.libraries.formula.lvalues;
|
||||||
|
|
||||||
|
-import org.apache.commons.logging.Log;
|
||||||
|
-import org.apache.commons.logging.LogFactory;
|
||||||
|
+import java.util.logging.Level;
|
||||||
|
+import java.util.logging.Logger;
|
||||||
|
import org.pentaho.reporting.libraries.formula.EvaluationException;
|
||||||
|
import org.pentaho.reporting.libraries.formula.FormulaContext;
|
||||||
|
import org.pentaho.reporting.libraries.formula.LibFormulaErrorValue;
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
*/
|
||||||
|
public class FormulaFunction extends AbstractLValue
|
||||||
|
{
|
||||||
|
- private static final Log logger = LogFactory.getLog(FormulaFunction.class);
|
||||||
|
+ private static final Logger logger = Logger.getLogger(FormulaFunction.class.getName());
|
||||||
|
|
||||||
|
private static class FormulaParameterCallback implements ParameterCallback
|
||||||
|
{
|
||||||
|
@@ -74,9 +74,9 @@
|
||||||
|
final TypeValuePair converted = typeRegistry.convertTo(paramType, result);
|
||||||
|
if (converted == null)
|
||||||
|
{
|
||||||
|
- if (logger.isDebugEnabled())
|
||||||
|
+ if (logger.isLoggable(Level.CONFIG))
|
||||||
|
{
|
||||||
|
- logger.debug("Failed to evaluate parameter " + pos + " on function " + function);
|
||||||
|
+ logger.config("Failed to evaluate parameter " + pos + " on function " + function);
|
||||||
|
}
|
||||||
|
throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_AUTO_ARGUMENT_VALUE);
|
||||||
|
}
|
||||||
|
@@ -228,7 +228,7 @@
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
- logger.error("Unexpected exception while evaluating", e);
|
||||||
|
+ logger.severe("Unexpected exception while evaluating: " + e);
|
||||||
|
throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java 2021-02-23 14:41:06.961127380 +0000
|
||||||
|
+++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java 2021-02-23 14:47:11.376678905 +0000
|
||||||
|
@@ -35,8 +35,7 @@
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
-import org.apache.commons.logging.Log;
|
||||||
|
-import org.apache.commons.logging.LogFactory;
|
||||||
|
+import java.util.logging.Logger;
|
||||||
|
import org.pentaho.reporting.libraries.base.config.Configuration;
|
||||||
|
import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
|
||||||
|
import org.pentaho.reporting.libraries.formula.EvaluationException;
|
||||||
|
@@ -66,7 +65,7 @@
|
||||||
|
*/
|
||||||
|
public class DefaultTypeRegistry implements TypeRegistry
|
||||||
|
{
|
||||||
|
- private static final Log logger = LogFactory.getLog(DefaultTypeRegistry.class);
|
||||||
|
+ private static final Logger logger = Logger.getLogger(DefaultTypeRegistry.class.getName());
|
||||||
|
|
||||||
|
private static class ArrayConverterCallback implements ArrayCallback
|
||||||
|
{
|
||||||
|
@@ -599,7 +598,7 @@
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- logger.warn("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
|
||||||
|
+ logger.warning("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
|
||||||
|
throw TypeConversionException.getInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -612,7 +611,7 @@
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
|
||||||
|
+ logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
|
||||||
|
throw TypeConversionException.getInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -651,7 +650,7 @@
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
|
||||||
|
+ logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
|
||||||
|
throw TypeConversionException.getInstance();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
Name: libformula
|
||||||
|
Version: 1.1.3
|
||||||
|
Release: 32%{?dist}
|
||||||
|
Summary: Formula Parser
|
||||||
|
License: LGPLv2
|
||||||
|
#Original source: http://downloads.sourceforge.net/jfreereport/%%{name}-%%{version}.zip
|
||||||
|
#unzip, find . -name "*.jar" -exec rm {} \;
|
||||||
|
#to simplify the licensing
|
||||||
|
Source: %{name}-%{version}-jarsdeleted.zip
|
||||||
|
URL: http://reporting.pentaho.org/
|
||||||
|
BuildRequires: ant, java-devel, jpackage-utils, libbase >= 1.1.3
|
||||||
|
Requires: java-headless, jpackage-utils, libbase >= 1.1.3
|
||||||
|
BuildArch: noarch
|
||||||
|
Patch0: libformula-1.1.2.build.patch
|
||||||
|
Patch1: libformula-1.1.2.java11.patch
|
||||||
|
Patch2: libformula-1.1.3-remove-ant-contrib-support.patch
|
||||||
|
Patch3: libformula-1.1.3-remove-commons-logging.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
LibFormula provides Excel-Style-Expressions. The implementation provided
|
||||||
|
here is very generic and can be used in any application that needs to
|
||||||
|
compute formulas.
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: Javadoc for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: jpackage-utils
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
Javadoc for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -c
|
||||||
|
%patch0 -p1 -b .build
|
||||||
|
%patch1 -p1 -b .java11
|
||||||
|
%patch2 -p1 -b .no_antcontrib
|
||||||
|
%patch3 -p1 -b .no_commons_logging
|
||||||
|
|
||||||
|
find . -name "*.jar" -exec rm -f {} \;
|
||||||
|
mkdir -p lib
|
||||||
|
build-jar-repository -s -p lib libbase
|
||||||
|
|
||||||
|
%build
|
||||||
|
ant jar javadoc
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||||
|
cp -p ./dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
|
cp -rp bin/javadoc/docs/api $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc licence-LGPL.txt README.txt ChangeLog.txt
|
||||||
|
%{_javadir}/%{name}.jar
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.3-32
|
||||||
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
|
* Wed May 19 2021 Caolán McNamara <caolanm@redhat.com> - 1.1.3-31
|
||||||
|
- Resolves: rhbz#1963838 restore missing functions
|
||||||
|
Remove ant-contrib support dropped compile.res_copy target so
|
||||||
|
.properties files didn't get included in the jar so libformula
|
||||||
|
didn't use its built-in loaders so libreoffice's database
|
||||||
|
report generator didn't show all categories in formula wizard
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.3-30
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Tue Feb 23 2021 Caolán McNamara <caolanm@redhat.com> - 1.1.3-29
|
||||||
|
- Related: rhbz#1895921 replace apache-commons-logging with java.util.logging
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-28
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 15 2021 Nicolas Lécureuil <neoclust@mageia.org> - 1.1.3-27
|
||||||
|
- Remove ant-contrib support
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-26
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 1.1.3-25
|
||||||
|
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||||
|
|
||||||
|
* Tue May 05 2020 Caolán McNamara <caolanm@redhat.com> - 1.1.3-24
|
||||||
|
- allow rebuild with java 11
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-23
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-22
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Apr 04 2019 Stephan Bergmann <sbergman@redhat.com> - 1.1.3-21
|
||||||
|
- Use /usr/share/java instead of _javadir macro for build dependencies
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-20
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-19
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-18
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-17
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-16
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Feb 25 2014 Caolán McNamara <caolanm@redhat.com> - 1.1.3-12
|
||||||
|
- Resolves: rhbz#1068354 Switch to java-headless (build)requires
|
||||||
|
|
||||||
|
* Wed Oct 23 2013 Caolán McNamara <caolanm@redhat.com> - 1.1.3-11
|
||||||
|
- Resolves: rhbz#1022132 remove versioned jars
|
||||||
|
|
||||||
|
* Tue Aug 06 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1.1.3-10
|
||||||
|
- ant-nodeps is dropped from ant-1.9.0-2 build in rawhide
|
||||||
|
- Drop buildroot, %%clean, %%defattr and removal of buildroot in %%install
|
||||||
|
|
||||||
|
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Nov 03 2012 Caolán McNamara <caolanm@redhat.com> - 1.1.3-7
|
||||||
|
- repack source to remove bundled multi-license .jars
|
||||||
|
|
||||||
|
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu May 03 2012 Caolán McNamara <caolanm@redhat.com> 1.1.3-5
|
||||||
|
- Resolves: rhbz#818494 adapt for jakarta->apache
|
||||||
|
|
||||||
|
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Oct 28 2011 Caolán McNamara <caolanm@redhat.com> 1.1.3-3
|
||||||
|
- Related: rhbz#749103 drop gcj aot
|
||||||
|
|
||||||
|
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Dec 03 2009 Caolan McNamara <caolanm@redhat.com> 1.1.3-1
|
||||||
|
- latest version
|
||||||
|
|
||||||
|
* Tue Nov 17 2009 Caolan McNamara <caolanm@redhat.com> 1.1.2-1
|
||||||
|
- latest version
|
||||||
|
|
||||||
|
* Fri Jul 24 2009 Caolan McNamara <caolanm@redhat.com> 0.2.0-3.OOo31
|
||||||
|
- make javadoc no-arch when building as arch-dependant aot
|
||||||
|
|
||||||
|
* Mon Mar 16 2009 Caolan McNamara <caolanm@redhat.com> 0.2.0-2.OOo31
|
||||||
|
- post-release tuned for OpenOffice.org report-designer
|
||||||
|
|
||||||
|
* Mon Mar 09 2009 Caolan McNamara <caolanm@redhat.com> 0.2.0-1
|
||||||
|
- latest version
|
||||||
|
|
||||||
|
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.18-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed May 07 2008 Caolan McNamara <caolanm@redhat.com> 0.1.18-1
|
||||||
|
- initial fedora import
|
Loading…
Reference in new issue