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 c7d7a2076 Only use static imports to import assert methods in tests c7d7a2076 is described below commit c7d7a207671d407f18e55bfcefb448cda0240fcd Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Apr 13 20:20:19 2023 -0400 Only use static imports to import assert methods in tests --- .../apache/commons/lang3/builder/ReflectionDiffBuilder.java | 10 ++++------ .../java/org/apache/commons/lang3/text/FormattableUtils.java | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java b/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java index ba1cdb360..ddae64874 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java @@ -16,8 +16,6 @@ */ package org.apache.commons.lang3.builder; -import static org.apache.commons.lang3.reflect.FieldUtils.readField; - import java.lang.reflect.Field; import java.lang.reflect.Modifier; @@ -110,11 +108,11 @@ public class ReflectionDiffBuilder<T> implements Builder<DiffResult<T>> { for (final Field field : FieldUtils.getAllFields(clazz)) { if (accept(field)) { try { - diffBuilder.append(field.getName(), readField(field, left, true), - readField(field, right, true)); + diffBuilder.append(field.getName(), FieldUtils.readField(field, left, true), + FieldUtils.readField(field, right, true)); } catch (final IllegalAccessException ex) { - //this can't happen. Would get a Security exception instead - //throw a runtime exception in case the impossible happens. + // this can't happen. Would get a Security exception instead + // throw a runtime exception in case the impossible happens. throw new InternalError("Unexpected IllegalAccessException: " + ex.getMessage()); } } diff --git a/src/main/java/org/apache/commons/lang3/text/FormattableUtils.java b/src/main/java/org/apache/commons/lang3/text/FormattableUtils.java index 1954ecf2a..1d29272cc 100644 --- a/src/main/java/org/apache/commons/lang3/text/FormattableUtils.java +++ b/src/main/java/org/apache/commons/lang3/text/FormattableUtils.java @@ -16,9 +16,8 @@ */ package org.apache.commons.lang3.text; -import static java.util.FormattableFlags.LEFT_JUSTIFY; - import java.util.Formattable; +import java.util.FormattableFlags; import java.util.Formatter; import org.apache.commons.lang3.ObjectUtils; @@ -141,7 +140,7 @@ public class FormattableUtils { final CharSequence actualEllipsis = ObjectUtils.defaultIfNull(ellipsis, StringUtils.EMPTY); buf.replace(precision - actualEllipsis.length(), seq.length(), actualEllipsis.toString()); } - final boolean leftJustify = (flags & LEFT_JUSTIFY) == LEFT_JUSTIFY; + final boolean leftJustify = (flags & FormattableFlags.LEFT_JUSTIFY) == FormattableFlags.LEFT_JUSTIFY; for (int i = buf.length(); i < width; i++) { buf.insert(leftJustify ? i : 0, padChar); }