Hi Gurkan, Any way to test it and maybe harness it in geronimo xbean? Typically it can only happen if the URL is wrongly formatted (means we should port a fix in xbean too) or the protocol is not supported (likely means a missing exclusion or new protocol handling in xbean). I saw some issues with .so in the past in tests but never managed to reproduce it and I know jrt brings a new protocol but thought we excluded it by default so if can confirm this case and if you have a few pointers it would be great, I would be happy to do the work in xbean about it.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> ---------- Forwarded message --------- De : <gerdo...@apache.org> Date: mer. 10 juin 2020 à 07:11 Subject: [openwebbeans] branch master updated: OWB-1328 NPE in AbstractMetaDataFactory To: comm...@openwebbeans.apache.org <comm...@openwebbeans.apache.org> This is an automated email from the ASF dual-hosted git repository. gerdogdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwebbeans.git The following commit(s) were added to refs/heads/master by this push: new b812c6f OWB-1328 NPE in AbstractMetaDataFactory new ff4c809 Merge branch 'master' of https://github.com/apache/openwebbeans b812c6f <https://github.com/apache/openwebbeansb812c6f> is described below commit b812c6ff7db69723d692efa1efd4dca00fd73c2a Author: Gurkan Erdogdu <cgurkanerdo...@gmail.com> AuthorDate: Wed Jun 10 08:10:54 2020 +0300 OWB-1328 NPE in AbstractMetaDataFactory --- .../corespi/scanner/AbstractMetaDataDiscovery.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AbstractMetaDataDiscovery.java b/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AbstractMetaDataDiscovery.java index 44febe9..c011670 100644 --- a/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AbstractMetaDataDiscovery.java +++ b/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AbstractMetaDataDiscovery.java @@ -43,6 +43,8 @@ import org.apache.xbean.finder.util.Files; import javax.decorator.Decorator; import javax.interceptor.Interceptor; + +import java.io.File; import java.io.IOException; import java.lang.annotation.Annotation; import java.net.URL; @@ -283,11 +285,14 @@ public abstract class AbstractMetaDataDiscovery implements BdaScannerService else { // we could check for META-INF/maven/org.apache.geronimo.specs presence there but this is faster - final String filename = Files.toFile(url).getName(); - if (filename.startsWith("geronimo-") && filename.contains("_spec")) - { - it.remove(); - } + File file = Files.toFile(url); + if(file!= null && file.exists()) { + final String filename = file.getName(); + if (filename.startsWith("geronimo-") && filename.contains("_spec")) + { + it.remove(); + } + } } } }