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.
This commit is contained in:
William L. Thomson Jr 2016-11-02 22:38:38 -04:00
parent 8649c3ff79
commit 51a9b4dd11
No known key found for this signature in database
GPG Key ID: 4D71B2A483AA3350
1 changed files with 6 additions and 4 deletions

View File

@ -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);
}
}