Browse Source

Remove Project.toBoolean

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270444 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
429530461e
4 changed files with 6 additions and 34 deletions
  1. +0
    -14
      proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
  2. +3
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
  3. +0
    -14
      proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java
  4. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java

+ 0
- 14
proposal/myrmidon/src/main/org/apache/tools/ant/Project.java View File

@@ -114,20 +114,6 @@ public class Project
return super.getLogger();
}

/**
* returns the boolean equivalent of a string, which is considered true if
* either "on", "true", or "yes" is found, ignoring case.
*
* @param s Description of Parameter
* @return Description of the Returned Value
*/
public static boolean toBoolean( String s )
{
return ( s.equalsIgnoreCase( "on" ) ||
s.equalsIgnoreCase( "true" ) ||
s.equalsIgnoreCase( "yes" ) );
}

/**
* get the base directory of the project as a file object
*


+ 3
- 3
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java View File

@@ -361,15 +361,15 @@ public class JUnitTestRunner implements TestListener
{
if( args[ i ].startsWith( "haltOnError=" ) )
{
haltError = Project.toBoolean( args[ i ].substring( 12 ) );
haltError = "true".equals( args[ i ].substring( 12 ) );
}
else if( args[ i ].startsWith( "haltOnFailure=" ) )
{
haltFail = Project.toBoolean( args[ i ].substring( 14 ) );
haltFail = "true".equals( args[ i ].substring( 14 ) );
}
else if( args[ i ].startsWith( "filtertrace=" ) )
{
stackfilter = Project.toBoolean( args[ i ].substring( 12 ) );
stackfilter = "true".equals( args[ i ].substring( 12 ) );
}
else if( args[ i ].startsWith( "formatter=" ) )
{


+ 0
- 14
proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java View File

@@ -114,20 +114,6 @@ public class Project
return super.getLogger();
}

/**
* returns the boolean equivalent of a string, which is considered true if
* either "on", "true", or "yes" is found, ignoring case.
*
* @param s Description of Parameter
* @return Description of the Returned Value
*/
public static boolean toBoolean( String s )
{
return ( s.equalsIgnoreCase( "on" ) ||
s.equalsIgnoreCase( "true" ) ||
s.equalsIgnoreCase( "yes" ) );
}

/**
* get the base directory of the project as a file object
*


+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java View File

@@ -361,15 +361,15 @@ public class JUnitTestRunner implements TestListener
{
if( args[ i ].startsWith( "haltOnError=" ) )
{
haltError = Project.toBoolean( args[ i ].substring( 12 ) );
haltError = "true".equals( args[ i ].substring( 12 ) );
}
else if( args[ i ].startsWith( "haltOnFailure=" ) )
{
haltFail = Project.toBoolean( args[ i ].substring( 14 ) );
haltFail = "true".equals( args[ i ].substring( 14 ) );
}
else if( args[ i ].startsWith( "filtertrace=" ) )
{
stackfilter = Project.toBoolean( args[ i ].substring( 12 ) );
stackfilter = "true".equals( args[ i ].substring( 12 ) );
}
else if( args[ i ].startsWith( "formatter=" ) )
{


Loading…
Cancel
Save