[freenet-dev] [freenet-cvs] r14883 - trunk/freenet/src/freenet/support

Matthew Toseland toad at amphibian.dyndns.org
Tue Sep 4 16:10:12 UTC 2007


Not sure I understand why the below is necessary, at least on 1.4 ... ?

On Sunday 26 August 2007 15:25, you wrote:
> Author: sback
> Date: 2007-08-26 14:25:18 +0000 (Sun, 26 Aug 2007)
> New Revision: 14883
> 
> Modified:
>    trunk/freenet/src/freenet/support/TimeSortedHashtable.java
> Log:
> Added a simple-and-always-allowed cast to provide class compatibility even 
to java 1.5
> 
> Modified: trunk/freenet/src/freenet/support/TimeSortedHashtable.java
> ===================================================================
> --- trunk/freenet/src/freenet/support/TimeSortedHashtable.java	2007-08-25 
21:55:29 UTC (rev 14882)
> +++ trunk/freenet/src/freenet/support/TimeSortedHashtable.java	2007-08-26 
14:25:18 UTC (rev 14883)
> @@ -32,7 +32,7 @@
>  	private class MyComparator implements Comparator {
>  
>  		public int compare(Object arg0, Object arg1) {
> -			if(arg0 instanceof Long && arg1 instanceof Long) return 
((Long)arg0).compareTo(arg1);
> +			if(arg0 instanceof Long && arg1 instanceof Long) return 
((Long)arg0).compareTo((Long)arg1);
>  			if(arg0 instanceof Element && arg1 instanceof Element) return 
((Element)arg0).compareTo(arg1);
>  			// Comparing a Long with an Element, because we are searching for an 
Element by the value of a Long.
>  			// Hence we do not need to consider the element value.
> 
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://emu.freenetproject.org/pipermail/devl/attachments/20070904/01d36265/attachment.pgp 


More information about the Devl mailing list