commit | 3851159ca6326420eb24d72e06bb27a5c6d005ce | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Fri May 28 00:20:33 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Fri May 28 00:20:33 2010 +0000 |
tree | 955174d418f8c6b70407397263ebdbb6712373a5 | |
parent | 4829f8f1f611cb7b44703153bf1a5a0464321ac2 [diff] |
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.