From 62c7b916a732e11d973a9c3abdd33f5bdac6d314 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 23 Jul 2010 19:26:01 +0000 Subject: [PATCH] --- .../test/java/org/wamblee/inject/TestInjectorFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/support/inject/src/test/java/org/wamblee/inject/TestInjectorFactory.java b/support/inject/src/test/java/org/wamblee/inject/TestInjectorFactory.java index 5e3d1cf2..b2c6c2d1 100644 --- a/support/inject/src/test/java/org/wamblee/inject/TestInjectorFactory.java +++ b/support/inject/src/test/java/org/wamblee/inject/TestInjectorFactory.java @@ -16,14 +16,16 @@ 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); + } } } -- 2.31.1