diff options
author | Alexander Kurtakov | 2015-02-23 19:30:43 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2015-02-24 17:02:51 +0000 |
commit | f92c74ac081d929a7ce96a85b26bf60b5364a101 (patch) | |
tree | 5a1aa1399e9457f34e46d10ae3eaadeeadc3e662 /bundles/org.eclipse.equinox.p2.artifact.repository | |
parent | 35349322363fd8fd75eb82abba9cb6ee0a86bb1a (diff) | |
download | rt.equinox.p2-f92c74ac081d929a7ce96a85b26bf60b5364a101.tar.gz rt.equinox.p2-f92c74ac081d929a7ce96a85b26bf60b5364a101.tar.xz rt.equinox.p2-f92c74ac081d929a7ce96a85b26bf60b5364a101.zip |
Bug 460627 - Fix compiler problems from generified IAdaptable#getAdapter
Generify where needed and bump the min version requirement for
o.e.core.runtime and o.e.equinox.common to ensure that generified
dependency will be used.
Change-Id: I3e177a3c8384b5aaabe4c77c949e9802e53923b1
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
2 files changed, 6 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF index 54771a068..1ec3b397a 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF @@ -31,7 +31,7 @@ Export-Package: org.eclipse.equinox.internal.p2.artifact.processing;x-friends:=" org.eclipse.equinox.p2.ui, org.eclipse.equinox.p2.publisher, org.eclipse.equinox.p2.updatesite" -Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)", +Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.7.0,4.0.0)", org.eclipse.equinox.registry, org.eclipse.equinox.p2.metadata Import-Package: javax.xml.parsers, diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java index 359b5c47e..fd012d359 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 IBM Corporation and others. + * Copyright (c) 2007, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,7 @@ * Cloudsmith Inc. - query indexes * Sonatype Inc - ongoing development * EclipseSource - file locking and ongoing development + * Red Hat Inc. - Fix compiler problems from generified IAdaptable#getAdapter *******************************************************************************/ package org.eclipse.equinox.internal.p2.artifact.repository.simple; @@ -220,13 +221,13 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme private static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$ private static final String ARTIFACT_UUID = "artifact.uuid"; //$NON-NLS-1$ static final private String BLOBSTORE = ".blobstore/"; //$NON-NLS-1$ - static final private String[][] PACKED_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed))", "${repoUrl}/plugins/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$ + static final private String[][] PACKED_MAPPING_RULES = {{"(& (classifier=osgi.bundle) (format=packed))", "${repoUrl}/plugins/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$ {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$ {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$ //$NON-NLS-2$ {"(& (classifier=org.eclipse.update.feature) (format=packed))", "${repoUrl}/features/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$ {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}}; //$NON-NLS-1$//$NON-NLS-2$ - static final private String[][] DEFAULT_MAPPING_RULES = { {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$ + static final private String[][] DEFAULT_MAPPING_RULES = {{"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$ {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$ //$NON-NLS-2$ {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}}; //$NON-NLS-1$//$NON-NLS-2$ private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$ @@ -694,9 +695,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme return mirrors.getMirrorLocation(baseLocation, monitor); } - // don't suppress the warning as it will cause warnings in the official build - // see bug 423628. Entire hierarchy should be refactored to use generics. - public Object getAdapter(Class adapter) { + public <T> T getAdapter(Class<T> adapter) { // if we are adapting to file or writable repositories then make sure we have a file location if (adapter == IFileArtifactRepository.class) if (!isLocal()) |