From dc92fd1b89e33067adc5b2bf51df76b8d488b0bf Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Sun, 2 Jun 2002 23:20:35 +0000 Subject: [PATCH] Removed deprecated methods that have floating around for 2 releases. Their time was up. --- .../tools/checkstyle/Configuration.java | 28 ------------------- .../tools/checkstyle/ConfigurationTest.java | 3 -- 2 files changed, 31 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/Configuration.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/Configuration.java index 97d8a857a..ba3a2f6cf 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/Configuration.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/Configuration.java @@ -625,23 +625,6 @@ public class Configuration return mHeaderLinesRegexp; } - /** - * This method is being kept for API backwards compatibility with - * Checkstyle version below 2.1. - * @return the first line number to ignore in header - * @deprecated use isHeaderIgnoreLineNo(int) instead - **/ - public int getHeaderIgnoreLineNo() - { - if (mHeaderIgnoreLineNo.isEmpty()) { - return -1; - } - else { - Integer firstLine = (Integer) mHeaderIgnoreLineNo.first(); - return firstLine.intValue(); - } - } - /** * @param aLineNo a line number * @return if aLineNo is one of the ignored header lines. @@ -964,17 +947,6 @@ public class Configuration mHeaderLinesRegexp = aHeaderLinesRegexp; } - /** - * This method is being kept for API backwards compatibility with - * Checkstyle version below 2.1. - * @param aHeaderIgnoreLineNo line number to ignore in header - * @deprecated use setHeaderIgnoreLines(String) instead - */ - public void setHeaderIgnoreLineNo(int aHeaderIgnoreLineNo) - { - setHeaderIgnoreLines(String.valueOf(aHeaderIgnoreLineNo)); - } - /** * @param aList comma separated list of line numbers to ignore in header. */ diff --git a/src/tests/com/puppycrawl/tools/checkstyle/ConfigurationTest.java b/src/tests/com/puppycrawl/tools/checkstyle/ConfigurationTest.java index 0fe18151e..dbf1fb450 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/ConfigurationTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/ConfigurationTest.java @@ -27,10 +27,7 @@ public class ConfigurationTest final Configuration c = new Configuration(p, System.out); assertNotNull(c); assertEquals(66, c.getMaxLineLength()); - assertEquals(-1, c.getHeaderIgnoreLineNo()); assertEquals(true, c.isAllowTabs()); - c.setHeaderIgnoreLineNo(666); - assertEquals(666, c.getHeaderIgnoreLineNo()); } public void test2() throws Exception