diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index 97ec6554cc..a244cc3f6a 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -5,9 +5,11 @@ Fixed character reference in xml report - thanks to Seko Add C# support for CPD - thanks to Florian Bauer Fix small bug in Rule Designer UI Improve TooManyMethods rule - thanks to a patch from Riku Nykanen +Improve DoNotCallSystemExit - thanks to a patch from Steven Christou New Rule: - basic: DontCallThreadRun - thanks to Andy Throgmorton + Basic ruleset: DontCallThreadRun - thanks to Andy Throgmorton + Logging with Jakarta Commons ruleset: GuardDebugLogging September 14, 2011 - 4.2.6: Fixed bug 2920057 - False + : CloseRessource whith an external getter @@ -40,7 +42,6 @@ New rule: StrictExceptions : AvoidCatchingGenericException, AvoidLosingExceptionInformation Naming : GenericsNaming JSP: NoInlineScript - Logging with Jakarta Commons ruleset: GuardDebugLogging February 08, 2009 - 4.2.5: diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/j2ee/xml/DoNotCallSystemExit.xml b/pmd/regress/test/net/sourceforge/pmd/rules/j2ee/xml/DoNotCallSystemExit.xml index 0fcab6e245..276edb0538 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/j2ee/xml/DoNotCallSystemExit.xml +++ b/pmd/regress/test/net/sourceforge/pmd/rules/j2ee/xml/DoNotCallSystemExit.xml @@ -25,6 +25,20 @@ public class SystemCall { // OK application.exit(0); } +} + ]]> + + + + 1 + diff --git a/pmd/rulesets/j2ee.xml b/pmd/rulesets/j2ee.xml index 0daad1a786..ab2f35363b 100644 --- a/pmd/rulesets/j2ee.xml +++ b/pmd/rulesets/j2ee.xml @@ -267,13 +267,18 @@ public class Foo { class="net.sourceforge.pmd.rules.XPathRule" externalInfoUrl="http://pmd.sourceforge.net/rules/j2ee.html#DoNotCallSystemExit"> Web applications should not call System.exit(), since only the web container or the -application server should stop the JVM. +application server should stop the JVM. This rule also checks for the equivalent call Runtime.getRuntime().exit(). 3 @@ -281,9 +286,13 @@ application server should stop the JVM. diff --git a/pmd/xdocs/credits.xml b/pmd/xdocs/credits.xml index 30af4eb157..809cf9d22c 100644 --- a/pmd/xdocs/credits.xml +++ b/pmd/xdocs/credits.xml @@ -322,6 +322,7 @@
  • Andreas Dangel - GodClass and LawOfDemeter rules, several bugfixes and cleanup
  • Riku Nykanen - patch improving TooManyMethods rule
  • Tammo van Lessen - new rule GuardDebugLogging for Jakarta Commons Logging ruleset.
  • +
  • Steven Christou - patch improving DoNotCallSystemExit rule