Checking that StringBuffer constructor not called with a char!

Xavier Outhier <[email protected]>
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
Hi all,

I've just watched to 
http://www.denverjug.org/meetings/files/200408_Puzzles.pdf
(or the multimedia version: http://www.javalobby.org/eps/more-puzzlers/).
Yes, that's not really new stuff.

Check new StringBuffer(char)
I was wondering if there is a way to configure checkstyle to check
if the constructor of StringBuffer is not called with a char that is indeed
interpreted as an int and then set the size of the StringBuffer and not
initilize with the string of one character
So new StringBuffer('M'); should provide a warning

Do I new to write my own checker?

Thanks for any tips,

Xavier.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.