summaryrefslogtreecommitdiffstats
path: root/nio_char/src
Commit message (Collapse)AuthorAgeFilesLines
* More Charset/ICU cleanup.Elliott Hughes2010-04-021-31/+22
| | | | | | | | | | | | | | | | I've been feeling guilty about leaving broken double-checked locking (missing the "volatile") in harmony's Charset code. A quick investigation showed that the method that it's intended to optimize is basically never called, and the RI's documentation explicitly says "don't call this; it's slow". So this patch fixes that. I've also improved our documentation. I've also deleted a bunch of dead code. I've also tidied up some dodgy native string handling. Change-Id: Iad69ebb3459d9cc4c4ff37b255d458b83fe40132
* Start cleaning up the Charset implementation.Elliott Hughes2010-03-261-145/+56
| | | | | | | | | | | | | | This was going to be https://issues.apache.org/jira/browse/HARMONY-6461, but I couldn't resist cleaning up some of the surrounding code, and ended up cleaning up some of our native code too. In the course of the afternoon I spent on this, I lost my conviction that the upstream change makes sense, so I reverted that, leaving this change just pure cleanup. (Note that the cleanup work is incomplete. This is an improvement, but there's plenty left to do. I just don't want to get too distracted until all the Java 6 changes are done.) Change-Id: I56841db5f6c038bbf7942e83a148dca546519269
* Remove explicit 8192 arguments to BufferedReader and friends.Elliott Hughes2010-03-231-6/+2
| | | | | | | | | | | These were clearly added just to shut up our own warning, and are now unnecessary and misleading to future maintainers. There's one barely-related change: InputStreamReader and OutputStreamWriter are very similar, and this patch makes them more similar, and adds a few missing modifiers from their fields. Change-Id: I959011f914ff215e92bbfa41c1bac66465803685
* Remove all remaining "@since Android" tags.Elliott Hughes2010-03-223-7/+0
| | | | | | | I've fixed a few typos, and removed a few of the more egregiously nonsensical or incorrect comments that were nearby. Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
* Resync a load of tests with upstream, make our build faster.Elliott Hughes2010-02-194-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | I started off with a mission to remove uses of dalvik.annotation.* (stuff like @TestTargetNew and other useless junk that just makes it harder to stay in sync with upstream). I wrote a script to go through tests showing me the diff between what we have and what upstream has, thinking that in cases where upstream has also added tests, I may as well pull them in at the same time... ...but I didn't realize how close we were to having dx fill its 1.5GiB heap. After trying various alternatives, I decided to bite the bullet and break core-tests up into one .jar per module. This adds parallelism back into this, the slowest part of our build. (I can do even better, but I'll do that in a separate patch, preferably after we've merged recent changes from master.) Only a couple of dependencies were problematic: the worthless TestSuiteFactory which already contained a comment suggesting we get rid of it, and the fact that some tests -- most notably the concurrent ones -- also contained main methods that started the JUnit tty-based TestRunner. (In the long run, we want to be running the harmony tests directly from a pristine "svn co" of upstream, using DalvikRunner. But this will be a big help in the meantime, and starts the work of getting our current copy of the tests into a state where we can start to extract any meaningful changes/additions we've made.)
* Remove obviously bogus @KnownFailure annotations.Elliott Hughes2010-02-033-7/+0
| | | | | | | | | | | | | | We've already agreed @KnownFailure Must Die (to be replaced by expectations for DalvikRunner), but some are -- I think -- obviously in need of investigation. This patch removes @KnownFailure for all cases where the reason looks bogus. I've left the @KnownFailure annotations in cases where I it looks "reasonable" in that we simply haven't implemented the functionality (pack200, say), and a few other cases. Those should probably be done in a separate patch that adds expectations at the same time. But these ones, I think, all need investigating. (There's a scary number of Arabic-related bugs in here, given that we're supposed to be shipping Arabic in froyo.)
* A new hygenic way for tests to clean up before or after execution.Jesse Wilson2009-10-251-0/+3
| | | | This replaces PrefsTester and is more general purpose.
* Avoid shadowing fields from the superclass testcase.Jesse Wilson2009-10-201-12/+0
|
* Removing caching of file canonical path caching, and fixing NIO tests.Jesse Wilson2009-10-192-160/+5
| | | | | I checked in some regressions in the NIO test cases with the NIO patch; this addresses those problems.
* Update NIO and NIO char packages to Harmony 802921.Jesse Wilson2009-10-1616-418/+919
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes: - We don't use Harmony's new indexing for SelectorImpl. See the long bug thread on Harmony's site, https://issues.apache.org/jira/browse/HARMONY-6312 This patch includes the latest Harmony changes to SelectorImpl, which have been optimized since this patch was first created. - Several uses of StringBuffer updated to use StringBuilder - CharBuffer.read implementation changes - Additional checking in CharsetEncoder - Some inner classes made static - Harmony changed their Charset impl from ICU to Java. We're sticking with ICU. - Harmony added support for epoll. We're sticking with standard 'poll'. commit 2ed6cb602a52f4681afbf1348928f1b0c36d914d Merge: 8a74fca bcc5ec7 Author: Jesse Wilson <jessewilson@google.com> Date: Fri Aug 14 15:14:10 2009 -0700 Merge branch 'nio_802921' into nio_dalvik Conflicts: libcore/nio/.classpath libcore/nio/META-INF/MANIFEST.MF libcore/nio/build.xml libcore/nio/make/exclude.linux.x86.drl libcore/nio/make/exclude.linux.x86.ibm libcore/nio/make/exclude.linux.x86_64.drl libcore/nio/src/main/java/java/nio/BaseByteBuffer.java libcore/nio/src/main/java/java/nio/Buffer.java libcore/nio/src/main/java/java/nio/BufferOverflowException.java libcore/nio/src/main/java/java/nio/BufferUnderflowException.java libcore/nio/src/main/java/java/nio/ByteBuffer.java libcore/nio/src/main/java/java/nio/ByteOrder.java libcore/nio/src/main/java/java/nio/CharArrayBuffer.java libcore/nio/src/main/java/java/nio/CharBuffer.java libcore/nio/src/main/java/java/nio/CharSequenceAdapter.java libcore/nio/src/main/java/java/nio/CharToByteBufferAdapter.java libcore/nio/src/main/java/java/nio/DirectByteBuffer.java libcore/nio/src/main/java/java/nio/DirectByteBuffers.java libcore/nio/src/main/java/java/nio/DoubleArrayBuffer.java libcore/nio/src/main/java/java/nio/DoubleBuffer.java libcore/nio/src/main/java/java/nio/DoubleToByteBufferAdapter.java libcore/nio/src/main/java/java/nio/FloatArrayBuffer.java libcore/nio/src/main/java/java/nio/FloatBuffer.java libcore/nio/src/main/java/java/nio/FloatToByteBufferAdapter.java libcore/nio/src/main/java/java/nio/HeapByteBuffer.java libcore/nio/src/main/java/java/nio/IntArrayBuffer.java libcore/nio/src/main/java/java/nio/IntBuffer.java libcore/nio/src/main/java/java/nio/IntToByteBufferAdapter.java libcore/nio/src/main/java/java/nio/InvalidMarkException.java libcore/nio/src/main/java/java/nio/LongArrayBuffer.java libcore/nio/src/main/java/java/nio/LongBuffer.java libcore/nio/src/main/java/java/nio/LongToByteBufferAdapter.java libcore/nio/src/main/java/java/nio/MappedByteBuffer.java libcore/nio/src/main/java/java/nio/MappedByteBufferAdapter.java libcore/nio/src/main/java/java/nio/ReadOnlyBufferException.java libcore/nio/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteCharArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteDirectByteBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteHeapByteBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteIntArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteLongArrayBuffer.java libcore/nio/src/main/java/java/nio/ReadWriteShortArrayBuffer.java libcore/nio/src/main/java/java/nio/ShortArrayBuffer.java libcore/nio/src/main/java/java/nio/ShortBuffer.java libcore/nio/src/main/java/java/nio/ShortToByteBufferAdapter.java libcore/nio/src/main/java/java/nio/channels/AlreadyConnectedException.java libcore/nio/src/main/java/java/nio/channels/AsynchronousCloseException.java libcore/nio/src/main/java/java/nio/channels/ByteChannel.java libcore/nio/src/main/java/java/nio/channels/CancelledKeyException.java libcore/nio/src/main/java/java/nio/channels/Channel.java libcore/nio/src/main/java/java/nio/channels/Channels.java libcore/nio/src/main/java/java/nio/channels/ClosedByInterruptException.java libcore/nio/src/main/java/java/nio/channels/ClosedChannelException.java libcore/nio/src/main/java/java/nio/channels/ClosedSelectorException.java libcore/nio/src/main/java/java/nio/channels/ConnectionPendingException.java libcore/nio/src/main/java/java/nio/channels/DatagramChannel.java libcore/nio/src/main/java/java/nio/channels/FileChannel.java libcore/nio/src/main/java/java/nio/channels/FileLock.java libcore/nio/src/main/java/java/nio/channels/FileLockInterruptionException.java libcore/nio/src/main/java/java/nio/channels/GatheringByteChannel.java libcore/nio/src/main/java/java/nio/channels/IllegalBlockingModeException.java libcore/nio/src/main/java/java/nio/channels/IllegalSelectorException.java libcore/nio/src/main/java/java/nio/channels/InterruptibleChannel.java libcore/nio/src/main/java/java/nio/channels/NoConnectionPendingException.java libcore/nio/src/main/java/java/nio/channels/NonReadableChannelException.java libcore/nio/src/main/java/java/nio/channels/NonWritableChannelException.java libcore/nio/src/main/java/java/nio/channels/NotYetBoundException.java libcore/nio/src/main/java/java/nio/channels/NotYetConnectedException.java libcore/nio/src/main/java/java/nio/channels/OverlappingFileLockException.java libcore/nio/src/main/java/java/nio/channels/Pipe.java libcore/nio/src/main/java/java/nio/channels/ReadableByteChannel.java libcore/nio/src/main/java/java/nio/channels/ScatteringByteChannel.java libcore/nio/src/main/java/java/nio/channels/SelectableChannel.java libcore/nio/src/main/java/java/nio/channels/SelectionKey.java libcore/nio/src/main/java/java/nio/channels/Selector.java libcore/nio/src/main/java/java/nio/channels/ServerSocketChannel.java libcore/nio/src/main/java/java/nio/channels/SocketChannel.java libcore/nio/src/main/java/java/nio/channels/UnresolvedAddressException.java libcore/nio/src/main/java/java/nio/channels/UnsupportedAddressTypeException.java libcore/nio/src/main/java/java/nio/channels/WritableByteChannel.java libcore/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java libcore/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java libcore/nio/src/main/java/java/nio/channels/spi/AbstractSelectionKey.java libcore/nio/src/main/java/java/nio/channels/spi/AbstractSelector.java libcore/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java libcore/nio/src/main/java/org/apache/harmony/nio/AddressUtil.java libcore/nio/src/main/java/org/apache/harmony/nio/FileChannelFactory.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/DirectBuffer.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileLockImpl.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/IOUtil.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/ReadOnlyFileChannel.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/ReadWriteFileChannel.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/SelectorImpl.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/SelectorProviderImpl.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/SocketChannelImpl.java libcore/nio/src/main/java/org/apache/harmony/nio/internal/WriteOnlyFileChannel.java libcore/nio/src/main/native/nio/shared/DirectBufferUtil.c libcore/nio/src/main/native/nio/unix/exports.txt libcore/nio/src/main/native/nio/unix/makefile libcore/nio/src/main/native/nio/windows/makefile libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileChannelLockingTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileChannelWin32OnlyTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileLockTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/ServerSocketChannelTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectableChannelTest.java libcore/nio_char/.classpath libcore/nio_char/META-INF/MANIFEST.MF libcore/nio_char/build.xml libcore/nio_char/src/main/java/java/nio/charset/CharacterCodingException.java libcore/nio_char/src/main/java/java/nio/charset/Charset.java libcore/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java libcore/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java libcore/nio_char/src/main/java/java/nio/charset/CoderMalfunctionError.java libcore/nio_char/src/main/java/java/nio/charset/CoderResult.java libcore/nio_char/src/main/java/java/nio/charset/CodingErrorAction.java libcore/nio_char/src/main/java/java/nio/charset/IllegalCharsetNameException.java libcore/nio_char/src/main/java/java/nio/charset/MalformedInputException.java libcore/nio_char/src/main/java/java/nio/charset/UnmappableCharacterException.java libcore/nio_char/src/main/java/java/nio/charset/UnsupportedCharsetException.java libcore/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java libcore/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java libcore/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetEncoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetDecoderTest.java libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetEncoderTest.java commit 8a74fca0d85c82a9d02a83d00fd028d9b09755f7 Author: Jesse Wilson <jessewilson@google.com> Date: Thu Aug 13 16:03:25 2009 -0700 Dalvik Nio, Nio char commit bcc5ec78806787fbecab742e716fc0d63bcece5c Author: Jesse Wilson <jessewilson@google.com> Date: Thu Aug 13 16:01:06 2009 -0700 Nio, nio char 802921 commit fc1e09e74aec8e49e0e23f13643deed1e9112af4 Author: Jesse Wilson <jessewilson@google.com> Date: Thu Aug 13 15:48:17 2009 -0700 Nio, nio char 527399
* Integrate luni module (but not tests) to Harmony r772995.Jesse Wilson2009-07-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 1844104: Fix buffer overwrite bugs in CharsetEncoderICU and ↵Mihai Preda2009-05-262-0/+184
| | | | | | CharsetDecoderICU. And add unit test.
* AI 147120: am: CL 147118 Several fixes to reduce failing tests in the cts hostUrs Grob2009-04-212-5/+14
| | | | | | | | | | | | | | | | - Removing tests that are placed in a protected package name. They were not part of the cts tests. - Fixing a case of an Exception thrown in the static initializer of GBCharsetEncoderTest. - Remove copy/paste code which led to an exception in a 2nd thread (the test did not fail, but its output was reported in logcat) - fixing a test case in FileTest - removing test code in StmtTest that tested badly specified operations and failed. Original author: ursg Merged from: //branches/cupcake/... Automated import of CL 147120
* AI 143637: am: CL 143457 Bringing the nio_char tests down to zero failures.Jorg Pleumann2009-03-313-16/+18
| | | | | | | Original author: jorgp Merged from: //branches/cupcake/... Automated import of CL 143637
* auto import from //branches/cupcake_rel/...@140373The Android Open Source Project2009-03-181-26/+7
|
* auto import from //branches/cupcake/...@137873The Android Open Source Project2009-03-113-3/+0
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-03117-0/+25154
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-03117-25154/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-1024-101/+180
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-0994-3759/+15653
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-1754-534/+3215
|
* Initial ContributionThe Android Open Source Project2008-10-2164-0/+10500