Andreas Hartmann wrote:
Hi Felix,

[email protected] schrieb:
Author: froethenbacher
Date: Mon Feb  9 04:00:51 2009
New Revision: 742247

URL: http://svn.apache.org/viewvc?rev=742247&view=rev
Log:
Started to replace deprecated Assert with Validate.

 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.util.NetUtils;
+import org.apache.commons.lang.Validate;

is there a special (functional) reason for using commons.lang.Validate? Should we prefer it over the Assert class from Spring?

This is not a functional reason, but the Spring Assert class
is mostly used internally by the Spring framework (see javadoc).
Commons-lang's Validate is commonly used for argument validation
(throws IllegalArgumentException).

While replacing Assert's with Validate's I came across a few
Assert which were used in the sense of a Java 'assert' statement.
We should also fix this and use Validate for argument validation
only.

- Felix


Apart from the functional aspect, I think it is a good idea to use Commons – we should rather create dependencies to Apache libraries than to Spring.

-- Andreas




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to