[jboss-cvs] JBossAS SVN: r61661 - trunk/ejb3/src/main/org/jboss/injection.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Mar 24 23:01:21 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-03-24 23:01:21 -0400 (Sat, 24 Mar 2007)
New Revision: 61661

Modified:
   trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
Log:
Cleanup the multiple statements per line

Modified: trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java	2007-03-25 02:54:33 UTC (rev 61660)
+++ trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java	2007-03-25 03:01:21 UTC (rev 61661)
@@ -24,6 +24,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.naming.Util;
 
+import javax.naming.Context;
 import javax.naming.NameNotFoundException;
 import javax.naming.LinkRef;
 import javax.naming.NamingException;
@@ -54,11 +55,11 @@
    public EjbEncInjector(String name, Class refClass, String ejbLink, String error)
    {
       this.refClass = refClass;
-      String refClassName = refClass == null ? "NULL" : refClass.getName();
       this.ejbLink = ejbLink;
       this.error = error;
       this.encName = name;
-      if (refClass == null && ejbLink == null) throw new RuntimeException("cannot have null refClass and ejbLink for encName: " + name);
+      if (refClass == null && ejbLink == null)
+         throw new RuntimeException("cannot have null refClass and ejbLink for encName: " + name);
    }
 
 
@@ -91,9 +92,11 @@
       }
       try
       {
-         if (jndiName == null) throw new RuntimeException("Failed to populate ENC: " + encName + " global jndi name was null");
+         if (jndiName == null)
+            throw new RuntimeException("Failed to populate ENC: " + encName + " global jndi name was null");
          log.debug(" " + encName + " --> " + jndiName);
-         Util.rebind(container.getEnc(), encName, new LinkRef(jndiName));
+         Context enc = container.getEnc();
+         Util.rebind(enc, encName, new LinkRef(jndiName));
       }
       catch (NamingException e)
       {




More information about the jboss-cvs-commits mailing list