You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/01/13 06:29:18 UTC
[GitHub] [commons-collections] arturobernalg opened a new pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
arturobernalg opened a new pull request #205:
URL: https://github.com/apache/commons-collections/pull/205
Add test with javadoc pointer to Jira and prove that it not reproducible
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [commons-collections] coveralls commented on pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #205:
URL: https://github.com/apache/commons-collections/pull/205#issuecomment-759413070
[](https://coveralls.io/builds/36292134)
Coverage remained the same at 90.184% when pulling **48af6834febfca39e7957b7b03808ca359559e68 on arturobernalg:feature/COLLECTIONS-761** into **7e392b90934e29435e7f6db4e6c417bf302a5db9 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:
users@infra.apache.org
[GitHub] [commons-collections] arturobernalg commented on a change in pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
arturobernalg commented on a change in pull request #205:
URL: https://github.com/apache/commons-collections/pull/205#discussion_r556323500
##########
File path: src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
##########
@@ -46,7 +47,9 @@
import java.util.LinkedHashSet;
import org.apache.commons.collections4.iterators.*;
+import org.apache.commons.collections4.list.GrowthList;
import org.apache.commons.collections4.map.EntrySetToMapIteratorAdapter;
+import org.junit.Assert;
Review comment:
True. Fix It
##########
File path: src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
##########
@@ -46,7 +47,9 @@
import java.util.LinkedHashSet;
import org.apache.commons.collections4.iterators.*;
+import org.apache.commons.collections4.list.GrowthList;
Review comment:
True. Fix It
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [commons-collections] arturobernalg closed pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
arturobernalg closed pull request #205:
URL: https://github.com/apache/commons-collections/pull/205
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [commons-collections] arturobernalg commented on pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #205:
URL: https://github.com/apache/commons-collections/pull/205#issuecomment-759275198
> The test code is simple, but at the moment it's not failing. From what I understood from the JIRA linked, it was supposed to test something that is not working? Unless we are adding the test for coverage?
Hi @kinow
First that all Happy New Years. I tried to prove the Jira and was not possible. I think it's working correctly. For some reason @garydgregory suggested adding the test. I guess its related with my last question about the regression
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [commons-collections] kinow commented on a change in pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #205:
URL: https://github.com/apache/commons-collections/pull/205#discussion_r556311651
##########
File path: src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
##########
@@ -46,7 +47,9 @@
import java.util.LinkedHashSet;
import org.apache.commons.collections4.iterators.*;
+import org.apache.commons.collections4.list.GrowthList;
import org.apache.commons.collections4.map.EntrySetToMapIteratorAdapter;
+import org.junit.Assert;
Review comment:
Is this import being used?
##########
File path: src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
##########
@@ -46,7 +47,9 @@
import java.util.LinkedHashSet;
import org.apache.commons.collections4.iterators.*;
+import org.apache.commons.collections4.list.GrowthList;
Review comment:
Is this import being used?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [commons-collections] kinow commented on pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
kinow commented on pull request #205:
URL: https://github.com/apache/commons-collections/pull/205#issuecomment-759749343
Hi @arturobernalg , happy 2021!
> I tried to prove the Jira and was not possible. I think it's working correctly.
From the JIRA description, it sounded to me like we would get an empty list when it was not desired. So that was the issue/problem we would need to fix for the next release.
> For some reason @garydgregory suggested adding the test. I guess its related with my last question about the regression
I think what Gary meant, is that along what I explained above, that if we indeed have an issue, it is really good if the person that created the JIRA issue can provide a unit test, and/or some small code snippet to show the developers what needs to be fixed.
For example, if you have a JIRA-1234 issue, where it says "Serializing an empty list results in an Exception", then it would be nice if the person reporting could include some code or unit test like
```java
@Test
public void testEmptyListSerializationIssue() {
// NOTE: we are not testing assertThrows(() -> {...}) here, as the test is for "how should the API behave", and
// not "how the API is behaving now"
UtilCode.serialize(new SomeCollectionsClass();
}
```
Hope it helps
Bruno
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [commons-collections] arturobernalg commented on pull request #205: [COLLECTIONS-761] - IteratorUtils.toList() will return empty list when size of iterator is 1
Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #205:
URL: https://github.com/apache/commons-collections/pull/205#issuecomment-759984195
Hi @kinow
thank you very much. I understand now.
I close the PR and we wait for the person who reported the Jira send a test
----------------------------------------------------------------
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:
users@infra.apache.org