Menu

#5 TestResource class>>isAvailable always returns true?

open
nobody
None
5
2014-07-17
2009-04-28
Anonymous
No

Hi...

I reviewed the implementation of TestResource class>>isAvailable in several smalltalks (VAST 6, VAST 8, Visual Works 7.5 and Pharo) and all have the following implementation:

TestResource class>>isAvailable
^self current notNil and: [self current isAvailable]

I think this always initialize the resource... because current is implemented via lazy initialization.... "self current notNil" always returns true...

Maybe the implementation should be:

isAvailable
^current notNil and: [current isAvailable]

???

Discussion


Log in to post a comment.