corrected style issues (mostly empty blocks and missing javadocs)

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@201881 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Caswell 2005-06-26 17:42:09 +00:00
parent 687bb75889
commit 4f7de5d638
12 changed files with 54 additions and 2 deletions

View File

@ -133,6 +133,7 @@ public class ArrayUtils {
* to operate.</p>
*/
public ArrayUtils() {
; // empty constructor
}
// Basic methods handling multi-dimensional arrays

View File

@ -40,6 +40,7 @@ public class BooleanUtils {
* to operate.</p>
*/
public BooleanUtils() {
; // empty constructor
}
// Boolean utilities

View File

@ -40,6 +40,7 @@ public class CharSetUtils {
* to operate.</p>
*/
public CharSetUtils() {
; // empty constructor
}
// Factory

View File

@ -64,6 +64,7 @@ public class CharUtils {
* to operate.</p>
*/
public CharUtils() {
; // empty constructor
}
//-----------------------------------------------------------------------

View File

@ -79,6 +79,7 @@ public class ClassUtils {
* instance to operate.</p>
*/
public ClassUtils() {
; // empty constructor
}
// Short class name

View File

@ -44,6 +44,7 @@ public final class NumberUtils {
* to operate.</p>
*/
public NumberUtils() {
; // empty constructor
}
//--------------------------------------------------------------------
@ -213,6 +214,7 @@ public final class NumberUtils {
}
} catch (NumberFormatException nfe) {
; // empty catch
}
//Fall through
case 'd' :
@ -223,10 +225,12 @@ public final class NumberUtils {
return d;
}
} catch (NumberFormatException nfe) {
; // empty catch
}
try {
return createBigDecimal(numeric);
} catch (NumberFormatException e) {
; // empty catch
}
//Fall through
default :
@ -246,10 +250,12 @@ public final class NumberUtils {
try {
return createInteger(val);
} catch (NumberFormatException nfe) {
; // empty catch
}
try {
return createLong(val);
} catch (NumberFormatException nfe) {
; // empty catch
}
return createBigInteger(val);
@ -262,6 +268,7 @@ public final class NumberUtils {
return f;
}
} catch (NumberFormatException nfe) {
; // empty catch
}
try {
Double d = createDouble(val);
@ -269,6 +276,7 @@ public final class NumberUtils {
return d;
}
} catch (NumberFormatException nfe) {
; // empty catch
}
return createBigDecimal(val);

View File

@ -62,6 +62,7 @@ public class ObjectUtils {
* to operate.</p>
*/
public ObjectUtils() {
; // empty constructor
}
// Defaulting
@ -258,6 +259,7 @@ public class ObjectUtils {
* Restricted constructor - singleton.
*/
Null() {
; // empty constructor
}
/**

View File

@ -46,6 +46,7 @@ public class RandomStringUtils {
* to operate.</p>
*/
public RandomStringUtils() {
; // empty constructor
}
// Random

View File

@ -51,6 +51,7 @@ public class StringEscapeUtils {
* instance to operate.</p>
*/
public StringEscapeUtils() {
; // empty constructor
}
// Java and JavaScript
@ -137,6 +138,13 @@ public class StringEscapeUtils {
escapeJavaStyleString(out, str, true);
}
/**
* <p>Worker method for the {@link escapeJavaScript(String) method.</p>
*
* @param str String to escape values in, may be null
* @param escapeSingleQuotes escapes single quotes if <code>true</code>
* @return the escaped string
*/
private static String escapeJavaStyleString(String str, boolean escapeSingleQuotes) {
if (str == null) {
return null;
@ -152,6 +160,14 @@ public class StringEscapeUtils {
}
}
/**
* <p>Worker method for the {@link escapeJavaScript(String) method.</p>
*
* @param out write to receieve the escaped string
* @param str String to escape values in, may be null
* @param escapeSingleQuote escapes single quotes if <code>true</code>
* @throws IOException if an IOException occurs
*/
private static void escapeJavaStyleString(Writer out, String str, boolean escapeSingleQuote) throws IOException {
if (out == null) {
throw new IllegalArgumentException("The Writer must not be null");
@ -490,7 +506,7 @@ public class StringEscapeUtils {
*
* @param str the <code>String</code> to unescape, may be null
* @return a new unescaped <code>String</code>, <code>null</code> if null string input
* @see #escapeHtml(String)
* @see #escapeHtml(Writer, String)
**/
public static String unescapeHtml(String str) {
if (str == null) {
@ -509,6 +525,23 @@ public class StringEscapeUtils {
}
}
/**
* <p>Unescapes a string containing entity escapes to a string
* containing the actual Unicode characters corresponding to the
* escapes. Supports HTML 4.0 entities.</p>
*
* <p>For example, the string "&amp;lt;Fran&amp;ccedil;ais&amp;gt;"
* will become "&lt;Fran&ccedil;ais&gt;"</p>
*
* <p>If an entity is unrecognized, it is left alone, and inserted
* verbatim into the result string. e.g. "&amp;gt;&amp;zzzz;x" will
* become "&gt;&amp;zzzz;x".</p>
*
* @param writer writer receiving the unescaped string
* @param string the <code>String</code> to unescape, may be null
* @throws IOException if an IOException occurs
* @see #escapeHtml(String)
**/
public static void unescapeHtml(Writer writer, String string) throws IOException {
if (writer == null ) {
throw new IllegalArgumentException ("The Writer must not be null.");

View File

@ -2105,7 +2105,8 @@ public class StringUtils {
* StringUtils.splitByWholeSeparator("ab de fg", null, 0) = ["ab", "de", "fg"]
* StringUtils.splitByWholeSeparator("ab:cd:ef", ":", 2) = ["ab", "cd"]
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) = ["bst", "m"]
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) = ["abstemiously", "abstemiously"]
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) =
* ["abstemiously", "abstemiously"]
* </pre>
*
* @param str the String to parse, may be null

View File

@ -44,6 +44,7 @@ public class Validate {
* Constructor. This class should not normally be instantiated.
*/
public Validate() {
; // empty constructor
}
// isTrue

View File

@ -41,6 +41,7 @@ public class WordUtils {
* instance to operate.</p>
*/
public WordUtils() {
; // empty constructor
}
// Wrapping