commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r512283 - in /jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri: compiler/ExpressionPath.java model/dom/DOMNodePointer.java
Date Tue, 27 Feb 2007 15:35:30 GMT
Author: mbenson
Date: Tue Feb 27 07:35:26 2007
New Revision: 512283

URL: http://svn.apache.org/viewvc?view=rev&rev=512283
Log:
fix broken nightlies that compile file on JDK 5 but not below due to my excessive fascination
with the ternary operator. :|

Modified:
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java?view=diff&rev=512283&r1=512282&r2=512283
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java
Tue Feb 27 07:35:26 2007
@@ -180,6 +180,7 @@
                 context = new PredicateContext(context, predicates[j]);
             }
         }
-        return firstMatch ? getSingleNodePointerForSteps(context) : evalSteps(context);
+        return firstMatch ? (Object) getSingleNodePointerForSteps(context)
+                : evalSteps(context);
     }
-}
\ No newline at end of file
+}

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java?view=diff&rev=512283&r1=512282&r2=512283
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
Tue Feb 27 07:35:26 2007
@@ -668,7 +668,7 @@
         Document document = node.getNodeType() == Node.DOCUMENT_NODE ? (Document) node
                 : node.getOwnerDocument();
         Element element = document.getElementById(id);
-        return element == null ? new NullPointer(getLocale(), id)
+        return element == null ? (Pointer) new NullPointer(getLocale(), id)
                 : new DOMNodePointer(element, getLocale(), id);
     }
 
@@ -727,4 +727,4 @@
         }
         return 0;
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message