From 51a9b4dd11d293569d5312785b95d8d776e9b749 Mon Sep 17 00:00:00 2001 From: "William L. Thomson Jr" Date: Wed, 2 Nov 2016 22:38:38 -0400 Subject: [PATCH] org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java: Switched from Properties to HashMap to fix compilation issues. Where Properties is not of type Dictionary. This passes the right type to bundleContext.registerService. Also corrects the first argument, String -> String[], same issue wrong type passed. --- .../functionloader/osgi/BundleFunctionLoader.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 62eb29265e..518a92ea2e 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(); + dictionary.put("function", functions); + registration = bundleContext.registerService(className, this, dictionary); } }