diff --git a/build.gradle b/build.gradle
index 5972fa05dd..81781ba167 100644
--- a/build.gradle
+++ b/build.gradle
@@ -99,7 +99,6 @@ dependencies {
compile 'javax.el:javax.el-api:3.0.1-b04'
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.0'
- compile 'javolution:javolution:5.4.3'
compile 'junit:junit-dep:4.10'
compile 'net.fortuna.ical4j:ical4j:1.0-rc3-atlassian-11'
compile 'org.apache.ant:ant-junit:1.9.0'
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
index d980d9aef4..b97af171c1 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
@@ -1041,13 +1041,15 @@ public class EntityTestSuite extends EntityTestCase {
* Tests EntitySaxReader, verification loading data with tag create, create-update, create-replace, delete
*/
public void testEntitySaxReaderCreation() throws Exception {
- String xmlContentLoad =
+ String xmlContentLoad =
+ "" +
"" +
"" +
" " +
" " +
"" +
- "";
+ "" +
+ "";
EntitySaxReader reader = new EntitySaxReader(delegator);
long numberLoaded = reader.parse(xmlContentLoad);
assertEquals("Create Entity loaded ", 4, numberLoaded);
@@ -1068,8 +1070,10 @@ public class EntityTestSuite extends EntityTestCase {
public void testEntitySaxReaderCreateSkip() throws Exception {
String xmlContentLoad =
+ "" +
"" +
- "";
+ "" +
+ "";
EntitySaxReader reader = new EntitySaxReader(delegator);
long numberLoaded = reader.parse(xmlContentLoad);
xmlContentLoad =
@@ -1089,13 +1093,15 @@ public class EntityTestSuite extends EntityTestCase {
public void testEntitySaxReaderUpdate() throws Exception {
String xmlContentLoad =
+ "" +
"" +
"" +
"" +
"" +
" " +
" " +
- "";
+ "" +
+ "";
EntitySaxReader reader = new EntitySaxReader(delegator);
long numberLoaded = reader.parse(xmlContentLoad);
assertEquals("Update Entity loaded ", 5, numberLoaded);
@@ -1116,12 +1122,14 @@ public class EntityTestSuite extends EntityTestCase {
public void testEntitySaxReaderReplace() throws Exception {
String xmlContentLoad =
+ "" +
"" +
"" +
"" +
" " +
"" +
- "";
+ "" +
+ "";
EntitySaxReader reader = new EntitySaxReader(delegator);
long numberLoaded = reader.parse(xmlContentLoad);
assertEquals("Replace Entity loaded ", 4, numberLoaded);
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
index d1c3f48739..4db4c4cc54 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
@@ -27,10 +27,14 @@ import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
import org.apache.ofbiz.base.location.FlexibleLocation;
import org.apache.ofbiz.base.util.Base64;
@@ -53,24 +57,20 @@ import org.apache.ofbiz.entity.transaction.TransactionUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.xml.sax.ErrorHandler;
+import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
import freemarker.ext.dom.NodeModel;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import freemarker.template.TemplateHashModel;
-import javolution.text.CharArray;
-import javolution.text.Text;
-import javolution.xml.sax.Attributes;
-import javolution.xml.sax.XMLReaderImpl;
/**
* SAX XML Parser Content Handler for Entity Engine XML files
*/
-public class EntitySaxReader implements javolution.xml.sax.ContentHandler, ErrorHandler {
-
+public class EntitySaxReader extends DefaultHandler {
public static final String module = EntitySaxReader.class.getName();
public static final int DEFAULT_TX_TIMEOUT = 7200;
@@ -79,7 +79,7 @@ public class EntitySaxReader implements javolution.xml.sax.ContentHandler, Error
protected EntityEcaHandler> ecaHandler = null;
protected GenericValue currentValue = null;
protected CharSequence currentFieldName = null;
- protected CharSequence currentFieldValue = null;
+ private char[] currentFieldValue = null;
protected long numberRead = 0;
protected long numberCreated = 0;
protected long numberUpdated = 0;
@@ -94,16 +94,14 @@ public class EntitySaxReader implements javolution.xml.sax.ContentHandler, Error
protected boolean maintainTxStamps = false;
protected boolean createDummyFks = false;
protected boolean checkDataOnly = false;
- @Deprecated
- protected boolean doCacheClear = true;
protected boolean disableEeca = false;
protected enum Action {CREATE, CREATE_UPDATE, CREATE_REPLACE, DELETE};
protected List actionTags = UtilMisc.toList("create", "create-update", "create-replace", "delete");
protected Action currentAction = Action.CREATE_UPDATE;
protected List