cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/components/language/markup/xsp XSPSessionFwHelper.java
Date Fri, 26 Dec 2003 23:47:50 GMT
antonio     2003/12/26 15:47:50

  Modified:    src/blocks/session-fw/java/org/apache/cocoon/components/language/markup/xsp
                        XSPSessionFwHelper.java
  Log:
  Fixing NPE, when the context does not exist
  
  Revision  Changes    Path
  1.7       +3 -4      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/components/language/markup/xsp/XSPSessionFwHelper.java
  
  Index: XSPSessionFwHelper.java
  ===================================================================
  RCS file: /home/cvs//cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/components/language/markup/xsp/XSPSessionFwHelper.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XSPSessionFwHelper.java	18 Dec 2003 13:30:15 -0000	1.6
  +++ XSPSessionFwHelper.java	26 Dec 2003 23:47:50 -0000	1.7
  @@ -59,7 +59,6 @@
   import org.apache.cocoon.webapps.session.SessionManager;
   
   import org.w3c.dom.DocumentFragment;
  -import org.w3c.dom.Node;
   
   /**
    * The <code>Session-fw</code> object helper
  @@ -102,8 +101,8 @@
        * @param path The parameter path
        **/
       public static String getXMLAsString(ComponentManager cm, String context, String path)
throws ProcessingException {
  -        Node node = getXML(cm, context, path).getFirstChild();
  -        return node != null ? node.getNodeValue() : "";
  +        DocumentFragment df = getXML(cm, context, path);
  +        return df != null ? df.getFirstChild().getNodeValue() : "";
       }
   }
   
  
  
  

Mime
View raw message