(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 23 Jul 2010 19:26:01 +0000 (19:26 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 23 Jul 2010 19:26:01 +0000 (19:26 +0000)
support/inject/src/test/java/org/wamblee/inject/TestInjectorFactory.java

index 5e3d1cf27896ae844958123c9bcbeb3992023e9f..b2c6c2d1c837a3817685ede426a09101062ebca5 100644 (file)
 package org.wamblee.inject;
 
 public class TestInjectorFactory implements InjectorFactory {
-    
+
     public static final String MAGIC_VALUE = "Hello";
 
     public static class TestInjector implements Injector {
         @Override
         public void inject(Object aComponent) {
-            Pojo pojo = (Pojo) aComponent;
-            pojo.setValue(MAGIC_VALUE);
+            if (aComponent instanceof Pojo) {
+                Pojo pojo = (Pojo) aComponent;
+                pojo.setValue(MAGIC_VALUE);
+            }
         }
     }