Now the component provides read-only access to the interfaces.
[utils] / system / general / src / main / java / org / wamblee / system / container / Container.java
index a69ac98eb7c41732527350327e3fdf48aa2193f4..fe744f74c8be805d95842588e173b724a7091e22 100644 (file)
@@ -194,7 +194,7 @@ public class Container extends AbstractComponent<Scope> {
      * @return Scope.
      */
     public Scope start() {
-        Scope scope = new DefaultScope(getProvidedInterfaces());
+        Scope scope = new DefaultScope(getProvidedInterfaces().toArray());
         return super.start(scope);
     }
 
@@ -202,7 +202,7 @@ public class Container extends AbstractComponent<Scope> {
     protected Scope doStart(Scope aExternalScope) {
         checkSealed();
         validate();
-        Scope scope = new DefaultScope(getProvidedInterfaces(), aExternalScope);
+        Scope scope = new DefaultScope(getProvidedInterfaces().toArray(), aExternalScope);
         ComponentGraph graph = doStartOptionalDryRun(scope, false);
         exposeProvidedInterfaces(graph, aExternalScope, scope);
         seal();