Permalink
Browse files

Fixes deprecation and unchecked warnings

  • Loading branch information...
1 parent fe22ebb commit bd52d9284a39abda32efd95353c25b5595fa3481 @vsalaman vsalaman committed Apr 9, 2014
Showing with 151 additions and 49 deletions.
  1. +3 −0 compat_1_5_2/build.gradle
  2. +1 −0 compat_1_5_2/src/main/java/org/jpos/core/CardAgentLookup.java
  3. +1 −0 compat_1_5_2/src/main/java/org/jpos/core/CardSelector.java
  4. +8 −3 compat_1_5_2/src/main/java/org/jpos/iso/ISOMUX.java
  5. +3 −2 compat_1_5_2/src/main/java/org/jpos/space/Connector.java
  6. +4 −1 compat_1_5_2/src/main/java/org/jpos/space/ISOChannelAdaptor.java
  7. +2 −0 compat_1_5_2/src/main/java/org/jpos/space/PersistentSpace.java
  8. +1 −0 compat_1_5_2/src/main/java/org/jpos/space/Request.java
  9. +4 −2 compat_1_5_2/src/main/java/org/jpos/space/SpaceChannel.java
  10. +8 −3 compat_1_5_2/src/main/java/org/jpos/space/SpaceMUX.java
  11. +2 −0 compat_1_5_2/src/main/java/org/jpos/space/TinySpace.java
  12. +2 −0 compat_1_5_2/src/main/java/org/jpos/space/TransientSpace.java
  13. +1 −0 compat_1_5_2/src/main/java/org/jpos/tpl/ConnectionPool.java
  14. +1 −0 compat_1_5_2/src/main/java/org/jpos/tpl/RowMap.java
  15. +3 −2 compat_1_5_2/src/main/java/org/jpos/util/Log4JListener.java
  16. +1 −0 compat_1_5_2/src/main/java/org/jpos/util/SimpleLockManager.java
  17. +2 −1 jpos/src/main/java/org/jpos/bsh/BSHRequestListener.java
  18. +1 −0 jpos/src/main/java/org/jpos/core/VolatileSequencer.java
  19. +2 −1 jpos/src/main/java/org/jpos/iso/BaseChannel.java
  20. +2 −1 jpos/src/main/java/org/jpos/iso/FilteredBase.java
  21. +0 −1 jpos/src/main/java/org/jpos/iso/IFB_LLHECHAR.java
  22. +0 −1 jpos/src/main/java/org/jpos/iso/IFB_LLLHECHAR.java
  23. +0 −1 jpos/src/main/java/org/jpos/iso/ISOFieldPackager.java
  24. +2 −1 jpos/src/main/java/org/jpos/iso/ISOMsg.java
  25. +1 −0 jpos/src/main/java/org/jpos/iso/ISOServer.java
  26. +2 −1 jpos/src/main/java/org/jpos/iso/ISOVField.java
  27. +2 −1 jpos/src/main/java/org/jpos/iso/ISOVMsg.java
  28. +1 −0 jpos/src/main/java/org/jpos/iso/channel/BASE24Channel.java
  29. +1 −0 jpos/src/main/java/org/jpos/iso/channel/BASE24TCPChannel.java
  30. +1 −0 jpos/src/main/java/org/jpos/iso/channel/ChannelPool.java
  31. +1 −0 jpos/src/main/java/org/jpos/iso/channel/X25Channel.java
  32. +1 −0 jpos/src/main/java/org/jpos/iso/filter/StatefulFilter.java
  33. +1 −0 jpos/src/main/java/org/jpos/iso/gui/ISOMeter.java
  34. +1 −0 jpos/src/main/java/org/jpos/iso/gui/ISOMsgPanel.java
  35. +1 −0 jpos/src/main/java/org/jpos/iso/gui/ISORequestListenerPanel.java
  36. +2 −1 jpos/src/main/java/org/jpos/iso/packager/Base1SubFieldPackager.java
  37. +1 −0 jpos/src/main/java/org/jpos/iso/packager/EuroSubFieldPackager.java
  38. +2 −0 jpos/src/main/java/org/jpos/iso/packager/GenericValidatingPackager.java
  39. +1 −0 jpos/src/main/java/org/jpos/iso/packager/LogPackager.java
  40. +2 −1 jpos/src/main/java/org/jpos/iso/packager/VISA1Packager.java
  41. +1 −0 jpos/src/main/java/org/jpos/iso/packager/XML2003Packager.java
  42. +1 −0 jpos/src/main/java/org/jpos/iso/packager/XMLPackager.java
  43. +1 −0 jpos/src/main/java/org/jpos/iso/validator/TEST0100.java
  44. +1 −0 jpos/src/main/java/org/jpos/iso/validator/VErrorParser.java
  45. +1 −0 jpos/src/main/java/org/jpos/q2/Q2.java
  46. +2 −1 jpos/src/main/java/org/jpos/q2/QClassLoader.java
  47. +1 −0 jpos/src/main/java/org/jpos/q2/QFactory.java
  48. +4 −1 jpos/src/main/java/org/jpos/q2/iso/ChannelAdaptor.java
  49. +1 −0 jpos/src/main/java/org/jpos/q2/iso/ContextMaker.java
  50. +3 −1 jpos/src/main/java/org/jpos/q2/iso/MultiSessionChannelAdaptor.java
  51. +2 −1 jpos/src/main/java/org/jpos/q2/iso/QMUX.java
  52. +1 −0 jpos/src/main/java/org/jpos/q2/iso/QServer.java
  53. +19 −18 jpos/src/main/java/org/jpos/q2/qbean/QBeanFactory.java
  54. +1 −0 jpos/src/main/java/org/jpos/q2/qbean/SpaceLet.java
  55. +1 −0 jpos/src/main/java/org/jpos/security/CryptographicServiceMessage.java
  56. +1 −0 jpos/src/main/java/org/jpos/security/jceadapter/JCEHandler.java
  57. +1 −0 jpos/src/main/java/org/jpos/security/jceadapter/JCESecurityModule.java
  58. +1 −0 jpos/src/main/java/org/jpos/space/JDBMSpace.java
  59. +1 −0 jpos/src/main/java/org/jpos/space/JESpace.java
  60. +1 −0 jpos/src/main/java/org/jpos/space/SpaceProxy.java
  61. +1 −0 jpos/src/main/java/org/jpos/space/SpaceTap.java
  62. +1 −0 jpos/src/main/java/org/jpos/space/SpaceUtil.java
  63. +1 −0 jpos/src/main/java/org/jpos/space/TSpace.java
  64. +1 −0 jpos/src/main/java/org/jpos/tlv/TLVList.java
  65. +1 −0 jpos/src/main/java/org/jpos/transaction/Context.java
  66. +1 −0 jpos/src/main/java/org/jpos/transaction/participant/BSHMethod.java
  67. +2 −1 jpos/src/main/java/org/jpos/transaction/participant/BSHTransactionParticipant.java
  68. +1 −0 jpos/src/main/java/org/jpos/transaction/participant/Forward.java
  69. +2 −1 jpos/src/main/java/org/jpos/transaction/participant/Join.java
  70. +1 −0 jpos/src/main/java/org/jpos/ui/UI.java
  71. +1 −0 jpos/src/main/java/org/jpos/ui/factory/JTabbedPaneFactory.java
  72. +1 −0 jpos/src/main/java/org/jpos/ui/factory/JTreeFactory.java
  73. +1 −0 jpos/src/main/java/org/jpos/util/BlockingQueue.java
  74. +2 −1 jpos/src/main/java/org/jpos/util/DirPoll.java
  75. +1 −0 jpos/src/main/java/org/jpos/util/FSDMsg.java
  76. +1 −0 jpos/src/main/java/org/jpos/util/FilterLogListener.java
  77. +1 −0 jpos/src/main/java/org/jpos/util/Logger.java
  78. +1 −0 jpos/src/test/java/org/jpos/q2/iso/ChannelAdaptorTest.java
  79. +1 −0 jpos/src/test/java/org/jpos/q2/iso/QMUXTestCase.java
  80. +1 −0 jpos/src/test/java/org/jpos/space/JDBMSpaceTestCase.java
  81. +1 −0 jpos/src/test/java/org/jpos/space/JESpaceTestCase.java
  82. +1 −0 jpos/src/test/java/org/jpos/space/SpaceInterceptorTest.java
  83. +2 −0 jpos/src/test/java/org/jpos/space/TSpacePerformanceTest.java
  84. +1 −0 jpos/src/test/java/org/jpos/space/TSpaceTest.java
  85. +1 −0 jpos/src/test/java/org/jpos/space/TSpaceTestCase.java
  86. +1 −0 jpos/src/test/java/org/jpos/transaction/TransactionManagerTestCase.java
  87. +1 −0 jpos/src/test/java/org/jpos/util/FSDMsgTest.java
@@ -3,3 +3,6 @@ dependencies {
compile "log4j:log4j:1.2.16"
}
+tasks.withType(JavaCompile) {
+ options.compilerArgs << "-Xlint:none"
+}
@@ -33,6 +33,7 @@
* @see CardAgent
* @see CardTransaction
*/
+@SuppressWarnings("unchecked")
public class CardAgentLookup {
private static CardAgentLookup instance = new CardAgentLookup();
private ArrayList agents;
@@ -34,6 +34,7 @@
* instance of CardSelector we have the chance to use multiple
* instances of CardSelector within the same JVM if ever needed.
*/
+@SuppressWarnings("unchecked")
public class CardSelector {
List list;
static CardSelector defaultInstance;
@@ -18,9 +18,13 @@
package org.jpos.iso;
+import org.jpos.core.Configurable;
import org.jpos.core.Configuration;
-import org.jpos.core.ReConfigurable;
-import org.jpos.util.*;
+import org.jpos.util.LogEvent;
+import org.jpos.util.LogSource;
+import org.jpos.util.Loggeable;
+import org.jpos.util.Logger;
+import org.jpos.util.NameRegistrar;
import java.io.EOFException;
import java.io.IOException;
@@ -41,8 +45,9 @@
* @see ISORequestListener
*/
+@SuppressWarnings({"unchecked", "deprecation"})
public class ISOMUX implements Runnable, LogSource, MUX,
- ReConfigurable, Loggeable, ISOMUXMBean
+ Configurable, Loggeable, ISOMUXMBean
{
private ISOChannel channel;
private Thread rx = null, tx = null;
@@ -18,15 +18,16 @@
package org.jpos.space;
+import org.jpos.core.Configurable;
import org.jpos.core.Configuration;
-import org.jpos.core.ReConfigurable;
/**
* @author Alejandro Revilla
* @version $Revision$ $Date$
* @since 2.0
*/
-public class Connector implements ReConfigurable, SpaceListener
+@SuppressWarnings({"unchecked", "deprecation"})
+public class Connector implements Configurable, SpaceListener
{
LocalSpace sp;
Configuration cfg;
@@ -37,7 +37,8 @@
* @author Alejandro Revilla
* @version $Revision$ $Date$
*/
-public class ISOChannelAdaptor
+@SuppressWarnings("unchecked")
+public class ISOChannelAdaptor
extends SimpleLogSource
implements Configurable
{
@@ -66,6 +67,7 @@ public void setConfiguration (Configuration cfg)
throw new ConfigurationException (e);
}
}
+ @SuppressWarnings("unchecked")
public class Sender implements Runnable {
public Sender () {
super ();
@@ -89,6 +91,7 @@ public void run () {
}
}
}
+ @SuppressWarnings("unchecked")
public class Receiver implements Runnable {
public Receiver () {
super ();
@@ -27,6 +27,7 @@
* @version $Revision$ $Date$
* @since 2.0
*/
+@SuppressWarnings("unchecked")
public class PersistentSpace implements LocalSpace // PersistentSpaceMBean {
{
protected Map map;
@@ -147,6 +148,7 @@ public synchronized void removeListener (Object key, SpaceListener listener) {
data.removeListener (listener);
}
+ @SuppressWarnings("unchecked")
protected static final class Data {
LinkedList data;
LinkedList stored;
@@ -26,6 +26,7 @@
* @version $Revision$ $Date$
* @since 1.4.7
*/
+@SuppressWarnings("deprecation")
public class Request extends TinySpace {
public static String REQUEST = "$REQ";
public static String RESPONSE = "$RESP";
@@ -18,8 +18,8 @@
package org.jpos.space;
+import org.jpos.core.Configurable;
import org.jpos.core.Configuration;
-import org.jpos.core.ReConfigurable;
import org.jpos.iso.Channel;
import org.jpos.iso.ISOMsg;
@@ -29,7 +29,9 @@
* @version $Revision$ $Date$
* @see org.jpos.iso.Channel
*/
-public class SpaceChannel implements Channel, ReConfigurable {
+@SuppressWarnings({"unchecked", "deprecation"})
+public class SpaceChannel implements Channel, Configurable
+{
Space sp;
Configuration cfg;
String from, to;
@@ -18,10 +18,14 @@
package org.jpos.space;
+import org.jpos.core.Configurable;
import org.jpos.core.Configuration;
import org.jpos.core.ConfigurationException;
-import org.jpos.core.ReConfigurable;
-import org.jpos.iso.*;
+import org.jpos.iso.ISOException;
+import org.jpos.iso.ISOMsg;
+import org.jpos.iso.ISOResponseListener;
+import org.jpos.iso.ISOUtil;
+import org.jpos.iso.MUX;
import org.jpos.util.LogEvent;
import org.jpos.util.Logger;
import org.jpos.util.NameRegistrar;
@@ -35,8 +39,9 @@
* @version $Revision$ $Date$
* @see org.jpos.iso.MUX
*/
+@SuppressWarnings({"unchecked", "deprecation"})
public class SpaceMUX extends SimpleLogSource
- implements MUX, ReConfigurable, SpaceListener
+ implements MUX, Configurable, SpaceListener
{
LocalSpace sp;
Configuration cfg;
@@ -31,6 +31,7 @@
* @since 1.4.7
* @deprecated org.jpos.space.TSpace is the new default lightweight space
*/
+@SuppressWarnings("unchecked")
public class TinySpace implements Space, Serializable {
protected Map map = new HashMap ();
private static final long serialVersionUID = -5216796586015661708L;
@@ -165,6 +166,7 @@ public void put (Object key, Object value) {
public void put (Object key, Object value, long timeout) {
throw new SpaceError ("Unsupported operation");
}
+ @SuppressWarnings("unchecked")
protected static final class Data {
LinkedList data;
@@ -26,6 +26,7 @@
* @version $Revision$ $Date$
* @since 2.0
*/
+@SuppressWarnings("unchecked")
public class TransientSpace implements LocalSpace, TransientSpaceMBean {
protected Map map;
static LocalSpace defaultSpace = new TransientSpace ();
@@ -141,6 +142,7 @@ public synchronized void removeListener (Object key, SpaceListener listener) {
data.removeListener (listener);
}
+ @SuppressWarnings("unchecked")
protected static final class Data {
LinkedList data;
LinkedList listeners;
@@ -41,6 +41,7 @@
* @author Rajal Shah
* @version $Revision$ $Date$
*/
+@SuppressWarnings("unchecked")
public class ConnectionPool implements Runnable, LogSource, Configurable {
Configuration cfg;
Logger logger;
@@ -31,6 +31,7 @@
* @author apr@cs.com.uy
* @version $Id$
*/
+@SuppressWarnings("unchecked")
public class RowMap {
protected Map map;
public RowMap () {
@@ -21,9 +21,9 @@
import org.apache.log4j.Level;
import org.apache.log4j.helpers.FileWatchdog;
import org.apache.log4j.xml.DOMConfigurator;
+import org.jpos.core.Configurable;
import org.jpos.core.Configuration;
import org.jpos.core.ConfigurationException;
-import org.jpos.core.ReConfigurable;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
@@ -42,7 +42,8 @@
* be changed by calling <code>setLevel</code>
*/
-public class Log4JListener implements LogListener, ReConfigurable
+@SuppressWarnings("deprecation")
+public class Log4JListener implements LogListener, Configurable
{
private Level _level;
/**
@@ -49,6 +49,7 @@
import java.util.Hashtable;
import java.util.Map;
+@SuppressWarnings("unchecked")
public class SimpleLockManager implements LockManager {
Map locks;
@@ -35,7 +35,8 @@
* @author <a href="mailto:apr@cs.com.uy">Alejandro P. Revilla</a>
* @version $Revision$ $Date$
*/
-public class BSHRequestListener extends Log
+@SuppressWarnings("unchecked")
+public class BSHRequestListener extends Log
implements ISORequestListener, Configurable
{
protected static final String MTI_MACRO = "$mti";
@@ -29,6 +29,7 @@
* A simple sequencer intended for Debugging applications.<br>
* Production grade Sequencers are required to be persistent capables
*/
+@SuppressWarnings("unchecked")
public class VolatileSequencer implements Sequencer, VolatileSequencerMBean {
private Map map;
public VolatileSequencer () {
@@ -65,7 +65,8 @@
* @see Logger
*
*/
-public abstract class BaseChannel extends Observable
+@SuppressWarnings("unchecked")
+public abstract class BaseChannel extends Observable
implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel,
LogSource, Configurable, BaseChannelMBean, Cloneable
{
@@ -34,7 +34,8 @@
* @see FilteredChannel
*/
-public abstract class FilteredBase extends Observable
+@SuppressWarnings("unchecked")
+public abstract class FilteredBase extends Observable
implements FilteredChannel, Cloneable
{
protected Vector incomingFilters, outgoingFilters;
@@ -28,7 +28,6 @@
* @version $Id$
* @see ISOComponent
* @see IFB_LLHCHAR
- * @see IF_ECHAR
*/
public class IFB_LLHECHAR extends ISOStringFieldPackager {
public IFB_LLHECHAR() {
@@ -24,7 +24,6 @@
* @version $Id$
* @see ISOComponent
* @see IFB_LLHECHAR
- * @see IF_ECHAR
*/
public class IFB_LLLHECHAR extends ISOStringFieldPackager {
public IFB_LLLHECHAR() {
@@ -56,7 +56,6 @@
* @see IFB_LLNUM
* @see IFB_NUMERIC
* @see IF_CHAR
- * @see IF_ECHAR
*/
public abstract class ISOFieldPackager {
private int len;
@@ -35,7 +35,8 @@
* @see ISOComponent
* @see ISOField
*/
-public class ISOMsg extends ISOComponent
+@SuppressWarnings("unchecked")
+public class ISOMsg extends ISOComponent
implements Cloneable, Loggeable, Externalizable
{
protected Map<Integer,Object> fields;
@@ -57,6 +57,7 @@
* @author Bharavi Gade
* @version $Revision$ $Date$
*/
+@SuppressWarnings("unchecked")
public class ISOServer extends Observable
implements LogSource, Runnable, Observer, ISOServerMBean, Configurable,
Loggeable, ISOServerSocketFactory
@@ -34,6 +34,7 @@
* @author Jose Eduardo Leon
* @version 1.0
*/
+@SuppressWarnings("unchecked")
public class ISOVField extends ISOField implements ISOVErrorList {
private static final long serialVersionUID = -2503711799295775875L;
@@ -63,4 +64,4 @@ public ListIterator errorListIterator() {
/** list of errors **/
protected LinkedList errors = new LinkedList( );
-}
+}
@@ -34,6 +34,7 @@
* @author Jose Eduardo Leon
* @version 1.0
*/
+@SuppressWarnings("unchecked")
public class ISOVMsg extends ISOMsg implements ISOVErrorList {
private static final long serialVersionUID = 443461124206801037L;
@@ -87,4 +88,4 @@ public ListIterator errorListIterator() {
/** list of errors **/
protected LinkedList errors = new LinkedList( );
-}
+}
@@ -40,6 +40,7 @@
* @see ISOException
* @see ISOChannel
*/
+@SuppressWarnings("deprecation")
public class BASE24Channel extends BaseChannel {
/**
* Public constructor (used by Class.forName("...").newInstance())
@@ -42,6 +42,7 @@
* @see ISOChannel
*/
+@SuppressWarnings("deprecation")
public class BASE24TCPChannel extends BaseChannel {
/**
* Public constructor (used by Class.forName("...").newInstance())
@@ -34,6 +34,7 @@
import java.util.List;
import java.util.Vector;
+@SuppressWarnings("unchecked")
public class ChannelPool implements ISOChannel, LogSource, Configurable, Cloneable {
boolean usable = true;
String name = "";
@@ -45,6 +45,7 @@
* @see ISOException
* @see ISOChannel
*/
+@SuppressWarnings("unchecked")
public class X25Channel extends BaseChannel {
BufferedReader reader = null;
protected byte[] header;
@@ -35,6 +35,7 @@
* based on a key formed by some fields.
* @author <a href="mailto:aalcarraz@cabal.com.uy">Andr&eacute;s Alcarraz </a>
*/
+@SuppressWarnings("unchecked")
public class StatefulFilter implements ISOFilter, Configurable{
/**
Oops, something went wrong.

0 comments on commit bd52d92

Please sign in to comment.