[
https://issues.jboss.org/browse/SHRINKWRAP-253?page=com.atlassian.jira.pl...
]
Aslak Knutsen commented on SHRINKWRAP-253:
------------------------------------------
{panel:title=JavaDoc Class.getResourceAsStream}
Finds a resource with a given name. The rules for searching resources associated with a
given class are implemented by the defining class loader of the class. This method
delegates to this object's class loader. If this object was loaded by the bootstrap
class loader, the method delegates to
ClassLoader.getSystemResourceAsStream(java.lang.String).
{panel}
Wouldn't simply using this work as expected?
{code}
return clazz.getResourceAsStream(getResourceNameOfClass(clazz));
{code}
ClassAsset / ClassLoaderAsset should not use TCCL
-------------------------------------------------
Key: SHRINKWRAP-253
URL:
https://issues.jboss.org/browse/SHRINKWRAP-253
Project: ShrinkWrap
Issue Type: Bug
Reporter: Aslak Knutsen
ClassAsset.openStream should not fall back to using TCCL if class.getClassLoader is null.
That means it's a System resource and static ClassLoader.getResourceAsStream should be
used instead.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira