Repository: jclouds
Updated Branches:
  refs/heads/master f5523c941 -> 46f4a4e45


More robust line-ending detection for Bundles


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/46f4a4e4
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/46f4a4e4
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/46f4a4e4

Branch: refs/heads/master
Commit: 46f4a4e454700d56b1c2704edd2e5aa5b40259ba
Parents: f5523c9
Author: Zack Shoylev <[email protected]>
Authored: Wed Jan 21 18:24:50 2015 -0600
Committer: Zack Shoylev <[email protected]>
Committed: Thu Jan 22 12:45:54 2015 -0600

----------------------------------------------------------------------
 core/src/main/java/org/jclouds/osgi/Bundles.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/46f4a4e4/core/src/main/java/org/jclouds/osgi/Bundles.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/osgi/Bundles.java 
b/core/src/main/java/org/jclouds/osgi/Bundles.java
index cff5db5..25aa00c 100644
--- a/core/src/main/java/org/jclouds/osgi/Bundles.java
+++ b/core/src/main/java/org/jclouds/osgi/Bundles.java
@@ -41,7 +41,7 @@ public final class Bundles {
    /**
     * instantiates the supplied classnames using the bundle classloader, and 
casts to the supplied type. Any errors are
     * silently ignored.
-    * 
+    *
     * @return instances that could be instantiated without error.
     */
    public static <T> ImmutableSet<T> instantiateAvailableClasses(Bundle 
bundle, Iterable<String> classNames,
@@ -60,7 +60,7 @@ public final class Bundles {
    /**
     * A function that loads classes from the bundle, or returns null if the 
class isn't found or assignable by the input
     * parameter
-    * 
+    *
     * @param bundle
     *           where to find classes
     * @param clazz
@@ -87,7 +87,7 @@ public final class Bundles {
 
    /**
     * A function that instantiates classes or returns null, if it encounters 
any problems.
-    * 
+    *
     * @param clazz
     *           superclass to cast as
     */
@@ -108,7 +108,7 @@ public final class Bundles {
 
    /**
     * Reads the resource from a {@link Bundle}.
-    * 
+    *
     * @param resourcePath
     *           The path to the resource.
     * @param bundle
@@ -131,6 +131,6 @@ public final class Bundles {
    }
 
    private static Iterable<String> splitOrEmptyAndClose(InputStream in) throws 
IOException {
-      return Splitter.on('\n').omitEmptyStrings().split(toStringAndClose(in));
+      return 
Splitter.onPattern("\r?\n").omitEmptyStrings().split(toStringAndClose(in));
    }
 }

Reply via email to