Re: Forbid static method call
"Leif Bladt (Inxmail GmbH)" <[email protected]> Fri, 27 Nov 2009 09:08:43 +0100
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, Am 26.11.2009 um 19:39 schrieb Niels Stargardt: > Hi > Am 26.11.2009 16:44, Leif Bladt (Inxmail GmbH) schrieb: >> Hi, >> >> I wonder if I can forbid the call of some specific static methods, like the JOptionPane.show... methods. I tried it with the IllegalToken check, but I couldn't manage to get it filtered on the needed method names. In fact it warned me about every single method call in the project :) > why you don't use the regexp-check? Good idea, but these calls can span across several lines, so at least the RegexpMultiline is needed. And to operate so low-level on a text-file makes it hard to ignore comments (all different flavors) in java files. So I think it's very hard to make this check robust with "pure" regular expressions. -- Software Developer ------------------------------------------------------ Inxmail GmbH Wentzingerstr. 21, 79106 Freiburg, Germany Tel: +49 761 296979-0, Fax: -9 [email protected], www.inxmail.de ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july