From d0dfd4b95d5eea0ef67f4b76dc607663df54158b Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Tue, 12 Nov 2002 02:42:12 +0000 Subject: [PATCH] removed dead code --- .../checkstyle/api/LocalizedMessages.java | 127 ------------------ .../tools/checkstyle/api/Utils.java | 34 +---- 2 files changed, 6 insertions(+), 155 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java index c6f22febc..fb8c94378 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java @@ -101,19 +101,6 @@ public class LocalizedMessages add(new LocalizedMessage(aLineNo, 0, OLD_BUNDLE, aKey, aArgs)); } - /** - * Helper method to log a LocalizedMessage. Column defaults to 0. - * - * @param aLineNo line number to associate with the message - * @param aKey key to locale message format - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, String aKey) - { - add(aLineNo, aKey, new Object[0]); - } - /** * Helper method to log a LocalizedMessage. Column defaults to 0. * @@ -128,120 +115,6 @@ public class LocalizedMessages add(aLineNo, aKey, new Object[] {aArg0}); } - /** - * Helper method to log a LocalizedMessage. Column defaults to 0. - * - * @param aLineNo line number to associate with the message - * @param aKey key to locale message format - * @param aArg0 first argument - * @param aArg1 second argument - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, String aKey, Object aArg0, Object aArg1) - { - add(aLineNo, aKey, new Object[] {aArg0, aArg1}); - } - - /** - * Helper method to log a LocalizedMessage. Column defaults to 0. - * - * @param aLineNo line number to associate with the message - * @param aKey key to locale message format - * @param aArg0 first argument - * @param aArg1 second argument - * @param aArg2 third argument - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, String aKey, - Object aArg0, Object aArg1, Object aArg2) - { - add(aLineNo, aKey, new Object[] {aArg0, aArg1, aArg2}); - } - - /** - * Helper method to log a LocalizedMessage. - * - * @param aLineNo line number to associate with the message - * @param aColNo column number to associate with the message - * @param aKey key to locale message format - * @param aArgs arguments for message - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, int aColNo, String aKey, Object[] aArgs) - { - final int col = 1 + Utils.lengthExpandedTabs( - mLines[aLineNo - 1], aColNo, mTabWidth); - mMessages.add( - new LocalizedMessage(aLineNo, col, OLD_BUNDLE, aKey, aArgs)); - } - - /** - * Helper method to log a LocalizedMessage. - * - * @param aLineNo line number to associate with the message - * @param aColNo column number to associate with the message - * @param aKey key to locale message format - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, int aColNo, String aKey) - { - add(aLineNo, aColNo, aKey, new Object[0]); - } - - /** - * Helper method to log a LocalizedMessage. - * - * @param aLineNo line number to associate with the message - * @param aColNo column number to associate with the message - * @param aKey key to locale message format - * @param aArg0 first argument - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, int aColNo, String aKey, Object aArg0) - { - add(aLineNo, aColNo, aKey, new Object[] {aArg0}); - } - - /** - * Helper method to log a LocalizedMessage. - * - * @param aLineNo line number to associate with the message - * @param aColNo column number to associate with the message - * @param aKey key to locale message format - * @param aArg0 first argument - * @param aArg1 second argument - * - * @deprecated replaced by Check.log() - */ - public void add(int aLineNo, int aColNo, String aKey, - Object aArg0, Object aArg1) - { - add(aLineNo, aColNo, aKey, new Object[] {aArg0, aArg1}); - } - - /** - * Helper method to log a LocalizedMessage. - * - * @param aLineNo line number to associate with the message - * @param aColNo column number to associate with the message - * @param aKey key to locale message format - * @param aArg0 first argument - * @param aArg1 second argument - * @param aArg2 third argument - * - * @deprecated replaced by Check.log() - */ - void add(int aLineNo, int aColNo, String aKey, - Object aArg0, Object aArg1, Object aArg2) - { - add(aLineNo, aColNo, aKey, new Object[] {aArg0, aArg1, aArg2}); - } - /** @return the number of messages */ public int size() { diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Utils.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Utils.java index 762fc2f1b..38a039832 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Utils.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Utils.java @@ -19,19 +19,17 @@ package com.puppycrawl.tools.checkstyle.api; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.ArrayList; +import java.io.FileReader; import java.io.IOException; import java.io.LineNumberReader; -import java.io.FileReader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import org.apache.commons.beanutils.ConversionException; import org.apache.regexp.RE; import org.apache.regexp.RESyntaxException; -import org.apache.commons.beanutils.ConversionException; /** * Contains utility methods. @@ -145,26 +143,6 @@ public final class Utils } } - /** - * Add a Set add a String to a set of properties. The Set will be encoded - * by seperating the Set with ",". - * @param aProps the Properties to add to - * @param aKey the key to add the property under - * @param aSet the Set to encode - */ - public static void addSetString(Properties aProps, String aKey, Set aSet) - { - final StringBuffer buf = new StringBuffer(); - final Iterator it = aSet.iterator(); - while (it.hasNext()) { - buf.append(it.next().toString()); - if (it.hasNext()) { - buf.append(","); - } - } - aProps.put(aKey, buf.toString()); - } - /** * Loads the contents of a file in a String array. * @return the lines in the file