I've posted a webrev for review at 

http://cr.openjdk.java.net/~mduigou/6728865.0/webrev/

which improves the behaviour of Collections.disjoint() when the collection c1 
is not a Set and is larger than c2.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6728865

I've included some other micro-optimizations suggested by the issue and by 
common usage. 

One optimization, the checks whether either collection is empty using 
isEmpty(), may slightly degrade performance relative to the current 
implementation but should be a good tradeoff for cases where either of the 
collections are empty.

I've also upgraded the javadoc to newer style conventions and included the 
missing @return.

Any comments or feedback welcome.

Mike

Reply via email to