[commons-lang] branch master updated: Clean ups.

2020-03-19 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
 new 1c42dfb  Clean ups.
1c42dfb is described below

commit 1c42dfb05791a1172e03d355d296327c013177f9
Author: Gary Gregory 
AuthorDate: Thu Mar 19 10:00:46 2020 -0400

Clean ups.
---
 .../commons/lang3/builder/EqualsExclude.java   |   2 +-
 .../commons/lang3/builder/HashCodeExclude.java |   2 +-
 .../commons/lang3/builder/ToStringExclude.java |   2 +-
 .../commons/lang3/builder/ToStringSummary.java |   2 +-
 .../apache/commons/lang3/reflect/TypeUtils.java| 241 +++--
 .../text/translate/NumericEntityUnescaper.java |   4 +-
 6 files changed, 132 insertions(+), 121 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java 
b/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java
index f6b4d3e..b4ede8f 100755
--- a/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java
+++ b/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java
@@ -32,5 +32,5 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 public @interface EqualsExclude {
-
+// empty
 }
diff --git 
a/src/main/java/org/apache/commons/lang3/builder/HashCodeExclude.java 
b/src/main/java/org/apache/commons/lang3/builder/HashCodeExclude.java
index e25a168..d1c3661 100755
--- a/src/main/java/org/apache/commons/lang3/builder/HashCodeExclude.java
+++ b/src/main/java/org/apache/commons/lang3/builder/HashCodeExclude.java
@@ -32,5 +32,5 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 public @interface HashCodeExclude {
-
+// empty
 }
diff --git 
a/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java 
b/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
index e36acce..41dcf67 100755
--- a/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
+++ b/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
@@ -31,5 +31,5 @@ import java.lang.annotation.RetentionPolicy;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 public @interface ToStringExclude {
-
+// empty
 }
diff --git 
a/src/main/java/org/apache/commons/lang3/builder/ToStringSummary.java 
b/src/main/java/org/apache/commons/lang3/builder/ToStringSummary.java
index ba255d4..c6dad14 100644
--- a/src/main/java/org/apache/commons/lang3/builder/ToStringSummary.java
+++ b/src/main/java/org/apache/commons/lang3/builder/ToStringSummary.java
@@ -36,5 +36,5 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 public @interface ToStringSummary {
-
+// empty
 }
diff --git a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java 
b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
index eced4e0..aea37a7 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
@@ -150,12 +150,12 @@ public class TypeUtils {
 
 /**
  * Constructor
- * @param raw type
+ * @param rawClass type
  * @param useOwner owner type to use, if any
  * @param typeArguments formal type arguments
  */
-private ParameterizedTypeImpl(final Class raw, final Type useOwner, 
final Type[] typeArguments) {
-this.raw = raw;
+private ParameterizedTypeImpl(final Class rawClass, final Type 
useOwner, final Type[] typeArguments) {
+this.raw = rawClass;
 this.useOwner = useOwner;
 this.typeArguments = Arrays.copyOf(typeArguments, 
typeArguments.length, Type[].class);
 }
@@ -482,17 +482,18 @@ public class TypeUtils {
 /**
  * Look up {@code var} in {@code typeVarAssigns} transitively,
  * i.e. keep looking until the value found is not a type variable.
- * @param var the type variable to look up
+ * @param typeVariable the type variable to look up
  * @param typeVarAssigns the map used for the look up
  * @return Type or {@code null} if some variable was not in the map
  * @since 3.2
  */
-private static Type unrollVariableAssignments(TypeVariable var, final 
Map, Type> typeVarAssigns) {
+private static Type unrollVariableAssignments(TypeVariable typeVariable,
+final Map, Type> typeVarAssigns) {
 Type result;
 do {
-result = typeVarAssigns.get(var);
-if (result instanceof TypeVariable && !result.equals(var)) {
-var = (TypeVariable) result;
+result = typeVarAssigns.get(typeVariable);
+if (result instanceof TypeVariable && 
!result.equals(typeVariable)) {
+typeVariable = (TypeVariable) result;
 

[commons-lang] branch master updated: Clean ups.

2020-06-24 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
 new a14b289  Clean ups.
a14b289 is described below

commit a14b28923e3a6d76732de072a774c6eed1f9ce61
Author: Gary Gregory 
AuthorDate: Wed Jun 24 08:42:16 2020 -0400

Clean ups.

- Fix Javadoc
- Simplify error message
- Rmove on layer of API call.
---
 .../commons/lang3/exception/ExceptionUtils.java| 28 --
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java 
b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
index 5b48b0e..8c387a9 100644
--- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
+++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
@@ -24,12 +24,12 @@ import java.lang.reflect.Method;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.StringTokenizer;
 
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.ClassUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.Validate;
 
 /**
  * Provides utilities for manipulating and examining
@@ -624,20 +624,21 @@ public class ExceptionUtils {
  * that don't have nested causes.
  *
  * @param throwable  the throwable to output, may be null
- * @param stream  the stream to output to, may not be null
- * @throws IllegalArgumentException if the stream is {@code null}
+ * @param printStream  the stream to output to, may not be null
+ * @throws NullPointerException if the printStream is {@code null}
  * @since 2.0
  */
-public static void printRootCauseStackTrace(final Throwable throwable, 
final PrintStream stream) {
+@SuppressWarnings("resource")
+public static void printRootCauseStackTrace(final Throwable throwable, 
final PrintStream printStream) {
 if (throwable == null) {
 return;
 }
-Validate.notNull(stream, "The PrintStream must not be null");
+Objects.requireNonNull(printStream, "printStream");
 final String[] trace = getRootCauseStackTrace(throwable);
 for (final String element : trace) {
-stream.println(element);
+printStream.println(element);
 }
-stream.flush();
+printStream.flush();
 }
 
 /**
@@ -655,20 +656,21 @@ public class ExceptionUtils {
  * that don't have nested causes.
  *
  * @param throwable  the throwable to output, may be null
- * @param writer  the writer to output to, may not be null
- * @throws IllegalArgumentException if the writer is {@code null}
+ * @param printWriter  the writer to output to, may not be null
+ * @throws NullPointerException if the printWriter is {@code null}
  * @since 2.0
  */
-public static void printRootCauseStackTrace(final Throwable throwable, 
final PrintWriter writer) {
+@SuppressWarnings("resource")
+public static void printRootCauseStackTrace(final Throwable throwable, 
final PrintWriter printWriter) {
 if (throwable == null) {
 return;
 }
-Validate.notNull(writer, "The PrintWriter must not be null");
+Objects.requireNonNull(printWriter, "printWriter");
 final String[] trace = getRootCauseStackTrace(throwable);
 for (final String element : trace) {
-writer.println(element);
+printWriter.println(element);
 }
-writer.flush();
+printWriter.flush();
 }
 
 /**