[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/42808] EnumSet.allOf behavior differs from Sun 1.5 with e
btaitelb at gmail dot com
[Bug classpath/42808] EnumSet.allOf behavior differs from Sun 1.5 with empty collection
19 Jan 2010 20:34:01 -0000
------- Comment #1 from btaitelb at gmail dot com 2010-01-19 20:34 -------
Created an attachment (id=19660)
adds support for calling allOf on empty collections
This is my first go at a patch. I've tested this with empty collections, but
haven't tested with non-empty ones.
Is there a testsuite somewhere that includes tests for this class?
I pulled out the anonymous inner class implementation of an EnumSet from the
of(T first) method into a private static inner class, and moved the logic of
setting the enumClass and instantiating the store with the correct size to the
add(T val) method of the implementation class (where this logic takes place the
first time this method is called).