felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r809484 - in /felix/trunk/karaf/gshell: gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java
Date Mon, 31 Aug 2009 07:36:47 GMT
Author: gnodet
Date: Mon Aug 31 07:36:47 2009
New Revision: 809484

URL: http://svn.apache.org/viewvc?rev=809484&view=rev
Log:
Remove two harmless exceptions at startup time

Modified:
    felix/trunk/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java
    felix/trunk/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java

Modified: felix/trunk/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java?rev=809484&r1=809483&r2=809484&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java
(original)
+++ felix/trunk/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java
Mon Aug 31 07:36:47 2009
@@ -81,6 +81,12 @@
 
     public synchronized void init() throws Exception {
         try {
+            if (!storageLocation.isFile()) {
+                if (storageLocation.exists()) {
+                    LOGGER.error("Instances storage location should be a file: " + storageLocation);
+                }
+                return;
+            }
             Properties storage = loadStorage(storageLocation);
             int count = Integer.parseInt(storage.getProperty("count", "0"));
             defaultPortStart = Integer.parseInt(storage.getProperty("port", Integer.toString(defaultPortStart)));

Modified: felix/trunk/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java?rev=809484&r1=809483&r2=809484&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java
(original)
+++ felix/trunk/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java
Mon Aug 31 07:36:47 2009
@@ -52,7 +52,9 @@
     }
 
     public void unregister(ServiceReference reference) {
-        completers.remove(reference);
+        if (reference != null) {
+            completers.remove(reference);
+        }
     }
 
     private Set<String> getNames(ServiceReference reference) {



Mime
View raw message