Adrian Crum wrote:
>
>> Comments are welcome.
>
Your first mistake! heh
It does not appear my trunk checkout has these classes in them ... I am
guessing that the use here is in standard classes (not in junit testers).
If you have a second to look at my patch associated with OFBIZ-3670; I
provided a BaseTestCase that provides similar assertions that add-on to the
set provided by junit (I am taking assertEmpty type guys that use the
UtilValidate.isEmpty) ... If the intent was to do this from unit testers I
would consider putting them in this base class.
As for comments, I would _consider_ the following minor tweaks ...
a) (if possible) create an org.ofbiz.base.util.Validate that extends the one
from Apache commons with your enhancement
b) would consider overloading "notNull" rather than introducing a new method
c) without seeing the class, my guess is that you have it overloaded to
support n name/value pairs (where n is arbitrarily largish ... like 6) :)
d) may consider creating a Pair object so we could have a signature
something like ..
Validate.notNull(Pair.create("foo", foo), Pair.create("bar", bar));
public static void notNull(Pair... objects) {
...
}
You can also provide a notNull that just takes an open-ended set of objects
and does what the apache commons implementation does (just on each one). Ok
those are my ramblings ...
--
View this message in context:
http://n4.nabble.com/Re-svn-commit-r934179-in-ofbiz-trunk-framework-base-build-xml-src-org-ofbiz-base-util-Assert-java-sra-tp1840515p1840770.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.