On 08/12/2011 15:21, Mike Duigou wrote:
Was the SnychronousQueue test recently added or did something else change to
cause the failure?
This failure has not happened yet, but is will when I push the "warning"
changes for j.u.c ( with some minor impl changes ).
SynchronousQueue.iterator() no longer returns
Collections.emptyIterator(), it will return its own private
EmptyIterator implementation. Collections.emptyIterator was added in 1.7
and we need to able to compile with 1.6. There is no spec requirement on
SynchronousQueue.iterator(). I think the test just took advantage the
private implementation of SynchronousQueue.
-Chris.
Mike
On Dec 8 2011, at 03:33 , Chris Hegarty wrote:
On 08/12/2011 05:13, David Holmes wrote:
....
I also think the SynchronousQueue has no business being used in this
test. Though I confess I'm unclear what this test is for - is it for
emptyIterator() or for "iterators of empty collections" ?
Thanks David, so the proposed change is to simple remove SynchronousQueue.
--- a/test/java/util/Collections/EmptyIterator.java Wed Dec 07 10:17:34
2011 +0000
+++ b/test/java/util/Collections/EmptyIterator.java Thu Dec 08 11:28:16
2011 +0000
@@ -35,8 +35,6 @@ public class EmptyIterator {
void test(String[] args) throws Throwable {
testEmptyCollection(Collections.<Object>emptyList());
testEmptyCollection(Collections.<Object>emptySet());
- testEmptyCollection(new java.util.concurrent.
- SynchronousQueue<Object>());
testEmptyMap(Collections.<Object, Object>emptyMap());
Since it is trivial, I'll push it with the warning changes.
-Chris.
David
-----