antonio 2004/03/28 14:03:02
Modified: src/java/org/apache/cocoon/transformation
SimpleFormTransformer.java
Log:
Changing to use o.a.commons.lang.BooleanUtils
Revision Changes Path
1.15 +6 -15
cocoon-2.1/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java
Index: SimpleFormTransformer.java
===================================================================
RCS file:
/home/cvs//cocoon-2.1/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- SimpleFormTransformer.java 28 Mar 2004 20:51:24 -0000 1.14
+++ SimpleFormTransformer.java 28 Mar 2004 22:03:02 -0000 1.15
@@ -564,7 +564,7 @@
if (getLogger().isDebugEnabled())
getLogger().debug(
"startInputElement " + name + " attributes " +
this.printAttributes(attr));
- if (aName == null || this.fixed || (fixed != null &&
parseBoolean(fixed))) {
+ if (aName == null || this.fixed || (fixed != null &&
BooleanUtils.toBoolean(fixed))) {
this.relayStartElement(uri, name, raw, attr);
} else {
@@ -608,7 +608,7 @@
if (getLogger().isDebugEnabled())
getLogger().debug(
"startSelectElement " + name + " attributes " +
this.printAttributes(attr));
- if (aName != null && !(this.fixed || (fixed != null &&
parseBoolean(fixed)))) {
+ if (aName != null && !(this.fixed || (fixed != null &&
BooleanUtils.toBoolean(fixed)))) {
if (attr.getIndex("multiple") > -1) {
this.values = this.getValues(aName);
} else {
@@ -686,7 +686,7 @@
if (aName != null) {
value = this.getNextValue(aName);
}
- if (value == null || this.fixed || (fixed != null &&
parseBoolean(fixed))) {
+ if (value == null || this.fixed || (fixed != null &&
BooleanUtils.toBoolean(fixed))) {
this.relayStartElement(uri, name, raw, attributes);
} else {
if (getLogger().isDebugEnabled())
@@ -773,7 +773,7 @@
if (fixed == null) {
this.relayStartElement(uri, name, raw, attr);
} else {
- if (!this.fixed && parseBoolean(fixed)) {
+ if (!this.fixed && BooleanUtils.toBoolean(fixed)) {
this.fixed = true;
}
// remove attributes not meant for client
@@ -803,7 +803,7 @@
throws SAXException {
if (this.recordingCount == 0) {
- if (!(this.fixed ||
parseBoolean(attr.getValue(this.fixedName)))) {
+ if (!(this.fixed ||
BooleanUtils.toBoolean(attr.getValue(this.fixedName)))) {
RepeaterStatus status =
new RepeaterStatus("${" + attr.getValue("using") + "}",
0, attr.getValue("on"));
this.repeater.add(status);
@@ -952,15 +952,6 @@
this.relayEndElement(uri, name, raw);
}
}
- }
-
- /**
- * Check if a string is one of "yes", "true" ignoring case.
- * @param aBoolean
- * @return true if string is one of "yes", true"
- */
- private static boolean parseBoolean(String aBoolean) {
- return BooleanUtils.toBoolean(aBoolean);
}
/**