swarajsaaj commented on a change in pull request #530:
URL: https://github.com/apache/commons-lang/pull/530#discussion_r426143710



##########
File path: src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
##########
@@ -635,6 +635,14 @@ protected void appendDetail(final StringBuffer buffer, 
final String fieldName, f
      *  {@code toString}, not {@code null}
      */
     protected void appendDetail(final StringBuffer buffer, final String 
fieldName, final Collection<?> coll) {
+        if (coll != null && !coll.isEmpty()) {
+            coll.stream().findFirst()
+                    .map(Object::getClass)
+                    .filter(Class::isEnum)

Review comment:
       Hello, this will restrict only enums to be appended from a collection, a 
list of other types (e.g. Collection of Integers or Strings) will be ignored. 
This filter should be removed to allow all types of collections (or we should 
allow buffer.append(col1) at last line of method to run for other types, either 
way)




----------------------------------------------------------------
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]


Reply via email to