[ 
https://issues.apache.org/jira/browse/LANG-1600?focusedWorklogId=474056&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-474056
 ]

ASF GitHub Bot logged work on LANG-1600:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Aug/20 21:20
            Start Date: 24/Aug/20 21:20
    Worklog Time Spent: 10m 
      Work Description: coveralls commented on pull request #610:
URL: https://github.com/apache/commons-lang/pull/610#issuecomment-679372662


   
   [![Coverage 
Status](https://coveralls.io/builds/32968009/badge)](https://coveralls.io/builds/32968009)
   
   Coverage increased (+0.0007%) to 94.705% when pulling 
**8d027c87741acfafad2ba07428fd94646b5ca53a on 
amphied:LANG-1600_fix_collections_for_non-json_tostringstyle** into 
**31dc5c700e1a08f4af33d94301ff06790533099b on apache:master**.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 474056)
    Time Spent: 20m  (was: 10m)

> ToStringBuilder behavior for collections changed with 3.11
> ----------------------------------------------------------
>
>                 Key: LANG-1600
>                 URL: https://issues.apache.org/jira/browse/LANG-1600
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.11
>         Environment: {code:none}
> java -version
> openjdk version "1.8.0_242"
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)
> {code}
> commons-lang3-3.10.jar via maven central
> commons-lang3-3.11.jar via maven central
>            Reporter: Michael F
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The fix in LANG-1542 (git commit 
> [1dddec8|https://github.com/apache/commons-lang/commit/1dddec8ba867bc31233ba194f0753ea35818cbfd])
>  had side effects and did not just affect json styles, but {{DEFAULT_STYLE}}, 
> {{SHORT_PREFIX_STYLE}}, and possibly others as well.
> Also, collections are now treated differently when empty:
> Square brackets for empty list vs. curly brackets for non-empty lists.
> h3. Test case
> {code:java}
> new ToStringBuilder(new Object(), ToStringStyle.SHORT_PREFIX_STYLE)
>         .append("foo0", Collections.emptyList())
>         .append("foo1", Collections.singleton("1"))
>         .append("foo2", Arrays.asList("1", "2"))
>         .build();
> {code}
> h3. {{SHORT_PREFIX_STYLE}}
> Result for version 3.11:
> {code:none}
> Object[foo0=[],foo1={1},foo2={1,2}]
> {code}
> Expected (also as-is for 3.10)
> {code:none}
> Object[foo0=[],foo1=[1],foo2=[1, 2]]
> {code}
> h3. {{DEFAULT_STYLE}}
> Result for version 3.11
> {code:none}
> java.lang.Object@7960847b[foo0=[],foo1={1},foo2={1,2}]
> {code}
> Expected (also as-is for 3.10)
> {code:none}
> java.lang.Object@7960847b[foo0=[],foo1=[1],foo2=[1, 2]]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to