commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <ggreg...@seagullsw.com>
Subject RE: [lang] Adding method to StringUtils (Was: Introduction)
Date Thu, 26 Feb 2004 20:51:02 GMT
Hello,

A couple of comments:

- This method might be more at home in ArrayUtils.
- The method name should not start with a capital letter.
- When you submit a patch, do not forget to Javadocs boundary conditions and
special cases (null, empty arrays) and *unit tests*.

Cheers,
Gary

> -----Original Message-----
> From: James Stauffer [mailto:jstauffe@spscommerce.com]
> Sent: Thursday, February 26, 2004 12:39
> To: 'Jakarta Commons Developers List'
> Subject: RE: [lang] Adding method to StringUtils (Was: Introduction)
> 
> Sorry, I didn't see those rules.
> 
> We have the method below in our code and I was wondering what it takes to
> get something like that added (assuming it doesn't already exist) to
> StringUtils or CharSetUtils(or the appropriate place).  I read
> http://jakarta.apache.org/commons/patches.html so is there anything else
> to
> know?  Actually I am interested in reviewing my company's generic methods
> and adding anything extra to commons and switching over to using commons.
> 
>     /**
>      * Transposes the characters at the given index positions.
>      * i.e switches the characters at the given indexes.
>      */
>     public static void Transpose(char[] chars, int i, int j) {
>         char jc = chars[j];
>         chars[j] = chars[i];
>         chars[i] = jc;
>     }//end-method
> 
> James Stauffer
> 
> 
> 
> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
> 
> You need first to follow the 'rules' of the mailing list, which includes
> prefixing mail subjects by the relevant commons project. You might be
> talking about [lang] but I just don't know.
> 
> You might want to outline one idea in more detail.
> 
> Stephen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message