Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571) No functional change. We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html : <<Using the integer fields in this class (such as ROUND_HALF_UP) to represent rounding mode is largely obsolete; the enumeration values of the RoundingMode enum, (such as RoundingMode.HALF_UP) should be used instead.>> That's an easy global replacement. But it also needs to import the RoundingMode class. It was 26 files so I decided to rather clean all the imports in all files with the help of Eclipse. This is a 1st step. I will need to closely look at 2 special class: UtilNumber and Calculate. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+3
-3
@@ -22,9 +22,6 @@ import java.net.URL;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.TestResult;
|
||||
|
||||
import org.apache.ofbiz.base.location.FlexibleLocation;
|
||||
import org.apache.ofbiz.base.util.Debug;
|
||||
import org.apache.ofbiz.base.util.UtilValidate;
|
||||
@@ -33,6 +30,9 @@ import org.apache.ofbiz.entity.util.EntitySaxReader;
|
||||
import org.apache.ofbiz.service.testtools.OFBizTestCase;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.TestResult;
|
||||
|
||||
public class EntityXmlAssertTest extends OFBizTestCase {
|
||||
|
||||
public static final String module = ServiceTest.class.getName();
|
||||
|
||||
@@ -21,9 +21,6 @@ package org.apache.ofbiz.testtools;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.apache.ofbiz.base.component.ComponentConfig;
|
||||
import org.apache.ofbiz.base.config.GenericConfigException;
|
||||
import org.apache.ofbiz.base.config.ResourceHandler;
|
||||
@@ -31,6 +28,9 @@ import org.apache.ofbiz.base.util.Debug;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Use this class in a JUnit test runner to prepare the TestSuite.
|
||||
*/
|
||||
|
||||
@@ -23,10 +23,6 @@ import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.apache.commons.lang.RandomStringUtils;
|
||||
import org.apache.ofbiz.base.util.Debug;
|
||||
import org.apache.ofbiz.base.util.ObjectType;
|
||||
@@ -44,6 +40,10 @@ import org.apache.ofbiz.service.ServiceContainer;
|
||||
import org.apache.ofbiz.service.testtools.OFBizTestCase;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Use this class in a JUnit test runner to bootstrap the Test Suite runner.
|
||||
*/
|
||||
|
||||
@@ -21,9 +21,6 @@ package org.apache.ofbiz.testtools;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.TestResult;
|
||||
|
||||
import org.apache.ofbiz.base.util.UtilGenerics;
|
||||
import org.apache.ofbiz.base.util.UtilMisc;
|
||||
import org.apache.ofbiz.base.util.UtilValidate;
|
||||
@@ -32,6 +29,9 @@ import org.apache.ofbiz.service.ModelService;
|
||||
import org.apache.ofbiz.service.testtools.OFBizTestCase;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.TestResult;
|
||||
|
||||
public class ServiceTest extends OFBizTestCase {
|
||||
|
||||
public static final String module = ServiceTest.class.getName();
|
||||
|
||||
+10
-10
@@ -27,6 +27,16 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ofbiz.base.container.Container;
|
||||
import org.apache.ofbiz.base.container.ContainerException;
|
||||
import org.apache.ofbiz.base.container.StartupCommandToArgsAdapter;
|
||||
import org.apache.ofbiz.base.start.StartupCommand;
|
||||
import org.apache.ofbiz.base.util.Debug;
|
||||
import org.apache.ofbiz.entity.Delegator;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
|
||||
import org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
@@ -35,16 +45,6 @@ import junit.framework.TestListener;
|
||||
import junit.framework.TestResult;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
|
||||
import org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter;
|
||||
import org.apache.ofbiz.base.container.Container;
|
||||
import org.apache.ofbiz.base.container.ContainerException;
|
||||
import org.apache.ofbiz.base.container.StartupCommandToArgsAdapter;
|
||||
import org.apache.ofbiz.base.start.StartupCommand;
|
||||
import org.apache.ofbiz.base.util.Debug;
|
||||
import org.apache.ofbiz.entity.Delegator;
|
||||
|
||||
/**
|
||||
* A Container implementation to run the tests configured through this testtools stuff.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user