Generify CandidateComparator (FELIX-2035)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@949049 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/CandidateComparator.java b/framework/src/main/java/org/apache/felix/framework/resolver/CandidateComparator.java
index 9ce4c31..5e85776 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/CandidateComparator.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/CandidateComparator.java
@@ -23,13 +23,10 @@
 import org.osgi.framework.Constants;
 import org.osgi.framework.Version;
 
-public class CandidateComparator implements Comparator
+public class CandidateComparator implements Comparator<Capability>
 {
-    public int compare(Object arg1, Object arg2)
+    public int compare(Capability cap1, Capability cap2)
     {
-        Capability cap1 = (Capability) arg1;
-        Capability cap2 = (Capability) arg2;
-
         // First check resolved state, since resolved capabilities have priority
         // over unresolved ones. Compare in reverse order since we want to sort
         // in descending order.