diff --git a/build.xml b/build.xml index c8dbcc2b8..60b01176c 100644 --- a/build.xml +++ b/build.xml @@ -275,6 +275,8 @@ + diff --git a/contrib/checkstyle-frames.xsl b/contrib/checkstyle-frames.xsl index 749ac69bc..d50f80a57 100644 --- a/contrib/checkstyle-frames.xsl +++ b/contrib/checkstyle-frames.xsl @@ -207,6 +207,7 @@

Files

+

Summary

diff --git a/docs/releasenotes.html b/docs/releasenotes.html index 2151d4513..484592ac3 100644 --- a/docs/releasenotes.html +++ b/docs/releasenotes.html @@ -103,8 +103,11 @@
  • xmllogger.dtd is out-of-date (bug 847974).
  • -
  • ArrayTypeStyle shouldn't check method definition - (bug 849450).
  • +
  • ArrayTypeStyle shouldn't check method definition + (bug 849450).
  • + +
  • Added link to summary page in + checkstyle-frames.xsl (bug 852397).
  • diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java index 8673e04bc..40e6696db 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java @@ -221,7 +221,7 @@ public final class IllegalTypeCheck extends AbstractFormatCheck { mIgnoredMethodNames.clear(); for (int i = 0; i < aMethodNames.length; i++) { - mIllegalClassNames.add(aMethodNames[i]); + mIgnoredMethodNames.add(aMethodNames[i]); } } diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java index f9de8e7ca..6bf3cbaae 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java @@ -20,4 +20,19 @@ public class IllegalTypeCheckTest extends BaseCheckTestCase { verify(checkConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected); } + + public void testIgnoreMethodNames() throws Exception { + DefaultConfiguration checkConfig = createCheckConfig(IllegalTypeCheck.class); + checkConfig.addAttribute("ignoredMethodNames", "table2"); + + String[] expected = { + "6:13: Declaring variables, return values or parameters of type 'AbstractClass' is not allowed.", + "9:13: Declaring variables, return values or parameters of type " + + "'au.com.redhillconsulting.jamaica.tools.checkstyle.InputIllegalType.AbstractClass'" + + " is not allowed.", + "16:13: Declaring variables, return values or parameters of type 'java.util.Hashtable' is not allowed.", + }; + + verify(checkConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected); + } }