Author: alessio.soldano(a)jboss.com
Date: 2013-07-19 14:16:31 -0400 (Fri, 19 Jul 2013)
New Revision: 17805
Modified:
common/trunk/src/main/java/org/jboss/ws/common/utils/DelegateClassLoader.java
Log:
[JBWS-3669] Use getResourceAsStream from ModuleClassLoader
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/DelegateClassLoader.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/utils/DelegateClassLoader.java 2013-07-19
08:46:26 UTC (rev 17804)
+++
common/trunk/src/main/java/org/jboss/ws/common/utils/DelegateClassLoader.java 2013-07-19
18:16:31 UTC (rev 17805)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2013, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -129,17 +129,7 @@
@Override
public InputStream getResourceAsStream(final String name)
{
- URL foundResource = getResource(name);
- if (foundResource != null)
- {
- try
- {
- return foundResource.openStream();
- }
- catch (IOException e)
- {
- }
- }
- return null;
+ InputStream is = parent.getResourceAsStream(name);
+ return (is == null) ? delegate.getResourceAsStream(name) : is;
}
}
\ No newline at end of file