On Apr 2, 2008, at 5:01 PM, dbkr at freenetproject.org wrote:

> Author: dbkr
> Date: 2008-04-02 22:01:06 +0000 (Wed, 02 Apr 2008)
> New Revision: 18922
>
> Modified:
>   trunk/freenet/src/freenet/client/async/USKManager.java
> Log:
> Fix logging confusion (assuming ERROR was intended, change if not)
>
>
> Modified: trunk/freenet/src/freenet/client/async/USKManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/client/async/USKManager.java     
> 2008-04-02 19:55:49 UTC (rev 18921)
> +++ trunk/freenet/src/freenet/client/async/USKManager.java     
> 2008-04-02 22:01:06 UTC (rev 18922)
> @@ -212,7 +212,7 @@
>                       USK clear = origUSK.clearCopy();
>                       USKCallback[] callbacks = (USKCallback[])  
> subscribersByClearUSK.get(clear);
>                       if(callbacks == null){ // maybe we should throw 
> something ? shall  
> we allow multiple unsubscriptions ?
> -                             if(Logger.shouldLog(Logger.MINOR, this)){
> +                             if(Logger.shouldLog(Logger.ERROR, this)){
>                                       Logger.error(this, "The callback is 
> null! it has been already  
> unsubscribed, hasn't it?");
>                                       new NullPointerException("The callback 
> is null! it has been  
> already unsubscribed, hasn't it?").printStackTrace();
>                               }

That logic still looks broken. We only throw if we would log the  
message???

--
Robert Hailey



Reply via email to