diff --git a/pmd/src/net/sourceforge/pmd/rules/strings/StringInstantiation.java b/pmd/src/net/sourceforge/pmd/rules/strings/StringInstantiation.java index c51628525f..861837791d 100644 --- a/pmd/src/net/sourceforge/pmd/rules/strings/StringInstantiation.java +++ b/pmd/src/net/sourceforge/pmd/rules/strings/StringInstantiation.java @@ -40,7 +40,7 @@ public class StringInstantiation extends AbstractRule { return data; } - NameDeclaration nd = (NameDeclaration) name.getNameDeclaration(); + NameDeclaration nd = name.getNameDeclaration(); if (!(nd instanceof VariableNameDeclaration)) { return data; }