commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io BeanWriter.java
Date Sat, 15 Jun 2002 03:27:54 GMT
jon         2002/06/14 20:27:53

  Modified:    betwixt/src/java/org/apache/commons/betwixt/io
                        BeanWriter.java
  Log:
  string -> char
  
  -jon
  
  Revision  Changes    Path
  1.6       +12 -10    jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/BeanWriter.java
  
  Index: BeanWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/BeanWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BeanWriter.java	14 Jun 2002 23:05:26 -0000	1.5
  +++ BeanWriter.java	15 Jun 2002 03:27:53 -0000	1.6
  @@ -147,7 +147,9 @@
       /** Where the output goes */
       private Writer writer;    
       /** text used for end of lines. Defaults to <code>\n</code>*/
  -    private String endOfLine = "\n";
  +    private static final String EOL = "\n";
  +    /** text used for end of lines. Defaults to <code>\n</code>*/
  +    private String endOfLine = EOL;
       /** indentation text */
       private String indent;
       /** indentation level */
  @@ -325,7 +327,7 @@
        * The default is adding 2 spaces and a newline
        */
       public void enablePrettyPrint() {
  -        endOfLine = "\n";
  +        endOfLine = EOL;
           indent = "  ";
       }
   
  @@ -437,7 +439,7 @@
           
           writePrintln();
           writeIndent();
  -        writer.write( "<" );
  +        writer.write( '<' );
           writer.write( qualifiedName );
       }
       
  @@ -451,7 +453,7 @@
           
           writer.write( "</" );
           writer.write( qualifiedName );
  -        writer.write( ">" );
  +        writer.write( '>' );
       }    
       
       /** Express an empty element end */
  @@ -488,11 +490,11 @@
               return;
           }
                   
  -        writer.write( " " );
  +        writer.write( ' ' );
           writer.write( qualifiedName );
           writer.write( "=\"" );
           writer.write( value );
  -        writer.write( "\"" );
  +        writer.write( '\"' );
       }
   
   
  @@ -607,7 +609,7 @@
                               for ( Iterator iter = (Iterator) childBean; iter.hasNext();
) {
                                   if ( ! writtenContent ) {
                                       writtenContent = true;
  -                                    writer.write( ">" );
  +                                    writer.write( '>' );
                                   }
                                   ++indentLevel;
                                   write( qualifiedName, iter.next() );
  @@ -617,7 +619,7 @@
                           else {
                               if ( ! writtenContent ) {
                                   writtenContent = true;
  -                                writer.write( ">" );
  +                                writer.write( '>' );
                               }
                               ++indentLevel;
                               write( qualifiedName, childBean );
  @@ -628,7 +630,7 @@
                   else {
                       if ( ! writtenContent ) {
                           writtenContent = true;
  -                        writer.write( ">" );
  +                        writer.write( '>' );
                       }
                       if (childDescriptor.isWrapCollectionsInElement()) {
                           ++indentLevel;
  @@ -656,7 +658,7 @@
                       if ( text != null && text.length() > 0 ) {
                           if ( ! writtenContent ) {
                               writtenContent = true;
  -                            writer.write( ">" );
  +                            writer.write( '>' );
                           }
                           expressBodyText(text);
                       }
  
  
  

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


Mime
View raw message