avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/meta/impl/src/java/org/apache/avalon/meta/info/writer XMLTypeWriter.java
Date Mon, 11 Aug 2003 22:06:38 GMT
mcconnell    2003/08/11 15:06:38

  Modified:    meta/impl/src/java/org/apache/avalon/meta/info/writer
                        XMLTypeWriter.java
  Log:
  Fix bug in type writer when generating context entry descriptors.
  
  Revision  Changes    Path
  1.13      +16 -8     avalon-sandbox/meta/impl/src/java/org/apache/avalon/meta/info/writer/XMLTypeWriter.java
  
  Index: XMLTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/impl/src/java/org/apache/avalon/meta/info/writer/XMLTypeWriter.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XMLTypeWriter.java	28 Jul 2003 13:26:58 -0000	1.12
  +++ XMLTypeWriter.java	11 Aug 2003 22:06:38 -0000	1.13
  @@ -282,24 +282,32 @@
           throws IOException
       {
           writer.write( "\n    <entry key=\"" );
  -        writer.write( entry.getKey() );
  -        writer.write( "\" type=\"" );
  -        writer.write( entry.getClassname() );
  +        writer.write( entry.getKey() + "\" " );
  +
  +        if( !entry.getClassname().equals( "java.lang.String" ) )
  +        {
  +            writer.write( "type=\"" );
  +            writer.write( entry.getClassname() );
  +            writer.write( "\" " );
  +        }
   
           if( entry.getAlias() != null )
           {
  -            writer.write( "\" alias=\"" + entry.getAlias() + "\"" );
  +            if( !entry.getAlias().equals( entry.getKey() ) )
  +            {
  +                writer.write( "alias=\"" + entry.getAlias() + "\" " );
  +            }
           }
           if( entry.isOptional() )
           {
  -            writer.write( "\" optional=\"true" );
  +            writer.write( "\" optional=\"true\" " );
           }
           if( entry.isVolatile() )
           {
  -            writer.write( "\" volatile=\"true" );
  +            writer.write( "\" volatile=\"true\" " );
           }
   
  -        writer.write( "\"/>" );
  +        writer.write( "/>" );
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message