Changeset 1362 for trunk/autoquest-core-tasktrees/src/main/java/de
- Timestamp:
- 02/07/14 19:09:08 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java
r1294 r1362 192 192 if (!(instance instanceof SelectionInstance)) { 193 193 throw new IllegalArgumentException 194 ("illegal type of se quenceinstance provided: " + instance.getClass());194 ("illegal type of selection instance provided: " + instance.getClass()); 195 195 } 196 196 197 197 if (!(child instanceof TaskInstance)) { 198 throw new IllegalArgumentException 199 ("illegal type of task instance provided: " + child.getClass());198 throw new IllegalArgumentException("illegal type of task instance provided: " + 199 (child == null ? null : child.getClass())); 200 200 } 201 201 … … 353 353 ("illegal type of task instance provided: " + taskInstance.getClass()); 354 354 } 355 355 if (!(task instanceof Task)) { 356 throw new IllegalArgumentException("illegal type of task provided: " + task.getClass()); 357 } 358 359 if (((TaskInstance) taskInstance).getTask() instanceof Task) { 360 ((Task) ((TaskInstance) taskInstance).getTask()).removeInstance(taskInstance); 361 } 356 362 ((TaskInstance) taskInstance).setTask(task); 363 364 ((Task) task).addInstance(taskInstance); 357 365 } 358 366
Note: See TracChangeset
for help on using the changeset viewer.