felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1124397 - /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
Date Wed, 18 May 2011 19:43:33 GMT
Author: rickhall
Date: Wed May 18 19:43:32 2011
New Revision: 1124397

URL: http://svn.apache.org/viewvc?rev=1124397&view=rev
Log:
Fix repository delete bug. (FELIX-2958)

Modified:
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java?rev=1124397&r1=1124396&r2=1124397&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
Wed May 18 19:43:32 2011
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.bundlerepository.impl;
 
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
@@ -143,8 +144,16 @@ public class RepositoryAdminImpl impleme
     public synchronized boolean removeRepository(String uri)
     {
         initialize();
-
-        return m_repoMap.remove(uri) != null;
+        
+        try
+        {
+            URL url = new URL(uri);
+            return m_repoMap.remove(url.toExternalForm()) != null;
+        }
+        catch (MalformedURLException e)
+        {
+            return m_repoMap.remove(uri) != null;
+        }
     }
 
     public synchronized Repository[] listRepositories()



Mime
View raw message