You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2010/02/18 17:48:04 UTC
svn commit: r911484 -
/felix/trunk/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
Author: gnodet
Date: Thu Feb 18 16:48:04 2010
New Revision: 911484
URL: http://svn.apache.org/viewvc?rev=911484&view=rev
Log:
[karaf] Fix NPE in the OBR refreshUrl command
Modified:
felix/trunk/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
Modified: felix/trunk/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java?rev=911484&r1=911483&r2=911484&view=diff
==============================================================================
--- felix/trunk/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java (original)
+++ felix/trunk/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java Thu Feb 18 16:48:04 2010
@@ -31,7 +31,7 @@
List<String> urls;
protected void doExecute(RepositoryAdmin admin) throws Exception {
- if (urls != null || urls.isEmpty()) {
+ if (urls != null && !urls.isEmpty()) {
for (String url : urls) {
admin.removeRepository(new URL(url));
admin.addRepository(new URL(url));