[shrinkwrap-issues] [JBoss JIRA] Updated: (SHRINKWRAP-290) NPE in ContainerBase.fileFromResource if the specified argument does not exist

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Mon Jun 27 10:12:23 EDT 2011


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

Andrew Rubinger updated SHRINKWRAP-290:
---------------------------------------

           Status: Resolved  (was: Pull Request Sent)
    Fix Version/s: 1.0.0-beta-4
       Resolution: Done


Upstream: https://github.com/shrinkwrap/shrinkwrap/commit/0e78c56c4aea9643b3ba6fa2e454996b8f45987d

> NPE in ContainerBase.fileFromResource if the specified argument does not exist
> ------------------------------------------------------------------------------
>
>                 Key: SHRINKWRAP-290
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-290
>             Project: ShrinkWrap
>          Issue Type: Bug
>            Reporter: Andrew Rubinger
>            Assignee: Ivan Pazmino
>             Fix For: 1.0.0-beta-4
>
>
> We're missing some good precondition checks in place.
> Erring code:
> final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb-security-test.jar");
>         jar.addPackage(AnnotatedSLSB.class.getPackage());
>         jar.addAsManifestResource("ejb/security/ejb-jar.xml", "ejb-jar.xml");  // HERE, if the file in the first arg does not exist
>         return jar;
> Makes:
> Caused by: java.lang.NullPointerException
> 	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.fileFromResource(ContainerBase.java:1481)
> 	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsManifestResource(ContainerBase.java:547)
> 	at org.jboss.as.test.spec.ejb3.security.EJBSecurityTestCase.createDeployment(EJBSecurityTestCase.java:47)
> 	... 55 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the shrinkwrap-issues mailing list