History log of /libcore/luni/src/main/java/java/util/BitSet.java
Revision Date Author Comments
8ffa0b68c9fd3f722bee2bcd94b1d38151a0791d 13-May-2013 Elliott Hughes <enh@google.com> Un-@hide various APIs.

Bug: 3484927
Change-Id: I4cda326a31240135d883528d9cb976a9db084234
834ce234b54466ba230b3c7199d4363a837c5628 07-Sep-2011 Elliott Hughes <enh@google.com> Improve detail messages for throwers of NegativeArraySizeException.

(cherry-pick of e1766a71541cbc592c6ceb6fe703258bebd9c15e.)

Change-Id: Ib208ac64d26f2969299667d3312eb0fd1fdda3d1
049ddf9438b4707faccf7bf01abcc3a24eaf9978 16-May-2012 Elliott Hughes <enh@google.com> Fix BitSet.nextClearBit.

Bug: http://code.google.com/p/android/issues/detail?id=31036

(cherry picked from commit 431d246358fa832bc2e759fcaec9c4ad9f0b09a7)

Change-Id: If5acc7bbfdba12d98b8a6ef02b887eafa29cb2d8
431d246358fa832bc2e759fcaec9c4ad9f0b09a7 16-May-2012 Elliott Hughes <enh@google.com> Fix BitSet.nextClearBit.

Bug: http://code.google.com/p/android/issues/detail?id=31036
Change-Id: I45762449b56773cb5eb323bda7728e8c63a50487
52c4cc5aa39d8e64cb7d57a86fa712ddb316d89d 14-Mar-2011 Elliott Hughes <enh@google.com> More BitSet work.

Fixes bugs in or and xor, implements toByteArray, simplifies
valueOf(ByteBuffer) and arrayForBits, tidies up documentation and adds trivial
implementations of previousSetBit and previousClearBit.

Bug: 3484927
Change-Id: Ie5159fb97414f35da32903e26ef5e668b8f36568
27a5b793cc7ae8a72ba2f767214a828becdc64cd 10-Mar-2011 Elliott Hughes <enh@google.com> Rewrite BitSet and add the new valueOf and toLongArray methods.

All four overloads of valueOf (byte[], long[], ByteBuffer, LongBuffer) are
included. There's still toByteArray and previousClearBit/previousSetBit to
add in a later change. This includes all the rewriting of BitSet I planned on,
though it may be possible to simplify it still further (in particular, I left
get(int, int) pretty much as it was).

This implementation is faster than the old one, as well as clearer, and it
also has a more sane performance profile; operations that ought to be cheap --
such as isEmpty -- are now cheap, and you now always amortize the cost of any
work you cause to be done, where before you might have to do it repeatedly
until a structural change.

The new code also makes better use of Long's functionality.

Bug: 3484927
Change-Id: I180e6ae836437e78a8b6ca0a7a5d522e58f3d911
df1414c93940bc672af318237a8a5e38e0b64e70 14-Jan-2011 Elliott Hughes <enh@google.com> Remove a harmony pessimization from BitSet.cardinality.

Long.bitCount is 4x faster on dalvik, 10x on the JVM.

Change-Id: I131cd39846d4fc4eb68a5ed0ad0b7a2296941678
fb0ec0e650bf8be35acb0d47da0311a7c446aa33 14-Jan-2011 Elliott Hughes <enh@google.com> Remove useless android-changed comments.

I've changed useful ones to regular comments or TODOs, as appropriate.

I've left ones in code like java.util.concurrent where we really are
tracking an upstream source, making the change markers useful.

I've left a handful of others where I intend to actually investigate
the implied TODOs before deciding how to resolve them.

Change-Id: Iaf71059b818596351cf8ee5a3cf3c85586051fa6
a1603838fe9e865575c87982e32c6343740e464c 11-Dec-2010 Elliott Hughes <enh@google.com> Lots more bounds-checking/exception-throwing consistency.

Overflow-safe checks all round, plus better detail messages. This isn't
quite everything, but it's a large chunk of the work. Most notably, this
is all of io and nio.

There are numerous changes of exception priority here, and the harmony
tests noticed a subset of them in the nio code. I've modified our checked-out
copy of the tests to accept any of the throwable exceptions.

Change-Id: Id185f1228fb9a1d5fc9494e78375b5623fb0fe14
1d58625189328f29c10fa98d52512ee6cf8cc641 26-Aug-2010 Ben Dodson <bjdodson@google.com> Update for changes to @code processing

Change-Id: Ifb7dbe3105bdef15dadb84740845a71b019d62e3
b1396870f92135aa140bd2b86221768dea5bc11d 25-May-2010 Elliott Hughes <enh@google.com> Remove the luni localized exception messages.

Also fix a bug I introduced in KXmlSerializer: s.isEmpty() is not
equivalent to "".equals(s) if s is allowed to be null.

Bug: 1251121
Change-Id: I41a0a98ffb49f214041c9110f824d327af5c34e8
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
fd6bb3510c2f94d636f3572dcf5f7f4dcd1a2726 13-May-2010 Elliott Hughes <enh@google.com> Remove //$NON-NLS-\d$ cruft.

Mostly done by perl(1), with manual cleanup of the few misspelled instances.
This makes our trailing whitespace slightly worse, but I'll fix all that with
a follow-on change.

Change-Id: I0b4ca98819be6f9519c4ba980d759bd1ee1a0303
4fefecee9d4a5d2a4510f516b4015607b19e8d09 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
1c422fc0ab0692e10a05af6f48c6276c4dad4bea 16-Oct-2009 Jesse Wilson <jessewilson@google.com> Respond to impossible CloneNotSupportedExceptions with AssertionErrors.

See bug 2183132.
a389b4a499f40379b0b204d7ba1c2057663d95c0 11-Aug-2009 Jesse Wilson <jessewilson@google.com> Update Luni to Harmony r802921.

Notable changes:
- replaced StringBuffer with StringBuilder in several places
- fixed a problem with BufferedInputStream's newline characters (EBCDIC)
- cleanup Timer's finalizer helper object
- new cache for the canonical path of a file
- fixed concurrency issue with ArrayList
- floating point parsing now trims length for very small numbers
- encoding specified "UTF-8" when converting some byte[]s to strings (JarURLConnection, Util, OSFileSystem)
- Harmony now implements floor and ceil in Java. We continue to use native code.
f5597e626ecf7949d249dea08c1a2964d890ec11 25-Jul-2009 Jesse Wilson <jessewilson@google.com> Integrate luni module (but not tests) to Harmony r772995.

Notable changes
- Stripped "@since Android 1.0" from many files. Most files
are now 100% the same in Dalvik and Harmony.
- AbstractStringBuilder.reverse() supports surrogates
- AbstractStringBuilder shares less to waste less memory
- Bitset optimized
- BufferedInputStream changed to support unsynchronized close()
- BufferedOutputStream does flushInternal
- BufferedReader supports EBCDIC NEL
- Collections.synchronizedList().indexOf() does a copy for more concurrency
- Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl
and ServerSocketChannelImpl (these depend on internal APIs changed in
this update)
- DataInputStream/DataOutputStream now use a small buffer to limit the
number of times the underlying stream is accessed
- Date now has a minutes offset, more efficient toString()
- ExposedByteArrayInputStream: new internal class
- DeleteOnExit moved to top-level class
- FileDescriptor.isValid() now non-native
- Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending)
- FileURLConnection now guesses content types from streams
- HashMap iterator changes
- Hashtable iterator changes
- INetworkSystem
- removes bind2(), createMulticastSocket, sendStream(),
- renames createSocket to createStreamSocket
- JarURLConnection rewritten
- LinkedHashMap: new iterator
- Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik
- ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik
- ProxyClassFile - many changes
- String - optimized ascii for toLowerCase, toUpperCase, compare
- Timer - rewritten
- TreeMap - rewritten
- URLClassLoader - new
- URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content
to lookup content type handlers
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution