Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-10-04 12:59:44 -0400
committerJohn Arthorne2010-10-04 12:59:44 -0400
commitfdfa6363a847d135212385970259283890243fd0 (patch)
tree36b2417d822242d54d84a3c63c36b010900b0f4d /bundles/org.eclipse.equinox.p2.repository
parent66d60f2ea0d94f246c00f8dd827d6c64bb7b0a88 (diff)
downloadrt.equinox.p2-fdfa6363a847d135212385970259283890243fd0.tar.gz
rt.equinox.p2-fdfa6363a847d135212385970259283890243fd0.tar.xz
rt.equinox.p2-fdfa6363a847d135212385970259283890243fd0.zip
Fixed compiler warnings related to genericsv20101004
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java14
2 files changed, 12 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
index 6f4e4448d..bdb23985f 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
@@ -10,9 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.persistence;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.net.*;
import java.util.List;
import java.util.StringTokenizer;
@@ -22,6 +19,8 @@ import org.eclipse.equinox.internal.p2.core.Activator;
import org.eclipse.equinox.internal.p2.core.StringPool;
import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
@@ -48,7 +47,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
protected StringPool stringPool = new StringPool();//used to eliminate string duplication
private IProgressMonitor monitor;
- private static ServiceTracker xmlTracker = null;
+ private static ServiceTracker<SAXParserFactory, SAXParserFactory> xmlTracker = null;
public XMLParser(BundleContext context, String pluginId) {
super();
@@ -77,10 +76,10 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
private synchronized static SAXParserFactory acquireXMLParsing(BundleContext context) {
if (xmlTracker == null) {
- xmlTracker = new ServiceTracker(context, SAXParserFactory.class.getName(), null);
+ xmlTracker = new ServiceTracker<SAXParserFactory, SAXParserFactory>(context, SAXParserFactory.class, null);
xmlTracker.open();
}
- return (SAXParserFactory) xmlTracker.getService();
+ return xmlTracker.getService();
}
protected synchronized static void releaseXMLParsing() {
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
index 695e2874d..f4cc4713d 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
@@ -32,10 +32,10 @@ public class Activator implements BundleActivator {
private static BundleContext context;
// tracker for ECF service
- private ServiceTracker retrievalFactoryTracker;
+ private ServiceTracker<IRetrieveFileTransferFactory, IRetrieveFileTransferFactory> retrievalFactoryTracker;
// tracker for protocolToFactoryMapperTracker
- private ServiceTracker protocolToFactoryMapperTracker = null;
+ private ServiceTracker<IFileTransferProtocolToFactoryMapper, IFileTransferProtocolToFactoryMapper> protocolToFactoryMapperTracker = null;
// The shared instance
private static Activator plugin;
@@ -79,7 +79,7 @@ public class Activator implements BundleActivator {
* @return a factory, or null, if configuration is incorrect
*/
public IRetrieveFileTransferFactory getRetrieveFileTransferFactory() {
- return (IRetrieveFileTransferFactory) getFileTransferServiceTracker().getService();
+ return getFileTransferServiceTracker().getService();
}
public synchronized void useJREHttpClient() {
@@ -126,9 +126,9 @@ public class Activator implements BundleActivator {
* "org.eclipse.ecf.provider.filetransfer" on first call.
* @return ServiceTracker
*/
- private synchronized ServiceTracker getFileTransferServiceTracker() {
+ private synchronized ServiceTracker<IRetrieveFileTransferFactory, IRetrieveFileTransferFactory> getFileTransferServiceTracker() {
if (retrievalFactoryTracker == null) {
- retrievalFactoryTracker = new ServiceTracker(Activator.getContext(), IRetrieveFileTransferFactory.class.getName(), null);
+ retrievalFactoryTracker = new ServiceTracker<IRetrieveFileTransferFactory, IRetrieveFileTransferFactory>(Activator.getContext(), IRetrieveFileTransferFactory.class, null);
retrievalFactoryTracker.open();
startBundle("org.eclipse.ecf"); //$NON-NLS-1$
startBundle("org.eclipse.ecf.provider.filetransfer"); //$NON-NLS-1$
@@ -138,10 +138,10 @@ public class Activator implements BundleActivator {
private IFileTransferProtocolToFactoryMapper getProtocolToFactoryMapper() {
if (protocolToFactoryMapperTracker == null) {
- protocolToFactoryMapperTracker = new ServiceTracker(context, IFileTransferProtocolToFactoryMapper.class.getName(), null);
+ protocolToFactoryMapperTracker = new ServiceTracker<IFileTransferProtocolToFactoryMapper, IFileTransferProtocolToFactoryMapper>(context, IFileTransferProtocolToFactoryMapper.class, null);
protocolToFactoryMapperTracker.open();
}
- return (IFileTransferProtocolToFactoryMapper) protocolToFactoryMapperTracker.getService();
+ return protocolToFactoryMapperTracker.getService();
}
private boolean startBundle(String bundleId) {

Back to the top