felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r662751 - /felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
Date Tue, 03 Jun 2008 11:45:33 GMT
Author: cziegeler
Date: Tue Jun  3 04:45:32 2008
New Revision: 662751

URL: http://svn.apache.org/viewvc?rev=662751&view=rev
Log:
FELIX-594: Pretty print generated xml.

Modified:
    felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java

Modified: felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java?rev=662751&r1=662750&r2=662751&view=diff
==============================================================================
--- felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
(original)
+++ felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
Tue Jun  3 04:45:32 2008
@@ -197,14 +197,15 @@
         IOUtils.addAttribute(ai, "servicefactory", String.valueOf(service.isServicefactory()));
         IOUtils.indent(contentHandler, 2);
         contentHandler.startElement(NAMESPACE_URI, ComponentDescriptorIO.SERVICE, ComponentDescriptorIO.SERVICE_QNAME,
ai);
-        if ( service.getInterfaces() != null ) {
+        if ( service.getInterfaces() != null && service.getInterfaces().size() >
0 ) {
+            IOUtils.newline(contentHandler);
             final Iterator i = service.getInterfaces().iterator();
             while ( i.hasNext() ) {
                 final Interface interf = (Interface)i.next();
                 generateXML(interf, contentHandler);
             }
+            IOUtils.indent(contentHandler, 2);
         }
-        IOUtils.indent(contentHandler, 2);
         contentHandler.endElement(NAMESPACE_URI, ComponentDescriptorIO.SERVICE, ComponentDescriptorIO.SERVICE_QNAME);
         IOUtils.newline(contentHandler);
     }



Mime
View raw message