Sean, that's not how class loaders work AFAIK. the mere presence of an
import does not trigger the load. You have to touch it.

HOWEVER, if I am wrong, I will (a) buy the beer, and (b) add the
reflective code to get rid of the import.

On Sun, Jan 17, 2010 at 7:26 PM, Sean Owen <sro...@gmail.com> wrote:
> Nope, since it imports MersenneTwisterRNG, that class will be
> initialized the moment RandomUtils is loaded.
>
> On Mon, Jan 18, 2010 at 12:19 AM, Benson Margulies
> <bimargul...@gmail.com> wrote:
>> That would make a difference. If the code in RandomUtils never new's
>> the Mersenne class, then it's static blocks would never run. If
>> necessary, the Mersenne class could by loaded explicitly, but I don't
>> think we have to go that far.
>>
>> So the question to me is whether we lose any test quality by using the JDK 
>> RNG.
>>
>

Reply via email to