Repository: jclouds Updated Branches: refs/heads/master 8649c3ff7 -> 0b48d4a25
org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java: Switched from Properties to HashMap to fix compilation issues. Where Properties is not of type Dictionary<String, ?>. This passes the right type to bundleContext.registerService. Also corrects the first argument, String -> String[], same issue wrong type passed. Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/51a9b4dd Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/51a9b4dd Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/51a9b4dd Branch: refs/heads/master Commit: 51a9b4dd11d293569d5312785b95d8d776e9b749 Parents: 8649c3f Author: William L. Thomson Jr <[email protected]> Authored: Wed Nov 2 22:38:38 2016 -0400 Committer: William L. Thomson Jr <[email protected]> Committed: Wed Nov 2 22:54:17 2016 -0400 ---------------------------------------------------------------------- .../functionloader/osgi/BundleFunctionLoader.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/51a9b4dd/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java ---------------------------------------------------------------------- diff --git a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java index 62eb292..518a92e 100644 --- a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java +++ b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java @@ -18,8 +18,9 @@ package org.jclouds.scriptbuilder.functionloader.osgi; import java.io.IOException; import java.net.URL; +import java.util.Dictionary; import java.util.Enumeration; -import java.util.Properties; +import java.util.HashMap; import org.jclouds.scriptbuilder.domain.OsFamily; import org.jclouds.scriptbuilder.domain.ShellToken; @@ -98,9 +99,10 @@ public class BundleFunctionLoader implements FunctionLoader { } private void registerFunction(String functions) { - Properties properties = new Properties(); - properties.put("function", functions); - registration = bundleContext.registerService(FunctionLoader.class.getName(), this, properties); + String[] className = { FunctionLoader.class.getName() }; + Dictionary dictionary = new HashMap<String, Object>(); + dictionary.put("function", functions); + registration = bundleContext.registerService(className, this, dictionary); } }
