]
Andrew Rubinger updated SHRINKWRAP-290:
---------------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 1.0.0-beta-4
Resolution: Done
Upstream:
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: