From cfb74ffcc139e4ab901994d21fe1ba51c94fb647 Mon Sep 17 00:00:00 2001 From: Chris Custine Date: Sat, 12 Mar 2011 13:28:39 -0700 Subject: [PATCH] Fix for classloader issues in OSGi, web apps, etc. --- .../src/main/java/org/jclouds/scriptbuilder/util/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/util/Utils.java b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/util/Utils.java index 2e3d010417..3739757bf0 100644 --- a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/util/Utils.java +++ b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/util/Utils.java @@ -134,8 +134,8 @@ public class Utils { public static String writeFunctionFromResource(String function, OsFamily family) { try { - return CharStreams.toString(Resources.newReaderSupplier(Resources.getResource(String - .format("functions/%s.%s", function, ShellToken.SH.to(family))), Charsets.UTF_8)); + return CharStreams.toString(Resources.newReaderSupplier(Resources.getResource(Utils.class, String + .format("/functions/%s.%s", function, ShellToken.SH.to(family))), Charsets.UTF_8)); } catch (IOException e) { throw new FunctionNotFoundException(function, family, e); }