diff --git a/src/java/org/apache/commons/lang/ArrayUtils.java b/src/java/org/apache/commons/lang/ArrayUtils.java index d7a5444ef..26ad09e18 100644 --- a/src/java/org/apache/commons/lang/ArrayUtils.java +++ b/src/java/org/apache/commons/lang/ArrayUtils.java @@ -133,6 +133,7 @@ public class ArrayUtils { * to operate.
*/ public ArrayUtils() { + ; // empty constructor } // Basic methods handling multi-dimensional arrays diff --git a/src/java/org/apache/commons/lang/BooleanUtils.java b/src/java/org/apache/commons/lang/BooleanUtils.java index 9053b553f..c984b761a 100644 --- a/src/java/org/apache/commons/lang/BooleanUtils.java +++ b/src/java/org/apache/commons/lang/BooleanUtils.java @@ -40,6 +40,7 @@ public class BooleanUtils { * to operate. */ public BooleanUtils() { + ; // empty constructor } // Boolean utilities diff --git a/src/java/org/apache/commons/lang/CharSetUtils.java b/src/java/org/apache/commons/lang/CharSetUtils.java index 4dff0d2d6..72c445d8e 100644 --- a/src/java/org/apache/commons/lang/CharSetUtils.java +++ b/src/java/org/apache/commons/lang/CharSetUtils.java @@ -40,6 +40,7 @@ public class CharSetUtils { * to operate. */ public CharSetUtils() { + ; // empty constructor } // Factory diff --git a/src/java/org/apache/commons/lang/CharUtils.java b/src/java/org/apache/commons/lang/CharUtils.java index 3e6985588..abb3f2b9d 100644 --- a/src/java/org/apache/commons/lang/CharUtils.java +++ b/src/java/org/apache/commons/lang/CharUtils.java @@ -64,6 +64,7 @@ public class CharUtils { * to operate. */ public CharUtils() { + ; // empty constructor } //----------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/lang/ClassUtils.java b/src/java/org/apache/commons/lang/ClassUtils.java index ccf727794..2f276f7dd 100644 --- a/src/java/org/apache/commons/lang/ClassUtils.java +++ b/src/java/org/apache/commons/lang/ClassUtils.java @@ -79,6 +79,7 @@ public class ClassUtils { * instance to operate. */ public ClassUtils() { + ; // empty constructor } // Short class name diff --git a/src/java/org/apache/commons/lang/NumberUtils.java b/src/java/org/apache/commons/lang/NumberUtils.java index ff60142a5..1e97788ec 100644 --- a/src/java/org/apache/commons/lang/NumberUtils.java +++ b/src/java/org/apache/commons/lang/NumberUtils.java @@ -44,6 +44,7 @@ public final class NumberUtils { * to operate. */ 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); diff --git a/src/java/org/apache/commons/lang/ObjectUtils.java b/src/java/org/apache/commons/lang/ObjectUtils.java index daec53eaf..269134e6a 100644 --- a/src/java/org/apache/commons/lang/ObjectUtils.java +++ b/src/java/org/apache/commons/lang/ObjectUtils.java @@ -62,6 +62,7 @@ public class ObjectUtils { * to operate. */ public ObjectUtils() { + ; // empty constructor } // Defaulting @@ -258,6 +259,7 @@ public class ObjectUtils { * Restricted constructor - singleton. */ Null() { + ; // empty constructor } /** diff --git a/src/java/org/apache/commons/lang/RandomStringUtils.java b/src/java/org/apache/commons/lang/RandomStringUtils.java index abf1e1559..361017961 100644 --- a/src/java/org/apache/commons/lang/RandomStringUtils.java +++ b/src/java/org/apache/commons/lang/RandomStringUtils.java @@ -46,6 +46,7 @@ public class RandomStringUtils { * to operate. */ public RandomStringUtils() { + ; // empty constructor } // Random diff --git a/src/java/org/apache/commons/lang/StringEscapeUtils.java b/src/java/org/apache/commons/lang/StringEscapeUtils.java index 19a5d71e7..69c530af6 100644 --- a/src/java/org/apache/commons/lang/StringEscapeUtils.java +++ b/src/java/org/apache/commons/lang/StringEscapeUtils.java @@ -51,6 +51,7 @@ public class StringEscapeUtils { * instance to operate. */ public StringEscapeUtils() { + ; // empty constructor } // Java and JavaScript @@ -137,6 +138,13 @@ public class StringEscapeUtils { escapeJavaStyleString(out, str, true); } + /** + *Worker method for the {@link escapeJavaScript(String) method.
+ * + * @param str String to escape values in, may be null + * @param escapeSingleQuotes escapes single quotes iftrue
+ * @return the escaped string
+ */
private static String escapeJavaStyleString(String str, boolean escapeSingleQuotes) {
if (str == null) {
return null;
@@ -152,6 +160,14 @@ public class StringEscapeUtils {
}
}
+ /**
+ * Worker method for the {@link escapeJavaScript(String) method.
+ * + * @param out write to receieve the escaped string + * @param str String to escape values in, may be null + * @param escapeSingleQuote escapes single quotes iftrue
+ * @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 String
to unescape, may be null
* @return a new unescaped String
, null
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 {
}
}
+ /**
+ * Unescapes a string containing entity escapes to a string + * containing the actual Unicode characters corresponding to the + * escapes. Supports HTML 4.0 entities.
+ * + *For example, the string "<Français>" + * will become "<Français>"
+ * + *If an entity is unrecognized, it is left alone, and inserted + * verbatim into the result string. e.g. ">&zzzz;x" will + * become ">&zzzz;x".
+ * + * @param writer writer receiving the unescaped string + * @param string theString
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.");
diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java
index 85881e6a5..968da8c3a 100644
--- a/src/java/org/apache/commons/lang/StringUtils.java
+++ b/src/java/org/apache/commons/lang/StringUtils.java
@@ -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"]
*
*
* @param str the String to parse, may be null
diff --git a/src/java/org/apache/commons/lang/Validate.java b/src/java/org/apache/commons/lang/Validate.java
index 3486b3efd..00d918380 100644
--- a/src/java/org/apache/commons/lang/Validate.java
+++ b/src/java/org/apache/commons/lang/Validate.java
@@ -44,6 +44,7 @@ public class Validate {
* Constructor. This class should not normally be instantiated.
*/
public Validate() {
+ ; // empty constructor
}
// isTrue
diff --git a/src/java/org/apache/commons/lang/WordUtils.java b/src/java/org/apache/commons/lang/WordUtils.java
index 12bf2ba6c..a521cf914 100644
--- a/src/java/org/apache/commons/lang/WordUtils.java
+++ b/src/java/org/apache/commons/lang/WordUtils.java
@@ -41,6 +41,7 @@ public class WordUtils {
* instance to operate.
*/
public WordUtils() {
+ ; // empty constructor
}
// Wrapping