diff --git a/pom.xml b/pom.xml
index c5141b2e..5ba48f13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.fasterxml
oss-parent
- 38
+ 39
com.fasterxml.woodstox
diff --git a/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java b/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java
index 0ad84029..b233267c 100644
--- a/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java
+++ b/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java
@@ -1,5 +1,7 @@
package com.ctc.wstx.osgi;
+import java.util.Dictionary;
+
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -23,17 +25,21 @@ public WstxBundleActivator() { }
* Method called on activation. We need to register all providers we have at
* this point.
*/
+ @SuppressWarnings("rawtypes") // for compatibility between older and new OSGi-core jars
@Override
public void start(BundleContext ctxt)
{
InputFactoryProviderImpl inputP = new InputFactoryProviderImpl();
- ctxt.registerService(Stax2InputFactoryProvider.class.getName(), inputP, inputP.getProperties());
+ final Dictionary inputProps = inputP.getProperties();
+ ctxt.registerService(Stax2InputFactoryProvider.class.getName(), inputP, inputProps);
OutputFactoryProviderImpl outputP = new OutputFactoryProviderImpl();
- ctxt.registerService(Stax2OutputFactoryProvider.class.getName(), outputP, outputP.getProperties());
+ final Dictionary outputProps = outputP.getProperties();
+ ctxt.registerService(Stax2OutputFactoryProvider.class.getName(), outputP, outputProps);
ValidationSchemaFactoryProviderImpl[] impls = ValidationSchemaFactoryProviderImpl.createAll();
for (int i = 0, len = impls.length; i < len; ++i) {
ValidationSchemaFactoryProviderImpl impl = impls[i];
- ctxt.registerService(Stax2ValidationSchemaFactoryProvider.class.getName(), impl, impl.getProperties());
+ final Dictionary implProps = impl.getProperties();
+ ctxt.registerService(Stax2ValidationSchemaFactoryProvider.class.getName(), impl, implProps);
}
}
@@ -43,4 +49,3 @@ public void stop(BundleContext ctxt) {
// deactivation.
}
}
-