[jboss-jira] [JBoss JIRA] Reopened: (JBDEPLOY-223) isRelevant ignores required string input

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Thu Nov 12 17:18:28 EST 2009


     [ https://jira.jboss.org/jira/browse/JBDEPLOY-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler reopened JBDEPLOY-223:
-------------------------------------



Thanks for looking at this.

Could you please put in javadoc how this is intended to work?

My current understanding is:

* setInput(type) sets a required input. If the type is not attached the deployer does not get called
* addInput(String) adds an optional input used for ordering. The deployer gets called regardless of whether their is an object attached by the given name or not. 

> isRelevant ignores required string input
> ----------------------------------------
>
>                 Key: JBDEPLOY-223
>                 URL: https://jira.jboss.org/jira/browse/JBDEPLOY-223
>             Project: JBoss Deployers
>          Issue Type: Bug
>    Affects Versions: JBDEPLOY-2.0.8.GA
>            Reporter: Thomas Diesler
>            Assignee: Ales Justin
>             Fix For:  JBDEPLOY-2.1.0.Alpha1
>
>
> In DeployersImpl we have
>       if (deployer.isAllInputs() == false)
>       {
>          // No attachment for the input type
>          Class<?> input = deployer.getInput();
>          if (input != null && unit.getAttachment(input) == null)
>             return false;
>       }
> This only looks at the single input type, but not the set of String inputs that also might have been added
> ServletContainerInitializerDeployer for example does not set an input type, but multiple string inputs 
>    public ServletContainerInitializerDeployer()
>    {
>       setStage(DeploymentStages.POST_CLASSLOADER);
>       addInput(MergedJBossWebMetaDataDeployer.WEB_ORDER_ATTACHMENT_NAME);
>       addInput(MergedJBossWebMetaDataDeployer.WEB_SCIS_ATTACHMENT_NAME);
>       addOutput(SCI_ATTACHMENT_NAME);
>       addOutput(SCI_HANDLESTYPES_ATTACHMENT_NAME);
>    }
> This deloyer is called even though JBossWebMetaData nor any of the String inputs are attached. This leads to 
> Caused by: java.lang.NullPointerException
> 	at org.jboss.web.deployers.ServletContainerInitializerDeployer.deploy(ServletContainerInitializerDeployer.java:91)
> 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
> for OSGi WAR deployments.
> I could not find the documentation that spells out whether the String inputs should be considered for isRelevant() 

-- 
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