[jboss-jira] [JBoss JIRA] Resolved: (JBDEPLOY-223) isRelevant ignores required string input
Ales Justin (JIRA)
jira-events at lists.jboss.org
Thu Nov 12 03:26:05 EST 2009
[ https://jira.jboss.org/jira/browse/JBDEPLOY-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ales Justin resolved JBDEPLOY-223.
----------------------------------
Fix Version/s: JBDEPLOY-2.1.0.Alpha1
Resolution: Rejected
Assignee: Ales Justin
DeployersImpl::isRelevant is a quick check, more complex checks should be done in deployers itself.
In this case you should simply use / extend AbstractAllInputDeployer.
Mostly inputs are used for natural ordering, meaning not all are required.
And AbstractAllInputDeployer handles this properly - via optional inputs.
> 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