openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1797218 - in /openwebbeans/meecrowave/trunk: meecrowave-core/src/main/java/org/apache/catalina/startup/MeecrowaveContextConfig.java meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java pom.xml
Date Thu, 01 Jun 2017 13:02:21 GMT
Author: rmannibucau
Date: Thu Jun  1 13:02:21 2017
New Revision: 1797218

URL: http://svn.apache.org/viewvc?rev=1797218&view=rev
Log:
MEECROWAVE-32 upgrade log4j2 and fix a potential NPE

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/catalina/startup/MeecrowaveContextConfig.java
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
    openwebbeans/meecrowave/trunk/pom.xml

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/catalina/startup/MeecrowaveContextConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/catalina/startup/MeecrowaveContextConfig.java?rev=1797218&r1=1797217&r2=1797218&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/catalina/startup/MeecrowaveContextConfig.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/catalina/startup/MeecrowaveContextConfig.java
Thu Jun  1 13:02:21 2017
@@ -18,6 +18,7 @@
  */
 package org.apache.catalina.startup;
 
+import org.apache.catalina.Context;
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleEvent;
 import org.apache.catalina.WebResource;
@@ -130,7 +131,7 @@ public class MeecrowaveContextConfig ext
     @Override
     public void lifecycleEvent(final LifecycleEvent event) {
         super.lifecycleEvent(event);
-        if (watcher != null && watcher.shouldRun()) {
+        if (watcher != null && watcher.shouldRun() && Context.class.cast(event.getLifecycle())
== context) {
             if (Lifecycle.AFTER_START_EVENT.equals(event.getType())) {
                 watcher.start();
             } else if (Lifecycle.BEFORE_STOP_EVENT.equals(event.getType())) {

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java?rev=1797218&r1=1797217&r2=1797218&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
Thu Jun  1 13:02:21 2017
@@ -84,17 +84,24 @@ public class ReloadOnChangeController im
 
     @Override
     public void close() {
+        if (!running) {
+            return;
+        }
         running = false;
         final long waitMs = bouncing * 2 + 5000 /*margin if redeploying, we can make it configurable
later*/;
-        try {
-            bouncer.join(waitMs);
-        } catch (final InterruptedException e) {
-            Thread.interrupted();
+        if (bouncer != null) {
+            try {
+                bouncer.join(waitMs);
+            } catch (final InterruptedException e) {
+                Thread.interrupted();
+            }
         }
-        try {
-            watcher.join(waitMs);
-        } catch (final InterruptedException e) {
-            Thread.interrupted();
+        if (watcher != null) {
+            try {
+                watcher.join(waitMs);
+            } catch (final InterruptedException e) {
+                Thread.interrupted();
+            }
         }
     }
 

Modified: openwebbeans/meecrowave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/pom.xml?rev=1797218&r1=1797217&r2=1797218&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/pom.xml (original)
+++ openwebbeans/meecrowave/trunk/pom.xml Thu Jun  1 13:02:21 2017
@@ -53,7 +53,7 @@
     <openwebbeans.version>1.7.3</openwebbeans.version>
     <cxf.version>3.1.11</cxf.version>
     <johnzon.version>1.1.0</johnzon.version>
-    <log4j2.version>2.8</log4j2.version>
+    <log4j2.version>2.8.2</log4j2.version>
     <deltaspike.version>1.7.2</deltaspike.version>
     <jaxb.version>2.2.11</jaxb.version>
     <openjpa.version>2.4.2</openjpa.version>



Mime
View raw message