cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/xml XMLUtils.java
Date Fri, 24 Oct 2003 13:42:01 GMT
vgritsenko    2003/10/24 06:42:01

  Modified:    src/java/org/apache/cocoon/xml XMLUtils.java
               src/java/org/apache/cocoon/xml XMLUtils.java
  Log:
  nitpicking
  
  Revision  Changes    Path
  1.4       +12 -12    cocoon-2.1/src/java/org/apache/cocoon/xml/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/XMLUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLUtils.java	6 May 2003 12:09:20 -0000	1.3
  +++ XMLUtils.java	24 Oct 2003 13:42:01 -0000	1.4
  @@ -81,7 +81,7 @@
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
    * @version CVS $Id$
    */
  -public class XMLUtils{
  +public class XMLUtils {
   
       public static final AttributesImpl EMPTY_ATTRIBUTES = new AttributesImpl();
   
  @@ -158,9 +158,9 @@
        */
       public static XMLConsumer getConsumer(ContentHandler ch, LexicalHandler lh) {
           if (ch instanceof XMLConsumer)
  -          return (XMLConsumer)ch;
  +            return (XMLConsumer)ch;
           else
  -          return new ContentHandlerWrapper(ch, lh);
  +            return new ContentHandlerWrapper(ch, lh);
       }
   
       /**
  @@ -223,18 +223,20 @@
       public static String serializeNode(Node node, Properties format)
       throws ProcessingException {
           try {
  -            if (node == null) return "";
  +            if (node == null) {
  +                return "";
  +            }
               StringWriter writer = new StringWriter();
               TransformerHandler transformerHandler;
               transformerHandler = ((SAXTransformerFactory)TransformerFactory.newInstance()).newTransformerHandler();
               transformerHandler.getTransformer().setOutputProperties(format);
               transformerHandler.setResult(new StreamResult(writer));
  -            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
  +            if (node.getNodeType() != Node.DOCUMENT_NODE) {
                   transformerHandler.startDocument();
               } 
               DOMStreamer domStreamer = new DOMStreamer(transformerHandler, transformerHandler);
               domStreamer.stream(node);
  -            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
  +            if (node.getNodeType() != Node.DOCUMENT_NODE) {
                   transformerHandler.endDocument();
               } 
               return writer.toString();
  @@ -252,7 +254,7 @@
        * @param data The string data
        */
       public static void data(ContentHandler contentHandler,
  -                                 String data)
  +                            String data)
       throws SAXException {
           contentHandler.characters(data.toCharArray(), 0, data.length());
       }
  @@ -278,8 +280,8 @@
        * @param contentHandler the SAX content handler
        * @param v the XML fragment
        */
  -    public static void valueOf(ContentHandler contentHandler, 
  -                                 org.apache.excalibur.xml.sax.XMLizable v)
  +    public static void valueOf(ContentHandler contentHandler,
  +                               org.apache.excalibur.xml.sax.XMLizable v)
       throws SAXException {
           if (v != null) {
               v.toSAX(contentHandler);
  @@ -620,6 +622,4 @@
       throws SAXException {
           contentHandler.startElement(namespaceURI, localName, localName, atts);
       }
  -     
  -
   }
  
  
  
  1.4       +12 -12    cocoon-2.2/src/java/org/apache/cocoon/xml/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/xml/XMLUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLUtils.java	6 May 2003 12:09:20 -0000	1.3
  +++ XMLUtils.java	24 Oct 2003 13:42:01 -0000	1.4
  @@ -81,7 +81,7 @@
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
    * @version CVS $Id$
    */
  -public class XMLUtils{
  +public class XMLUtils {
   
       public static final AttributesImpl EMPTY_ATTRIBUTES = new AttributesImpl();
   
  @@ -158,9 +158,9 @@
        */
       public static XMLConsumer getConsumer(ContentHandler ch, LexicalHandler lh) {
           if (ch instanceof XMLConsumer)
  -          return (XMLConsumer)ch;
  +            return (XMLConsumer)ch;
           else
  -          return new ContentHandlerWrapper(ch, lh);
  +            return new ContentHandlerWrapper(ch, lh);
       }
   
       /**
  @@ -223,18 +223,20 @@
       public static String serializeNode(Node node, Properties format)
       throws ProcessingException {
           try {
  -            if (node == null) return "";
  +            if (node == null) {
  +                return "";
  +            }
               StringWriter writer = new StringWriter();
               TransformerHandler transformerHandler;
               transformerHandler = ((SAXTransformerFactory)TransformerFactory.newInstance()).newTransformerHandler();
               transformerHandler.getTransformer().setOutputProperties(format);
               transformerHandler.setResult(new StreamResult(writer));
  -            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
  +            if (node.getNodeType() != Node.DOCUMENT_NODE) {
                   transformerHandler.startDocument();
               } 
               DOMStreamer domStreamer = new DOMStreamer(transformerHandler, transformerHandler);
               domStreamer.stream(node);
  -            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
  +            if (node.getNodeType() != Node.DOCUMENT_NODE) {
                   transformerHandler.endDocument();
               } 
               return writer.toString();
  @@ -252,7 +254,7 @@
        * @param data The string data
        */
       public static void data(ContentHandler contentHandler,
  -                                 String data)
  +                            String data)
       throws SAXException {
           contentHandler.characters(data.toCharArray(), 0, data.length());
       }
  @@ -278,8 +280,8 @@
        * @param contentHandler the SAX content handler
        * @param v the XML fragment
        */
  -    public static void valueOf(ContentHandler contentHandler, 
  -                                 org.apache.excalibur.xml.sax.XMLizable v)
  +    public static void valueOf(ContentHandler contentHandler,
  +                               org.apache.excalibur.xml.sax.XMLizable v)
       throws SAXException {
           if (v != null) {
               v.toSAX(contentHandler);
  @@ -620,6 +622,4 @@
       throws SAXException {
           contentHandler.startElement(namespaceURI, localName, localName, atts);
       }
  -     
  -
   }
  
  
  

Mime
View raw message