< prev index next >

## src/com/sun/javatest/agent/AgentMain.java

Print this page

    @@ -372,11 +372,11 @@
             String pkg = s.substring(0, s.lastIndexOf('.'));

             switch (mode) {
             case ACTIVE:
                 try {
    -                Class c = Class.forName(pkg + ".ActiveConnectionFactory");
    +                Class<?> c = Class.forName(pkg + ".ActiveConnectionFactory");
                     Constructor m = c.getConstructor(new Class[] {String.class, int.class});
                     Object[] args = { activeHost, new Integer(activePort) };
                     return (ConnectionFactory)(m.newInstance(args));
                 }
                 catch (Throwable e) {

    @@ -389,11 +389,11 @@
                     throw new Fault(msgs);
                 }

             case PASSIVE:
                 try {
    -                Class c = Class.forName(pkg + ".PassiveConnectionFactory");
    +                Class<?> c = Class.forName(pkg + ".PassiveConnectionFactory");
                     Constructor m = c.getConstructor(new Class[] {int.class, int.class});
                     Object[] args = { new Integer(passivePort), new Integer(concurrency + 1) };
                     return (ConnectionFactory)(m.newInstance(args));
                 }
                 catch (Throwable e) {

    @@ -410,11 +410,11 @@
                     }
                 }

             case SERIAL:
                 try {
    -                Class c = Class.forName(pkg + ".SerialPortConnectionFactory");
    +                Class<?> c = Class.forName(pkg + ".SerialPortConnectionFactory");
                     Constructor m = c.getConstructor(new Class[] {String.class, String.class, int.class});
                     Object[] args = {serialPort, Agent.productName, new Integer(10*1000)};
                     return (ConnectionFactory)(m.newInstance(args));
                 }
                 catch (InvocationTargetException e) {

< prev index next >