geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r957601 - /geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java
Date Thu, 24 Jun 2010 16:13:29 GMT
Author: djencks
Date: Thu Jun 24 16:13:28 2010
New Revision: 957601

URL: http://svn.apache.org/viewvc?rev=957601&view=rev
Log:
eliminate deprecated xbeans usage

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java?rev=957601&r1=957600&r2=957601&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java
Thu Jun 24 16:13:28 2010
@@ -35,7 +35,6 @@ import javax.naming.NamingException;
 
 import org.apache.xbean.recipe.ObjectRecipe;
 import org.apache.xbean.recipe.Option;
-import org.apache.xbean.recipe.StaticRecipe;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -192,14 +191,7 @@ public class Holder implements Serializa
                     String jndiName = injection.getJndiName();
                     //our componentContext is attached to jndi at "java:" so we remove that
when looking stuff up in it
                     Object object = context.lookup("comp/env/" + jndiName);
-                    if (object instanceof String) {
-                        String string = (String) object;
-                        // Pass it in raw so it could be potentially converted to
-                        // another data type by an xbean-reflect property editor
-                        objectRecipe.setProperty(injection.getTargetName(), string);
-                    } else {
-                        objectRecipe.setProperty(injection.getTargetName(), new StaticRecipe(object));
-                    }
+                    objectRecipe.setProperty(injection.getTargetName(), object);
                 } catch (NamingException e) {
                     log.info("Could not look up " + injection.getJndiName(), e);
                     problems.add(e);



Mime
View raw message