From 44a8c0defe26f76c6f2b7afec870c7cae49a8448 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sun, 24 Jan 2016 17:17:40 +0100 Subject: [PATCH] fixes #1449 false positive when casting a variable to short --- .../main/resources/rulesets/java/controversial.xml | 2 +- .../rule/controversial/xml/AvoidUsingShortType.xml | 13 +++++++++++++ src/site/markdown/overview/changelog.md | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pmd-java/src/main/resources/rulesets/java/controversial.xml b/pmd-java/src/main/resources/rulesets/java/controversial.xml index 364d330180..026482f312 100644 --- a/pmd-java/src/main/resources/rulesets/java/controversial.xml +++ b/pmd-java/src/main/resources/rulesets/java/controversial.xml @@ -416,7 +416,7 @@ adverse impacts on performance. diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/controversial/xml/AvoidUsingShortType.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/controversial/xml/AvoidUsingShortType.xml index 044c950621..29030daf07 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/controversial/xml/AvoidUsingShortType.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/controversial/xml/AvoidUsingShortType.xml @@ -66,4 +66,17 @@ Short as method return type ]]> + + + #1449 false positive when casting a variable to short + 0 + + diff --git a/src/site/markdown/overview/changelog.md b/src/site/markdown/overview/changelog.md index 7aa77e58bf..2aa752d45f 100644 --- a/src/site/markdown/overview/changelog.md +++ b/src/site/markdown/overview/changelog.md @@ -25,6 +25,8 @@ **Bugfixes:** +* java-controversial/AvoidUsingShortType: + * [#1449](https://sourceforge.net/p/pmd/bugs/1449/): false positive when casting a variable to short * java-design/AccessorClassGeneration: * [#1452](https://sourceforge.net/p/pmd/bugs/1452/): ArrayIndexOutOfBoundsException with Annotations for AccessorClassGenerationRule