From f0dd2b0519a4c9647017eeb57df1445ce46fd0c7 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 5 Sep 2015 19:39:31 +0200 Subject: [PATCH] #1400 False positive with JUnit4TestShouldUseBeforeAnnotation --- .../src/main/resources/rulesets/java/migrating.xml | 4 ++-- .../xml/JUnit4TestShouldUseBeforeAnnotation.xml | 12 ++++++++++++ src/site/markdown/overview/changelog.md | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pmd-java/src/main/resources/rulesets/java/migrating.xml b/pmd-java/src/main/resources/rulesets/java/migrating.xml index 90e9cc884f..1e901a5b7a 100644 --- a/pmd-java/src/main/resources/rulesets/java/migrating.xml +++ b/pmd-java/src/main/resources/rulesets/java/migrating.xml @@ -311,7 +311,7 @@ JUnit 4 skips the setUp method and executes all methods annotated with @Before b @@ -347,7 +347,7 @@ JUnit 4 skips the tearDown method and executes all methods annotated with @After diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/migrating/xml/JUnit4TestShouldUseBeforeAnnotation.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/migrating/xml/JUnit4TestShouldUseBeforeAnnotation.xml index eaa5b2822e..a243d6c9eb 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/migrating/xml/JUnit4TestShouldUseBeforeAnnotation.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/migrating/xml/JUnit4TestShouldUseBeforeAnnotation.xml @@ -47,4 +47,16 @@ public class Foo { } ]]> + + #1400 False positive with JUnit4TestShouldUseBeforeAnnotation + 0 + + diff --git a/src/site/markdown/overview/changelog.md b/src/site/markdown/overview/changelog.md index 81e6e39677..44d4857567 100644 --- a/src/site/markdown/overview/changelog.md +++ b/src/site/markdown/overview/changelog.md @@ -15,6 +15,7 @@ * [#1370](https://sourceforge.net/p/pmd/bugs/1370/): ConsecutiveAppendsShouldReuse not detected properly on StringBuffer * [#1371](https://sourceforge.net/p/pmd/bugs/1371/): InsufficientStringBufferDeclaration not detected properly on StringBuffer * [#1384](https://sourceforge.net/p/pmd/bugs/1384/): NullPointerException in ConsecutiveLiteralAppendsRule +* [#1400](https://sourceforge.net/p/pmd/bugs/1400/): False positive with JUnit4TestShouldUseBeforeAnnotation * [#1401](https://sourceforge.net/p/pmd/bugs/1401/): False positive for StringBuilder.append called with constructor * [#1402](https://sourceforge.net/p/pmd/bugs/1402/): Windows-Only: File exclusions are not case insensitive