You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by st...@apache.org on 2004/09/07 11:32:48 UTC

cvs commit: ws-axis/java/src/org/apache/axis/message NodeImpl.java

stevel      2004/09/07 02:32:48

  Modified:    java/src/org/apache/axis/i18n resource.properties
               java/src/org/apache/axis/message NodeImpl.java
  Log:
  some comments, plus an exception (that is ignored) is logged at error level, instead of printed to stdout.
  
  Revision  Changes    Path
  1.92      +3 -1      ws-axis/java/src/org/apache/axis/i18n/resource.properties
  
  Index: resource.properties
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/i18n/resource.properties,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- resource.properties	20 Jul 2004 19:26:54 -0000	1.91
  +++ resource.properties	7 Sep 2004 09:32:48 -0000	1.92
  @@ -1243,4 +1243,6 @@
   ignoringNonFatalException00=Ignoring non-fatal exception
   incompatibleSEI00=Incompatible service endpoint interface: {0}
   
  -indexOutOfBoundsException00=IndexOutOfBoundsException:
  \ No newline at end of file
  +indexOutOfBoundsException00=IndexOutOfBoundsException:
  +
  +saxToDomFailed00=Exception caught while converting attributes from SAX to DOM
  \ No newline at end of file
  
  
  
  1.4       +25 -3     ws-axis/java/src/org/apache/axis/message/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/NodeImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NodeImpl.java	29 Jun 2004 13:28:02 -0000	1.3
  +++ NodeImpl.java	7 Sep 2004 09:32:48 -0000	1.4
  @@ -39,6 +39,9 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   
  +/**
  + * This is our implementation of the DOM node
  + */
   public class NodeImpl implements org.w3c.dom.Node, javax.xml.soap.Node,
           Serializable, Cloneable {
   
  @@ -58,10 +61,18 @@
       protected CharacterData textRep = null;
   
       protected boolean   _isDirty = false;
  -    
  +    private static final String NULL_URI_NAME = "intentionalNullURI";
  +
  +    /**
  +     * empty constructor
  +     */
       public NodeImpl() {
       }
   
  +    /**
  +     * constructor which adopts the name and NS of the char data, and its text
  +     * @param text
  +     */
       public NodeImpl(CharacterData text) {
           textRep = text;
           namespaceURI = text.getNamespaceURI();
  @@ -689,7 +700,7 @@
                   if (uri != null && uri.trim().length() > 0) {
                       // filterring out the tricky method to differentiate the null namespace
                       // -ware case
  -                    if (uri.equals("intentionalNullURI")) {
  +                    if (NULL_URI_NAME.equals(uri)) {
                           uri = null;
                       }
                       Attr attr = doc.createAttributeNS(uri, qname);
  @@ -703,7 +714,8 @@
               }
               return domAttributes;
           } catch (Exception ex) {
  -            ex.printStackTrace();
  +            log.error(Messages.getMessage("saxToDomFailed00"),ex);
  +
               return null;
           }
       }
  @@ -767,8 +779,17 @@
           context.setPretty(oldPretty);
       }
   
  +    /**
  +     * get the dirty bit
  +     * @return
  +     */
       public boolean isDirty() { return _isDirty; }
   
  +    /**
  +     * set the dirty bit. will also set our parent as dirty, if there is one.
  +     * Note that clearing the dirty bit does <i>not</i> propagate upwards.
  +     * @param dirty new value of the dirty bit
  +     */
       public void setDirty(boolean dirty)
       { 
           _isDirty = dirty; 
  @@ -776,5 +797,6 @@
               ((NodeImpl)parent).setDirty(true);
           }
       }
  +
   
   }