Browse Source

Fix shouldRun logic.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271288 13f79535-47bb-0310-9956-ffa450edef68
master
Stephane Bailliez 23 years ago
parent
commit
4829434a73
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/BaseTestElement.java

+ 6
- 2
proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/BaseTestElement.java View File

@@ -105,8 +105,12 @@ public abstract class BaseTestElement
*/
protected boolean shouldRun() {
final Project project = getProject();
if ((project.getProperty(ifProperty) == null) ||
(project.getProperty(unlessProperty) != null)) {
if ( ifProperty != null &&
project.getProperty(ifProperty) == null ){
return false;
}
if (unlessProperty != null &&
project.getProperty(unlessProperty) != null) {
return false;
}
return true;


Loading…
Cancel
Save