git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275179 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -233,6 +233,9 @@ Fixed bugs: | |||||
| or in the top package. | or in the top package. | ||||
| Bugzilla Report 21915. | Bugzilla Report 21915. | ||||
| * Project.toBoolean(String) now handles null as argument and does not throw a | |||||
| NullPointerException any more. | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| * All tasks can be used outside of <target>s. Note that some tasks | * All tasks can be used outside of <target>s. Note that some tasks | ||||
| @@ -586,7 +589,7 @@ Other changes: | |||||
| Bugzilla Report 22533. | Bugzilla Report 22533. | ||||
| * additional shortcuts for ant options (-d --> -debug, -e --> -emacs, | * additional shortcuts for ant options (-d --> -debug, -e --> -emacs, | ||||
| -h --> -help, -p --> -projecthelp, -s --> -find) | |||||
| -h --> -help, -p --> -projecthelp, -s --> -find). | |||||
| Changes from Ant 1.5.3 to Ant 1.5.4 | Changes from Ant 1.5.3 to Ant 1.5.4 | ||||
| =================================== | =================================== | ||||
| @@ -1569,16 +1569,15 @@ public class Project { | |||||
| * or <code>"yes"</code> is found, ignoring case. | * or <code>"yes"</code> is found, ignoring case. | ||||
| * | * | ||||
| * @param s The string to convert to a boolean value. | * @param s The string to convert to a boolean value. | ||||
| * Must not be <code>null</code>. | |||||
| * | * | ||||
| * @return <code>true</code> if the given string is <code>"on"</code>, | * @return <code>true</code> if the given string is <code>"on"</code>, | ||||
| * <code>"true"</code> or <code>"yes"</code>, or | * <code>"true"</code> or <code>"yes"</code>, or | ||||
| * <code>false</code> otherwise. | * <code>false</code> otherwise. | ||||
| */ | */ | ||||
| public static boolean toBoolean(String s) { | public static boolean toBoolean(String s) { | ||||
| return (s.equalsIgnoreCase("on") | |||||
| || s.equalsIgnoreCase("true") | |||||
| || s.equalsIgnoreCase("yes")); | |||||
| return ("on".equalsIgnoreCase(s) | |||||
| || "true".equalsIgnoreCase(s) | |||||
| || "yes".equalsIgnoreCase(s)); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -2097,4 +2096,4 @@ public class Project { | |||||
| // is private/protected. | // is private/protected. | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| } | |||||