code style improvements.
[utils] / system / general / src / test / java / org / wamblee / system / container / ContainerTest.java
index 25ec9bc231582572134759715b374889ba1d8e94..01f8a35f7c93b7685a109e638878849a2eb48a56 100644 (file)
@@ -1,24 +1,27 @@
 /*
- * Copyright 2007 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */
+ */ 
 package org.wamblee.system.container;
 
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
 import junit.framework.TestCase;
 
 import org.wamblee.general.Pair;
-
 import org.wamblee.system.core.Component;
 import org.wamblee.system.core.DefaultProvidedInterface;
 import org.wamblee.system.core.DefaultRequiredInterface;
@@ -29,15 +32,9 @@ import org.wamblee.system.core.RequiredInterface;
 import org.wamblee.system.core.Scope;
 import org.wamblee.system.core.StringComponent;
 import org.wamblee.system.core.SystemAssemblyException;
-
 import org.wamblee.test.AssertionUtils;
 import org.wamblee.test.EventTracker;
 
-import java.io.Serializable;
-
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * 
  * @author $author$
@@ -222,12 +219,19 @@ public class ContainerTest extends TestCase {
             Component<?> comp = new Application();
             Container system = new Container("top").addComponent(comp);
             Container system2 = new Container("top2").addComponent(comp);
+            
+            ignoredVariable(system);
+            ignoredVariable(system2);
         } catch (SystemAssemblyException e) {
             return;
         }
 
         fail();
     }
+    
+    private static void ignoredVariable(Object aObject) { 
+        // for findbugs.
+    }
 
     public void testCompositeWithExternalDependencesProvided() {
         Component<?> environment = new Environment();
@@ -553,7 +557,7 @@ public class ContainerTest extends TestCase {
         Scope external = new DefaultScope(new ProvidedInterface[0]);
         external.publishInterface(provided, 100);
 
-        Scope scope = container.start(external);
+        container.start(external);
     }
 
     public void testProvidedInterfaces() {
@@ -631,7 +635,7 @@ public class ContainerTest extends TestCase {
         container.getRequiredInterfaces().get(1).setProvider(x);
         container.getRequiredInterfaces().get(2).setProvider(y);
 
-        Scope runtime = container.start(externalScope);
+        container.start(externalScope);
 
         assertEquals("y-value", app.getString());
     }