diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java index 83d6b8cc1..b4af9bfbe 100644 --- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java +++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Red Hat Inc. - Fix compiler problems from generified IAdaptable#getAdapter *******************************************************************************/ package org.eclipse.equinox.internal.p2.ui.model; @@ -28,12 +29,10 @@ public class ProfileElement extends RemoteQueriedElement { this.profileId = profileId; } - // don't suppress this warning as it will cause build-time warning - // see bug 423628. This should be possible to fix once - // the entire hierarchy adopts generics - public Object getAdapter(Class adapter) { + @SuppressWarnings("unchecked") + public <T> T getAdapter(Class<T> adapter) { if (adapter == IProfile.class) - return getQueryable(); + return (T) getQueryable(); return super.getAdapter(adapter); } |