servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject servicemix-bundles git commit: [SM-2718]reflections bundle should strip the reference: prefix if a bundle is using reference protocol
Date Sun, 01 Nov 2015 13:53:58 GMT
Repository: servicemix-bundles
Updated Branches:
  refs/heads/master e8012a432 -> efc4746ea


[SM-2718]reflections bundle should strip the reference: prefix if a bundle is using reference
protocol


Project: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/commit/efc4746e
Tree: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/tree/efc4746e
Diff: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/diff/efc4746e

Branch: refs/heads/master
Commit: efc4746ea2007c2d17d52ad66b3c9406aacdfd27
Parents: e8012a4
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Sun Nov 1 21:53:20 2015 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Sun Nov 1 21:53:20 2015 +0800

----------------------------------------------------------------------
 pom.xml                                                   | 3 +++
 reflections-0.9.10/src/main/java/org/reflections/Vfs.java | 6 +++++-
 reflections-0.9.8/src/main/java/org/reflections/Vfs.java  | 6 +++++-
 reflections-0.9.9/src/main/java/org/reflections/Vfs.java  | 6 +++++-
 4 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/efc4746e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d2de561..d920bf1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,6 +122,9 @@
         <module>spring-webmvc-4.2.2.RELEASE</module>
         <module>spring-webmvc-portlet-4.2.2.RELEASE</module>
         <module>spring-websocket-4.2.2.RELEASE</module>
+        <module>reflections-0.9.8</module>
+        <module>reflections-0.9.9</module>
+        <module>reflections-0.9.10</module>
     </modules>
 
 </project>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/efc4746e/reflections-0.9.10/src/main/java/org/reflections/Vfs.java
----------------------------------------------------------------------
diff --git a/reflections-0.9.10/src/main/java/org/reflections/Vfs.java b/reflections-0.9.10/src/main/java/org/reflections/Vfs.java
index 1d89477..d0f3ecb 100644
--- a/reflections-0.9.10/src/main/java/org/reflections/Vfs.java
+++ b/reflections-0.9.10/src/main/java/org/reflections/Vfs.java
@@ -317,7 +317,11 @@ public abstract class Vfs {
 
             public Dir createDir(final URL url) throws Exception {
                 try {
-                    return new ZipDir(new JarFile(getFile(new URL(FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation()))));
+                    String location = FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation();
+                    if (location.startsWith("reference:")) {
+                        location = location.substring("reference:".length());
+                    }
+                    return new ZipDir(new JarFile(getFile(new URL(location))));
                 } catch (Exception e) {
                     e.printStackTrace();
                     throw e;

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/efc4746e/reflections-0.9.8/src/main/java/org/reflections/Vfs.java
----------------------------------------------------------------------
diff --git a/reflections-0.9.8/src/main/java/org/reflections/Vfs.java b/reflections-0.9.8/src/main/java/org/reflections/Vfs.java
index 1d89477..d0f3ecb 100644
--- a/reflections-0.9.8/src/main/java/org/reflections/Vfs.java
+++ b/reflections-0.9.8/src/main/java/org/reflections/Vfs.java
@@ -317,7 +317,11 @@ public abstract class Vfs {
 
             public Dir createDir(final URL url) throws Exception {
                 try {
-                    return new ZipDir(new JarFile(getFile(new URL(FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation()))));
+                    String location = FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation();
+                    if (location.startsWith("reference:")) {
+                        location = location.substring("reference:".length());
+                    }
+                    return new ZipDir(new JarFile(getFile(new URL(location))));
                 } catch (Exception e) {
                     e.printStackTrace();
                     throw e;

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/efc4746e/reflections-0.9.9/src/main/java/org/reflections/Vfs.java
----------------------------------------------------------------------
diff --git a/reflections-0.9.9/src/main/java/org/reflections/Vfs.java b/reflections-0.9.9/src/main/java/org/reflections/Vfs.java
index 1d89477..d0f3ecb 100644
--- a/reflections-0.9.9/src/main/java/org/reflections/Vfs.java
+++ b/reflections-0.9.9/src/main/java/org/reflections/Vfs.java
@@ -317,7 +317,11 @@ public abstract class Vfs {
 
             public Dir createDir(final URL url) throws Exception {
                 try {
-                    return new ZipDir(new JarFile(getFile(new URL(FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation()))));
+                    String location = FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation();
+                    if (location.startsWith("reference:")) {
+                        location = location.substring("reference:".length());
+                    }
+                    return new ZipDir(new JarFile(getFile(new URL(location))));
                 } catch (Exception e) {
                     e.printStackTrace();
                     throw e;


Mime
View raw message