Author: ggregory Date: Mon May 2 11:31:49 2005 New Revision: 165657 URL: http://svn.apache.org/viewcvs?rev=165657&view=rev Log: Fix 120-length warnings reported for 2.1-RC4 here: http://people.apache.org/~stevencaswell/commons-lang-2.1/docs/checkstyle-report.html
Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharEncoding.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharEncoding.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharEncoding.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharEncoding.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharEncoding.java Mon May 2 11:31:49 2005 @@ -19,15 +19,21 @@ import java.io.UnsupportedEncodingException; /** - * <p>Character encoding names required of every implementation of the Java platform.</p> + * <p> + * Character encoding names required of every implementation of the Java platform. + * </p> * - * <p>According to the Java documentation - * <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a>:<br /> + * <p> + * According to <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a>: + * <p> * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the - * release documentation for your implementation to see if any other encodings are supported. </cite> + * release documentation for your implementation to see if any other encodings are supported.</cite> + * </p> * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding + * names</a> * @author Apache Software Foundation * @since 2.1 * @version $Id$ @@ -42,7 +48,8 @@ * Every implementation of the Java platform is required to support this character encoding. * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static final String ISO_8859_1 = "ISO-8859-1"; @@ -54,7 +61,8 @@ * Every implementation of the Java platform is required to support this character encoding. * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static final String US_ASCII = "US-ASCII"; @@ -67,7 +75,8 @@ * Every implementation of the Java platform is required to support this character encoding. * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static final String UTF_16 = "UTF-16"; @@ -79,7 +88,8 @@ * Every implementation of the Java platform is required to support this character encoding. * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static final String UTF_16BE = "UTF-16BE"; @@ -91,7 +101,8 @@ * Every implementation of the Java platform is required to support this character encoding. * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static final String UTF_16LE = "UTF-16LE"; @@ -103,7 +114,8 @@ * Every implementation of the Java platform is required to support this character encoding. * </p> * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static final String UTF_8 = "UTF-8"; @@ -112,14 +124,18 @@ * Returns whether the named charset is supported. * </p> * <p> - * This is similar to - * <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html#isSupported(java.lang.String)">java.nio.charset.Charset.isSupported(String)</a> + * This is similar to <a + * href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html#isSupported(java.lang.String)"> + * java.nio.charset.Charset.isSupported(String)</a> * </p> * - * @param name the name of the requested charset; may be either a canonical name or an alias - * @return <code>true</code> if, and only if, support for the named charset is available in the current Java virtual machine + * @param name + * the name of the requested charset; may be either a canonical name or an alias + * @return <code>true</code> if, and only if, support for the named charset is available in the current Java + * virtual machine * - * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a> + * @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character + * encoding names</a> */ public static boolean isSupported(String name) { if (name == null) { Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java Mon May 2 11:31:49 2005 @@ -400,7 +400,12 @@ * <p>Escapes the characters in a <code>String</code> using HTML entities.</p> * * <p> - * For example: <tt>"bread" & "butter"</tt> => <tt>&quot;bread&quot; &amp; &quot;butter&quot;</tt>. + * For example: + * </p> + * <p><code>"bread" & "butter"</code></p> + * becomes: + * <p> + * <code>&quot;bread&quot; &amp; &quot;butter&quot;</code>. * </p> * * <p>Supports all known HTML 4.0 entities, including funky accents.</p> Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java Mon May 2 11:31:49 2005 @@ -424,7 +424,8 @@ * @since 2.1 * @since Java 1.4 */ - public static final String JAVA_UTIL_PREFS_PREFERENCES_FACTORY = getSystemProperty("java.util.prefs.PreferencesFactory"); + public static final String JAVA_UTIL_PREFS_PREFERENCES_FACTORY = + getSystemProperty("java.util.prefs.PreferencesFactory"); /** * <p>The <code>java.vendor</code> System Property. Java vendor-specific string.</p> Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java Mon May 2 11:31:49 2005 @@ -518,18 +518,23 @@ } /** - * <p>Validate an argument, throwing <code>IllegalArgumentException</code> - * if the argument collection is <code>null</code> or has elements that are not of - * type <code>clazz</code> or a subclass.</p> - * + * <p> + * Validate an argument, throwing <code>IllegalArgumentException</code> if the argument collection is + * <code>null</code> or has elements that are not of type <code>clazz</code> or a subclass. + * </p> + * * <pre> * Validate.allElementsOfType(collection, String.class); * </pre> - * - * <p>The message in the exception is 'The validated collection contains an element not of type clazz at index: '.</p> * - * @param collection the collection to check, not null - * @param clazz the <code>Class</code> which the collection's elements are expected to be, not null + * <p> + * The message in the exception is 'The validated collection contains an element not of type clazz at index: '. + * </p> + * + * @param collection + * the collection to check, not null + * @param clazz + * the <code>Class</code> which the collection's elements are expected to be, not null * @since 2.1 */ public static void allElementsOfType(Collection collection, Class clazz) { Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java Mon May 2 11:31:49 2005 @@ -401,7 +401,8 @@ * if the Object is <code>null</code> * @since 2.0 */ - public static String toString(Object object, ToStringStyle style, boolean outputTransients, Class reflectUpToClass) { + public static String toString(Object object, ToStringStyle style, boolean outputTransients, + Class reflectUpToClass) { return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients).toString(); } Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java Mon May 2 11:31:49 2005 @@ -229,7 +229,7 @@ * @return the time as a String */ public static String formatPeriodISO(long startMillis, long endMillis) { - return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault() ); + return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault()); } /** @@ -257,7 +257,8 @@ * @param timezone the millis are defined in * @return the time as a String */ - public static String formatPeriod(long startMillis, long endMillis, String format, boolean padWithZeros, TimeZone timezone) { + public static String formatPeriod(long startMillis, long endMillis, String format, boolean padWithZeros, + TimeZone timezone) { long millis = endMillis - startMillis; if (millis < 28 * DateUtils.MILLIS_PER_DAY) { @@ -368,9 +369,8 @@ * @param padWithZeros whether to pad * @return the formetted string */ - static String format(Token[] tokens, int years, int months, int days, int hours, - int minutes, int seconds, int milliseconds, boolean padWithZeros) - { + static String format(Token[] tokens, int years, int months, int days, int hours, int minutes, int seconds, + int milliseconds, boolean padWithZeros) { StringBuffer buffer = new StringBuffer(); boolean lastOutputSeconds = false; int sz = tokens.length; @@ -378,40 +378,49 @@ Token token = tokens[i]; Object value = token.getValue(); int count = token.getCount(); - if(value instanceof StringBuffer) { + if (value instanceof StringBuffer) { buffer.append(value.toString()); } else { if (value == y) { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(years), count, '0') : Integer.toString(years)); + buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(years), count, '0') : Integer + .toString(years)); lastOutputSeconds = false; } else if (value == M) { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(months), count, '0') : Integer.toString(months)); + buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(months), count, '0') : Integer + .toString(months)); lastOutputSeconds = false; } else if (value == d) { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(days), count, '0') : Integer.toString(days)); + buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(days), count, '0') : Integer + .toString(days)); lastOutputSeconds = false; } else if (value == H) { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(hours), count, '0') : Integer.toString(hours)); + buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(hours), count, '0') : Integer + .toString(hours)); lastOutputSeconds = false; } else if (value == m) { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(minutes), count, '0') : Integer.toString(minutes)); + buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(minutes), count, '0') : Integer + .toString(minutes)); lastOutputSeconds = false; } else if (value == s) { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(seconds), count, '0') : Integer.toString(seconds)); + buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(seconds), count, '0') : Integer + .toString(seconds)); lastOutputSeconds = true; } else if (value == S) { if (lastOutputSeconds) { milliseconds += 1000; - String str = padWithZeros ? StringUtils.leftPad(Integer.toString(milliseconds), count, '0') : Integer.toString(milliseconds); + String str = padWithZeros + ? StringUtils.leftPad(Integer.toString(milliseconds), count, '0') + : Integer.toString(milliseconds); buffer.append(str.substring(1)); } else { - buffer.append(padWithZeros ? StringUtils.leftPad(Integer.toString(milliseconds), count, '0') : Integer.toString(milliseconds)); + buffer.append(padWithZeros + ? StringUtils.leftPad(Integer.toString(milliseconds), count, '0') + : Integer.toString(milliseconds)); } lastOutputSeconds = false; } } } - return buffer.toString(); } Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java?rev=165657&r1=165656&r2=165657&view=diff ============================================================================== --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java Mon May 2 11:31:49 2005 @@ -445,8 +445,8 @@ * @throws IllegalArgumentException if the Locale has no date/time * pattern defined */ - public static synchronized FastDateFormat getDateTimeInstance( - int dateStyle, int timeStyle, TimeZone timeZone, Locale locale) { + public static synchronized FastDateFormat getDateTimeInstance(int dateStyle, int timeStyle, TimeZone timeZone, + Locale locale) { Object key = new Pair(new Integer(dateStyle), new Integer(timeStyle)); if (timeZone != null) { @@ -463,11 +463,12 @@ } try { - SimpleDateFormat formatter = (SimpleDateFormat) DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale); + SimpleDateFormat formatter = (SimpleDateFormat) DateFormat.getDateTimeInstance(dateStyle, timeStyle, + locale); String pattern = formatter.toPattern(); format = getInstance(pattern, timeZone, locale); cDateTimeInstanceCache.put(key, format); - + } catch (ClassCastException ex) { throw new IllegalArgumentException("No date time pattern for locale: " + locale); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]