From e83bfab2fd048ba801b8da76571f6bb7a27ddbe2 Mon Sep 17 00:00:00 2001 From: Alejandro Revilla Date: Sun, 6 Mar 2016 19:19:54 -0300 Subject: [PATCH] Upgrade to jdom2 --- .../java/org/jpos/simulator/TestRunner.java | 3 +-- .../java/org/jpos/rest/ValidateParams.java | 2 +- .../main/java/org/jpos/iso/FSDISOMsgX.java | 7 ------ .../src/main/java/org/jpos/gl/Account.java | 2 +- .../java/org/jpos/gl/CompositeAccount.java | 3 +-- .../src/main/java/org/jpos/gl/Currency.java | 3 +-- .../main/java/org/jpos/gl/FinalAccount.java | 2 +- .../src/main/java/org/jpos/gl/GLEntry.java | 2 +- .../main/java/org/jpos/gl/GLTransaction.java | 2 +- .../src/main/java/org/jpos/gl/GLUser.java | 4 ++-- .../src/main/java/org/jpos/gl/Journal.java | 6 ++--- .../src/main/java/org/jpos/gl/Layer.java | 3 +-- .../src/main/java/org/jpos/gl/RuleInfo.java | 4 +--- .../src/main/java/org/jpos/gl/Util.java | 3 +-- .../main/java/org/jpos/gl/tools/Export.java | 24 +++++-------------- .../main/java/org/jpos/gl/tools/Import.java | 8 +++---- .../main/java/org/jpos/q2/QuartzAdaptor.java | 2 +- .../jpos/space/ReplicatedSpaceAdaptor.java | 2 +- .../main/java/org/jpos/ee/status/Monitor.java | 4 +--- .../ee/SysConfigConfigurationFactory.java | 2 +- 20 files changed, 29 insertions(+), 59 deletions(-) diff --git a/modules/client-simulator/src/main/java/org/jpos/simulator/TestRunner.java b/modules/client-simulator/src/main/java/org/jpos/simulator/TestRunner.java index 859ece980b..389887495c 100644 --- a/modules/client-simulator/src/main/java/org/jpos/simulator/TestRunner.java +++ b/modules/client-simulator/src/main/java/org/jpos/simulator/TestRunner.java @@ -28,13 +28,12 @@ import org.jpos.iso.ISOComponent; import org.jpos.iso.ISOUtil; import org.jpos.iso.ISOField; -import org.jpos.iso.ISOHeader; import org.jpos.iso.ISOPackager; import org.jpos.iso.ISOException; import org.jpos.iso.packager.XMLPackager; import org.jpos.util.Logger; import org.jpos.util.LogEvent; -import org.jdom.Element; +import org.jdom2.Element; import org.jpos.iso.MUX; import org.jpos.util.NameRegistrar; import bsh.Interpreter; diff --git a/modules/eerest/src/main/java/org/jpos/rest/ValidateParams.java b/modules/eerest/src/main/java/org/jpos/rest/ValidateParams.java index bf781a3257..f52c52df4c 100644 --- a/modules/eerest/src/main/java/org/jpos/rest/ValidateParams.java +++ b/modules/eerest/src/main/java/org/jpos/rest/ValidateParams.java @@ -24,7 +24,7 @@ import com.github.fge.jsonschema.core.report.ProcessingReport; import com.github.fge.jsonschema.main.JsonSchema; import com.github.fge.jsonschema.main.JsonSchemaFactory; -import org.jdom.Element; +import org.jdom2.Element; import org.jpos.core.ConfigurationException; import org.jpos.core.XmlConfigurable; import org.jpos.ee.BLException; diff --git a/modules/fsdmsgx/src/main/java/org/jpos/iso/FSDISOMsgX.java b/modules/fsdmsgx/src/main/java/org/jpos/iso/FSDISOMsgX.java index f513ef1122..161deb8dc2 100644 --- a/modules/fsdmsgx/src/main/java/org/jpos/iso/FSDISOMsgX.java +++ b/modules/fsdmsgx/src/main/java/org/jpos/iso/FSDISOMsgX.java @@ -23,14 +23,7 @@ import java.io.ObjectInput; import java.io.ObjectOutput; import java.io.PrintStream; -import java.util.Iterator; -import java.util.Map; - -import org.jdom.JDOMException; import org.jpos.fsdpackager.FSDMsgX; -import org.jpos.iso.ISOException; -import org.jpos.iso.ISOMsg; -import org.jpos.util.FSDMsg; public class FSDISOMsgX extends ISOMsg { FSDMsgX fsd; diff --git a/modules/minigl/src/main/java/org/jpos/gl/Account.java b/modules/minigl/src/main/java/org/jpos/gl/Account.java index 22ce2cdbc9..2e9fbc1333 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/Account.java +++ b/modules/minigl/src/main/java/org/jpos/gl/Account.java @@ -22,7 +22,7 @@ import java.util.Set; import java.io.Serializable; import java.text.ParseException; -import org.jdom.Element; +import org.jdom2.Element; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/modules/minigl/src/main/java/org/jpos/gl/CompositeAccount.java b/modules/minigl/src/main/java/org/jpos/gl/CompositeAccount.java index 79b032e369..0a76a8a75e 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/CompositeAccount.java +++ b/modules/minigl/src/main/java/org/jpos/gl/CompositeAccount.java @@ -20,10 +20,9 @@ import java.util.Set; import java.util.TreeSet; -import java.util.ArrayList; import java.util.Iterator; import java.text.ParseException; -import org.jdom.Element; +import org.jdom2.Element; /** * Composite Account diff --git a/modules/minigl/src/main/java/org/jpos/gl/Currency.java b/modules/minigl/src/main/java/org/jpos/gl/Currency.java index 8f3263cd3c..5de1cdbbe1 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/Currency.java +++ b/modules/minigl/src/main/java/org/jpos/gl/Currency.java @@ -19,8 +19,7 @@ package org.jpos.gl; import java.text.ParseException; -import org.jdom.Element; -import org.jdom.Comment; +import org.jdom2.Element; /** * Represents a currency. diff --git a/modules/minigl/src/main/java/org/jpos/gl/FinalAccount.java b/modules/minigl/src/main/java/org/jpos/gl/FinalAccount.java index 5de9c5ca6a..dee68e0c2d 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/FinalAccount.java +++ b/modules/minigl/src/main/java/org/jpos/gl/FinalAccount.java @@ -20,7 +20,7 @@ import java.util.Set; import java.text.ParseException; -import org.jdom.Element; +import org.jdom2.Element; /** * Final (leaf) Account. diff --git a/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java b/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java index cba8a2c173..fae91c66dd 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java +++ b/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java @@ -20,7 +20,7 @@ import java.math.BigDecimal; import java.text.ParseException; -import org.jdom.Element; +import org.jdom2.Element; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/modules/minigl/src/main/java/org/jpos/gl/GLTransaction.java b/modules/minigl/src/main/java/org/jpos/gl/GLTransaction.java index 6bebd59e14..96c59ddbe9 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/GLTransaction.java +++ b/modules/minigl/src/main/java/org/jpos/gl/GLTransaction.java @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.math.BigDecimal; import java.text.ParseException; -import org.jdom.Element; +import org.jdom2.Element; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/modules/minigl/src/main/java/org/jpos/gl/GLUser.java b/modules/minigl/src/main/java/org/jpos/gl/GLUser.java index c8a5a363f9..d5add9ef32 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/GLUser.java +++ b/modules/minigl/src/main/java/org/jpos/gl/GLUser.java @@ -21,8 +21,8 @@ import java.util.Set; import java.util.LinkedHashSet; import java.util.Iterator; -import org.jdom.Element; -import org.jdom.Comment; +import org.jdom2.Element; +import org.jdom2.Comment; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/modules/minigl/src/main/java/org/jpos/gl/Journal.java b/modules/minigl/src/main/java/org/jpos/gl/Journal.java index 7314544521..a741324b13 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/Journal.java +++ b/modules/minigl/src/main/java/org/jpos/gl/Journal.java @@ -20,11 +20,9 @@ import java.util.Set; import java.util.Date; -import java.util.List; import java.util.Iterator; -import java.util.ArrayList; -import org.jdom.Element; -import org.jdom.Comment; +import org.jdom2.Element; +import org.jdom2.Comment; import java.text.ParseException; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/modules/minigl/src/main/java/org/jpos/gl/Layer.java b/modules/minigl/src/main/java/org/jpos/gl/Layer.java index 70eaa83d96..1840406b03 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/Layer.java +++ b/modules/minigl/src/main/java/org/jpos/gl/Layer.java @@ -24,8 +24,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import java.text.ParseException; -import org.jdom.Element; -import org.jdom.Comment; +import org.jdom2.Element; /** * Journal level layer information. diff --git a/modules/minigl/src/main/java/org/jpos/gl/RuleInfo.java b/modules/minigl/src/main/java/org/jpos/gl/RuleInfo.java index 76660f7d40..ffdb56c1a0 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/RuleInfo.java +++ b/modules/minigl/src/main/java/org/jpos/gl/RuleInfo.java @@ -18,11 +18,9 @@ package org.jpos.gl; -import java.io.Serializable; import java.text.ParseException; import java.util.StringTokenizer; -import org.jdom.Element; -import org.jdom.Comment; +import org.jdom2.Element; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/modules/minigl/src/main/java/org/jpos/gl/Util.java b/modules/minigl/src/main/java/org/jpos/gl/Util.java index 8a9af8bedc..a379e4dd7b 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/Util.java +++ b/modules/minigl/src/main/java/org/jpos/gl/Util.java @@ -21,11 +21,10 @@ import java.util.Date; import java.util.Locale; import java.util.Calendar; -import java.util.TimeZone; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; -import org.jdom.Element; +import org.jdom2.Element; /** * Assorted helper methods diff --git a/modules/minigl/src/main/java/org/jpos/gl/tools/Export.java b/modules/minigl/src/main/java/org/jpos/gl/tools/Export.java index b65b1564bc..addefe1635 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/tools/Export.java +++ b/modules/minigl/src/main/java/org/jpos/gl/tools/Export.java @@ -18,39 +18,27 @@ package org.jpos.gl.tools; -import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; -import java.util.Date; -import java.util.List; import java.util.Iterator; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.DocType; -import org.jdom.Comment; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.DocType; +import org.jdom2.Comment; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import java.sql.SQLException; import org.hibernate.Query; import org.hibernate.Session; -import org.hibernate.Hibernate; -import org.hibernate.Transaction; -import org.hibernate.SessionFactory; import org.hibernate.HibernateException; import org.jpos.gl.GLUser; import org.jpos.gl.Journal; import org.jpos.gl.RuleInfo; -import org.jpos.gl.GLPermission; -import org.jpos.gl.CompositeAccount; -import org.jpos.gl.FinalAccount; import org.jpos.gl.Account; -import org.jpos.gl.GLEntry; import org.jpos.gl.GLException; import org.jpos.gl.GLSession; import org.jpos.gl.GLTransaction; diff --git a/modules/minigl/src/main/java/org/jpos/gl/tools/Import.java b/modules/minigl/src/main/java/org/jpos/gl/tools/Import.java index 6c147d57c2..bf26d0a486 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/tools/Import.java +++ b/modules/minigl/src/main/java/org/jpos/gl/tools/Import.java @@ -25,10 +25,10 @@ import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import org.jpos.core.ConfigurationException; import org.jpos.ee.DB; import org.jpos.gl.*; diff --git a/modules/quartz/src/main/java/org/jpos/q2/QuartzAdaptor.java b/modules/quartz/src/main/java/org/jpos/q2/QuartzAdaptor.java index 5d02bde877..af5a18039d 100644 --- a/modules/quartz/src/main/java/org/jpos/q2/QuartzAdaptor.java +++ b/modules/quartz/src/main/java/org/jpos/q2/QuartzAdaptor.java @@ -18,7 +18,7 @@ package org.jpos.q2; -import org.jdom.Element; +import org.jdom2.Element; import org.jpos.core.Configurable; import org.jpos.core.Configuration; import org.jpos.core.ConfigurationException; diff --git a/modules/rspace/src/main/java/org/jpos/space/ReplicatedSpaceAdaptor.java b/modules/rspace/src/main/java/org/jpos/space/ReplicatedSpaceAdaptor.java index 9869ef3a41..8a232371c4 100644 --- a/modules/rspace/src/main/java/org/jpos/space/ReplicatedSpaceAdaptor.java +++ b/modules/rspace/src/main/java/org/jpos/space/ReplicatedSpaceAdaptor.java @@ -21,7 +21,7 @@ import org.jpos.q2.QBeanSupport; import org.jpos.core.ConfigurationException; import org.jpos.util.NameRegistrar; -import org.jdom.Element; +import org.jdom2.Element; /** * RemoteSpaceAdaptor diff --git a/modules/status/src/main/java/org/jpos/ee/status/Monitor.java b/modules/status/src/main/java/org/jpos/ee/status/Monitor.java index 86123f5845..b462e7cdf4 100644 --- a/modules/status/src/main/java/org/jpos/ee/status/Monitor.java +++ b/modules/status/src/main/java/org/jpos/ee/status/Monitor.java @@ -26,11 +26,9 @@ import org.jpos.ee.DB; import org.jpos.q2.QFactory; import org.jpos.q2.QBeanSupport; -import org.jpos.iso.ISOUtil; -import org.jpos.util.DateUtil; import org.jpos.core.XmlConfigurable; import org.jpos.core.ConfigurationException; -import org.jdom.Element; +import org.jdom2.Element; import org.hibernate.HibernateException; public class Monitor extends QBeanSupport implements XmlConfigurable { diff --git a/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigConfigurationFactory.java b/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigConfigurationFactory.java index 18ec4ff8fd..79c27d64d8 100644 --- a/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigConfigurationFactory.java +++ b/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigConfigurationFactory.java @@ -18,7 +18,7 @@ package org.jpos.ee; -import org.jdom.Element; +import org.jdom2.Element; import org.jpos.core.Configuration; import org.jpos.core.ConfigurationException; import org.jpos.core.SimpleConfiguration;