FELIX-553: handle opaque URIs

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@682008 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
index 27bb5b7..c26d826 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
@@ -179,7 +179,8 @@
         }
 
         URI tempURI = ObrUtils.findRepositoryXml( "", remoteOBR );
-        String repositoryName = new File( tempURI.getPath() ).getName();
+        String repositoryPath = tempURI.isOpaque() ? tempURI.getSchemeSpecificPart() : tempURI.getPath();
+        String repositoryName = new File( repositoryPath ).getName();
 
         Log log = getLog();
         ObrUpdate update;
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
index 8af1114..88816d8 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
@@ -146,7 +146,8 @@
         }
 
         URI tempURI = ObrUtils.findRepositoryXml( "", remoteOBR );
-        String repositoryName = new File( tempURI.getPath() ).getName();
+        String repositoryPath = tempURI.isOpaque() ? tempURI.getSchemeSpecificPart() : tempURI.getPath();
+        String repositoryName = new File( repositoryPath ).getName();
 
         Log log = getLog();
         ObrUpdate update;