From 9c3c93b53f2f93b5b1753bc6af9e931a8c5d29c6 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 14 Jan 2022 18:48:00 +0100 Subject: [PATCH] [java] Update rule DoNotTerminateVM --- .ci/files/all-java.xml | 1 + .../src/main/resources/category/java/errorprone.xml | 10 +++++----- .../java/rule/errorprone/DoNotTerminateVMTest.java | 1 - .../lang/java/rule/errorprone/xml/DoNotTerminateVM.xml | 7 +++++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.ci/files/all-java.xml b/.ci/files/all-java.xml index 040fb26ada..a70730fff2 100644 --- a/.ci/files/all-java.xml +++ b/.ci/files/all-java.xml @@ -208,6 +208,7 @@ + diff --git a/pmd-java/src/main/resources/category/java/errorprone.xml b/pmd-java/src/main/resources/category/java/errorprone.xml index f493f38018..9fb7c0a844 100644 --- a/pmd-java/src/main/resources/category/java/errorprone.xml +++ b/pmd-java/src/main/resources/category/java/errorprone.xml @@ -1327,11 +1327,11 @@ This rule was called *DoNotCallSystemExit* until PMD 6.29.0. diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/DoNotTerminateVMTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/DoNotTerminateVMTest.java index dbc90d12de..2c6aa0f631 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/DoNotTerminateVMTest.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/DoNotTerminateVMTest.java @@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.java.rule.errorprone; import net.sourceforge.pmd.testframework.PmdRuleTst; -@org.junit.Ignore("Rule has not been updated yet") public class DoNotTerminateVMTest extends PmdRuleTst { // no additional unit tests } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/DoNotTerminateVM.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/DoNotTerminateVM.xml index 82fbeba58b..41a664672d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/DoNotTerminateVM.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/DoNotTerminateVM.xml @@ -7,6 +7,7 @@ basic violations 2 + 5,10 0 @@ -39,6 +44,7 @@ public class SystemCall { basic violations with Runtime 2 + 4,5 system exit in anonymous class inside main 1 + 6