diff --git a/metatype/src/main/java/org/apache/felix/metatype/MetaData.java b/metatype/src/main/java/org/apache/felix/metatype/MetaData.java
index 9abf244..0985c87 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/MetaData.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/MetaData.java
@@ -39,6 +39,7 @@
     private Map designates;
     private URL source;
 
+
     public String getLocalePrefix()
     {
         return localePrefix;
diff --git a/metatype/src/main/java/org/apache/felix/metatype/MetaDataReader.java b/metatype/src/main/java/org/apache/felix/metatype/MetaDataReader.java
index 482529d..d96ffc3 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/MetaDataReader.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/MetaDataReader.java
@@ -78,12 +78,18 @@
     private KXmlParser parser = new KXmlParser();
 
     /** Sets of attributes belonging to XML elements. */
-    private final Set AD_ATTRIBUTES = new HashSet(Arrays.asList(new String[] { "name", "description", "id", "type", "cardinality", "min", "max", "default", "required" }));
-    private final Set ATTRIBUTE_ATTRIBUTES = new HashSet(Arrays.asList(new String[] { "adref", "content" }));
-    private final Set DESIGNATE_ATTRIBUTES = new HashSet(Arrays.asList(new String[] { "pid", "factoryPid", "bundle", "optional", "merge" }));
-    private final Set DESIGNATEOBJECT_ATTRIBUTES = new HashSet(Arrays.asList(new String[] { "ocdref" }));
-    private final Set METADATA_ATTRIBUTES = new HashSet(Arrays.asList(new String[] { "localization" }));
-    private final Set OCD_ATTRIBUTES = new HashSet(Arrays.asList(new String[] { "name", "description", "id" }));
+    private final Set AD_ATTRIBUTES = new HashSet( Arrays.asList( new String[]
+        { "name", "description", "id", "type", "cardinality", "min", "max", "default", "required" } ) );
+    private final Set ATTRIBUTE_ATTRIBUTES = new HashSet( Arrays.asList( new String[]
+        { "adref", "content" } ) );
+    private final Set DESIGNATE_ATTRIBUTES = new HashSet( Arrays.asList( new String[]
+        { "pid", "factoryPid", "bundle", "optional", "merge" } ) );
+    private final Set DESIGNATEOBJECT_ATTRIBUTES = new HashSet( Arrays.asList( new String[]
+        { "ocdref" } ) );
+    private final Set METADATA_ATTRIBUTES = new HashSet( Arrays.asList( new String[]
+        { "localization" } ) );
+    private final Set OCD_ATTRIBUTES = new HashSet( Arrays.asList( new String[]
+        { "name", "description", "id" } ) );
 
 
     /**
@@ -183,7 +189,7 @@
                 if ( "MetaData".equals( this.parser.getName() ) )
                 {
                     checkMetatypeNamespace();
-                    mti = this.readMetaData( );
+                    mti = this.readMetaData();
                 }
                 else
                 {
@@ -197,15 +203,16 @@
     }
 
 
-    private void readOptionalAttributes(OptionalAttributes entity, Set attributes) {
+    private void readOptionalAttributes( OptionalAttributes entity, Set attributes )
+    {
         int count = this.parser.getAttributeCount();
-        for (int i = 0; i < count; i++)
+        for ( int i = 0; i < count; i++ )
         {
-            String name = this.parser.getAttributeName(i);
-            if (!attributes.contains(name))
+            String name = this.parser.getAttributeName( i );
+            if ( !attributes.contains( name ) )
             {
-                String value = this.parser.getAttributeValue(i);
-                entity.addOptionalAttribute(name, value);
+                String value = this.parser.getAttributeValue( i );
+                entity.addOptionalAttribute( name, value );
             }
         }
     }
@@ -216,7 +223,7 @@
         MetaData mti = this.createMetaData();
         mti.setLocalePrefix( this.getOptionalAttribute( "localization" ) );
 
-        readOptionalAttributes(mti, METADATA_ATTRIBUTES);
+        readOptionalAttributes( mti, METADATA_ATTRIBUTES );
 
         int eventType = this.parser.next();
         while ( eventType != XmlPullParser.END_DOCUMENT )
@@ -259,7 +266,7 @@
         ocd.setName( this.getRequiredAttribute( "name" ) );
         ocd.setDescription( this.getOptionalAttribute( "description" ) );
 
-        readOptionalAttributes(ocd, OCD_ATTRIBUTES);
+        readOptionalAttributes( ocd, OCD_ATTRIBUTES );
 
         int eventType = this.parser.next();
         while ( eventType != XmlPullParser.END_DOCUMENT )
@@ -324,7 +331,7 @@
         designate.setOptional( this.getOptionalAttribute( "optional", false ) );
         designate.setMerge( this.getOptionalAttribute( "merge", false ) );
 
-        readOptionalAttributes(designate, DESIGNATE_ATTRIBUTES);
+        readOptionalAttributes( designate, DESIGNATE_ATTRIBUTES );
 
         int eventType = this.parser.next();
         while ( eventType != XmlPullParser.END_DOCUMENT )
@@ -369,7 +376,7 @@
         ad.setDefaultValue( this.getOptionalAttribute( "default" ) );
         ad.setRequired( this.getOptionalAttribute( "required", true ) );
 
-        readOptionalAttributes(ad, AD_ATTRIBUTES);
+        readOptionalAttributes( ad, AD_ATTRIBUTES );
 
         Map options = new LinkedHashMap();
         int eventType = this.parser.next();
@@ -413,7 +420,7 @@
         DesignateObject oh = this.createDesignateObject();
         oh.setOcdRef( this.getRequiredAttribute( "ocdref" ) );
 
-        readOptionalAttributes(oh, DESIGNATEOBJECT_ATTRIBUTES);
+        readOptionalAttributes( oh, DESIGNATEOBJECT_ATTRIBUTES );
 
         int eventType = this.parser.next();
         while ( eventType != XmlPullParser.END_DOCUMENT )
@@ -450,7 +457,7 @@
         ah.setAdRef( this.getRequiredAttribute( "adref" ) );
         ah.addContent( this.getOptionalAttribute( "content" ), true );
 
-        readOptionalAttributes(ah, ATTRIBUTE_ATTRIBUTES);
+        readOptionalAttributes( ah, ATTRIBUTE_ATTRIBUTES );
 
         int eventType = this.parser.next();
         while ( eventType != XmlPullParser.END_DOCUMENT )
diff --git a/metatype/src/main/java/org/apache/felix/metatype/OptionalAttributes.java b/metatype/src/main/java/org/apache/felix/metatype/OptionalAttributes.java
index 365643c..6ce7078 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/OptionalAttributes.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/OptionalAttributes.java
@@ -18,22 +18,28 @@
  */
 package org.apache.felix.metatype;
 
+
 import java.util.HashMap;
 import java.util.Map;
 
-public class OptionalAttributes {
+
+public class OptionalAttributes
+{
     private Map optionalAttributes;
-    
-    public void addOptionalAttribute(String name, String value)
+
+
+    public void addOptionalAttribute( String name, String value )
     {
-        if (optionalAttributes == null)
+        if ( optionalAttributes == null )
         {
             optionalAttributes = new HashMap();
         }
-        optionalAttributes.put(name, value);
+        optionalAttributes.put( name, value );
     }
-    
-    public Map getOptionalAttributes() {
+
+
+    public Map getOptionalAttributes()
+    {
         return optionalAttributes;
     }
 }
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java b/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java
index 44f026b..e399b0d 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java
@@ -120,6 +120,7 @@
         BundleResources.clearResourcesCache();
     }
 
+
     //---------- Logging Support ----------------------------------------------
     // log to stdout or use LogService
 
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/LocalizedObjectClassDefinition.java b/metatype/src/main/java/org/apache/felix/metatype/internal/LocalizedObjectClassDefinition.java
index e511dda..d18dc32 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/LocalizedObjectClassDefinition.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/LocalizedObjectClassDefinition.java
@@ -156,7 +156,7 @@
 
         // just create an URL based on the source of the metadata
         // see FELIX2868
-        URL url = new URL(this.ocd.getMetadata().getSource(), iconPath);
+        URL url = new URL( this.ocd.getMetadata().getSource(), iconPath );
         return url.openStream();
     }
 
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeInformationImpl.java b/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeInformationImpl.java
index dbf3772..22ac3fe 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeInformationImpl.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeInformationImpl.java
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.metatype.internal;
 
+
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
@@ -36,6 +37,7 @@
 import org.osgi.service.metatype.MetaTypeProvider;
 import org.osgi.service.metatype.ObjectClassDefinition;
 
+
 /**
  * The <code>MetaTypeInformationImpl</code> class implements the
  * <code>MetaTypeInformation</code> interface returned from the
@@ -43,7 +45,8 @@
  *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class MetaTypeInformationImpl implements MetaTypeInformation {
+public class MetaTypeInformationImpl implements MetaTypeInformation
+{
 
     // also defined in org.osgi.service.cm.ConfigurationAdmin, but copied
     // here to not create a synthetic dependency
@@ -59,68 +62,82 @@
 
     private Map metaTypeProviders;
 
-    protected MetaTypeInformationImpl(Bundle bundle) {
+
+    protected MetaTypeInformationImpl( Bundle bundle )
+    {
         this.bundle = bundle;
         this.pids = new TreeSet();
         this.factoryPids = new TreeSet();
         this.metaTypeProviders = new HashMap();
     }
 
+
     /*
      * (non-Javadoc)
      *
      * @see org.osgi.service.metatype.MetaTypeInformation#getBundle()
      */
-    public Bundle getBundle() {
+    public Bundle getBundle()
+    {
         return this.bundle;
     }
 
+
     /*
      * (non-Javadoc)
      *
      * @see org.osgi.service.metatype.MetaTypeInformation#getFactoryPids()
      */
-    public String[] getFactoryPids() {
-        return (String[]) this.factoryPids.toArray(new String[this.factoryPids.size()]);
+    public String[] getFactoryPids()
+    {
+        return ( String[] ) this.factoryPids.toArray( new String[this.factoryPids.size()] );
     }
 
+
     /*
      * (non-Javadoc)
      *
      * @see org.osgi.service.metatype.MetaTypeInformation#getPids()
      */
-    public String[] getPids() {
-        return (String[]) this.pids.toArray(new String[this.pids.size()]);
+    public String[] getPids()
+    {
+        return ( String[] ) this.pids.toArray( new String[this.pids.size()] );
     }
 
+
     /*
      * (non-Javadoc)
      *
      * @see org.osgi.service.metatype.MetaTypeProvider#getLocales()
      */
-    public String[] getLocales() {
-        if (this.locales == null) {
-            synchronized (this) {
+    public String[] getLocales()
+    {
+        if ( this.locales == null )
+        {
+            synchronized ( this )
+            {
                 Set newLocales = new TreeSet();
-                for (Iterator mi = this.metaTypeProviders.values().iterator(); mi.hasNext();) {
-                    MetaTypeProvider mtp = (MetaTypeProvider) mi.next();
-                    this.addValues(newLocales, mtp.getLocales());
+                for ( Iterator mi = this.metaTypeProviders.values().iterator(); mi.hasNext(); )
+                {
+                    MetaTypeProvider mtp = ( MetaTypeProvider ) mi.next();
+                    this.addValues( newLocales, mtp.getLocales() );
                 }
                 this.locales = newLocales;
             }
         }
 
-        return (String[]) this.locales.toArray(new String[this.locales.size()]);
+        return ( String[] ) this.locales.toArray( new String[this.locales.size()] );
     }
 
+
     /*
      * (non-Javadoc)
      *
      * @see org.osgi.service.metatype.MetaTypeProvider#getObjectClassDefinition(java.lang.String,
      *      java.lang.String)
      */
-    public ObjectClassDefinition getObjectClassDefinition(String id,
-            String locale) {
+    public ObjectClassDefinition getObjectClassDefinition( String id, String locale )
+    {
 
         if ( id == null || id.length() == 0 )
         {
@@ -142,6 +159,7 @@
         return ocd;
     }
 
+
     // ---------- internal support for metadata -------------------------------
 
     Designate getDesignate( String pid )
@@ -155,27 +173,33 @@
         return null;
     }
 
+
     // ---------- setters to fill the values -----------------------------------
 
-    protected void addMetaData(MetaData md) {
-        if (md.getDesignates() != null) {
+    protected void addMetaData( MetaData md )
+    {
+        if ( md.getDesignates() != null )
+        {
             // meta type provide to register by PID
-            DefaultMetaTypeProvider dmtp = new DefaultMetaTypeProvider(this.bundle, md);
+            DefaultMetaTypeProvider dmtp = new DefaultMetaTypeProvider( this.bundle, md );
 
             Iterator designates = md.getDesignates().values().iterator();
-            while (designates.hasNext()) {
-                Designate designate = (Designate) designates.next();
+            while ( designates.hasNext() )
+            {
+                Designate designate = ( Designate ) designates.next();
 
                 // get the OCD reference, ignore the designate if none
                 DesignateObject object = designate.getObject();
-                String ocdRef = (object == null) ? null : object.getOcdRef();
-                if (ocdRef == null) {
+                String ocdRef = ( object == null ) ? null : object.getOcdRef();
+                if ( ocdRef == null )
+                {
                     continue;
                 }
 
                 // get ocd for the reference, ignore designate if none
-                OCD ocd = (OCD) md.getObjectClassDefinitions().get(ocdRef);
-                if (ocd == null) {
+                OCD ocd = ( OCD ) md.getObjectClassDefinitions().get( ocdRef );
+                if ( ocd == null )
+                {
                     continue;
                 }
 
@@ -194,41 +218,58 @@
         }
     }
 
-    protected void addPids(String[] pids) {
-        this.addValues(this.pids, pids);
+
+    protected void addPids( String[] pids )
+    {
+        this.addValues( this.pids, pids );
     }
 
-    protected void removePid(String pid) {
-        this.pids.remove(pid);
+
+    protected void removePid( String pid )
+    {
+        this.pids.remove( pid );
     }
 
-    protected void addFactoryPids(String[] factoryPids) {
-        this.addValues(this.factoryPids, factoryPids);
+
+    protected void addFactoryPids( String[] factoryPids )
+    {
+        this.addValues( this.factoryPids, factoryPids );
     }
 
-    protected void removeFactoryPid(String factoryPid) {
-        this.factoryPids.remove(factoryPid);
+
+    protected void removeFactoryPid( String factoryPid )
+    {
+        this.factoryPids.remove( factoryPid );
     }
 
-    protected void addMetaTypeProvider(String key, MetaTypeProvider mtp) {
-        if (key != null && mtp != null) {
-            this.metaTypeProviders.put(key, mtp);
+
+    protected void addMetaTypeProvider( String key, MetaTypeProvider mtp )
+    {
+        if ( key != null && mtp != null )
+        {
+            this.metaTypeProviders.put( key, mtp );
             this.locales = null;
         }
     }
 
-    protected MetaTypeProvider removeMetaTypeProvider(String key) {
-        if (key != null) {
+
+    protected MetaTypeProvider removeMetaTypeProvider( String key )
+    {
+        if ( key != null )
+        {
             this.locales = null;
-            return (MetaTypeProvider) this.metaTypeProviders.remove(key);
+            return ( MetaTypeProvider ) this.metaTypeProviders.remove( key );
         }
 
         return null;
     }
 
-    private void addValues(Collection dest, Object[] values) {
-        if (values != null && values.length > 0) {
-            dest.addAll(Arrays.asList(values));
+
+    private void addValues( Collection dest, Object[] values )
+    {
+        if ( values != null && values.length > 0 )
+        {
+            dest.addAll( Arrays.asList( values ) );
         }
     }
 }
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeServiceImpl.java b/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeServiceImpl.java
index d4fbd31..d659f56 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeServiceImpl.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/MetaTypeServiceImpl.java
@@ -100,7 +100,8 @@
             try
             {
                 MetaData metaData = reader.parse( doc );
-                if (metaData != null) {
+                if ( metaData != null )
+                {
                     cmti.addMetaData( metaData );
                 }
             }
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java b/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java
index 03f86eb..771d89a 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java
@@ -163,13 +163,13 @@
 
         Properties props = new Properties( parentProperties );
         URL resURL = bundle.getEntry( resourceName );
-        
+
         // FELIX-607 backwards compatibility, support
         if ( resURL == null )
         {
             resURL = bundle.getEntry( MetaTypeService.METATYPE_DOCUMENTS_LOCATION + "/" + resourceName );
         }
-        
+
         if ( resURL != null )
         {
             InputStream ins = null;
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/Resources.java b/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/Resources.java
index 6a45754..29a043a 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/Resources.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/Resources.java
@@ -18,8 +18,10 @@
  */
 package org.apache.felix.metatype.internal.l10n;
 
+
 import java.util.Properties;
 
+
 /**
  * The <code>Resources</code> TODO
  *
@@ -30,21 +32,29 @@
 
     private String locale;
     private Properties resources;
-    
-    Resources(String locale, Properties resources) {
+
+
+    Resources( String locale, Properties resources )
+    {
         this.locale = locale;
         this.resources = resources;
     }
-    
-    public String getLocale() {
+
+
+    public String getLocale()
+    {
         return locale;
     }
-    
-    Properties getResources() {
+
+
+    Properties getResources()
+    {
         return resources;
     }
-    
-    public String getResource(String resourceName) {
-        return  resources.getProperty( resourceName, resourceName );
+
+
+    public String getResource( String resourceName )
+    {
+        return resources.getProperty( resourceName, resourceName );
     }
 }
diff --git a/metatype/src/test/java/org/apache/felix/metatype/MetaDataReaderTest.java b/metatype/src/test/java/org/apache/felix/metatype/MetaDataReaderTest.java
index f5d497f..8f10a10 100644
--- a/metatype/src/test/java/org/apache/felix/metatype/MetaDataReaderTest.java
+++ b/metatype/src/test/java/org/apache/felix/metatype/MetaDataReaderTest.java
@@ -66,6 +66,7 @@
         assertNull( mti.getObjectClassDefinitions() );
     }
 
+
     public void testOptionalAttributesInMetaData() throws IOException, XmlPullParserException
     {
         String name = "myattribute";
@@ -78,9 +79,10 @@
         assertNull( mti.getObjectClassDefinitions() );
         assertNotNull( mti.getOptionalAttributes() );
         assertEquals( 1, mti.getOptionalAttributes().size() );
-        assertEquals( value, mti.getOptionalAttributes().get(name) );
+        assertEquals( value, mti.getOptionalAttributes().get( name ) );
     }
 
+
     public void testWithNamespace_1_0_0() throws IOException, XmlPullParserException
     {
         String empty = "<metatype:MetaData xmlns:metatype=\"http://www.osgi.org/xmlns/metatype/v1.0.0\" "
