A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modernize FindSimGrid
[simgrid.git]
/
src
/
bindings
/
java
/
org
/
simgrid
/
msg
/
Process.java
diff --git
a/src/bindings/java/org/simgrid/msg/Process.java
b/src/bindings/java/org/simgrid/msg/Process.java
index
ecc7cee
..
6c06550
100644
(file)
--- a/
src/bindings/java/org/simgrid/msg/Process.java
+++ b/
src/bindings/java/org/simgrid/msg/Process.java
@@
-1,4
+1,4
@@
-/* Copyright (c) 2006-201
7
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-201
8
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-107,9
+107,9
@@
public abstract class Process implements Runnable {
*
* @param host Where to create the process.
* @param name The name of the process.
*
* @param host Where to create the process.
* @param name The name of the process.
- * @param args
The arguments of main method of the process.
+ * @param args
Param
The arguments of main method of the process.
*/
*/
- public Process(Host host, String name, String[]args)
+ public Process(Host host, String name, String[]args
Param
)
{
if (host == null)
throw new IllegalArgumentException("Cannot create a process on the null host");
{
if (host == null)
throw new IllegalArgumentException("Cannot create a process on the null host");
@@
-120,8
+120,8
@@
public abstract class Process implements Runnable {
this.name = name;
this.args = new ArrayList<>();
this.name = name;
this.args = new ArrayList<>();
- if (null != args)
- this.args.addAll(Arrays.asList(args));
+ if (null != args
Param
)
+ this.args.addAll(Arrays.asList(args
Param
));
}
/**
* Constructs a new process from a host and his name, the arguments of here method function are
}
/**
* Constructs a new process from a host and his name, the arguments of here method function are
@@
-295,15
+295,11
@@
public abstract class Process implements Runnable {
@Override
public void run() {
@Override
public void run() {
- String[] args = null; /* do not fill it before the signal or this.args will be empty */
-
try {
try {
- args = new String[this.args.size()];
- if (!this.args.isEmpty()) {
- this.args.toArray(args);
- }
+ String[] argsArray = new String[this.args.size()];
+ this.args.toArray(argsArray);
- this.main(args);
+ this.main(args
Array
);
}
catch(MsgException e) {
e.printStackTrace();
}
catch(MsgException e) {
e.printStackTrace();