[jboss-jira] [JBoss JIRA] Commented: (JGRP-704) Configurator.startProtocolStack() throws NPE if cluster_name is null

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Mon Mar 3 10:02:08 EST 2008


    [ http://jira.jboss.com/jira/browse/JGRP-704?page=comments#action_12401096 ] 
            
Brian Stansberry commented on JGRP-704:
---------------------------------------

Yes, the related JBMESSAGING-1244 is the JIRA for the JBM issue.

> Configurator.startProtocolStack() throws NPE if cluster_name is null
> --------------------------------------------------------------------
>
>                 Key: JGRP-704
>                 URL: http://jira.jboss.com/jira/browse/JGRP-704
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.6.2
>            Reporter: Brian Stansberry
>         Assigned To: Bela Ban
>            Priority: Minor
>             Fix For: 2.6.3, 2.7
>
>
> Tries to pass the null to ConcurrentMap.keySet().contains(), which throws NPE:
> 2008-02-28 17:43:06,098 ERROR [org.jboss.messaging.util.ExceptionUtil] org.jboss.messaging.core.jmx.MessagingPostOfficeService at 1a0d916 startService
> org.jgroups.ChannelException: failed to start protocol stack
> at org.jgroups.JChannel.startStack(JChannel.java:1440)
> at org.jgroups.JChannel.connect(JChannel.java:362)
> at org.jboss.messaging.core.impl.postoffice.GroupMember.start(GroupMember.java:142)
>         ....
> Caused by: java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
> at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:745)
> at java.util.concurrent.ConcurrentHashMap$KeySet.contains(ConcurrentHashMap.java:1215)
> at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:85)
> at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:341)
> at org.jgroups.JChannel.startStack(JChannel.java:1437)
> ... 59 more
> In JChannel.startStack(String cluster_name) there's this which implies a null cluster_name is meant to work:
> if(cluster_name == null) {
>        if(log.isDebugEnabled()) log.debug("cluster_name is null, assuming unicast channel");
> }
> If it isn't meant to work any longer, then an IllegalArgumentException is better than 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