Author: peteroyle
Date: 2010-04-28 10:30:23 -0400 (Wed, 28 Apr 2010)
New Revision: 6184
Modified:
java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java
Log:
WELDSE-10: Applied patch from Koichi Kobayashi to support beans.xml files from multiple
archives.
Modified:
java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java
===================================================================
---
java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java 2010-04-28
13:29:48 UTC (rev 6183)
+++
java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java 2010-04-28
14:30:23 UTC (rev 6184)
@@ -139,6 +139,7 @@
{
log.trace("archive: " + file);
+ String archiveUrl = "jar:" + file.toURI().toURL().toExternalForm() +
"!/";
ZipFile zip = new ZipFile(file);
Enumeration<? extends ZipEntry> entries = zip.entries();
@@ -146,7 +147,7 @@
{
ZipEntry entry = entries.nextElement();
String name = entry.getName();
- handle(name, getClassLoader().getResource(name));
+ handle(name, new URL(archiveUrl + name));
}
}
catch (ZipException e)