=== modified file 'dhis-2/dhis-services/dhis-service-administration/pom.xml'
--- dhis-2/dhis-services/dhis-service-administration/pom.xml 2015-01-23 14:07:46 +0000
+++ dhis-2/dhis-services/dhis-service-administration/pom.xml 2015-03-31 08:46:53 +0000
@@ -33,8 +33,9 @@
commons-logging
- commons-math
- commons-math
+ org.apache.commons
+ commons-math3
+ 3.4.1
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.java 2015-03-24 16:52:51 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.java 2015-03-31 08:46:53 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.apache.commons.math.util.MathUtils;
+import org.apache.commons.math3.util.Precision;
import java.text.NumberFormat;
import java.text.ParseException;
@@ -132,6 +132,6 @@
private static String parseCoordinate( String number, int precision, NumberFormat nf )
throws ParseException
{
- return Double.toString( MathUtils.round( nf.parse( number ).doubleValue(), precision ) );
+ return Double.toString( Precision.round(nf.parse(number).doubleValue(), precision ) );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/pom.xml'
--- dhis-2/dhis-services/dhis-service-reporting/pom.xml 2015-03-06 11:35:01 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/pom.xml 2015-03-31 08:46:53 +0000
@@ -87,8 +87,9 @@
- commons-math
- commons-math
+ org.apache.commons
+ commons-math3
+ 3.4.1
org.hisp.dhis
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2015-03-31 08:46:53 +0000
@@ -52,11 +52,11 @@
import java.util.Map;
import java.util.Map.Entry;
-import org.apache.commons.math.MathException;
-import org.apache.commons.math.analysis.SplineInterpolator;
-import org.apache.commons.math.analysis.UnivariateRealFunction;
-import org.apache.commons.math.analysis.UnivariateRealInterpolator;
-import org.apache.commons.math.stat.regression.SimpleRegression;
+import org.apache.commons.math3.exception.MathRuntimeException;
+import org.apache.commons.math3.analysis.interpolation.SplineInterpolator;
+import org.apache.commons.math3.analysis.UnivariateFunction;
+import org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator;
+import org.apache.commons.math3.stat.regression.SimpleRegression;
import org.hisp.dhis.analytics.AnalyticsService;
import org.hisp.dhis.analytics.event.EventAnalyticsService;
import org.hisp.dhis.chart.BaseChart;
@@ -340,7 +340,7 @@
MinMaxDataElement minMax = minMaxDataElementService.getMinMaxDataElement( organisationUnit, dataElement,
categoryOptionCombo );
- UnivariateRealInterpolator interpolator = new SplineInterpolator();
+ UnivariateInterpolator interpolator = new SplineInterpolator();
Integer periodCount = 0;
List x = new ArrayList<>();
@@ -396,7 +396,7 @@
try
{
- UnivariateRealFunction function = interpolator.interpolate( xa, getArray( y ) );
+ UnivariateFunction function = interpolator.interpolate( xa, getArray( y ) );
for ( Period period : periods )
{
@@ -406,7 +406,7 @@
}
}
}
- catch ( MathException ex )
+ catch ( MathRuntimeException ex )
{
throw new RuntimeException( "Failed to interpolate", ex );
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java 2015-03-31 08:46:53 +0000
@@ -30,7 +30,7 @@
import java.util.List;
-import org.apache.commons.math.util.MathUtils;
+import org.apache.commons.math3.util.Precision;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.datavalue.DataValue;
@@ -129,7 +129,7 @@
max = Math.max( max, historyPoint.getValue() );
total += historyPoint.getValue();
average = total / ++count;
- average = MathUtils.round( average, 1 );
+ average = Precision.round( average, 1 );
}
historyPoint.setAverage( average );
=== modified file 'dhis-2/dhis-support/dhis-support-system/pom.xml'
--- dhis-2/dhis-support/dhis-support-system/pom.xml 2015-03-05 18:41:52 +0000
+++ dhis-2/dhis-support/dhis-support-system/pom.xml 2015-03-31 08:46:53 +0000
@@ -107,8 +107,9 @@
commons-codec
- commons-math
- commons-math
+ org.apache.commons
+ commons-math3
+ 3.4.1
commons-validator
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2015-03-07 16:16:41 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2015-03-31 08:46:53 +0000
@@ -45,7 +45,7 @@
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRField;
-import org.apache.commons.math.stat.regression.SimpleRegression;
+import org.apache.commons.math3.stat.regression.SimpleRegression;
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.common.GridHeader;
import org.hisp.dhis.common.adapter.JacksonRowDataSerializer;
=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml 2015-03-30 02:29:33 +0000
+++ dhis-2/pom.xml 2015-03-31 08:46:53 +0000
@@ -653,9 +653,9 @@
1.9
- commons-math
- commons-math
- 1.2
+ org.apache.commons
+ commons-math3
+ 3.4.1
commons-validator