openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1808064 - in /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave: cxf/MeecrowaveBus.java openwebbeans/OWBTomcatWebScannerService.java
Date Mon, 11 Sep 2017 20:21:15 GMT
Author: struberg
Date: Mon Sep 11 20:21:14 2017
New Revision: 1808064

URL: http://svn.apache.org/viewvc?rev=1808064&view=rev
Log:
MEECROWAVE-64 fix NPE if Meecrowave is used in classic unit test

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBTomcatWebScannerService.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java?rev=1808064&r1=1808063&r2=1808064&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
Mon Sep 11 20:21:14 2017
@@ -58,7 +58,7 @@ public class MeecrowaveBus implements Bu
         });
 
         final Meecrowave.Builder builder = Meecrowave.Builder.class.cast(context.getAttribute("meecrowave.configuration"));
-        if (builder.isJaxrsProviderSetup()) {
+        if (builder != null && builder.isJaxrsProviderSetup()) {
             final List<Object> providers =
                     ofNullable(builder.getJaxrsDefaultProviders())
                             .map(s -> Stream.of(s.split(" *, *"))

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBTomcatWebScannerService.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBTomcatWebScannerService.java?rev=1808064&r1=1808063&r2=1808064&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBTomcatWebScannerService.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBTomcatWebScannerService.java
Mon Sep 11 20:21:14 2017
@@ -278,7 +278,7 @@ public class OWBTomcatWebScannerService
         if (path.startsWith("jar:file:") && path.endsWith(".jar!/")) {
             final int lastSep = path.substring(0, path.length() - 2).lastIndexOf('/');
             if (lastSep > 0) {
-                return filter.check(PLUGGABILITY, path.substring(lastSep + 1, path.length()
- 2)) ?
+                return filter != null && filter.check(PLUGGABILITY, path.substring(lastSep
+ 1, path.length() - 2)) ?
                         -1 : (path.indexOf(".jar") - 1 /*should be lastIndexOf but filterExcludedJar
logic would be broken*/);
             }
         }
@@ -288,7 +288,7 @@ public class OWBTomcatWebScannerService
             return -1;
         }
 
-        return filter.check(PLUGGABILITY, path.substring(filenameIdx)) ? -1 : (path.indexOf(".jar")
- 1);
+        return filter!= null && filter.check(PLUGGABILITY, path.substring(filenameIdx))
? -1 : (path.indexOf(".jar") - 1);
     }
 
     // replace init



Mime
View raw message