commit | e8f2446190ce002f136783a7ce6ec22d31beee00 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Mon Aug 31 07:36:47 2009 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Mon Aug 31 07:36:47 2009 +0000 |
tree | 144b30552e13ee25e06736e4f42be0793f0d0369 | |
parent | 30fdfb9e4070c49c76b8c2c820ed5759512e8d7b [diff] |
Remove two harmless exceptions at startup time git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@809484 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java b/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java index 2e7ec98..5f7ea9f 100644 --- a/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java +++ b/karaf/gshell/gshell-admin/src/main/java/org/apache/felix/karaf/gshell/admin/internal/AdminServiceImpl.java
@@ -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)));
diff --git a/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java b/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java index 3030236..48143fe 100644 --- a/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java +++ b/karaf/gshell/gshell-console/src/main/java/org/apache/felix/karaf/gshell/console/completer/CommandsCompleter.java
@@ -52,7 +52,9 @@ } public void unregister(ServiceReference reference) { - completers.remove(reference); + if (reference != null) { + completers.remove(reference); + } } private Set<String> getNames(ServiceReference reference) {