[jboss-jira] [JBoss JIRA] Created: (JBAS-5475) NullPointerException when no invoker proxy bindings configured
Dan Ciarniello (JIRA)
jira-events at lists.jboss.org
Wed Apr 23 14:04:09 EDT 2008
NullPointerException when no invoker proxy bindings configured
--------------------------------------------------------------
Key: JBAS-5475
URL: http://jira.jboss.com/jira/browse/JBAS-5475
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossAS-4.2.2.GA
Environment: RHEL 4
JDK 1.6
Reporter: Dan Ciarniello
When no invoker proxy bindings are configured, org.jboss.metadata.BeanMetaData.getInvokerBindings() returns a NullPointerException. This is caused by the fix for JBAS-4444. org.jboss.metadata.ConfigurationMetaData.getInvokers() used to return a zero-length array when no bindings were configured but it now returns a null value which BeanMetaData.getInvokerBindings() does not properly handle:
public Iterator getInvokerBindings()
{
if (invokerBindings == null)
{
// See if there is a container default invoker name
String[] defaultNames = configuration.getInvokers();
if (defaultNames.length > 0) // Line 263 NPE
{
invokerBindings = new HashMap();
for (int count = 0; count < defaultNames.length; count++)
{
invokerBindings.put(defaultNames[count], getJndiName());
}
}
else
{
// Use the hard-coded defaults
defaultInvokerBindings();
}
}
return invokerBindings.keySet().iterator();
}
Changing line 263 to if(defaultNames!=null && defaultNames.length()>0) would eliminate the NPE.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list