[jboss-jira] [JBoss JIRA] Created: (JBMICROCONT-430) Empty string property fails with NPE

Scott M Stark (JIRA) jira-events at lists.jboss.org
Tue May 12 21:48:46 EDT 2009


Empty string property fails with NPE
------------------------------------

                 Key: JBMICROCONT-430
                 URL: https://jira.jboss.org/jira/browse/JBMICROCONT-430
             Project: JBoss Microcontainer
          Issue Type: Bug
          Components: Deployment
    Affects Versions:  JBossMC-2.0.5.GA
            Reporter: Scott M Stark


If I configure a bean with a java.lang.String property separator as shown in this fragment:

    <bean name="WarManagerMBeanDeploymentNameBuilder"
        class="org.jboss.profileservice.management.mbean.ComplexMBeanDeploymentNameBuilder">
        <property name="prefix">//</property>
        <property name="separator"></property>
        <property name="keyNames">
            <list elementClass="java.lang.String">
                <value>host</value>
                <value>path</value>
            </list>
        </property>
    </bean>

The bean fails to deploy due to the following NPE:

18:42:39,452 ERROR [AbstractKernelController] Error installing to Configured: name=WarManagerMBeanDeploymentNameBuilder state=Instantiated
java.lang.RuntimeException: Error configuring property: separator for WarManagerMBeanDeploymentNameBuilder
...
Caused by: java.lang.NullPointerException
	at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:111)
	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
	at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:107)
	... 49 more

We should be mapping this to an empty string or null rather than failing in this way.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list