commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom JDOMNodePointer.java JDOMNamespaceIterator.java
Date Tue, 17 Jun 2003 01:30:22 GMT
dmitri      2003/06/16 18:30:21

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom
                        JDOMNodePointer.java JDOMNamespaceIterator.java
  Log:
  Temporary fix pending the release of the next version of JDOM,
  which currently has an incompatible API change.
  
  Revision  Changes    Path
  1.9       +13 -13    jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
  
  Index: JDOMNodePointer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JDOMNodePointer.java	11 Mar 2003 00:59:33 -0000	1.8
  +++ JDOMNodePointer.java	17 Jun 2003 01:30:21 -0000	1.9
  @@ -508,19 +508,19 @@
       
       private Element nodeParent(Object node) {
           if (node instanceof Element) {
  -            return ((Element) node).getParent();
  +            return (Element) ((Element) node).getParent();
           }
           else if (node instanceof Text) {
  -            return ((Text) node).getParent();
  +            return (Element) ((Text) node).getParent();
           }
           else if (node instanceof CDATA) {
  -            return ((CDATA) node).getParent();
  +            return (Element) ((CDATA) node).getParent();
           }
           else if (node instanceof ProcessingInstruction) {
  -            return ((ProcessingInstruction) node).getParent();
  +            return (Element) ((ProcessingInstruction) node).getParent();
           }
           else if (node instanceof Comment) {
  -            return ((Comment) node).getParent();
  +            return (Element) ((Comment) node).getParent();
           }
           return null;
       }
  @@ -664,7 +664,7 @@
   
       private int getRelativePositionByName() {
           if (node instanceof Element) {
  -            Element parent = ((Element) node).getParent();
  +            Element parent = (Element)((Element) node).getParent();
               if (parent == null) {
                   return 1;
               }
  @@ -689,10 +689,10 @@
       private int getRelativePositionOfTextNode() {
           Element parent;
           if (node instanceof Text) {
  -            parent = ((Text) node).getParent();
  +            parent = (Element) ((Text) node).getParent();
           }
           else {
  -            parent = ((CDATA) node).getParent();
  +            parent = (Element) ((CDATA) node).getParent();
           }
           if (parent == null) {
               return 1;
  @@ -712,7 +712,7 @@
       }
   
       private int getRelativePositionOfPI(String target) {
  -        Element parent = ((ProcessingInstruction) node).getParent();
  +        Element parent = (Element) ((ProcessingInstruction) node).getParent();
           if (parent == null) {
               return 1;
           }
  
  
  
  1.5       +5 -5      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNamespaceIterator.java
  
  Index: JDOMNamespaceIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNamespaceIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JDOMNamespaceIterator.java	11 Mar 2003 00:59:33 -0000	1.4
  +++ JDOMNamespaceIterator.java	17 Jun 2003 01:30:21 -0000	1.5
  @@ -107,7 +107,7 @@
                   prefixes.add(ns.getPrefix());
               }
           }
  -        Element parent = element.getParent();
  +        Element parent = (Element) element.getParent();
           if (parent != null) {
               collectNamespaces(parent);
           }
  
  
  

---------------------------------------------------------------------
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