garydgregory commented on code in PR #645:
URL:
https://github.com/apache/commons-configuration/pull/645#discussion_r3581060648
##########
src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java:
##########
@@ -511,13 +511,13 @@ void testCompress840ArrayList(final int size) {
void testCompress840ArrayListCycle(final int size) {
final ArrayList<Object> object = new ArrayList<>();
for (int i = 0; i < size; i++) {
- object.add(i);
+ object.add(String.valueOf(i));
object.add(object);
object.add(new ArrayList<>(object));
}
final Collection<?> result = testCompress840(object);
assertNotNull(result);
- assertEquals(size, result.size());
+ assertEquals((1 << (size + 1)) - 2, result.size());
Review Comment:
Explain the expression in an inline comment.
##########
src/main/java/org/apache/commons/configuration2/convert/AbstractListDelimiterHandler.java:
##########
@@ -85,6 +85,12 @@ static void flattenIterator(final ListDelimiterHandler
handler, final Collection
}
}
+ private static boolean isRecursiveContainer(final Object value) {
+ return value instanceof Iterator
+ || value instanceof Iterable && !(value instanceof Path)
Review Comment:
You lost an inline comment when you refactored the code as to why Path is
handled specifically.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]