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:
       This will restrict only enums to be appended in a collection, a list of 
other types (e.g. Collection of Integers or Strings) will be ignored. This 
filter should be removed.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to