Re: Checking that StringBuffer constructor not called with a char!
"Oliver Burn" <[email protected]>
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
This type of Check required deep type information that Checkstyle does not collect. This type of Check is best written in FindBugs. On 2/13/07, Xavier Outhier <[email protected]> wrote: > > 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 > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > ------------------------------------------------------------------------- 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 _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user