On Thursday 14 August 2008 08:40, j16sdiz at freenetproject.org wrote:
> Author: j16sdiz
> Date: 2008-08-14 07:40:13 +0000 (Thu, 14 Aug 2008)
> New Revision: 21832
> 
> Modified:
>    trunk/freenet/src/freenet/config/Config.java
>    trunk/freenet/src/freenet/config/PersistentConfig.java
>    trunk/freenet/src/freenet/config/SubConfig.java
>    trunk/freenet/src/freenet/config/WrapperConfig.java
> Log:
> Generic
> 
> Modified: trunk/freenet/src/freenet/config/SubConfig.java
> ===================================================================
> --- trunk/freenet/src/freenet/config/SubConfig.java   2008-08-14 07:39:51 UTC 
(rev 21831)
> +++ trunk/freenet/src/freenet/config/SubConfig.java   2008-08-14 07:40:13 UTC 
(rev 21832)
> @@ -304,15 +304,11 @@
>               return prefix;
>       }
>       
> -     public int compareTo(Object o){
> -             if((o == null) || !(o instanceof SubConfig)) return 0;
> -             else{
> -                     SubConfig second = (SubConfig) o;
> -                     if(this.getPrefix().compareTo(second.getPrefix())>0)
> -                             return 1;
> -                     else
> -                             return -1;
> -             }
> +     public int compareTo(SubConfig second) {
> +             if (this.getPrefix().compareTo(second.getPrefix()) > 0)
> +                     return 1;
> +             else
> +                     return -1;
>       }

Why doesn't this break Comparable ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080822/fb16fec9/attachment.pgp>

Reply via email to