Title: [681] trunk/components/base/src/main/java/org/servicemix/components/AbstractComponent.java: Fix logging statements, and remove possible NPE
Revision
681
Author
gnt
Date
2005-10-26 19:21:10 -0400 (Wed, 26 Oct 2005)

Log Message

Fix logging statements, and remove possible NPE

Modified Paths


Diff

Modified: trunk/components/base/src/main/java/org/servicemix/components/AbstractComponent.java (680 => 681)

--- trunk/components/base/src/main/java/org/servicemix/components/AbstractComponent.java	2005-10-26 23:19:00 UTC (rev 680)
+++ trunk/components/base/src/main/java/org/servicemix/components/AbstractComponent.java	2005-10-26 23:21:10 UTC (rev 681)
@@ -209,7 +209,7 @@
         } catch (JBIException e) {
             throw e;
         } catch (Exception e) {
-            throw new JBIException("Error calling init", e);
+            throw new JBIException("Error calling shutdown", e);
         }
     }
 
@@ -309,14 +309,18 @@
         } catch (JBIException e) {
             throw e;
         } catch (Exception e) {
-            throw new JBIException("Error calling init", e);
+            throw new JBIException("Error calling stop", e);
         }
     }
 
     protected void doStop() throws Exception {
-        this.meListener.interrupt();
-        this.meListener.join();
-        this.workManager.doStop();
+        if (this.meListener != null) {
+            this.meListener.interrupt();
+            this.meListener.join();
+        }
+        if (this.workManager != null) {
+            this.workManager.doStop();
+        }
     }
 
 }

Reply via email to