FELIX-3535 finish enabling ServiceMetadata validation

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1346204 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java
index a047d77..92b107e 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java
@@ -79,14 +79,7 @@
      * @return the implemented interfaces as a string array
      */
     public String [] getProvides() {
-        String provides[] = new String[m_provides.size()];
-        Iterator it = m_provides.iterator();
-        int count = 0;
-        while (it.hasNext())
-        {
-            provides[count++] = it.next().toString();
-        }
-        return provides;
+        return (String[]) m_provides.toArray( new String[m_provides.size()] );
     }
 
     /**
@@ -100,5 +93,6 @@
             throw componentMetadata
                 .validationFailure( "At least one provided interface must be declared in the service element" );
         }
+        m_validated = true;
     }
 }