On Friday, October 18, 2002, at 08:01 PM, Craig R. McClanahan wrote:


On Fri, 18 Oct 2002, robert burrell donkin wrote:

Date: Fri, 18 Oct 2002 19:47:07 +0100
From: robert burrell donkin <[EMAIL PROTECTED]>
Reply-To: Jakarta Commons Developers List <commons-
[EMAIL PROTECTED]>
To: Jakarta Commons Developers List <[EMAIL PROTECTED]>
Subject: Re: [beanutils] ready for 1.5 release?

the patch looks ok.

since it's a fix for a caching bug and all the caching code is private to
the class, it's going to be very hard to create a test case without
changing some of the variables from private to package (say).

This is an area that I've often wondered about -- how do most people deal
with writing unit tests for this sort of stuff?
i'd hoped that you might be able to tell me :)

In principle, I think it'd be OK to make things package instead of
private, if we also seal the JAR file (i.e. add a "Sealed:" attribute in
the manifest) to prevent application classes from declaring themselves
into the org.apache.commons.beanutils package and therefore gaining access
to these variables.
an alternative might be to provide a package method just for testing. we'd probably be ok just looking at the size of the cache and so we could add a method that just gives that information.

- robert


--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to