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

George Gastaldi (JIRA) jira-events at lists.jboss.org
Sat Jun 25 17:21:23 EDT 2011


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

George Gastaldi updated SHRINKWRAP-290:
---------------------------------------

              Status: Pull Request Sent  (was: Open)
    Git Pull Request: https://github.com/shrinkwrap/shrinkwrap/pull/21


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