I agree with Michael. When did this become is this a design goal? I am against it. :-(
It is one thing to say, "I'll cut and paste [lang] code /into/ my own project, and yes, I know about duplicating code, not getting bug fixes, etc". It is another to say: "Let's inline APIs within [lang] to make it easier to cut and paste", and knowingly making lang *harder* to maintain *by deisgn*, this is not a good thing from my POV. This turns a project on its head from a "eat your own dog food"-style library into a set of macro like templates. We've broached this topic before in the context of cross-project dependencies. Each project decides whether to introduce a dependency or duplicate code, that's quite fine. But IMO, not within lang. ***If you want a cut and paste library, then create it in docs and let folks cut and paste from /that/ since they would not use the lang jar in the first place!*** Why muck up a jar that the described audience would not use? Sorry for the flame but this is a 'shake-my-head-in-disbelief' moment that I find discouraging. I say: stop the in-lining. Where will it stop, how do you decide which ones to in-line or not. Arg.... Thank you, Gary > -----Original Message----- > From: Michael Heuer [mailto:[EMAIL PROTECTED] On Behalf Of Michael > Heuer > Sent: Tuesday, June 01, 2004 15:10 > To: Jakarta Commons Developers List > Subject: [lang] Re: cvs commit: jakarta- > commons/lang/src/java/org/apache/commons/lang Validate.java > > > On 1 Jun 2004 [EMAIL PROTECTED] wrote: > > > scolebourne 2004/06/01 14:25:35 > > > > Modified: lang/src/java/org/apache/commons/lang Validate.java > > Log: > > Ensure Validate has no inter-lang dependencies > > I'm confused -- why shouldn't a class in [lang] have dependencies to > other classes in [lang]? Isn't this taking things too far?? > > michael > > > > Revision Changes Path > > 1.12 +6 -5 jakarta- > commons/lang/src/java/org/apache/commons/lang/Validate.java > > > > Index: Validate.java > > =================================================================== > > RCS file: /home/cvs/jakarta- > commons/lang/src/java/org/apache/commons/lang/Validate.java,v > > retrieving revision 1.11 > > retrieving revision 1.12 > > diff -u -r1.11 -r1.12 > > --- Validate.java 19 Feb 2004 21:04:03 -0000 1.11 > > +++ Validate.java 1 Jun 2004 21:25:35 -0000 1.12 > > @@ -38,6 +38,7 @@ > > * @version $Id$ > > */ > > public class Validate { > > + // Validate has no dependencies on other classes in Commons Lang > at present > > > > /** > > * Constructor. This class should not normally be instantiated. > > @@ -236,7 +237,7 @@ > > * @throws IllegalArgumentException if the array is empty > > */ > > public static void notEmpty(Object[] array, String message) { > > - if (ArrayUtils.isEmpty(array)) { > > + if (array == null || array.length == 0) { > > throw new IllegalArgumentException(message); > > } > > } > > @@ -255,7 +256,7 @@ > > * @throws IllegalArgumentException if the array is empty > > */ > > public static void notEmpty(Object[] array) { > > - if (ArrayUtils.isEmpty(array)) { > > + if (array == null || array.length == 0) { > > throw new IllegalArgumentException("The validated array > is empty"); > > } > > } > > @@ -356,7 +357,7 @@ > > * @throws IllegalArgumentException if the string is empty > > */ > > public static void notEmpty(String string, String message) { > > - if (StringUtils.isEmpty(string)) { > > + if (string == null || string.length() == 0) { > > throw new IllegalArgumentException(message); > > } > > } > > @@ -375,7 +376,7 @@ > > * @throws IllegalArgumentException if the string is empty > > */ > > public static void notEmpty(String string) { > > - if (StringUtils.isEmpty(string)) { > > + if (string == null || string.length() == 0) { > > throw new IllegalArgumentException("The validated string > is empty"); > > } > > } > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]