[PATCH] OSGi Tutorials: Compilation issue with BundleContext.registerService()
-------------------------------------------------------------------------------
Key: FELIX-3251
URL: https://issues.apache.org/jira/browse/FELIX-3251
Project: Felix
Issue Type: Task
Components: Documentation
Environment: Windows XP (32-bit), Java 1.6.0_18
Reporter: Gaston Gonzalez
Priority: Trivial
I am new user of Felix and new to OSGi. Under Apache Felix 4.0.2, the call to
BundleContext.registerService () will not compile when a Properties instance is
passed. I am not sure if this is a bug in Felix 4.0.2 or just out-of-date
documentation in the following examples:
- Apache Felix Tutorial Example 2
- Apache Felix Tutorial Example 2b
The fix was relatively simple, replace:
Properties props = new Properties();
with:
Dictionary<String, String> props = new Hashtable<String, String>();
I hope this helps!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira