You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/11/04 23:01:46 UTC

[commons-lang] branch master updated (d0b95be -> 1163e17)

This is an automated email from the ASF dual-hosted git repository.

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


    from d0b95be  Lang 1463: StringUtils abbreviate returns String of length greater than maxWidth (#477)
     new 49e9754  In-line local variables only used once.
     new 1163e17  LANG-1463] StringUtils abbreviate returns String of length greater than maxWidth #477.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                                 | 1 +
 src/main/java/org/apache/commons/lang3/StringUtils.java | 6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)


[commons-lang] 02/02: LANG-1463] StringUtils abbreviate returns String of length greater than maxWidth #477.

Posted by gg...@apache.org.
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

commit 1163e177137f5c57ce80092c0743209b28d33400
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Nov 4 18:01:42 2019 -0500

    LANG-1463] StringUtils abbreviate returns String of length greater than
    maxWidth #477.
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c24b139..6279240 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -80,6 +80,7 @@ The <action> type attribute can be add,update,fix,remove.
     <action issue="LANG-1495" type="add" dev="ggregory" due-to="Cheong Voon Leong">Add EnumUtils getEnum() methods with default values #475.</action>
     <action issue="LANG-1177" type="add" dev="ggregory" due-to="Liel Fridman">Added indexesOf methods and simplified removeAllOccurences #471.</action>
     <action issue="LANG-1498" type="add" dev="ggregory" due-to="Lysergid, Gary Gregory">Add support of lambda value evaluation for defaulting methods #416.</action>
+    <action issue="LANG-1463" type="fix" dev="ggregory" due-to="bbeckercscc, Gary Gregory">StringUtils abbreviate returns String of length greater than maxWidth #477.</action>
   </release>
 
   <release version="3.9" date="2019-04-09" description="New features and bug fixes. Requires Java 8, supports Java 9, 10, 11.">


[commons-lang] 01/02: In-line local variables only used once.

Posted by gg...@apache.org.
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

commit 49e9754b6cb5bc3a8787ca1e2e74e736e8e9c082
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Nov 4 17:59:38 2019 -0500

    In-line local variables only used once.
---
 src/main/java/org/apache/commons/lang3/StringUtils.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index ee94635..9eb7fce 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -211,8 +211,7 @@ public class StringUtils {
      * @since 2.0
      */
     public static String abbreviate(final String str, final int maxWidth) {
-        final String defaultAbbrevMarker = "...";
-        return abbreviate(str, defaultAbbrevMarker, 0, maxWidth);
+        return abbreviate(str, "...", 0, maxWidth);
     }
 
     /**
@@ -251,8 +250,7 @@ public class StringUtils {
      * @since 2.0
      */
     public static String abbreviate(final String str, final int offset, final int maxWidth) {
-        final String defaultAbbrevMarker = "...";
-        return abbreviate(str, defaultAbbrevMarker, offset, maxWidth);
+        return abbreviate(str, "...", offset, maxWidth);
     }
 
     /**