Commit 8b0dd0ff authored by cdelbe's avatar cdelbe
Browse files

PICKED FROM TRUNK 14873

Fix SCHEDULING-519

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/proactive/scheduling/branches/Scheduling_2.0.x@14994 28e8926c-6b08-0410-baaa-805c5e19b8d6
parent 2b41f73e
......@@ -368,6 +368,9 @@ public abstract class Task extends CommonAttribute {
* Set a selection script. It is the script that will be in charge of selecting a node.
*/
public void setSelectionScript(SelectionScript selScript) {
if (selScript == null) {
throw new IllegalArgumentException("The given selection script cannot be null !");
}
List<SelectionScript> selScriptsList = new ArrayList<SelectionScript>();
selScriptsList.add(selScript);
setSelectionScripts(selScriptsList);
......@@ -387,6 +390,9 @@ public abstract class Task extends CommonAttribute {
* the selectionScript to add.
*/
public void addSelectionScript(SelectionScript selectionScript) {
if (selectionScript == null) {
throw new IllegalArgumentException("The given selection script cannot be null !");
}
if (this.sScripts == null) {
this.sScripts = new ArrayList<SelectionScript>();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment