hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Recursive call in SSLIOSession?
Date Wed, 18 Mar 2009 16:19:50 GMT
sebb wrote:
> On 18/03/2009, Asankha C. Perera <asankha@apache.org> wrote:
>>
>>> SSLIOSession has:
>>>
>>> SSLIOSession implements IOSession ...
>>>
>>>    private final IOSession session;
>>> ...
>>>    public Object getAttribute(final String name) {
>>>        return this.session.getAttribute(name);
>>>    }
>>>
>>> So if session is actually an SSLIOSession - rather than IOSessionImpl
>>> - it looks this will result in a recursive call.
>>>
>>> Similarly for set().
>>>
>>> Or have I missed something (again?!)
>>>
>>>
>>  AFAIK the 'session' variable field in SSLIOSession always will hold an
>> instance of IOSessionImpl ..
> 
> Yes, but it could hold an instance of SSLIOS and then S.O.S.!
> 

I think the only way there could be an infinite recursion is if 
'session' variable were set to 'this', which is not possible. If one 
decorates SSLIOSession with another SSLIOSession things are bound to get 
ugly anyways, but I doubt there is any risk of an infinite recursion.

Oleg



>>  cheers
>>  asankha
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>>  For additional commands, e-mail: dev-help@hc.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message