Author: britter
Date: Sun Jan 12 17:51:20 2014
New Revision: 1557571
URL: http://svn.apache.org/r1557571
Log:
Use constants instead of strings
Modified:
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/DebugUtils.java
Modified:
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/DebugUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/DebugUtils.java?rev=1557571&r1=1557570&r2=1557571&view=diff
==============================================================================
---
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/DebugUtils.java
(original)
+++
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/util/DebugUtils.java
Sun Jan 12 17:51:20 2014
@@ -69,7 +69,8 @@ public class DebugUtils
* @return true if debug mode is enabled
*/
public static boolean isDebugEnabled() {
- return "true".equalsIgnoreCase(System.getProperty(COMMONS_EXEC_DEBUG,
"false"));
+ final String debug = System.getProperty(COMMONS_EXEC_DEBUG,
Boolean.FALSE.toString());
+ return Boolean.TRUE.toString().equalsIgnoreCase(debug);
}
/**
@@ -78,7 +79,8 @@ public class DebugUtils
* @return true if lenient mode is enabled
*/
public static boolean isLenientEnabled() {
- return
"true".equalsIgnoreCase(System.getProperty(COMMONS_EXEC_LENIENT, "true"));
+ final String lenient = System.getProperty(COMMONS_EXEC_LENIENT,
Boolean.TRUE.toString());
+ return Boolean.TRUE.toString().equalsIgnoreCase(lenient);
}
}