Author: pete.muir(a)jboss.org
Date: 2009-03-12 13:32:50 -0400 (Thu, 12 Mar 2009)
New Revision: 1948
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/InternalEjbDescriptor.java
Log:
WBRI-179
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/InternalEjbDescriptor.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/InternalEjbDescriptor.java 2009-03-12
17:19:47 UTC (rev 1947)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/InternalEjbDescriptor.java 2009-03-12
17:32:50 UTC (rev 1948)
@@ -21,6 +21,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -53,7 +54,11 @@
// Internally, Object.class is added to the type hierachy of an
// EnterpriseBean, so we need to represent that here. We can just use any
// of the local business interfaces
- localBusinessInterfacesJndiNames.put(Object.class,
ejbDescriptor.getLocalBusinessInterfaces().iterator().next().getJndiName());
+ Iterator<BusinessInterfaceDescriptor<?>> it =
ejbDescriptor.getLocalBusinessInterfaces().iterator();
+ if (it.hasNext())
+ {
+ localBusinessInterfacesJndiNames.put(Object.class, it.next().getJndiName());
+ }
removeMethods = new ArrayList<Method>();
for (Method removeMethod : ejbDescriptor.getRemoveMethods())
{