openamf/src/java/org/openamf/invoker RankedMethod.java,1.5,1.6

[email protected]
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf/invoker
In directory sc8-pr-cvs1:/tmp/cvs-serv26081/src/java/org/openamf/invoker

Modified Files:
	RankedMethod.java 
Log Message:
cleaned up compareTo

Index: RankedMethod.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/RankedMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RankedMethod.java	6 May 2003 03:49:37 -0000	1.5
--- RankedMethod.java	6 May 2003 03:54:16 -0000	1.6
***************
*** 169,183 ****
  
  		int compareTo = 0;
! 		if (o instanceof RankedMethod) {
! 			double compareToRank = ((RankedMethod) o).getRank();
! 			if (getRank() > compareToRank) {
! 				compareTo = -1;
! 			} else if (getRank() < compareToRank) {
! 				compareTo = 1;
! 			} else {
! 				compareTo = 0;
! 			}
! 		} else {
! 			throw new ClassCastException();
  		}
  
--- 169,178 ----
  
  		int compareTo = 0;
! 		RankedMethod rankedMethod = (RankedMethod) o;
! 		
! 		if (getRank() > rankedMethod.getRank()) {
! 			compareTo = -1;
! 		} else if (getRank() < rankedMethod.getRank()) {
! 			compareTo = 1;
  		}
  




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.