xml: Fix compiler warnings
@@ -2,20 +2,23 @@ package org.osgi.impl.bundle.jaxp;
import java.util.Hashtable;
-import javax.xml.parsers.*;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
import org.osgi.util.xml.XMLParserActivator;
public class JaxpActivator implements BundleActivator {
+ @Override
public void start(BundleContext context) throws Exception {
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
try {
if (f != null) {
f.setNamespaceAware(true);
f.setValidating(true);
- Hashtable properties = new Hashtable();
+ Hashtable<String,Object> properties = new Hashtable<>();
properties.put(XMLParserActivator.PARSER_NAMESPACEAWARE, Boolean.valueOf(f.isNamespaceAware()));
properties.put(XMLParserActivator.PARSER_VALIDATING,
Boolean.valueOf(f.isValidating()));
@@ -33,7 +36,7 @@ public class JaxpActivator implements BundleActivator {
if (s != null) {
s.setNamespaceAware(true);
s.setValidating(true);
- Hashtable properties = new Hashtable();
+ Hashtable<String,Object> properties = new Hashtable<>();
properties.put(XMLParserActivator.PARSER_NAMESPACEAWARE,
Boolean.valueOf(s.isNamespaceAware()));
properties.put(XMLParserActivator.PARSER_VALIDATING,
@@ -49,6 +52,8 @@ public class JaxpActivator implements BundleActivator {
}
}
+ @Override
public void stop(BundleContext context) throws Exception {
+ // nothing to do
}
}
