dion 2004/09/09 08:18:54
Modified: jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml
SetTag.java
Log:
detab
Revision Changes Path
1.11 +27 -27 jakarta-commons/jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/SetTag.java
Index: SetTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/SetTag.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SetTag.java 9 Sep 2004 15:01:52 -0000 1.10
+++ SetTag.java 9 Sep 2004 15:18:54 -0000 1.11
@@ -73,11 +73,11 @@
Object xpathContext = getXPathContext();
Object value = null;
try {
- if(single!=null && single.booleanValue()==true) {
- value = select.selectSingleNode(xpathContext);
- } else {
- value = select.evaluate(xpathContext);
- }
+ if(single!=null && single.booleanValue()==true) {
+ value = select.selectSingleNode(xpathContext);
+ } else {
+ value = select.evaluate(xpathContext);
+ }
}
catch (JaxenException e) {
throw new JellyTagException(e);
@@ -90,26 +90,26 @@
}
}
if (single!=null) {
- if (single.booleanValue()==true) {
- if(value instanceof List) {
- List l = (List) value;
- if (l.size()==0)
- value=null;
- else
- value=l.get(0);
- }
- } else { // single == false
- if(! (value instanceof List) ) {
+ if (single.booleanValue()==true) {
+ if(value instanceof List) {
+ List l = (List) value;
+ if (l.size()==0)
+ value=null;
+ else
+ value=l.get(0);
+ }
+ } else { // single == false
+ if(! (value instanceof List) ) {
List l = null;
- if (value==null) {
- l = new ArrayList(0);
- } else {
- l = new ArrayList(1);
- l.add(value);
- }
- value = l;
- }
- }
+ if (value==null) {
+ l = new ArrayList(0);
+ } else {
+ l = new ArrayList(1);
+ l.add(value);
+ }
+ value = l;
+ }
+ }
}
//log.info( "Evaluated xpath: " + select + " as: " + value + " of type: " + value.getClass().getName()
);
@@ -132,7 +132,7 @@
}
/** If set to true will only take the first element matching.
- If set to false, guarantees that a list is returned.
+ If set to false, guarantees that a list is returned.
It then guarantees that the result is of type
{@link org.dom4j.Node} thereby making sure that, for example,
when an element is selected, one can directly call such methods
@@ -144,7 +144,7 @@
/** Sets the xpath expression to use to sort selected nodes.
- * Ignored if single is true.
+ * Ignored if single is true.
*/
public void setSort(XPath sortXPath) throws JaxenException {
if (xpCmp == null) xpCmp = new XPathComparator();
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|