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:
parent
687bb75889
commit
4f7de5d638
|
@ -133,6 +133,7 @@ public class ArrayUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public ArrayUtils() {
|
public ArrayUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Basic methods handling multi-dimensional arrays
|
// Basic methods handling multi-dimensional arrays
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class BooleanUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public BooleanUtils() {
|
public BooleanUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Boolean utilities
|
// Boolean utilities
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class CharSetUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public CharSetUtils() {
|
public CharSetUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Factory
|
// Factory
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class CharUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public CharUtils() {
|
public CharUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
|
|
@ -79,6 +79,7 @@ public class ClassUtils {
|
||||||
* instance to operate.</p>
|
* instance to operate.</p>
|
||||||
*/
|
*/
|
||||||
public ClassUtils() {
|
public ClassUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Short class name
|
// Short class name
|
||||||
|
|
|
@ -44,6 +44,7 @@ public final class NumberUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public NumberUtils() {
|
public NumberUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
@ -213,6 +214,7 @@ public final class NumberUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
//Fall through
|
//Fall through
|
||||||
case 'd' :
|
case 'd' :
|
||||||
|
@ -223,10 +225,12 @@ public final class NumberUtils {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return createBigDecimal(numeric);
|
return createBigDecimal(numeric);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
//Fall through
|
//Fall through
|
||||||
default :
|
default :
|
||||||
|
@ -246,10 +250,12 @@ public final class NumberUtils {
|
||||||
try {
|
try {
|
||||||
return createInteger(val);
|
return createInteger(val);
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return createLong(val);
|
return createLong(val);
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
return createBigInteger(val);
|
return createBigInteger(val);
|
||||||
|
|
||||||
|
@ -262,6 +268,7 @@ public final class NumberUtils {
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Double d = createDouble(val);
|
Double d = createDouble(val);
|
||||||
|
@ -269,6 +276,7 @@ public final class NumberUtils {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
|
; // empty catch
|
||||||
}
|
}
|
||||||
|
|
||||||
return createBigDecimal(val);
|
return createBigDecimal(val);
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class ObjectUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public ObjectUtils() {
|
public ObjectUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaulting
|
// Defaulting
|
||||||
|
@ -258,6 +259,7 @@ public class ObjectUtils {
|
||||||
* Restricted constructor - singleton.
|
* Restricted constructor - singleton.
|
||||||
*/
|
*/
|
||||||
Null() {
|
Null() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,6 +46,7 @@ public class RandomStringUtils {
|
||||||
* to operate.</p>
|
* to operate.</p>
|
||||||
*/
|
*/
|
||||||
public RandomStringUtils() {
|
public RandomStringUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Random
|
// Random
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class StringEscapeUtils {
|
||||||
* instance to operate.</p>
|
* instance to operate.</p>
|
||||||
*/
|
*/
|
||||||
public StringEscapeUtils() {
|
public StringEscapeUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Java and JavaScript
|
// Java and JavaScript
|
||||||
|
@ -137,6 +138,13 @@ public class StringEscapeUtils {
|
||||||
escapeJavaStyleString(out, str, true);
|
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) {
|
private static String escapeJavaStyleString(String str, boolean escapeSingleQuotes) {
|
||||||
if (str == null) {
|
if (str == null) {
|
||||||
return 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 {
|
private static void escapeJavaStyleString(Writer out, String str, boolean escapeSingleQuote) throws IOException {
|
||||||
if (out == null) {
|
if (out == null) {
|
||||||
throw new IllegalArgumentException("The Writer must not be 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
|
* @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
|
* @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) {
|
public static String unescapeHtml(String str) {
|
||||||
if (str == null) {
|
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 "&lt;Fran&ccedil;ais&gt;"
|
||||||
|
* will become "<Français>"</p>
|
||||||
|
*
|
||||||
|
* <p>If an entity is unrecognized, it is left alone, and inserted
|
||||||
|
* verbatim into the result string. e.g. "&gt;&zzzz;x" will
|
||||||
|
* become ">&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 {
|
public static void unescapeHtml(Writer writer, String string) throws IOException {
|
||||||
if (writer == null ) {
|
if (writer == null ) {
|
||||||
throw new IllegalArgumentException ("The Writer must not be null.");
|
throw new IllegalArgumentException ("The Writer must not be null.");
|
||||||
|
|
|
@ -2105,7 +2105,8 @@ public class StringUtils {
|
||||||
* StringUtils.splitByWholeSeparator("ab de fg", null, 0) = ["ab", "de", "fg"]
|
* StringUtils.splitByWholeSeparator("ab de fg", null, 0) = ["ab", "de", "fg"]
|
||||||
* StringUtils.splitByWholeSeparator("ab:cd:ef", ":", 2) = ["ab", "cd"]
|
* StringUtils.splitByWholeSeparator("ab:cd:ef", ":", 2) = ["ab", "cd"]
|
||||||
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) = ["bst", "m"]
|
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) = ["bst", "m"]
|
||||||
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) = ["abstemiously", "abstemiously"]
|
* StringUtils.splitByWholeSeparator("abstemiouslyaeiouyabstemiously", "aeiouy", 2) =
|
||||||
|
* ["abstemiously", "abstemiously"]
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param str the String to parse, may be null
|
* @param str the String to parse, may be null
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class Validate {
|
||||||
* Constructor. This class should not normally be instantiated.
|
* Constructor. This class should not normally be instantiated.
|
||||||
*/
|
*/
|
||||||
public Validate() {
|
public Validate() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// isTrue
|
// isTrue
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class WordUtils {
|
||||||
* instance to operate.</p>
|
* instance to operate.</p>
|
||||||
*/
|
*/
|
||||||
public WordUtils() {
|
public WordUtils() {
|
||||||
|
; // empty constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping
|
// Wrapping
|
||||||
|
|
Loading…
Reference in New Issue