Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The java reflect is already of use, i have removed them.
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 24 Sep 2007 12:19:35 +0000 (12:19 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 24 Sep 2007 12:19:35 +0000 (12:19 +0000)
My version of java (1.5) use the generic class. So if i compile
the classes ApplicationHandler or Process without type specification
for the vector, i get the warning "Note: Some input files use unchecked or unsafe operations."
It's just a warning, and all the examples always work. So now, i don't use the java templates.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4695 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/java/simgrid/msg/ApplicationHandler.java

index a3e2acb..a5c13c0 100644 (file)
@@ -14,7 +14,6 @@ package simgrid.msg;
 import java.util.Vector;
 import org.xml.sax.*;
 import org.xml.sax.helpers.*;
-import java.lang.reflect.*;
 
 /**
  * The handler used to parse the deployment file which contains 
@@ -41,7 +40,7 @@ public final class ApplicationHandler extends DefaultHandler
                 * The vector which contains the arguments of the main function 
                 * of the process object.
                 */
-               public Vector<String> args;
+               public Vector args;
                
                /**
                 * The name of the host of the process.
@@ -57,7 +56,7 @@ public final class ApplicationHandler extends DefaultHandler
                 * Default constructor.
                 */
                public ProcessFactory(){
-                       this.args = new Vector<String>();
+                       this.args = new Vector();
                        this.hostName = null;
                        this.function = null;
                }
@@ -103,11 +102,11 @@ public final class ApplicationHandler extends DefaultHandler
                        Host host = Host.getByName(this.hostName);
                        Msg.processCreate(process,host);
                        
-                       Vector<String> args = processFactory.args;
+                       Vector args = processFactory.args;
                        int size = args.size();
                        
                        for(int index = 0; index < size; index++)
-                               process.addArg(args.get(index));
+                               process.args.add(args.get(index));
                                
                } catch(JniException e)
                {