• Home
  • History
  • Annotate
  • only in /libcore/luni/src/main/java/java/
History log of /libcore/luni/src/main/java/java/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
10bac63511d71b86bc753215c72bd805d407566a 06-Jun-2016 Shubham Ajmera <shubhamajmera@google.com> Correct address fields in ByteBufferAsXBuffer classes

The value of the address field should be equals to the first element of
the ByteBufferAsXBuffer class, previously, it was pointing to the first
element of the underlying directbytebuffer object.

Bug: 28964300
(cherry-picked from commit e0f383ffa625e584e81061ef4ddef83a9f48809e)
Change-Id: I6dfc98ba408c524580198ea168923981b23a0bc2
io/NIOAccess.java
d2449bb576ad1e3a3877364e5e1ae28625f69e35 25-Apr-2016 Yi Kong <yikong@google.com> Update URLs to Java technotes and platform docs

Fix links to {@docRoot}/../{technotes,platform} pages.

This is done by batch editing using the following script:
grep @docRoot -rl | xargs sed -i 's/\/..\/technotes/r\/openjdk-redirect.html?v=8\&path=\/technotes/g;s/\/..\/platform/openjdk-redirect.html?v=8\&path=\/platform/g'

Bug: 27540501
Change-Id: Ib5634cd461fbba37dd94ddad9660910dc9397fe7
til/concurrent/BlockingDeque.java
111fdf10801861427f59e42c34c40d5df484053b 03-May-2016 Richard Uhler <ruhler@google.com> Hold a ClassLoader reference in NativeAllocationRegistry.

So that the native library isn't unloaded before we have a chance to
call the freeFunction.

Bug: 28406866
Change-Id: I1c876b90837902ac3e65a41eb4a4fdd4f84a9b6c
ath/BigInt.java
1bdc6bc1c72b033ed860360e69fc9f1f1121579b 22-Apr-2016 Narayan Kamath <narayan@google.com> CharsetEncoder/Decoder: Use NativeAllocationRegistry.

Works around issues with finalizer ordering.

bug: 26076560

(cherry picked from commit c672ce800bbc27cb79f78d9204a51ec06ef1ec3d)

Change-Id: I434842966fe2cda70aa955250162c562ce0f8991
io/charset/CharsetDecoderICU.java
io/charset/CharsetEncoderICU.java
0ee1606ffb8586014fb3ea6e540c07d7180d9e9e 12-Apr-2016 Narayan Kamath <narayan@google.com> ConcurrentHashMap: update API for keySet.

On Android M and earlier, keySet() returned a Set<K>. Changing the
return type to a type that doesn't exist on previous releases is an
incompatible change. We therefore revert it so that applications that
compile against the Android N SDK will continue to work on older
releases.

Note that there is no API update that accompanies this change. Due to
an asymmetry in doclava, this method is absent from the *api.txt files
but *does* exist in the stubs.

bug: 28099367
Change-Id: Ife90592847de1752cd33efdb2e7e0ec082df42fc
til/concurrent/ConcurrentHashMap.java
ed47d30308588e419164d9311a41b04b8eefa04c 18-Mar-2016 Shubham Ajmera <shubhamajmera@google.com> Add OpenJDK 8 java.util.List Default Methods

and corresponding tests.

Added replaceAll and sort methods from the upstream except for the
CopyOnWriteArrayList.

Added forEach method along with the above two methods in
CopyOnWriteArrayList.

Bug: 27693350
Bug: 27540008
(cherry-picked from commit 67b8c3f1414bf04e53c094b951c8ea7903998d90)
Change-Id: Id32df836e79bee614c0dce8c61dbc7b06731265d
til/concurrent/CopyOnWriteArrayList.java
ff18b5f136f92154f2e05217e3953d10f459e561 16-Mar-2016 Igor Murashkin <iam@google.com> Add openJdk8 java.util.stream package

Based on openJdk 8u60 source & iam@ stream prototype in
ag/872080

Uncommented all code that was waiting for java.util.stream
to show up

Differences from original sources:
- Removed unsignedDivision usage from LongStream, it's not currently
supported and we don't expect that large workloads on mobile devices.
- Removed java.nio.file references.
- Removed (yet) not implemented stream-related methods from
other packages listed in package-info.java.

Bug: 27692239
Change-Id: Ie24e60e8248367b576ef91046837ccde152de373
(cherry picked from commit d0a2645e29a9b84d7e5ec822eb9904e93bd6c013)
til/concurrent/CompletionStage.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ThreadLocalRandom.java
a070272beecae23c49421c9a04d712455d121e50 17-Mar-2016 Narayan Kamath <narayan@google.com> ThreadPoolExecutor: Relax check on core pool size.

This was added by the recent upstream pull of these libraries
and it manages to break a large number of apps.

bug: 27702221

(cherry picked from commit dfec9b5386ca028cc1468f3e2717120ab6274702)

Change-Id: Ib3c7fb0089eb9de5a3c06cd0b2fbcc1edf00ec5b
til/concurrent/ThreadPoolExecutor.java
5409226c71aa1e090291f391faeb4249f5447472 16-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Revert to android-specific CopyOnWriteArrayList

Bug: 27426599
Change-Id: Ibc4682a5d296d51f94494385aa2b0149e618a98b
(cherry picked from commit da61c6a1478cd1a14f3e654460292228f4f15e88)
til/concurrent/CopyOnWriteArrayList.java
e8b323c7cb7d55be9a4df579231e44f04f53d766 11-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> JSR-166 update without java 1.9 method/classes

Second attempt, in frist one I've submitted some code from openJdk 1.9
that shouldn't be here, orignial change can be found at
5328e07d282bef36ac8b757bbee16a761415b2c4

Adapted from sources taken from CVS using:
cvs -d ':pserver:anonymous@gee.cs.oswego.edu/home/jsr166/jsr166' checkout -D "03/03/2016 10:00:00 GMT" jsr166

This time with hidden/removed "@since 9" methods and classes

Bug: 27426599
Change-Id: Ibd8d26e13cba091bfd983c73d005e4f8d8f5946d
(cherry picked from commit b8b75116273ecfdb8ffdd1869b1c0dd04570a95e)
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/Callable.java
til/concurrent/CompletableFuture.java
til/concurrent/CompletionException.java
til/concurrent/CompletionStage.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentMap.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArrayList.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CountedCompleter.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Exchanger.java
til/concurrent/Executor.java
til/concurrent/ExecutorCompletionService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
til/concurrent/Future.java
til/concurrent/FutureTask.java
til/concurrent/Helpers.java
til/concurrent/LinkedBlockingDeque.java
til/concurrent/LinkedBlockingQueue.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/RecursiveAction.java
til/concurrent/RecursiveTask.java
til/concurrent/RunnableScheduledFuture.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadFactory.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/TransferQueue.java
til/concurrent/atomic/AtomicBoolean.java
til/concurrent/atomic/AtomicInteger.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReference.java
til/concurrent/atomic/AtomicReferenceArray.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/atomic/DoubleAccumulator.java
til/concurrent/atomic/DoubleAdder.java
til/concurrent/atomic/Fences.java
til/concurrent/atomic/LongAccumulator.java
til/concurrent/atomic/LongAdder.java
til/concurrent/atomic/Striped64.java
til/concurrent/atomic/package-info.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/Lock.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReadWriteLock.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/locks/StampedLock.java
til/concurrent/package-info.java
3984cdba314a0f7b0587000dec99ff26fd9bcbb5 02-Mar-2016 Narayan Kamath <narayan@google.com> Add Iterator.forEachRemaining / Iterator.remove.

Also pulls in various specializations from concrete subclasses.

bug: 27426688

(cherry picked from commit e633814ad4dc6c7dc0c34080292c2c9622cbd5a3)

Change-Id: Ic778fb61768ec2495e1ac17029afbdfd97d5e6db
til/concurrent/CopyOnWriteArrayList.java
be0e537d8953365ae5a008350461ccf777a719fb 16-Oct-2015 Neil Fuller <nfuller@google.com> Refresh of upstream JSR166 code

This is a pull of same code we should already have.
This is the version of classes found in the jdk7/
dir.

cvs -d ':pserver:anonymous@gee.cs.oswego.edu/home/jsr166/jsr166' checkout -D "03/24/2015 22:30:53 GMT" jsr166

Most Android modifications have been reapplied excluding
some changes to NullPointerException constructor
arguments). The majority of the changes are documentation
cleanups, with the exception of ArrayDeque.

Bug: 24726356

(cherry picked from commit fd81a99407d318ea3d8b5782294a0644e580d126)

Change-Id: If2f85be682d0811092abca720502ed13fa4e1769
til/concurrent/AbstractExecutorService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/Fences.java
4d156849d4b611c57e44cea474097e76f760304e 03-Feb-2016 Kenny Root <kroot@google.com> Blacklist weak ciphers to match previous behavior

In Bouncycastle we had added the ChainStrengthAnalyzer to keep weak keys
from being used in CertPath creation. However, the new CertPathVerifier
uses jdk.certpath.disabledAlgorithms to do the same thing. Add our
previous constraints to this property.

Bug: 26954162
Change-Id: I83e19a03f4bdfd1f96c25bd4bc590ddefb2b8c52
ecurity/security.properties
bf0403930ae8d1e86b3914d18b9711eeeec0adb9 27-Jan-2016 Kenny Root <kroot@google.com> Add a Provider that only does CertPathBuilder and CertPathValidator

Address revert of e4dd44d8a203a5fbf900d81c4b0556ce6d851db2 by only using
the actual types needed for certificate path validation and building.

Bug: 26630788
Change-Id: Ie9215ee27077957ef7bd772d3ab9b00b93eb79d8
ecurity/security.properties
c0461d41e59662d9ecf04215b811155d409ed213 20-Jan-2016 Sergio Giro <sgiro@google.com> Merge "java/security: remove system.scope from security.properties"
01b80be90e45266dbcfa8cd3ec82b574f7ec06c2 19-Jan-2016 Sergio Giro <sgiro@google.com> java/security: remove system.scope from security.properties

Fixes IdentityScopeTest accordingly and solves the bug tagged.
Other bugs that will possibly benefit from this change (still not solved):
26517816
26590281

Bug: 26515695

Change-Id: I7a95da43c61b78f72a132dbe49e0f1b5c31f6137
ecurity/security.properties
8cb7aee05b4d07632b6449065bdc152c494b8cf9 18-Jan-2016 Narayan Kamath <narayan@google.com> Revert "Use sun.security.provider.Sun"

This reverts commit e4dd44d8a203a5fbf900d81c4b0556ce6d851db2.

bug: 26589829
bug: 26589918
bug: 26590007
bug: 26590418
bug: 26588717
bug: 26584371

Change-Id: Iaa303e4d5f52b69eeb1554cb1b7279aa42740988
ecurity/security.properties
af23781a19850224ebe605e1e55ca6523b930dd2 14-Jan-2016 Richard Uhler <ruhler@google.com> Merge "Introduce NativeAllocationRegistry API."
33fc9556dfda6298fcd7c119f68a7375e13cbed9 28-Dec-2015 Richard Uhler <ruhler@google.com> Introduce NativeAllocationRegistry API.

The NativeAllocationRegistry API provides a way to associate native
allocations with Java objects. The native allocations will
automatically be freed when the correspondong Java object becomes
unreachable.

Use NativeAllocationRegistry for BigInt.

Bug: 23130675
Change-Id: If89dc03f0668afdecf1086280d16d2803e07a62a
ath/BigInt.java
ath/NativeBN.java
e4dd44d8a203a5fbf900d81c4b0556ce6d851db2 19-Dec-2015 Kenny Root <kroot@google.com> Use sun.security.provider.Sun

Change-Id: Ic63473d6b7d630e22ecfadcc1f193ad5356b267b
ecurity/security.properties
7e67be298350fdf7b88c17d7be4832eaacc01eb3 30-Dec-2015 Narayan Kamath <narayan@google.com> Remove unused luni java.util.regex.* implementation.

Change-Id: I70ffe3c09be45ffd760cb4bdeee63ec1ddf86596
til/regex/MatchResult.java
til/regex/MatchResultImpl.java
til/regex/Matcher.java
til/regex/Pattern.java
til/regex/PatternSyntaxException.java
til/regex/Splitter.java
071b891828c603fdfb35c922a3873076478dfd33 10-Dec-2015 ganxiaolin <ganxiaolin@xiaomi.com> Fix multi-thread problem in BigInteger hashCode method

Don't change hashCode when calculate it, using tmp variable.

Signed-off-by: ganxiaolin <ganxiaolin@xiaomi.com>
ath/BigInteger.java
fe0e5d3e460de87d24e0224ef10b089289355c47 12-Dec-2015 Narayan Kamath <narayan@google.com> Fix BufferTest#testFreed.

Each DirectByteBuffer now has a MemoryRef object associated with it.
This MemoryRef is shared across its duplicates and slices.

Also contains a few other surrounding cleanups :
- FileChannelImpl now allocates the DirectByteBuffer directly.
- Removed a pointless constructor from DirectByteBuffer.
- Removed unnecessary (pos << 0) shifts.

bug: 26020981
Change-Id: I573b48e621667c3cc2d78287678fba240783603d
io/NioUtils.java
6c0e55c2bbd4cf2798d6642a259f9983f69c979e 03-Dec-2015 Narayan Kamath <narayan@google.com> Scripted removal of unused libcore files.

All files that do not appear in non_openjdk_java_files.mk and
are present in a top level dir (luni, libart..) that *does* appear
in that file have been deleted.

Change-Id: Id831184333216c229a53398a93bd3d804332041e
wt/font/NumericShaper.java
wt/font/TextAttribute.java
eans/IndexedPropertyChangeEvent.java
eans/PropertyChangeEvent.java
eans/PropertyChangeListener.java
eans/PropertyChangeListenerProxy.java
eans/PropertyChangeSupport.java
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/CharConversionException.java
o/Closeable.java
o/Console.java
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/EOFException.java
o/EmulatedFields.java
o/EmulatedFieldsForDumping.java
o/EmulatedFieldsForLoading.java
o/Externalizable.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FileInputStream.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/FilterWriter.java
o/Flushable.java
o/IOError.java
o/IOException.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputStream.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/Serializable.java
o/SerializablePermission.java
o/SerializationHandleMap.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
ang/AbstractMethodError.java
ang/Appendable.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/AutoCloseable.java
ang/Boolean.java
ang/Byte.java
ang/CharSequence.java
ang/Character.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/ClassNotFoundException.java
ang/CloneNotSupportedException.java
ang/Cloneable.java
ang/Comparable.java
ang/Compiler.java
ang/Deprecated.java
ang/Double.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/HexStringParser.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/IntegralToString.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Package.java
ang/Process.java
ang/ProcessBuilder.java
ang/ProcessManager.java
ang/Readable.java
ang/RealToString.java
ang/ReflectiveOperationException.java
ang/Runnable.java
ang/Runtime.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SafeVarargs.java
ang/SecurityException.java
ang/SecurityManager.java
ang/Short.java
ang/StackOverflowError.java
ang/StackTraceElement.java
ang/StrictMath.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/StringToReal.java
ang/SuppressWarnings.java
ang/System.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/Throwable.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/annotation/Annotation.java
ang/annotation/AnnotationFormatError.java
ang/annotation/AnnotationTypeMismatchException.java
ang/annotation/Documented.java
ang/annotation/ElementType.java
ang/annotation/IncompleteAnnotationException.java
ang/annotation/Inherited.java
ang/annotation/Retention.java
ang/annotation/RetentionPolicy.java
ang/annotation/Target.java
ang/ref/PhantomReference.java
ang/ref/ReferenceQueue.java
ang/ref/SoftReference.java
ang/ref/WeakReference.java
ang/reflect/AnnotatedElement.java
ang/reflect/Array.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ang/reflect/WildcardType.java
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ConnectException.java
et/ContentHandler.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/CookieManager.java
et/CookiePolicy.java
et/CookieStore.java
et/CookieStoreImpl.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpCookie.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/IDN.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/InetUnixAddress.java
et/InterfaceAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PlainDatagramSocketImpl.java
et/PlainServerSocketImpl.java
et/PlainSocketImpl.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketAddress.java
et/SocketException.java
et/SocketImpl.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketTimeoutException.java
et/SocketUtils.java
et/Socks4Message.java
et/URI.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
io/Buffer.java
io/BufferOverflowException.java
io/BufferUnderflowException.java
io/ByteArrayBuffer.java
io/ByteBuffer.java
io/ByteBufferAsCharBuffer.java
io/ByteBufferAsDoubleBuffer.java
io/ByteBufferAsFloatBuffer.java
io/ByteBufferAsIntBuffer.java
io/ByteBufferAsLongBuffer.java
io/ByteBufferAsShortBuffer.java
io/ByteOrder.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/DatagramChannelImpl.java
io/DirectByteBuffer.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/FileChannelImpl.java
io/FileDescriptorChannel.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/InvalidMarkException.java
io/IoVec.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/MappedByteBuffer.java
io/MemoryBlock.java
io/PipeImpl.java
io/ReadOnlyBufferException.java
io/SelectionKeyImpl.java
io/SelectorImpl.java
io/SelectorProviderImpl.java
io/ServerSocketChannelImpl.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
io/SocketChannelImpl.java
io/channels/AlreadyConnectedException.java
io/channels/AsynchronousCloseException.java
io/channels/ByteChannel.java
io/channels/CancelledKeyException.java
io/channels/Channel.java
io/channels/Channels.java
io/channels/ClosedByInterruptException.java
io/channels/ClosedChannelException.java
io/channels/ClosedSelectorException.java
io/channels/ConnectionPendingException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/FileLockInterruptionException.java
io/channels/GatheringByteChannel.java
io/channels/IllegalBlockingModeException.java
io/channels/IllegalSelectorException.java
io/channels/InterruptibleChannel.java
io/channels/NoConnectionPendingException.java
io/channels/NonReadableChannelException.java
io/channels/NonWritableChannelException.java
io/channels/NotYetBoundException.java
io/channels/NotYetConnectedException.java
io/channels/OverlappingFileLockException.java
io/channels/Pipe.java
io/channels/ReadableByteChannel.java
io/channels/ScatteringByteChannel.java
io/channels/SelectableChannel.java
io/channels/SelectionKey.java
io/channels/Selector.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
io/channels/UnresolvedAddressException.java
io/channels/UnsupportedAddressTypeException.java
io/channels/WritableByteChannel.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelectableChannel.java
io/channels/spi/AbstractSelectionKey.java
io/channels/spi/AbstractSelector.java
io/channels/spi/SelectorProvider.java
io/charset/CharacterCodingException.java
io/charset/Charset.java
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
io/charset/CoderMalfunctionError.java
io/charset/CoderResult.java
io/charset/CodingErrorAction.java
io/charset/IllegalCharsetNameException.java
io/charset/MalformedInputException.java
io/charset/StandardCharsets.java
io/charset/UnmappableCharacterException.java
io/charset/UnsupportedCharsetException.java
io/charset/spi/CharsetProvider.java
ecurity/AccessControlContext.java
ecurity/AccessControlException.java
ecurity/AccessController.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameterGeneratorSpi.java
ecurity/AlgorithmParameters.java
ecurity/AlgorithmParametersSpi.java
ecurity/AllPermission.java
ecurity/AllPermissionCollection.java
ecurity/AuthProvider.java
ecurity/BasicPermission.java
ecurity/Certificate.java
ecurity/CodeSigner.java
ecurity/CodeSource.java
ecurity/DigestException.java
ecurity/DigestInputStream.java
ecurity/DigestOutputStream.java
ecurity/DomainCombiner.java
ecurity/GeneralSecurityException.java
ecurity/Guard.java
ecurity/GuardedObject.java
ecurity/Identity.java
ecurity/IdentityScope.java
ecurity/InvalidAlgorithmParameterException.java
ecurity/InvalidKeyException.java
ecurity/InvalidParameterException.java
ecurity/Key.java
ecurity/KeyException.java
ecurity/KeyFactory.java
ecurity/KeyFactorySpi.java
ecurity/KeyManagementException.java
ecurity/KeyPair.java
ecurity/KeyPairGenerator.java
ecurity/KeyPairGeneratorSpi.java
ecurity/KeyRep.java
ecurity/KeyStore.java
ecurity/KeyStoreException.java
ecurity/KeyStoreSpi.java
ecurity/MessageDigest.java
ecurity/MessageDigestSpi.java
ecurity/NoSuchAlgorithmException.java
ecurity/NoSuchProviderException.java
ecurity/Permission.java
ecurity/PermissionCollection.java
ecurity/Permissions.java
ecurity/PermissionsHash.java
ecurity/Policy.java
ecurity/PolicySpi.java
ecurity/Principal.java
ecurity/PrivateKey.java
ecurity/PrivilegedAction.java
ecurity/PrivilegedActionException.java
ecurity/PrivilegedExceptionAction.java
ecurity/ProtectionDomain.java
ecurity/Provider.java
ecurity/ProviderException.java
ecurity/PublicKey.java
ecurity/SecureClassLoader.java
ecurity/SecureRandom.java
ecurity/SecureRandomSpi.java
ecurity/Security.java
ecurity/SecurityPermission.java
ecurity/Signature.java
ecurity/SignatureException.java
ecurity/SignatureSpi.java
ecurity/SignedObject.java
ecurity/Signer.java
ecurity/Timestamp.java
ecurity/UnrecoverableEntryException.java
ecurity/UnrecoverableKeyException.java
ecurity/UnresolvedPermission.java
ecurity/acl/Acl.java
ecurity/acl/AclEntry.java
ecurity/acl/AclNotFoundException.java
ecurity/acl/Group.java
ecurity/acl/LastOwnerException.java
ecurity/acl/NotOwnerException.java
ecurity/acl/Owner.java
ecurity/acl/Permission.java
ecurity/acl/package.html
ecurity/cert/CRL.java
ecurity/cert/CRLException.java
ecurity/cert/CRLReason.java
ecurity/cert/CRLSelector.java
ecurity/cert/CertPath.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathBuilderException.java
ecurity/cert/CertPathBuilderResult.java
ecurity/cert/CertPathBuilderSpi.java
ecurity/cert/CertPathParameters.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertPathValidatorException.java
ecurity/cert/CertPathValidatorResult.java
ecurity/cert/CertPathValidatorSpi.java
ecurity/cert/CertSelector.java
ecurity/cert/CertStore.java
ecurity/cert/CertStoreException.java
ecurity/cert/CertStoreParameters.java
ecurity/cert/CertStoreSpi.java
ecurity/cert/Certificate.java
ecurity/cert/CertificateEncodingException.java
ecurity/cert/CertificateException.java
ecurity/cert/CertificateExpiredException.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
ecurity/cert/CertificateNotYetValidException.java
ecurity/cert/CertificateParsingException.java
ecurity/cert/CertificateRevokedException.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/Extension.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/PKIXBuilderParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/PKIXCertPathChecker.java
ecurity/cert/PKIXCertPathValidatorResult.java
ecurity/cert/PKIXParameters.java
ecurity/cert/PolicyNode.java
ecurity/cert/PolicyQualifierInfo.java
ecurity/cert/TrustAnchor.java
ecurity/cert/X509CRL.java
ecurity/cert/X509CRLEntry.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
ecurity/cert/X509Certificate.java
ecurity/cert/X509Extension.java
ecurity/cert/package.html
ecurity/interfaces/DSAKey.java
ecurity/interfaces/DSAKeyPairGenerator.java
ecurity/interfaces/DSAParams.java
ecurity/interfaces/DSAPrivateKey.java
ecurity/interfaces/DSAPublicKey.java
ecurity/interfaces/ECKey.java
ecurity/interfaces/ECPrivateKey.java
ecurity/interfaces/ECPublicKey.java
ecurity/interfaces/RSAKey.java
ecurity/interfaces/RSAMultiPrimePrivateCrtKey.java
ecurity/interfaces/RSAPrivateCrtKey.java
ecurity/interfaces/RSAPrivateKey.java
ecurity/interfaces/RSAPublicKey.java
ecurity/interfaces/package.html
ecurity/package.html
ecurity/spec/AlgorithmParameterSpec.java
ecurity/spec/DSAParameterSpec.java
ecurity/spec/DSAPrivateKeySpec.java
ecurity/spec/DSAPublicKeySpec.java
ecurity/spec/ECField.java
ecurity/spec/ECFieldF2m.java
ecurity/spec/ECFieldFp.java
ecurity/spec/ECGenParameterSpec.java
ecurity/spec/ECParameterSpec.java
ecurity/spec/ECPoint.java
ecurity/spec/ECPrivateKeySpec.java
ecurity/spec/ECPublicKeySpec.java
ecurity/spec/EllipticCurve.java
ecurity/spec/EncodedKeySpec.java
ecurity/spec/InvalidKeySpecException.java
ecurity/spec/InvalidParameterSpecException.java
ecurity/spec/KeySpec.java
ecurity/spec/MGF1ParameterSpec.java
ecurity/spec/PKCS8EncodedKeySpec.java
ecurity/spec/PSSParameterSpec.java
ecurity/spec/RSAKeyGenParameterSpec.java
ecurity/spec/RSAMultiPrimePrivateCrtKeySpec.java
ecurity/spec/RSAOtherPrimeInfo.java
ecurity/spec/RSAPrivateCrtKeySpec.java
ecurity/spec/RSAPrivateKeySpec.java
ecurity/spec/RSAPublicKeySpec.java
ecurity/spec/X509EncodedKeySpec.java
ecurity/spec/package.html
ql/Array.java
ql/BatchUpdateException.java
ql/Blob.java
ql/CallableStatement.java
ql/ClientInfoStatus.java
ql/Clob.java
ql/Connection.java
ql/DataTruncation.java
ql/DatabaseMetaData.java
ql/Date.java
ql/Driver.java
ql/DriverManager.java
ql/DriverPropertyInfo.java
ql/NClob.java
ql/ParameterMetaData.java
ql/PreparedStatement.java
ql/Ref.java
ql/ResultSet.java
ql/ResultSetMetaData.java
ql/RowId.java
ql/RowIdLifetime.java
ql/SQLClientInfoException.java
ql/SQLData.java
ql/SQLDataException.java
ql/SQLException.java
ql/SQLFeatureNotSupportedException.java
ql/SQLInput.java
ql/SQLIntegrityConstraintViolationException.java
ql/SQLInvalidAuthorizationSpecException.java
ql/SQLNonTransientConnectionException.java
ql/SQLNonTransientException.java
ql/SQLOutput.java
ql/SQLPermission.java
ql/SQLRecoverableException.java
ql/SQLSyntaxErrorException.java
ql/SQLTimeoutException.java
ql/SQLTransactionRollbackException.java
ql/SQLTransientConnectionException.java
ql/SQLTransientException.java
ql/SQLWarning.java
ql/SQLXML.java
ql/Savepoint.java
ql/Statement.java
ql/Struct.java
ql/Time.java
ql/Timestamp.java
ql/Types.java
ql/Wrapper.java
ext/Annotation.java
ext/AttributedCharacterIterator.java
ext/AttributedString.java
ext/Bidi.java
ext/BreakIterator.java
ext/CharacterIterator.java
ext/ChoiceFormat.java
ext/CollationElementIterator.java
ext/CollationKey.java
ext/Collator.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/FieldPosition.java
ext/Format.java
ext/IcuIteratorWrapper.java
ext/MessageFormat.java
ext/Normalizer.java
ext/NumberFormat.java
ext/ParseException.java
ext/ParsePosition.java
ext/RuleBasedCollator.java
ext/SimpleDateFormat.java
ext/StringCharacterIterator.java
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractQueue.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/ArrayDeque.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collection.java
til/Collections.java
til/ComparableTimSort.java
til/Comparator.java
til/ConcurrentModificationException.java
til/Currency.java
til/Date.java
til/Deque.java
til/Dictionary.java
til/DualPivotQuicksort.java
til/DuplicateFormatFlagsException.java
til/EmptyStackException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/Grego.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/IllformedLocaleException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MapEntry.java
til/MiniEnumSet.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/NavigableMap.java
til/NavigableSet.java
til/NoSuchElementException.java
til/Objects.java
til/Observable.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/RandomAccess.java
til/ResourceBundle.java
til/Scanner.java
til/ServiceConfigurationError.java
til/ServiceLoader.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/Stack.java
til/StringTokenizer.java
til/TimSort.java
til/TimeZone.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/TreeMap.java
til/TreeSet.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/UnsafeArrayList.java
til/Vector.java
til/WeakHashMap.java
til/jar/Attributes.java
til/jar/JarEntry.java
til/jar/JarException.java
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarOutputStream.java
til/jar/Manifest.java
til/jar/ManifestReader.java
til/jar/Pack200.java
til/logging/ConsoleHandler.java
til/logging/ErrorManager.java
til/logging/FileHandler.java
til/logging/Filter.java
til/logging/Formatter.java
til/logging/Handler.java
til/logging/Level.java
til/logging/LogManager.java
til/logging/LogRecord.java
til/logging/Logger.java
til/logging/LoggingMXBean.java
til/logging/LoggingPermission.java
til/logging/MemoryHandler.java
til/logging/SimpleFormatter.java
til/logging/SocketHandler.java
til/logging/StreamHandler.java
til/logging/XMLFormatter.java
til/prefs/AbstractPreferences.java
til/prefs/BackingStoreException.java
til/prefs/FilePreferencesFactoryImpl.java
til/prefs/FilePreferencesImpl.java
til/prefs/InvalidPreferencesFormatException.java
til/prefs/NodeChangeEvent.java
til/prefs/NodeChangeListener.java
til/prefs/NodeSet.java
til/prefs/PreferenceChangeEvent.java
til/prefs/PreferenceChangeListener.java
til/prefs/Preferences.java
til/prefs/PreferencesFactory.java
til/prefs/XMLParser.java
til/zip/Adler32.java
til/zip/CRC32.java
til/zip/CheckedInputStream.java
til/zip/CheckedOutputStream.java
til/zip/Checksum.java
til/zip/DataFormatException.java
til/zip/Deflater.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/GZIPOutputStream.java
til/zip/Inflater.java
til/zip/InflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/Zip64.java
til/zip/ZipConstants.java
til/zip/ZipEntry.java
til/zip/ZipError.java
til/zip/ZipException.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
f640e11f2a796db071428f97a12ef84888e8ef4d 03-Nov-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Move StrictJarFile to framework/core

Since StrictJarFile is derived from harmony code,
and not used in the libcore itself, we're moving
it to framework/base code.

Bug: 25337946
Change-Id: I477b7934fb3abfb0c7660e23dd46db216c504e73
(cherrypicked from 8996a40bc2d5caa031992765d642021252c4c810)
til/jar/StrictJarFile.java
til/jar/StrictJarManifest.java
til/jar/StrictJarManifestReader.java
til/jar/StrictJarVerifier.java
07ebb42106d30b98f3fb0c107822ff5b4bf4d8f8 25-Nov-2015 Neil Fuller <nfuller@google.com> Merge "Fix expiry checks in HttpCookie" am: 7263b24f8c am: d729610297
am: 006b8b3f79

* commit '006b8b3f7949e3497b495ebcb7b44dc1089f7f08':
Fix expiry checks in HttpCookie
7263b24f8c10284698c82d9153e0995b8a1044d9 25-Nov-2015 Neil Fuller <nfuller@google.com> Merge "Fix expiry checks in HttpCookie"
70b617fe562806bc3e15452a2792fec4355bd54f 20-Nov-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge mnc-dr-enso-dev into master

OpenJDK adjustments for master.
- Restored removed libcore.icu.* classes (needed
by the openjdk java.text.* classes). This will be
undone in short future.
- Adjusted java.lang.* and java.lang.reflect.* classes
for native reflection and other changes in master.

Bug: 25758743
Change-Id: Ifbbe5b1e8661138fc32ad24127f76f711dd585b7
4a0eb884e1ba0a9fc560083dee79f3b55c5d3421 19-Nov-2015 Neil Fuller <nfuller@google.com> Fix expiry checks in HttpCookie

Fixes the expiry checks and adds tests.

Bug: https://code.google.com/p/android/issues/detail?id=191981
Bug: 25682357
Change-Id: I795a470eea829d9a603426514b42c717ac0c2ef9
et/HttpCookie.java
50cf0110a3938c34c69b1e00333b6c68cb0a10ba 19-Nov-2015 Neil Fuller <nfuller@google.com> Merge "Fix for CookieStoreImpl and more tests around Cookie handling"
166e79a4003cd3fcb5d03c9306b48d9f19757065 16-Nov-2015 Neil Fuller <nfuller@google.com> Fix for CookieStoreImpl and more tests around Cookie handling

CookieStoreImpl was not using the same key for retrieval as
for storage. It was working because of the fall-back
"domain" match.

Bug: https://code.google.com/p/android/issues/detail?id=193475
Bug: 25682357
Change-Id: I57767d29525cc8697965c5272a6f6d8410b327d1
et/CookieManager.java
et/CookieStoreImpl.java
et/HttpCookie.java
de28d8844286a60fa0e0acbdc2685546d51fb21a 12-Nov-2015 Narayan Kamath <narayan@google.com> Merge mnc changes into mnc-dr.
1a9ca631d5e2d44f39b556132af3a3cb4e34a966 28-Sep-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Update StrictJarFile.

Also add a hidden ZipEntry constructor that this code expects.

Change-Id: I30c437b016bbbfcebe5a81bad4af3b31ee2317f3
til/jar/StrictJarFile.java
bf07204bff37fa34dbdb32e0a9d790d97ef46a81 12-Nov-2015 Narayan Kamath <narayan@google.com> Merge lmp changes into mnc.

Change-Id: I8f49c58f39dc5f4268c6b5718cab18ed26ac930a
a6a4efbf9240edd745c3804c8ca4f0c346fd47c6 14-Oct-2015 Sergio Giro <sgiro@google.com> libcore: change removal of tasks in Timer#purge

We believe there's a problem in PriorityQueue#removeAll, there will be
a follow-up change to fix that and back this code to use removeAll again

Also, address nits in https://android-review.googlesource.com/#/c/175538/

Change-Id: If11d578b101520bd8ce4641c8654313500ecac4b
(cherry picked from commit 9bfc5e7d2210c44864b6a4233c2fe875e00b34f8)
til/Timer.java
ae2814bc1277fcfd07af820162807d9db4f76ae0 13-Oct-2015 Sergio Giro <sgiro@google.com> libcore: remove cancelled tasks from the queue in Timer at the time they're scheduled

Currently they are not executed, but kept in the queue

Change-Id: Iddaa84027a70ca28e8db8d84bb40579bc0bb115c
(cherry picked from commit 1df9390efb8ddc0ef92adcfceff544d4b7f33703)
til/Timer.java
99ac18dd8b5aa5482fd03cb8c7f9201354c06b1c 25-Sep-2015 Sergio Giro <sgiro@google.com> libcore: rewrite Timer

Change-Id: Ia37426a56b39eae4975535c08de938c9098d55b1
(cherry picked from commit de81552caaae26dd1d2222e3923ce7a738540d5f)
til/Timer.java
til/TimerTask.java
f041054e578e0c982a8689b07f8f9d1c7ef7f2b2 09-Jul-2015 Narayan Kamath <narayan@google.com> Remove harmony provider and default SecureRandom impl.

These things are effectively unused and there's no point in
carting around all this excess baggage.

This change also removes some other classes that weren't being
used anywhere.

(cherry picked from commit 04270c61ba90e164732a227aaa40065009a21378)

Change-Id: I3813c06c60f09e3db99544bc0a2dcf569ff2f50e
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/security.properties
9b7a4b3eb9a9a1d0a25416bd914cdd46109146c5 30-Jun-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fixes for libcore.OsTest

Added .equal/.hashCode for InetUnixAddress (Android
InetAddress provides working implementation of both,
OpenJdk expects that all subclass with have its own).

Fixes networking code to properly detect that
IPv6 is supported, and return IPv6 loopback address
in java.net.InetAddress.getLoopbackAddress().

Change-Id: I48e046c95357441d1d0c74f89968b7d8940b360c
et/InetUnixAddress.java
f4462f3331e254f6e88e28387ab6683c605a63e9 28-May-2015 Piotr Jastrzebski <haaawk@google.com> Fix CharsetDecoderICU / Use OpenJdk InputStreamReader.

Take the output arrayOffset into account.

Change-Id: Iab56b7cd4efc1bc8378bbeaceb56cb9957d8a912
io/charset/CharsetDecoderICU.java
f7ab2bc37debba91864bfec6572a3e7bbe994c58 06-May-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.net.*

- Add FileURLConnection.
- NetworkUtilities : Update field names in JNI.
- Suppress a few libcore tests that rely on internal implementation
details.
- Remove code that loads the net library (not needed on android).
- DatagramSocket : Add setNetworkInterface method.
- HttpCookie : make parse & field public
- Inet4Address / Inet6Address : Add getAddressInternal.
- InetAddress : Add methods required by frameworks/base, particularly
those required to deal with net-ids and scope ids.
- URI : Add UriCodec static members for AUTHORITY_ENCODER and friends.
- URL : Add toUriLenient
- URLStreamHandler : Add a toExternalForm variant that optionally
escapes illegal chars.
- Inet4AddressImpl.c : Unconditionally define HAS_GLIBC_GETHOSTBY_R

Change-Id: Ic51f863941f5d954ed6cf86309cc610e711d54bd
et/InetUnixAddress.java
648446e24ad82c2c660e158be8f32faabf082420 05-May-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.nio.*

- Unsafe: add more supporting methods.
- NIOAccess / NIOUtils : Track OpenJdk implementation.
- Bits : Initialize byte-order inline.
- Buffer : Add elementSizeShift.
- ByteBuffer : Add stub implementations of setAccessible and
isAccessible for use by the frameworks.

Change-Id: I07da77a7b8b9a2edd0410118fb697e5d3aa46fde
io/NIOAccess.java
io/NioUtils.java
3d43823e17818b3c5f45831f830884917b181454 05-May-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.nio.channels.{spi}.*

- Unsafe : Add supporting methods (addressSize, pageSize,
allocateMemory, freeMemory, setMemory and various getters
equivalent to the existing libcore Memory classes).
- NioUtils : Rewrite nioutils methods in terms of OpenJdk classes.
- DeleteOnExitHook : Access java.lang.Shutdown directly.
- FileDescriptor : Add getInt$, setInt$ and setSocket.
- NativeBuffers : Copy byte-by-byte instead of using Unsafe.copyMemory.
- FileInputStream : Add a custom implementation of available() instead
of using IO_Available.

General : Switch JNI code to explicit registration rather than
implicit registration.

General : Track renaming of Unsafe methods (to add the $ suffix). This
might be unnecessary and will be reverted in a future change.

Change-Id: I7e63340d266dbd4b1c425b13710c05dce1086d4b
io/NioUtils.java
a8ed084745590c5e4a0e8559b5821809d60fe242 21-Apr-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.util.zip.*

- Move some of the internal implementation details of libcore's
zipfile into StrictJarFile.
- TODO: Adler32 continues to use old native code from libcore, this
must be switched over.
- InflaterInputStream: |closed| becomes protected.
- ZipFile : Always use mmap.
- ZipEntry : Add a long dataOffset.
- Switch all native code over to explicit registration.

Change-Id: Id5519b4548ea1eb22fd182edfbd2c804dc6f3bb5
til/jar/StrictJarFile.java
1d958dba8b5c9589e3375446045e1672eee0e1b1 24-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of parts of java.util.*, java.security.*.

Includes:

- java.util.jar
- java.security
- java.security.acl,
- java.security.cert
- java.security.interfaces
- java.security.spec

Preserve StrictJarFile (and supporting classes) which confirms to a
stronger spec than java.util.jar.*

- StrictJarFileTest#testGetManifest has been temporarily suppressed.
- Several security related methods are no-ops now.
- Read security.properties from the library jar file (and not the FS).
- Security.initializeStatics uses the following providers (in order):
(a) conscrypt
(b) bouncycastle
(c) harmony's crypto provider.
(d) conscrypt (JSSE).

Change-Id: I24d3d68b033d00293c3e450429d31cb8ce50a44b
et/SocketPermission.java
til/jar/JarVerifier.java
til/jar/StrictJarFile.java
til/jar/StrictJarManifest.java
til/jar/StrictJarManifestReader.java
til/jar/StrictJarVerifier.java
d8f431e70b8d54ec77004a52147a708ce816474a 05-Nov-2015 Andreas Gampe <agampe@google.com> Libcore: Add a private constructor to NoClassDefFoundError

Add a private constructor that accepts a Throwable cause. Add a test
to ensure availability of the constructor.

Bug: 25445103
Change-Id: I6a0dc54e78312283faf23415887eff387531407f
ang/NoClassDefFoundError.java
ed4abdf255d926b30917ba033a4e3e825a4e143d 23-Oct-2015 Neil Fuller <nfuller@google.com> Merge "Fix BigDecimal.equals() when scales are the same"
004dde7a25315cb63d5ceda66170337e8158f5e4 23-Oct-2015 Neil Fuller <nfuller@google.com> Fix BigDecimal.equals() when scales are the same

The equals() code was assuming that smallValue is always
valid if this.bitLength < 64. The other instance may have
the same scale but have a larger bitLength.

Numbers might only be equal if their unscaled (big integer)
bit-length is the same. If bitLength < 64 then smallValue will
be set. If bitLength >= 64 then intVal must be used (and
smallValue will be zero or junk).

Bug: 25171838
Bug: https://code.google.com/p/android/issues/detail?id=191227
Change-Id: I2a5fd1d345544fad62c12a4b01fbb2fd8f2c7f69
ath/BigDecimal.java
728029941ba340aeb8e4098b7ad12d3a30e38aa9 05-Oct-2015 Neil Fuller <nfuller@google.com> Switch from jarjar to generated source for ICU4J

Future changes will include ICU4J classes as public APIs
(still beneath android.icu). To generate these docs source
code will be needed under the expected package (android.icu),
as well as the ability to apply changes to the javadoc
comments programatically so ICU can be upgraded easily.

A consequence of this change is that libcore code can now
depend on icu in the android.icu package and not the
com.ibm.icu package as was the case previously. A nice
side effect is that the source code is available for use
during debugging as well.

Bug: 22023363
Change-Id: Icba5668fae53e2dc98ccc74e2f1ad1ca226e5feb
et/IDN.java
ext/Bidi.java
ext/BreakIterator.java
ext/CollationElementIterator.java
ext/Collator.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/IcuIteratorWrapper.java
ext/Normalizer.java
ext/NumberFormat.java
ext/RuleBasedCollator.java
492365f24e1e20f9027e7e36f53c3975646f2417 19-Oct-2015 Neil Fuller <nfuller@google.com> Merge "Fix some long-standing javadoc issues on HttpURLConnection"
88378853f8170d21e411f1823407c31c7434d3aa 16-Oct-2015 Alex Klyubin <klyubin@google.com> Merge "Fix MessageDigest.update(ByteBuffer) and .digest(byte[],...)."
333215f546fe5089cef0c0c24303bbecadadf91b 15-Oct-2015 Alex Klyubin <klyubin@google.com> Fix MessageDigest.update(ByteBuffer) and .digest(byte[],...).

This makes MessageDigest delegate update(ByteBuffer) and
digest(byte[], int, int) to the corresponding methods of its
MessageDigestSpi implementation. Without the delegation, the
potentially more efficient implementations of engineUpdate(ByteBuffer)
and engineDigest(byte[], int, int) in the SPI implementations were
ignored.

The test added here was inspired by a similar test for Signature
method delegation: b131e0c6c504ea2d1527f7843d63501139f696a0.

Bug: 24668220
Change-Id: I563e44c225efc05097fb4df6b9d3869fcee807f0
ecurity/MessageDigest.java
1efdd1addf3f060ee148f4fd1bc841ed144911fb 15-Oct-2015 Neil Fuller <nfuller@google.com> Merge "Migrate DecimalFormat to use ICU4J."
34ba8b516b5fd28fbf6a8608be6a7596716a8166 17-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Migrate DecimalFormat to use ICU4J.

This change migrates the underlying implementation of
DecimalFormat to use the Java version of the ICU library.

All all issues related to Harmony test failures have been
tracked down and everything not yet fixed in ICU has a
draft fix in the following commits:

https://android.googlesource.com/platform/external/icu/+/7a53939fbc0103d77d09d0174c52df850363caff
https://android.googlesource.com/platform/external/icu/+/90d4668d4d710507b3302de044e3a398cc4fe5ba
https://android.googlesource.com/platform/external/icu/+/4de0761d798b9a92826397e603835c742c8ff873

Behaviour change: Now a new instance of DecimalFormat()
has 309 as the maximumIntegerDigits instead of 20000000
which it was before. This is because it doesn't make
sense to have this value when ICU will only use up to 309
to format numbers.

Furthermore, ICU4J now returns patterns in the form of
<positive-part>;<negative-part> for displaying the
difference between positive and negative number formats.
Tests have been adjusted accordingly.

Benchmarks:
benchmark JAVA NATIVE
_formatAsExponent10e100 96 40
_formatAsExponent10e1000 13 34
_formatAsExponent10e3 37 33
_formatAsExponent10e9 38 33
_formatBigDecimal10e100 99 64
_formatBigDecimal10e1000 306 249
_formatBigDecimal10e3 34 29
_formatBigDecimal10e9 39 33
_formatE 18 39
_formatEur 7 22
_formatEurWithCents 14 37
_formatGrouping_BigDecimal10e100 104 63
_formatGrouping_BigDecimal10e1000 307 249
_formatGrouping_BigDecimal10e3 34 29
_formatGrouping_BigDecimal10e9 35 34
_formatPi 18 39
_formatToCharacterIterator10e100 3231 148
_formatToCharacterIterator10e1000 90411 4789
_formatToCharacterIterator10e3 163 34
_formatToCharacterIterator10e9 318 44
_formatUSD 8 31
_formatUsdWithCents 14 38

Tested on Nexus 5, times in us.

Change-Id: I642fd02acd3bcd198960cdf2a8d973db7baec42b
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/NumberFormat.java
9bfc5e7d2210c44864b6a4233c2fe875e00b34f8 14-Oct-2015 Sergio Giro <sgiro@google.com> libcore: change removal of tasks in Timer#purge

We believe there's a problem in PriorityQueue#removeAll, there will be
a follow-up change to fix that and back this code to use removeAll again

Also, address nits in https://android-review.googlesource.com/#/c/175538/

Change-Id: If11d578b101520bd8ce4641c8654313500ecac4b
til/Timer.java
1df9390efb8ddc0ef92adcfceff544d4b7f33703 13-Oct-2015 Sergio Giro <sgiro@google.com> libcore: remove cancelled tasks from the queue in Timer at the time they're scheduled

Currently they are not executed, but kept in the queue

Change-Id: Iddaa84027a70ca28e8db8d84bb40579bc0bb115c
til/Timer.java
d9aed1632ec6fdade72524261cb0489652b25ab4 12-Oct-2015 Sergio Giro <sgiro@google.com> Merge "libcore: rewrite Timer"
de81552caaae26dd1d2222e3923ce7a738540d5f 25-Sep-2015 Sergio Giro <sgiro@google.com> libcore: rewrite Timer

Change-Id: Ia37426a56b39eae4975535c08de938c9098d55b1
til/Timer.java
til/TimerTask.java
6de5831683acc64e2ca5efa61fae6834314d0eb2 23-Sep-2015 Neil Fuller <nfuller@google.com> Patch for awaitNanos() for coarse-grained clocks

If System.nanoTime() returns the same value twice in awaitNanos()
then (remaining == initialNanos) will be true but the code
will conclude that a (less likely) overflow occurred.

Bug: 24284239
(cherry-picked from commit 8fc2ac0fa8eb47ce607f8412e469d4f680b6ef85)
Change-Id: I3b9d573ea822e18f4c1849c8ab66071e66274a50
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
e1cbd1509e1c1f4a950721cec07148e66e834d57 09-Oct-2015 Neil Fuller <nfuller@google.com> Merge "Fix incorrect comment"
230a1ac09df5c55d8e41acca77dd4f42e5baaea5 09-Oct-2015 Neil Fuller <nfuller@google.com> Fix incorrect comment

Bug: https://code.google.com/p/android/issues/detail?id=188919
Change-Id: I476ae74786404d4337f954beff8e21d216b42b05
ang/IntegralToString.java
6ede0af4c1ce0c7d04865759c43b1997705d3f91 07-Oct-2015 Neil Fuller <nfuller@google.com> Fix some long-standing javadoc issues on HttpURLConnection

Code examples were badly formed.
Missing paragraphs led to bad spacing.
Information about redirects was out of date.

Bug: 24736056
Bug: 24736065
Change-Id: I7c8334da44f621620a1b2cc97bf89287e1b6d014
et/HttpURLConnection.java
96f346fa2e8e67f3cacd12f051c8fc4f69ea429a 01-Oct-2015 Sergio Giro <sgiro@google.com> am 8b1eed2f: Merge "libcore: fix typo in comment"

* commit '8b1eed2f810c69b4e73bf0356c4576e02da418c7':
libcore: fix typo in comment
8b2fa6ff346cab3683bbb93750fc72e74e4881be 01-Oct-2015 Sergio Giro <sgiro@google.com> libcore: fix typo in comment

Wrong javadoc broke git_dalvik-dev build

Change-Id: I7697b4cddf44c5ddef7d7d4c0e1d3115b43887f0
io/charset/ModifiedUtf8.java
3c994a8562c4539980503e6a49f4faeb0addc702 01-Oct-2015 Sergio Giro <sgiro@google.com> am e5b6ddc5: Merge "libcore: write new version of ModifiedUtf8"

* commit 'e5b6ddc54e3e54b7972e30b7ad50d012f263877b':
libcore: write new version of ModifiedUtf8
e5b6ddc54e3e54b7972e30b7ad50d012f263877b 01-Oct-2015 Sergio Giro <sgiro@google.com> Merge "libcore: write new version of ModifiedUtf8"
e1cbd774c3aa254bead141d7177dbe1722845937 23-Sep-2015 Sergio Giro <sgiro@google.com> libcore: write new version of ModifiedUtf8

Change-Id: Id016cc88da3c7c014397ab7dd2bf23dc3e7fbc5e
io/charset/ModifiedUtf8.java
627627ecef26ef3fd9a5ae5796e0c867bccc361d 28-Sep-2015 Neil Fuller <nfuller@google.com> am 7a99d801: Merge "Revert "Fix Double.toString() for a tie case""

* commit '7a99d80166e78c92ef5ccf5a609753613ecac470':
Revert "Fix Double.toString() for a tie case"
7a99d80166e78c92ef5ccf5a609753613ecac470 28-Sep-2015 Neil Fuller <nfuller@google.com> Merge "Revert "Fix Double.toString() for a tie case""
01ce21dbd1c816340ec7b68f42f9fcddb6916a58 28-Sep-2015 Neil Fuller <nfuller@google.com> Revert "Fix Double.toString() for a tie case"

Reverting because I probably misidentified the algorithm and there is
equivalent native code that would need to change in
java_lang_RealToString.cpp.

This reverts commit 75a2f70d97318bf7f160bbc8051f6abd1b841488.

Change-Id: Ice913dd887591e3d0767d703e9943c41e437efaa
ang/RealToString.java
232dec8aa6eab028aadd367a5794e88412b4da9e 24-Sep-2015 Neil Fuller <nfuller@google.com> am 7d2740bd: Merge "Patch for awaitNanos() for coarse-grained clocks"

* commit '7d2740bda8365b7e9a4b1278b75e48076a3b2ac3':
Patch for awaitNanos() for coarse-grained clocks
d917d24b08d7d1a287edaf292a50327c9414baa3 24-Sep-2015 Neil Fuller <nfuller@google.com> am 86436984: Merge "Fix Double.toString() for a tie case"

* commit '86436984baf98f58c7363788bf2e81f756517176':
Fix Double.toString() for a tie case
7d2740bda8365b7e9a4b1278b75e48076a3b2ac3 24-Sep-2015 Neil Fuller <nfuller@google.com> Merge "Patch for awaitNanos() for coarse-grained clocks"
8fc2ac0fa8eb47ce607f8412e469d4f680b6ef85 23-Sep-2015 Neil Fuller <nfuller@google.com> Patch for awaitNanos() for coarse-grained clocks

If System.nanoTime() returns the same value twice in awaitNanos()
then (remaining == initialNanos) will be true but the code
will conclude that a (less likely) overflow occurred.

Bug: 24284239
Change-Id: I3b9d573ea822e18f4c1849c8ab66071e66274a50
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
75a2f70d97318bf7f160bbc8051f6abd1b841488 22-Sep-2015 Neil Fuller <nfuller@google.com> Fix Double.toString() for a tie case

The double with bit pattern 0x406E533340000000L falls between
decimal values 242.60000610351562 and 242.60000610351563. i.e.
parsing either value will result in that double bit pattern.
The tie between the two is close and Android is not picking the
"correct" value. The Steele/White paper "How to Print
Floating-Point Numbers Accurately" algorithm (Table 3) suggests
the algorithm in RealToString should be picking the lower, not
the higher.

Bug: 24195419
Change-Id: Id67ed68939b30e0e1698dce94a56d530c5a4b04b
ang/RealToString.java
714383a0ab58e32f1f2afc7666924aeef8f5e83e 11-Sep-2015 Neil Fuller <nfuller@google.com> am b1d55f34: Merge "Add some documentation to JarURLConnection"

* commit 'b1d55f3465c7d04ca73eb2b7a125939f9cc4c193':
Add some documentation to JarURLConnection
b1d55f3465c7d04ca73eb2b7a125939f9cc4c193 11-Sep-2015 Neil Fuller <nfuller@google.com> Merge "Add some documentation to JarURLConnection"
b63a2007a51c41f47c51443b454512886edc1bd1 11-Sep-2015 Neil Fuller <nfuller@google.com> Add some documentation to JarURLConnection

The documentation is unclear on the responsibilities
of the caller. This makes things slightly clearer.

Change-Id: I5a4e3de0d7a1147938d52fba461574206d7f74df
et/JarURLConnection.java
f13aa2ce1850c90e5705298bc5a21095b82c7eb8 04-Sep-2015 Neil Fuller <nfuller@google.com> am b8fcb81f: Merge "Revert "Revert "Migrate Collator classes to use ICU4J."""

* commit 'b8fcb81f03613bd18c6a64ff17ef01f17dbe3c57':
Revert "Revert "Migrate Collator classes to use ICU4J.""
3df3bfcbad6f4da20964424c4772985d1b1586a1 26-Aug-2015 Rayhaan Jaufeerally <rayhaan@google.com> Revert "Revert "Migrate Collator classes to use ICU4J.""

The SDK build is now fixed by adding icu4j as a dependency of docs.

This reverts commit 5fc822e7ef47448adccd73ca2ebbd28a068f5136.

Change-Id: Ibac9b40189a83323e5175e8ea26c973eb07bc34f
ext/CollationElementIterator.java
ext/Collator.java
ext/RuleBasedCollator.java
8c36c45d9746cf2143d9d708103bbf3fbb0062e8 18-Aug-2015 Neil Fuller <nfuller@google.com> am 4fd38444: Merge "Revert "Migrate Collator classes to use ICU4J.""

* commit '4fd38444c4cc0fb0b529d4e9e3d7fd05e8edfac6':
Revert "Migrate Collator classes to use ICU4J."
4fd38444c4cc0fb0b529d4e9e3d7fd05e8edfac6 18-Aug-2015 Neil Fuller <nfuller@google.com> Merge "Revert "Migrate Collator classes to use ICU4J.""
5fc822e7ef47448adccd73ca2ebbd28a068f5136 18-Aug-2015 Neil Fuller <nfuller@google.com> Revert "Migrate Collator classes to use ICU4J."

This reverts commit bf7bbff3a512b3350911d129aba5503dcfde9311.

Change-Id: I5e3d3481d1df11d31871d63fd1575cbf46698dee
ext/CollationElementIterator.java
ext/Collator.java
ext/RuleBasedCollator.java
94141ea47ec0d3ebec492933cc9149452e3b9ed8 18-Aug-2015 Neil Fuller <nfuller@google.com> am 0340f95b: Merge "Change the Bidi class over to ICU4J."

* commit '0340f95b122ed18aebb4991b1f8bcddde64effce':
Change the Bidi class over to ICU4J.
8ada31a6212ab1974134d5f8a190ed9f8518646d 18-Aug-2015 Neil Fuller <nfuller@google.com> am 1a48afbe: Merge "Migrate Collator classes to use ICU4J."

* commit '1a48afbeed4601ab60845a20f985800474db16a0':
Migrate Collator classes to use ICU4J.
0340f95b122ed18aebb4991b1f8bcddde64effce 18-Aug-2015 Neil Fuller <nfuller@google.com> Merge "Change the Bidi class over to ICU4J."
bf7bbff3a512b3350911d129aba5503dcfde9311 23-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Migrate Collator classes to use ICU4J.

The following benchmarks have been run and show the performance
gains from calling ICU4J.

----- ICU4J -----
benchmark us linear runtime
CollatorIdentical 6.90 ==============================
CollatorPrimary 3.20 =============
CollatorSecondary 3.79 ================
CollatorTertiary 4.28 ==================
vm: app_process

----- ICU4C -----
benchmark us linear runtime
CollatorIdentical 11.75 ==============================
CollatorPrimary 10.01 =========================
CollatorSecondary 9.88 =========================
CollatorTertiary 10.26 ==========================
vm: app_process

All tests relating to Collation pass after this change.

With respect to CJK character loading time, tests were done on a
Nexus 6 running this change, in the US locale and TRADITIONAL_CHINESE
locale.

In EN-US:
Time to load Traditional Chinese collator after boot: 76ms, 76ms
Time to load again: (39ms, 36ms, 36ms), (36ms, 36ms, 48ms)
In ZH-TW:
Time to load Traditional Chinese collator after boot: 37ms, 36ms
Time to load again: (36ms, 36ms, 36ms), (35ms, 37ms, 35ms)

This seems to indicate the system is creating a Collator on boot meaning
that ICU is caching it after the first creation. So if a device is in the
Traditional Chinese locale, the cost of creating Traditional Chinese
collators should have been absorbed at boot time.

Loading up the CJK ideographs uses up around ~500k of memory. From the
above findings, if the device is in a language requiring those characters
then they should be loaded up on boot in the Zygote, which may mean the
memory is shared across processes wishing to use the data.

Change-Id: I98a1c32c8f58e03d16d694b8a4fca4ced961af8e
ext/CollationElementIterator.java
ext/Collator.java
ext/RuleBasedCollator.java
660d0bea759fc97c34eb0cadfdd353f882820c62 14-Aug-2015 Rayhaan Jaufeerally <rayhaan@google.com> Change the Bidi class over to ICU4J.

The Harmony BidiTest passes before and after this change.

This change requires a corresponding change in libnativehelper
to remove the reference to java_text_bidi.cpp.

After this change (ICU4J):

benchmark us linear runtime
_complicatedOverrideBidi 18.64 =========================
_createBidiFromCharArray 14.28 ===================
_createBidiFromIter 11.54 ===============
_createBidiFromString 11.08 ===============
_hebrewBidi 21.92 ==============================
_reorderVisually 2.41 ===
_requiresBidi 1.37 =
vm: app_process
trial: 0

Before this change (ICU4C):
benchmark us linear runtime
_complicatedOverrideBidi 66.94 ======================
_createBidiFromCharArray 44.25 ==============
_createBidiFromIter 21.76 =======
_createBidiFromString 20.23 ======
_hebrewBidi 89.72 ==============================
_reorderVisually 7.10 ==
_requiresBidi 29.02 =========
vm: app_process
trial: 0

Change-Id: I733ac3f9983b8285883dee70958c5cf8054d334d
ext/Bidi.java
d596f01c1431deaf028aa168de6492dc670c5aac 11-Aug-2015 Neil Fuller <nfuller@google.com> am a53c58dd: Merge "Migrate IDNA2003 implementation to ICU4J."

* commit 'a53c58dded9dd21716f2e3c66a8991aba00772f5':
Migrate IDNA2003 implementation to ICU4J.
a53c58dded9dd21716f2e3c66a8991aba00772f5 11-Aug-2015 Neil Fuller <nfuller@google.com> Merge "Migrate IDNA2003 implementation to ICU4J."
a522366e4141f8f9db1f256cdec39077ea6ddfdc 08-Aug-2015 Mathieu Chartier <mathieuc@google.com> am d0694e75: Merge "Add class table field to class loader"

* commit 'd0694e755dd15bc8131007c10bad4bc966cc11b7':
Add class table field to class loader
304152bc1a8a331426dd828afe4dff1738fa8acc 07-Aug-2015 Mathieu Chartier <mathieuc@google.com> Add class table field to class loader

Bug: 22957957

Change-Id: I8dbc042db6e22e2172ab4ec58ddf1db0345dcaaa
ang/reflect/Array.java
9dcac8229f1efd676f3e3b7e8a2f9a2c3eda04d2 30-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Migrate IDNA2003 implementation to ICU4J.

Although this migration uses the deprecated methods in ICU4J's
IDNA implementation, this has to be done to maintain complete
compatibility with the current implementation. This is because
the android API is explicitly documented as implementing the
IDNA2003 standard.

UTS46 is a new standard which aims to ease the transition to
IDNA2008 which is the latest specification for internationalized
domain names. Unfortunately this standard cannot be used in this
instance and will need to be introduced as part of another API.

The following benchmarks show the change in performance this
CL will cause. This seems acceptable for a string conversion.

--- Java ---
benchmark us linear runtime
ToAscii 804 ==============================
ToUnicode 323 ============
vm: app_process

--- Native ---
benchmark us linear runtime
ToAscii 134.0 ==============================
ToUnicode 89.5 ====================
vm: app_process

Change-Id: I96440d338ceeaea63eec490f49e9a35cfa5dc1f2
et/IDN.java
29a6ecf564c5c290804c0664a0238c43f398c3a1 31-Jul-2015 Narayan Kamath <narayan@google.com> am eaef70a4: Merge "Fix broken Zip64 extended info size checks."

* commit 'eaef70a4e1fbcf10b2b6f4c1cabb6063c04f586f':
Fix broken Zip64 extended info size checks.
6b37f0bb40c3789833a9fd02c321d68354c6ecaf 31-Jul-2015 Narayan Kamath <narayan@google.com> Fix broken Zip64 extended info size checks.

We assumed that all fields listed in the extended info layout were
always present. This is not the case. Only the size / uncompressed
size are required fields (in the LFH) and the directory offset is
required only if the corresponding field in the regular record is
0xFFFFFFFF. The same goes for disk number too, but we don't support
spanned archives, so we can assume that it's never present.

This change also fixes a spec violation where we were *not* writing
0xFFFFFFFF to the central directories LFH offset field when we were
putting the actual information in the Zip64 Extended info field.

This change also adds lower level unit tests to some of the Zip64
parsing functions since it's pretty hard (impossible ?) to find a
Zip64 tool that outputs stuff in the format we want.

bug: 22851464

(cherry picked from commit 837aeb356c331960073e5ddbf449779c6194f164)

Change-Id: I031b3151b7deeda8a0a98acfba3f5a906c0c360c
til/zip/Zip64.java
til/zip/ZipEntry.java
til/zip/ZipOutputStream.java
837aeb356c331960073e5ddbf449779c6194f164 31-Jul-2015 Narayan Kamath <narayan@google.com> Fix broken Zip64 extended info size checks.

We assumed that all fields listed in the extended info layout were
always present. This is not the case. Only the size / uncompressed
size are required fields (in the LFH) and the directory offset is
required only if the corresponding field in the regular record is
0xFFFFFFFF. The same goes for disk number too, but we don't support
spanned archives, so we can assume that it's never present.

This change also fixes a spec violation where we were *not* writing
0xFFFFFFFF to the central directories LFH offset field when we were
putting the actual information in the Zip64 Extended info field.

This change also adds lower level unit tests to some of the Zip64
parsing functions since it's pretty hard (impossible ?) to find a
Zip64 tool that outputs stuff in the format we want.

bug: 22851464
Change-Id: I3474fe501d0b7d5b91803976fd0b59d06fa127e8
til/zip/Zip64.java
til/zip/ZipEntry.java
til/zip/ZipOutputStream.java
6c05fdd0571a404f1feaff76fac51c27500382cb 29-Jul-2015 Narayan Kamath <narayan@google.com> am 60685760: Update code name / version number.

* commit '6068576078b1465d15750ebd0275ad20b0d895a2':
Update code name / version number.
6068576078b1465d15750ebd0275ad20b0d895a2 29-Jul-2015 Narayan Kamath <narayan@google.com> Update code name / version number.

bug: 19890045
Change-Id: I058972a86021846429263c59869544627a073686
til/Locale.java
2b2745ef12b61d9f959a4f9e787130bcfda038b3 24-Jul-2015 Narayan Kamath <narayan@google.com> am 03fcecb1: Merge "Revert "Convert IDN to use ICU4j instead of ICU4c.""

* commit '03fcecb113010cd8963353de25ac2d6c0efbc153':
Revert "Convert IDN to use ICU4j instead of ICU4c."
2bb6745a5d77cc873fa4bb71deb0315ce445cbad 24-Jul-2015 Narayan Kamath <narayan@google.com> am 0409b675: Merge "Convert IDN to use ICU4j instead of ICU4c."

* commit '0409b675acc48309f8b20f2eeca345d5f5e22ac6':
Convert IDN to use ICU4j instead of ICU4c.
8d7307aed3c02fc9549c15f4bf14ad0a9587cd9d 24-Jul-2015 Narayan Kamath <narayan@google.com> Revert "Convert IDN to use ICU4j instead of ICU4c."

This reverts commit 9fe44362752f86af1d34eed6dca2b6a27ffa7ad8.

Change-Id: I22bd7819c20817be6444ccd11b903ae68f8e7745
et/IDN.java
9fe44362752f86af1d34eed6dca2b6a27ffa7ad8 16-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Convert IDN to use ICU4j instead of ICU4c.

Apache harmony tests still pass after this change, and
new tests have been added to verify that this meets the
specification defined in http://unicode.org/reports/tr46/.

The benchmarks below show the performance penalty from not doing
this natively.
benchmark us linear runtime
JavaToAscii 59.6 =========================
JavaToUnicode 68.9 ==============================
NativeToAscii 11.2 ====
NativeToUnicode 13.8 ======

Change-Id: Ie3fd1d439d9fc2651f5f1773676d12409c430c83
et/IDN.java
0e8b8d38902f7e87120846b2a733bc31fe087ec4 21-Jul-2015 Kenny Root <kroot@google.com> am 7f531bd8: Merge "Ensure the SignatureImpl overrides all methods"

* commit '7f531bd8681fcd383495ea2b56b7dfcb79d52c85':
Ensure the SignatureImpl overrides all methods
32b081777608bfb8eee96efc268819495000376a 21-Jul-2015 Narayan Kamath <narayan@google.com> am adcee61e: Merge "Use O_DSYNC instead of O_SYNC when opening a file with mode="rwd"."

* commit 'adcee61e90099981a01306d3d12afdc232b741b1':
Use O_DSYNC instead of O_SYNC when opening a file with mode="rwd".
011e5d211ac55099709bdf34bf3eae069b6e9e8e 21-Jul-2015 Narayan Kamath <narayan@google.com> am eed9cb15: Merge "Transition the Normalizer class to call ICU4j."

* commit 'eed9cb152b69d6e0b7c6fb892187af656bb6a955':
Transition the Normalizer class to call ICU4j.
7f531bd8681fcd383495ea2b56b7dfcb79d52c85 21-Jul-2015 Kenny Root <kroot@google.com> Merge "Ensure the SignatureImpl overrides all methods"
b131e0c6c504ea2d1527f7843d63501139f696a0 17-Jul-2015 Kenny Root <kroot@google.com> Ensure the SignatureImpl overrides all methods

Since SignatureImpl's job is to select the correct SignatureSpi for a
given key type, it needs to have the chance to select it before it gets
to the actual delegated SignatureSpi.

One way to do that is simply to ensure that all methods are overridden
in the delegate. The base SignatureSpi overrides some of these by
calling over methods, but this may prevent us from enjoying some
optimizations that the real SignatureSpi provides.

Also, this seems to have prevented appRandom from being set correctly
on the delegated-to SignatureSpi and engineGetParameters() from ever
working correctly.

Bug: 22485587
Change-Id: I27a5bc58f74c37b07c0154e32df785e437596d2a
ecurity/Signature.java
49bd5fad754ebf395cae71822fcfc7783e7a3b78 03-Jul-2015 Philippe Longepe <philippe.longepe@intel.com> Use O_DSYNC instead of O_SYNC when opening a file with mode="rwd".

It distinguishes O_DSYNC and O_SYNC since Linux 2.6.33 which gives
more options to user space applications. The perfomance
RandomAccessFile will get benefit from this. And it makes the
implementation of "rwd" complied with the spec.

Change-Id: Ic8bf88cf449ba46abe21a44abf50d0bbc62e4bb0
Signed-off-by: Philippe Longepe <philippe.longepe@intel.com>
Signed-off-by: zhongjie <zhongjie.shi@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-12476
o/RandomAccessFile.java
37dd239f099f1d1b2aca030a2fe458669718cd78 14-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Transition the Normalizer class to call ICU4j.

The following benchmarks were obtained by running parts of NormalizerTest
through caliper.
benchmark us linear runtime
ICU4cIsNormalized 5.09 ======
ICU4jIsNormalized 5.22 ======
ICU4cNormalize 22.56 ==============================
ICU4jNormalize 21.97 =============================

NormalizerTest still passes after this change on Shamu. This change also
removes the JNI calls and their associated C++ wrappers.

Change-Id: I9081c899a76fdb3a341ca5ecd54c32cd6e6a0387
ext/Normalizer.java
7f2796e12a8cf8392593936e3ae78c62505fd362 16-Jul-2015 Narayan Kamath <narayan@google.com> am b58bb3b0: Merge "Remove harmony provider and default SecureRandom impl."

* commit 'b58bb3b005482dc670c66e9b95c9a97bebf99629':
Remove harmony provider and default SecureRandom impl.
04270c61ba90e164732a227aaa40065009a21378 09-Jul-2015 Narayan Kamath <narayan@google.com> Remove harmony provider and default SecureRandom impl.

These things are effectively unused and there's no point in
carting around all this excess baggage.

This change also removes some other classes that weren't being
used anywhere.

Change-Id: Ice41789c6544c947969868952008ac579885ded6
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/security.properties
b3697ef2fcef7f054e8468b2f009ae9781f7450a 09-Jul-2015 Neil Fuller <nfuller@google.com> am d30aac6c: Merge "Rearrange how AF_UNIX sockets are handled for accept()"

* commit 'd30aac6cafe07baaa84efcf82f9c5108e7a5c0b7':
Rearrange how AF_UNIX sockets are handled for accept()
0ab1a26ca767ae36fbbe27b62893670b208fa494 07-Jul-2015 Neil Fuller <nfuller@google.com> Rearrange how AF_UNIX sockets are handled for accept()

Contains the following changes:
1) Introduction of UnixSocketAddress / removal of InetUnixAddress.
2) Os/Posix classes now take SocketAddress instead of InetSocketAddress.
3) Removal of native code that dealt with InetUnixAddress.
4) Introduction of OsConstants.UNIX_PATH_MAX to hold the maximum sun_path
size.
5) Update tests.

Bug: 3106438
Change-Id: I47a3618387f21599bfbfd0dc9a821839bf47b39b
et/InetUnixAddress.java
1afdaaa46bc98f654a7e1582e3db1b1933f9bcfb 04-Jul-2015 Narayan Kamath <narayan@google.com> am f6cff071: Merge "InflaterInputStream : deflated streams are self limiting."

* commit 'f6cff071977306ddf12b735239ff487bae074f1e':
InflaterInputStream : deflated streams are self limiting.
28e3dec0da4a2dd9852fa05120273d1e2271f05f 24-Jun-2015 Narayan Kamath <narayan@google.com> InflaterInputStream : deflated streams are self limiting.

We call fill() whenever the Inflater needs more input. If the inflater
needs more input, reaching the end of the underlying stream is an error
that must be propagated to the caller.

bug: 21846904
Change-Id: If46cf7837df3a509b20fea8819e09f9a597905a5
til/zip/InflaterInputStream.java
til/zip/ZipInputStream.java
fffa9e6f4ab65efe7f1e450f471e69e3849d6494 26-Jun-2015 Nicolas Geoffray <ngeoffray@google.com> am ad18b03c: Merge "Do not overwrite property if it\'s unchangeable."

* commit 'ad18b03cca48e82a40992c02a71ae45d834da949':
Do not overwrite property if it's unchangeable.
1659541e9e802c63d760fba4f87abb60591ab6bd 25-Jun-2015 Nicolas Geoffray <ngeoffray@google.com> Do not overwrite property if it's unchangeable.

bug:19114742
Change-Id: I19496ee5749dbe70a3ed629fdeb26d59cbaac1c8
ang/System.java
9cca9b98fb52a9acb342a0f06a5901308b840754 17-Jun-2015 Neil Fuller <nfuller@google.com> am 69b6dc0c: Merge "Make Locale.forLanguageTag() map the language code "und" to language ""."

* commit '69b6dc0c242b6cc2b1caded8284d0ce845b8c9f7':
Make Locale.forLanguageTag() map the language code "und" to language "".
184d077ac4e1e008b8ef8a4cf0af60c4d87cfccb 12-May-2015 Fredrik Roubert <roubert@google.com> Make Locale.forLanguageTag() map the language code "und" to language "".

Bug: 21077368
Change-Id: I3f4d0f316bc0b0df11332df8b0414937de11406b
til/Locale.java
22e2d41ff2ca9879835cf66a41b0637d435e5581 13-Jun-2015 Dmitriy Ivanov <dimitry@google.com> am a4fafb89: Merge "Fix lookup order when opening directly from APK"

* commit 'a4fafb890a53640e859f4ee82b6d87a41edae61a':
Fix lookup order when opening directly from APK
384730cb57f41235f09829355d7ce67132625f7f 06-Jun-2015 Dmitriy Ivanov <dimitry@google.com> Fix lookup order when opening directly from APK

The order should be as follows:
1. Uncompressed native library dir (if any)
2. Directly from apk (<apk>!/lib/<abi>)
3. vendor/lib:/system/lib

Bug: http://b/21647354
Bug: http://b/21667767
Bug: http://b/21726698
Bug: http://b/8076853
Change-Id: I62cd76b7e4ae927d865d7d0ee81ceb91caa54e99
ang/Runtime.java
f38cae4f22e46c49f5fba94e6e0579dedd2d8fd1 06-Jun-2015 Dmitriy Ivanov <dimitry@google.com> Fix lookup order when opening directly from APK

The order should be as follows:
1. Uncompressed native library dir (if any)
2. Directly from apk (<apk>!/lib/<abi>)
3. vendor/lib:/system/lib

Bug: http://b/21647354
Bug: http://b/21667767
Bug: http://b/21726698
Bug: http://b/8076853
Change-Id: I62cd76b7e4ae927d865d7d0ee81ceb91caa54e99
ang/Runtime.java
bb81c1422b1a2f5f055bafbbf32ab3e13c957345 09-Jun-2015 Andreas Gampe <agampe@google.com> am 5c92a51a: Merge "Implemented ceil and floor in StrictMath"

* commit '5c92a51a3077d01bcce41038157c294089ecb297':
Implemented ceil and floor in StrictMath
5dc9ac81424bce11e8fa917c96d7f1689c83472e 02-Jun-2015 agicsaki <agicsaki@google.com> Implemented ceil and floor in StrictMath

Translated the ceiling and floor methods from the fdlibm library into Java
to remove transition to native code for these functions. Also updated the test
cases to include corner cases such as +infinity, -infinity, NaN, and interesting
values covering all lines of code found by random testing. Additionally updated
benchmarks to cover several interesting values for both functions.

Running the new benchmarks (for each function, taking the average of several calls
with differing values that ensure full line coverage) showed improved performance.

Ceiling before = 140.91 ns
Ceiling after = 86.55 ns

Floor before = 137.33 ns
Floor after = 86.64 ns

Bug: 21594029
Change-Id: I337c47daa2ae599bd0c0e7f11af4e457f96f9f9f
ang/StrictMath.java
2ae508725e0b6c4dd4c23717bc1625bd745670b6 02-Jun-2015 Sergio Giro <sgiro@google.com> libcore: throw InvalidKeyException instead of ProviderException

In java.security javax.crypto and java.security classes with
late binding, when guessing the provider and none of the
available ones supports the specified key

Bug: 18987633

(cherry pick from e38b83dd96281d178b01476b67d354655bf2de62)

Change-Id: I5931046e9044984baf724157138bf3a7c7ef5e90
ecurity/Signature.java
70a4eedb41624b7223d20069f45df4e1ca6ad730 08-Jun-2015 Neil Fuller <nfuller@google.com> am 79eb265f: Merge "Avoid binding a DatagramSocket before setReuseAddress"

* commit '79eb265ff54c869d306ed273aea5e9805294719b':
Avoid binding a DatagramSocket before setReuseAddress
bd5cee2b473d3d377fdffcb7410c8aa32d45dc2e 08-Jun-2015 Sergio Giro <sgiro@google.com> am 737d0de6: Merge "libcore: throw InvalidKeyException instead of ProviderException"

* commit '737d0de6facd23a898f2232c042b3e2432301432':
libcore: throw InvalidKeyException instead of ProviderException
79eb265ff54c869d306ed273aea5e9805294719b 08-Jun-2015 Neil Fuller <nfuller@google.com> Merge "Avoid binding a DatagramSocket before setReuseAddress"
49f2d45b30c55a4e55dd19886b1c0ed7ba23fc52 02-Jun-2015 Neil Fuller <nfuller@google.com> Avoid binding a DatagramSocket before setReuseAddress

The API docs suggest the behavior of setResueAddress is undefined
if performed after a socket bind. In reality Android can cope with
it but it is easier to stop relying on that than make excuses.

Bug: 15413832
Change-Id: Ic4c19d58b410e7af9019a1727dc2b7b94e9fb81b
et/MulticastSocket.java
737d0de6facd23a898f2232c042b3e2432301432 08-Jun-2015 Sergio Giro <sgiro@google.com> Merge "libcore: throw InvalidKeyException instead of ProviderException"
395352ec83a7a53d4410e9d81b9956671e81f153 06-Jun-2015 Mathieu Chartier <mathieuc@google.com> am c7733777: Merge "Add VMRuntime.runFinalizationWithTimeout" into mnc-dev

* commit 'c77337772bca4d343a6e6e021021b207c5ce8675':
Add VMRuntime.runFinalizationWithTimeout
9b2d8e2e2f3b453ba0e51473a2fbf150d8446670 05-Jun-2015 Mathieu Chartier <mathieuc@google.com> Add VMRuntime.runFinalizationWithTimeout

Used by native allocations to prevent deadlocks.

(cherry picked from commit 51855ccb72d01a28babedbaed70974d4f3697ab0)

Bug: 21544853
Change-Id: I57b2f7ae8b74185922eb3c15ba0ab71a4d2348aa
ang/Runtime.java
ang/ref/FinalizerReference.java
51855ccb72d01a28babedbaed70974d4f3697ab0 05-Jun-2015 Mathieu Chartier <mathieuc@google.com> Add VMRuntime.runFinalizationWithTimeout

Used by native allocations to prevent deadlocks.

Bug: 21544853
Change-Id: I57b2f7ae8b74185922eb3c15ba0ab71a4d2348aa
ang/Runtime.java
ang/ref/FinalizerReference.java
378401df38027e707859755912e4d660091b94c9 04-Jun-2015 Neil Fuller <nfuller@google.com> am 3db17f7f: Merge "Revert "Revert "Modification to the way boot classpath resources are loaded"""

* commit '3db17f7fcd2a93cfeead9874696a8901423aba6d':
Revert "Revert "Modification to the way boot classpath resources are loaded""
3db17f7fcd2a93cfeead9874696a8901423aba6d 04-Jun-2015 Neil Fuller <nfuller@google.com> Merge "Revert "Revert "Modification to the way boot classpath resources are loaded"""
4e9e810ea417baec065da9912110f11860f55103 04-Jun-2015 Neil Fuller <nfuller@google.com> am 0db80891: Merge "Make StrictJarFile deal with missing manifest entries"

* commit '0db808912f8245dc5d1a8b02e6a3ef1ca726a280':
Make StrictJarFile deal with missing manifest entries
2ce899fcb81707dd5447a15c29c2c137697f2f5e 04-Jun-2015 Neil Fuller <nfuller@google.com> Revert "Revert "Modification to the way boot classpath resources are loaded""

This reverts commit 0c2e3c7fcb6754a2116c6226fe6480b3f6fa691f.

Change-Id: I37abbb83f6091f252c90645b8a088cf361fa6a7a
til/jar/StrictJarFile.java
0db808912f8245dc5d1a8b02e6a3ef1ca726a280 04-Jun-2015 Neil Fuller <nfuller@google.com> Merge "Make StrictJarFile deal with missing manifest entries"
b8ec837828cc588fbd701ddc211f2a4293259d8d 04-Jun-2015 Neil Fuller <nfuller@google.com> Make StrictJarFile deal with missing manifest entries

jar files are allowed to not have manifest files.

Change-Id: Id3da8bf0aa5a74ecf1552e027ee9a0176c149928
til/jar/StrictJarFile.java
2a9ffd276edd0eeff3dd0af79a5c3ec1a337784c 03-Jun-2015 Neil Fuller <nfuller@google.com> am 049862d6: Merge "Revert "Modification to the way boot classpath resources are loaded""

* commit '049862d6692e4b2eafc140e8389848c4ac182517':
Revert "Modification to the way boot classpath resources are loaded"
7a75a7d6c27841c8e31a9d2d799c75d7958470da 03-Jun-2015 Neil Fuller <nfuller@google.com> am e41d5b91: Merge "Modification to the way boot classpath resources are loaded"

* commit 'e41d5b91fc53a5116584845b4ec6373588e77789':
Modification to the way boot classpath resources are loaded
049862d6692e4b2eafc140e8389848c4ac182517 03-Jun-2015 Neil Fuller <nfuller@google.com> Merge "Revert "Modification to the way boot classpath resources are loaded""
0c2e3c7fcb6754a2116c6226fe6480b3f6fa691f 03-Jun-2015 Neil Fuller <nfuller@google.com> Revert "Modification to the way boot classpath resources are loaded"

This reverts commit 05a5c2f89e12e27db69f24165a05bdfd0476c73a.

Change-Id: I07cc3841df40d20e2c09b0bf282bf213f422effe
til/jar/StrictJarFile.java
e38b83dd96281d178b01476b67d354655bf2de62 02-Jun-2015 Sergio Giro <sgiro@google.com> libcore: throw InvalidKeyException instead of ProviderException

In java.security javax.crypto and java.security classes with
late binding, when guessing the provider and none of the
available ones supports the specified key

Bug: 18987633
Change-Id: I2a4d258c8f628e2c40f4cbb060cb8825097bd22a
ecurity/Signature.java
15fe2bbb382a47b298c1191e9aa6a177b4dcfb8a 02-Jun-2015 Neil Fuller <nfuller@google.com> Improve HttpURLConnection Performance docs

Bug: 21582657
Bug: https://code.google.com/p/android/issues/detail?id=174949
(cherry-picked from commit b33ae4f5857e7b9ed870336655d2b42673c69146)

Change-Id: Ide0cb3ae300dbad5ae371ae7ac4fcae363ca0eba
et/HttpURLConnection.java
e41d5b91fc53a5116584845b4ec6373588e77789 03-Jun-2015 Neil Fuller <nfuller@google.com> Merge "Modification to the way boot classpath resources are loaded"
1345491b88e8a2939326bffe336645ca6e181e86 03-Jun-2015 Neil Fuller <nfuller@google.com> am 24030f54: Merge "Improve HttpURLConnection Performance docs"

* commit '24030f549409b5188ea23e8b2e93d50871371030':
Improve HttpURLConnection Performance docs
b33ae4f5857e7b9ed870336655d2b42673c69146 02-Jun-2015 Neil Fuller <nfuller@google.com> Improve HttpURLConnection Performance docs

Bug: 21582657
Bug: https://code.google.com/p/android/issues/detail?id=174949
Change-Id: Ia2f46828dd78d684093a1d48a0de8a1383702e3f
et/HttpURLConnection.java
677ebce029d297bded9d659445ddce974121a015 29-May-2015 Narayan Kamath <narayan@google.com> am 2d4366e7: Merge "Fix incorrect position calculation in CharsetDecoder."

* commit '2d4366e7bb0bb3c769cd3e04f59cfe9b1a821ca6':
Fix incorrect position calculation in CharsetDecoder.
654e8191641085aa6bff6df6aaef9a8cb0c03ec1 28-May-2015 Narayan Kamath <narayan@google.com> Fix incorrect position calculation in CharsetDecoder.

Data OUTPUT_OFFSET always gives us the number of bytes written
on output, so it's sufficient to increment the position by that number.
In particular, we do not have to subtract arrayOffset() from that
number.

Reported-By: Piotr Jastrzębski <haaawk@google.com>

Change-Id: I39ac470101f72aa4a87e31c4eb0665fe6a162e1d
io/charset/CharsetDecoderICU.java
0847ee1cb17dda1ba888da8afedc7b768775a1a9 28-May-2015 Narayan Kamath <narayan@google.com> am 874742e8: Don\'t throw UnsupportedOpEx on multi-char negative/percent symbols.

* commit '874742e871e805ccfb1c2d1bf0d0af92b4c47aff':
Don't throw UnsupportedOpEx on multi-char negative/percent symbols.
05a5c2f89e12e27db69f24165a05bdfd0476c73a 19-May-2015 Neil Fuller <nfuller@google.com> Modification to the way boot classpath resources are loaded

VMClassLoader.getResource(), used by the Android boot classloader
was more expensive than it needed to be.

Context:

Checking each classpath entry for a resource involved opening a
zip file, checking for the resource and closing it again.

Because classloaders are arranged in a hierarchy, and parent
classloaders are checked first, this change should have a positive
performance impact for every call to ClassLoader.getResource(),
getResources() and getResourceAsStream(), regardless of the
classloader being used.

Details of change:

This change builds on an earlier commit for BaseDexClassLoader.
See commit 1a796cbc5dfb263511f2f4e5213adbc1d396a813 for the
earlier change. Unlike the BaseDexClassLoader change, we did
not have the zip file already open so this does impact the amount
of reported heap memory being used at rest in the zygote. It may
increase the amount of heap memory in use generally for jars
that have no resources because all jar files are opened, not
just the ones found to have requested resources. The heap memory
should consist of the entry metadata. The zip file itself is
mapped into non-heap/native memory.

Any resources loaded from the boot classloader previously
would have caused the JarURLConnection cache to hold the
associated zip file open anyway. See
https://code.google.com/p/android/issues/detail?id=60071 for
context. This change avoids the use of that cache for bootclass
path resources. Most other usages of jar: urls should now be
within the control of apps, and their can call setUseCache() to
prevent caching.

Performance:

Measured on a Nexus 5. All values in microseconds.

Benchmark (not real app):

GetBootResource_hit - looks for a resource known to be in the
boot classpath in core-libart: java/util/logging/logging.properties
GetBootResource_miss - looks for a resource known to be missing.

Before:
GetBootResource_hit 237
GetBootResource_miss 3034

After:
GetBootResource_hit 23.8
GetBootResource_miss 22.5

App (using vogar --mode activity):

Before:
Hit: 236-446
Miss: 3042-3555

After:
Hit: 65-180
Miss: 88-120

Memory usage:

The use of StrictJarFile keeps the memory usage down to low levels
levels: An initial implementation of this change that used JarFile
was showing up as expensive because the heap memory usage is
dependent on the number of entries in the jar. ext.jar was taking
up 275k due to a large number of resources associated with
libphonenumber. By using StrictJarFile, Java heap usage is now < 2k
per jar. The JarFile cost would previous have been paid anyway
if an app read a resource out of ext.jar (because of the
JarURLConnectionImpl cache) so this change should also produce savings
there. It does mean that we map all the class path jars into memory
natively, but the kernel should be managing that for us and sharing
the expense across all apps.

Given the runtime may be mapping the files for its own purposes
elsewhere the additional cost may even be nil.

Bug: https://code.google.com/p/android/issues/detail?id=60071
Bug: 20685844
Change-Id: Ic3dc4a655c46cc67bfe9b9e254036c6651869c92
til/jar/StrictJarFile.java
874742e871e805ccfb1c2d1bf0d0af92b4c47aff 27-May-2015 Narayan Kamath <narayan@google.com> Don't throw UnsupportedOpEx on multi-char negative/percent symbols.

There seem to be a fair number of apps that call through to this
function, so just give them a "bogus" value (from Locale.ROOT) when
we encounter a multi-char symbol. The formatters and other java.text
APIs already use the correct multi-char value.

bug: 18785260

(cherry picked from commit c3cedb412d85ffeb8121b69308b2d2c35c63b287)

Change-Id: I71225102d4f501aaa689fa6e5f84ee967e32f0c8
ext/DecimalFormatSymbols.java
c3cedb412d85ffeb8121b69308b2d2c35c63b287 27-May-2015 Narayan Kamath <narayan@google.com> Don't throw UnsupportedOpEx on multi-char negative/percent symbols.

There seem to be a fair number of apps that call through to this
function, so just give them a "bogus" value (from Locale.ROOT) when
we encounter a multi-char symbol. The formatters and other java.text
APIs already use the correct multi-char value.

bug: 18785260
Change-Id: I80f2852fadbb590d598e4e38795e71fd12566c38
ext/DecimalFormatSymbols.java
2b949c3a33d3d58ea8a0a91c0e1fad96e98728f0 11-May-2015 Narayan Kamath <narayan@google.com> Serialize minusSign/percentSign as strings in DecimalFormatSymbols.

This allows us to Parcel DFS objects (not sure why anybody would
do that, but..) without crashes.

bug: https://code.google.com/p/android/issues/detail?id=170718
bug: 21455225

(cherry picked from commit 4fd2c14ce54447f13cd115e105d7b000adf24c2e)

Change-Id: I8f860b3fc764932291000ac6651bc95a8e457a99
ext/DecimalFormatSymbols.java
fa3fa5dfdb72c99c77555d3b41d86685382230ac 27-May-2015 Narayan Kamath <narayan@google.com> am 5a98f1a7: Merge "Serialize minusSign/percentSign as strings in DecimalFormatSymbols."

* commit '5a98f1a7c8003d969f8d215ebf45e24baf3d31b4':
Serialize minusSign/percentSign as strings in DecimalFormatSymbols.
4fd2c14ce54447f13cd115e105d7b000adf24c2e 11-May-2015 Narayan Kamath <narayan@google.com> Serialize minusSign/percentSign as strings in DecimalFormatSymbols.

This allows us to Parcel DFS objects (not sure why anybody would
do that, but..) without crashes.

bug: https://code.google.com/p/android/issues/detail?id=170718

Change-Id: I6e1e66dcf93e86e19adb9ae883865f4cd345a7f2
ext/DecimalFormatSymbols.java
834660d9ce0cdcedf256e4b90b7bd4b4d3832daa 18-May-2015 Alex Klyubin <klyubin@google.com> Revert "Expose getSpi from crypto operations as hidden API."

This reverts commit 050e672aaaaa8f8c57788e8d551f43c5fbffe339.

The users of public getSpi have been migrated to getCurrentSpi
introduced in 5d15925a79b8beddfafa8de2ede7fff360a386cb.

(cherry-picked from commit c52bf74f7e53b9f58bbeb29f4d248e7dba7d15ce)

Bug: 18088752
Change-Id: Ied72c8a62a49d9fba8b7bc2d3ef2e30da7daa6e4
ecurity/Signature.java
004cc204b5de342c5dd2f1f2632f0141817edfcc 19-May-2015 Kenny Root <kroot@google.com> Merge "Get rid of old Harmony Services cache" into mnc-dev
8c75589cba8b490e9cbc479ce2129ccf480be8f3 15-May-2015 Kenny Root <kroot@google.com> Get rid of old Harmony Services cache

Each java.security.Provider.Service has its own cache, so there is not a
lot of benefit to having another cache of the caches. In fact, this
makes adding a new provider a huge hit. This change makes adding a new
empty provider go from ~5080 microseconds to 73 microseconds.

(cherry picked from commit cc4791ad77128039c93d4c03b582d4dc397e6a02)

Bug: 21159204
Change-Id: Ib23032f8cb0def79367a321b48241b6cc94de6b0
ecurity/Provider.java
f5bac4874bd5c5266f202cd6aae437770d1ea8fd 19-May-2015 Alex Klyubin <klyubin@google.com> am 4f9043b6: Merge "Revert "Expose getSpi from crypto operations as hidden API.""

* commit '4f9043b6a65ef0b7ee3a67ffaa47dc266c002e3d':
Revert "Expose getSpi from crypto operations as hidden API."
4f9043b6a65ef0b7ee3a67ffaa47dc266c002e3d 19-May-2015 Alex Klyubin <klyubin@google.com> Merge "Revert "Expose getSpi from crypto operations as hidden API.""
0fe8702f1ea73ca65460fcf4a32332fee3e1cfee 19-May-2015 Narayan Kamath <narayan@google.com> am 7217bcc6: Merge "Remove support for big endian native orders."

* commit '7217bcc6d9e2b88990b84c700c549389b078d853':
Remove support for big endian native orders.
fc0a7474f3922e2ef087e1d225ce56f52edaf7aa 18-May-2015 Narayan Kamath <narayan@google.com> Remove support for big endian native orders.

We assume Android == LITTLE_ENDIAN in several places already.

bug: 20957523

Change-Id: Iff96c95c587c866285e0c35075dd014c8973bb92
io/ByteOrder.java
c52bf74f7e53b9f58bbeb29f4d248e7dba7d15ce 18-May-2015 Alex Klyubin <klyubin@google.com> Revert "Expose getSpi from crypto operations as hidden API."

This reverts commit 050e672aaaaa8f8c57788e8d551f43c5fbffe339.

The users of public getSpi have been migrated to getCurrentSpi
introduced in 5d15925a79b8beddfafa8de2ede7fff360a386cb.

Bug: 18088752
Change-Id: I826179a468b3068cb08bfaf042001cfddbf792c2
ecurity/Signature.java
4ec153a9ae62f6f62694fd0a320db16c254174c9 07-May-2015 Alex Klyubin <klyubin@google.com> Expose getCurrentSpi from crypto operations as hidden API.

050e672aaaaa8f8c57788e8d551f43c5fbffe339 exposed the existing getSpi
method of Cipher, Signature, Mac, and KeyAgreement as hidden API.
Unfortunately, the getSpi method creates an SPI instance if one is
not yet set. This changes the state of the crypto operation and does
does not lend itself well to being used for read-only querying of
the SPI from a crypto operation.

This CL addresses the issue by adding a getCurrentSpi hidden API to
these crypto operations. getCurrentSpi simply returns the current SPI
instance, if any, and does not modify the state of the crypto
operation.

A follow-up CL will revert 050e672aaaaa8f8c57788e8d551f43c5fbffe339
which will no longer be needed. This is not reverted here to avoid
breaking the build.

(cherry-picked from commit 5d15925a79b8beddfafa8de2ede7fff360a386cb)

Bug: 18088752
Change-Id: I8de4c121c9a395b3687b173d0bba4e1931ebf958
ecurity/Signature.java
0388a91d7a17355fadccc4d58c2ec4933e4033b9 18-May-2015 Alex Klyubin <klyubin@google.com> am b8acd20e: Merge "Expose getCurrentSpi from crypto operations as hidden API."

* commit 'b8acd20ed09b9c377c721c57eca4c9382d6a0b2c':
Expose getCurrentSpi from crypto operations as hidden API.
b8acd20ed09b9c377c721c57eca4c9382d6a0b2c 18-May-2015 Alex Klyubin <klyubin@google.com> Merge "Expose getCurrentSpi from crypto operations as hidden API."
2b1afd1f8be3a7ca06af8b02b485f8aaf43501a5 18-May-2015 Kenny Root <kroot@google.com> am 08871b7c: Merge "Get rid of old Harmony Services cache"

* commit '08871b7c7e020f1d342a7a506efeef1308bb5abd':
Get rid of old Harmony Services cache
cc4791ad77128039c93d4c03b582d4dc397e6a02 15-May-2015 Kenny Root <kroot@google.com> Get rid of old Harmony Services cache

Each java.security.Provider.Service has its own cache, so there is not a
lot of benefit to having another cache of the caches. In fact, this
makes adding a new provider a huge hit. This change makes adding a new
empty provider go from ~5080 microseconds to 73 microseconds.

Bug: 21159204
Change-Id: Ib23032f8cb0def79367a321b48241b6cc94de6b0
ecurity/Provider.java
87f8f39e2fc964638abc5b87ba12487cfbfa0ccb 13-May-2015 Narayan Kamath <narayan@google.com> Update ICU / CLDR / Unicode versions for the preview.

We don't have a release number or a codename yet, but this
information is still useful.

bug: 19890045

Change-Id: I272e9b9cdfa103f469cb84f1bb4648b39a4510d0
til/Locale.java
f2ffbf919d8daf8a2767449969393e6309b5d2a3 11-May-2015 Neil Fuller <nfuller@google.com> Fix for TimSort in the two Java forms in libcore

Bug: 19493779
(cherry-picked from commit f547d3aa155a20cfc7cb9852f595ce0806bd1198)

Change-Id: I71c7c143386aa4d805b6f1418b72573ddec05dec
til/ComparableTimSort.java
til/TimSort.java
b6a6d8a99940c1b008bb2a67dad5f7180ed337c1 13-May-2015 Neil Fuller <nfuller@google.com> Merge "Fix for TimSort in the two Java forms in libcore"
2824711e40ba28c03bdcc0cd329459e868e981d8 12-May-2015 Narayan Kamath <narayan@google.com> Fix a couple of Locale bugs discovered by ICU4J tests.

ULocaleTest revealed two issues :
- We weren't handling the legacy ja_JP_JP and th_TH_TH locales
correctly.
- We weren't lower-casing the extension key in forLanguageTag. This
shouldn't matter since language tags are case insensitive, by
definition but the convention is to keep them lowercase. This also
fixes a bug in the builder where extension keys were case sensitive
since we weren't normalizing them properly.

bug: 20252611

(cherry picked from commit e45a8ec4f4c53bd068e2eec6d3d07e7567e8381a)

Change-Id: Ide19c959c53e44f07e6b781a130c220b52e18352
til/Locale.java
e45a8ec4f4c53bd068e2eec6d3d07e7567e8381a 12-May-2015 Narayan Kamath <narayan@google.com> Fix a couple of Locale bugs discovered by ICU4J tests.

ULocaleTest revealed two issues :
- We weren't handling the legacy ja_JP_JP and th_TH_TH locales
correctly.
- We weren't lower-casing the extension key in forLanguageTag. This
shouldn't matter since language tags are case insensitive, by
definition but the convention is to keep them lowercase. This also
fixes a bug in the builder where extension keys were case sensitive
since we weren't normalizing them properly.

bug: 20252611
Change-Id: Id15823186c282aeac9adb937d200dc3409d580df
til/Locale.java
f547d3aa155a20cfc7cb9852f595ce0806bd1198 11-May-2015 Neil Fuller <nfuller@google.com> Fix for TimSort in the two Java forms in libcore

Bug: 19493779
Change-Id: I660e466118f8209e55efd84af37f8aca8f0b22a0
til/ComparableTimSort.java
til/TimSort.java
df9b861b74183eb4501529737db7ee6f4263171a 11-May-2015 Narayan Kamath <narayan@google.com> Document that null collections aren't valid input.

bug: https://code.google.com/p/android/issues/detail?id=172274

(cherry picked from commit 4d82cc9740553b35a56c1b0c0146a868b90c34f1)

Change-Id: I9e930cc2531e47340b1cbe921f95a937296108c8
til/List.java
4d82cc9740553b35a56c1b0c0146a868b90c34f1 11-May-2015 Narayan Kamath <narayan@google.com> Document that null collections aren't valid input.

bug: https://code.google.com/p/android/issues/detail?id=172274
Change-Id: Ib397bef6744249fd3241c03dc7cd5eb30f87fa75
til/List.java
5d15925a79b8beddfafa8de2ede7fff360a386cb 07-May-2015 Alex Klyubin <klyubin@google.com> Expose getCurrentSpi from crypto operations as hidden API.

050e672aaaaa8f8c57788e8d551f43c5fbffe339 exposed the existing getSpi
method of Cipher, Signature, Mac, and KeyAgreement as hidden API.
Unfortunately, the getSpi method creates an SPI instance if one is
not yet set. This changes the state of the crypto operation and does
does not lend itself well to being used for read-only querying of
the SPI from a crypto operation.

This CL addresses the issue by adding a getCurrentSpi hidden API to
these crypto operations. getCurrentSpi simply returns the current SPI
instance, if any, and does not modify the state of the crypto
operation.

A follow-up CL will revert 050e672aaaaa8f8c57788e8d551f43c5fbffe339
which will no longer be needed. This is not reverted here to avoid
breaking the build.

Bug: 18088752
Change-Id: Ifc0b0db1bcbc7447353254f0e2bcf8962cd3919e
ecurity/Signature.java
87f763589831414f3020be1e0b9395274ccd35dc 30-Apr-2015 Andreas Gampe <agampe@google.com> Libcore: Correct IllegalAccessError class javadoc

IllegalAccessError can be thrown in more than one case. Correct
the class documentation to be general, and state example cases
of the error.

Bug: 19997575

(cherry picked from commit e912fd64f9f086d256651cf495c607f9dbcc7ff9)

Change-Id: I8b14d8b2fcd77f547d377bec2eecc326743fb671
ang/IllegalAccessError.java
10ba80d58272b0e767689113b4fe7e84831a42a6 05-May-2015 Andreas Gampe <agampe@google.com> Merge "Libcore: Correct IllegalAccessError class javadoc" into mnc-dev
e912fd64f9f086d256651cf495c607f9dbcc7ff9 30-Apr-2015 Andreas Gampe <agampe@google.com> Libcore: Correct IllegalAccessError class javadoc

IllegalAccessError can be thrown in more than one case. Correct
the class documentation to be general, and state example cases
of the error.

Bug: 19997575
Change-Id: I8b14d8b2fcd77f547d377bec2eecc326743fb671
ang/IllegalAccessError.java
ece4a17e08d124f79538118e968004b8e36993e2 24-Apr-2015 Narayan Kamath <narayan@google.com> Don't accept [path|file|line].separator from the commandline.

We hardcode these values elsewhere in the system, so we shouldn't
open ourselves up to inconsistent behaviour when these things are
overriden from the command line. It's already impossible to
override them using System.setProperty and friends.

bug: 20133619

(cherry picked from commit bb3beca471e368c8f5fbf2331e71fc85194f3549)

Change-Id: If893ab7e2e8e143b3373a060fef4cc20cf13a544
ang/System.java
bb3beca471e368c8f5fbf2331e71fc85194f3549 24-Apr-2015 Narayan Kamath <narayan@google.com> Don't accept [path|file|line].separator from the commandline.

We hardcode these values elsewhere in the system, so we shouldn't
open ourselves up to inconsistent behaviour when these things are
overriden from the command line. It's already impossible to
override them using System.setProperty and friends.

bug: 20133619
Change-Id: I7bc0d9009c91f0b9b74cfee076bbb38b6f2d2a2c
ang/System.java
edf43d27e240d82106f39ae91404963c23987234 27-Apr-2015 Narayan Kamath <narayan@google.com> Update JSR-166 to Revision 1.43

This is CVS HEAD as of Tue Mar 24 22:30:53 2015 UTC with
android specific patches applied. All android patches have
a clear "android-note" header.

- Most changes are documentation related.
- @hide tags have been applied to 1.8 APIs
- Atomic*Updater have been updated to use VMStack.* APIs.

bug: 20628776
bug: https://code.google.com/p/android/issues/detail?id=170073

(cherry picked from commit aa2ed9e105504f21641d919b410c692981cfe386)

Change-Id: Ie7ce1780eda837f3455e6aa365861886956c4063
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentMap.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CountedCompleter.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Exchanger.java
til/concurrent/Executor.java
til/concurrent/ExecutorCompletionService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/FutureTask.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/RecursiveTask.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/atomic/AtomicBoolean.java
til/concurrent/atomic/AtomicInteger.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReference.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/locks/AbstractOwnableSynchronizer.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/Lock.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/package-info.java
aa2ed9e105504f21641d919b410c692981cfe386 27-Apr-2015 Narayan Kamath <narayan@google.com> Update JSR-166 to Revision 1.43

This is CVS HEAD as of Tue Mar 24 22:30:53 2015 UTC with
android specific patches applied. All android patches have
a clear "android-note" header.

- Most changes are documentation related.
- @hide tags have been applied to 1.8 APIs
- Atomic*Updater have been updated to use VMStack.* APIs.

bug: 20628776
bug: https://code.google.com/p/android/issues/detail?id=170073
Change-Id: Iead730222b4376f947e7dc05b0acaf608eccf238
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentMap.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CountedCompleter.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Exchanger.java
til/concurrent/Executor.java
til/concurrent/ExecutorCompletionService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/FutureTask.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/RecursiveTask.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/atomic/AtomicBoolean.java
til/concurrent/atomic/AtomicInteger.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReference.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/locks/AbstractOwnableSynchronizer.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/Lock.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/package-info.java
5e50fbcd745a7687fc2930961a258048b28d2213 27-Apr-2015 Narayan Kamath <narayan@google.com> Date.toString must always use Locale.US.

bug: https://code.google.com/p/android/issues/detail?id=81924

Change-Id: Id5e0ec6514f159d548617e5d9946088078b89afa
til/Date.java
83c7414449bc406b581f0cb81ae06e7bce91403c 15-Jan-2014 Jeff Hao <jeffhao@google.com> Removed offset and value from String and added StringFactory.

Change-Id: I55314ceb906d0bf7e78545dcd9bc3489a5baf03f
ang/AbstractStringBuilder.java
ang/CaseMapper.java
2b7e589a8ea095392e97d45f1feb04832bada21c 24-Apr-2015 Neil Fuller <nfuller@google.com> Merge "Tidy up Package and classloader comments"
dda692d6341fcbbb8f1ef9344024989b110bc040 22-Apr-2015 Narayan Kamath <narayan@google.com> Remove unnecessary code from InputStreamReader/OutputStreamWriter.init.

Explicitly check that the decoder/encoder isn't null instead.

bug: 20452644
Change-Id: Ia43be6b03842af4e5c8945c8854db618b6ec357a
o/InputStreamReader.java
o/OutputStreamWriter.java
73e9c6e19e1ffcf00cf55fc1529f9c6c1e8a3bdf 24-Apr-2015 Sergio Giro <sgiro@google.com> Merge "java/io/RandomAccessFile: do not nullify FileChannel when closing the RAF"
f5cd147674c1de0ef860ac28867358d8cfbcd958 22-Apr-2015 Neil Fuller <nfuller@google.com> Tidy up Package and classloader comments

After commit 31ae6d22605a0967d722f935bc3a8b868ada4917

Remove a TODO, improve a test and fix a comment.
Also fixes a bug in Package demonstrated by the improved test.

Bug: 20482259
Change-Id: I6b37413d7004ce85c99bb854e0ec41e5f8588250
o/ObjectInputStream.java
ang/Package.java
97db716bae1ebde9a55435e64e2db65f9e432ccd 22-Apr-2015 Sergio Giro <sgiro@google.com> java/io/RandomAccessFile: do not nullify FileChannel when closing the RAF

getChannel() should return always the same FileChannel, even if it's closed

Bug: 19892782
Change-Id: I5bd853b6b0931d9a6320a655c4ef982c9beaa6c0
o/RandomAccessFile.java
3f7c674bd1d220d1a8c149b5658145171c28094f 22-Apr-2015 Narayan Kamath <narayan@google.com> Move java.nio.Charsets to libcore.util.

This isn't public API, and isn't related to NIO. It's only ever
used by java.lang.String.

bug: 10898787
Change-Id: I4e194406746b88ba7268c2553e467e7e05400b40
io/charset/Charsets.java
31ae6d22605a0967d722f935bc3a8b868ada4917 21-Apr-2015 Brian Carlstrom <bdc@google.com> Fix Class.forName(..., ..., null) to pass 068-classloader's testClassForName

This caused fallout elsewhere requiring
- Package fix to pass 005-annotations
- ObjectInputStream fix to pass 093-serialization

Change-Id: I6bc470e20fa177e8a3debe55c90a84eef7ef518e
o/ObjectInputStream.java
ang/Package.java
8ee3e7e8238756bede737347a6fce19d1ac9a671 20-Apr-2015 Taiju Tsuiki <tzik@google.com> Return unlocalized TimeZoneID from TimeZone.getTimeZone()

ISO 8601 recommends the numbers in the time zone string should be non-localized
numbers. Though implemented version returns localized numbers depends on the
default locale.
This CL removes localization from formiting the time zone ID.

Change-Id: If828bcebb13b8509f5caf4dd201a4dbcd7defc38
til/TimeZone.java
13867636c784ffe2c8b742662c836db5c922e005 16-Apr-2015 Elliott Hughes <enh@google.com> Merge "Implement mapLibraryName in Java."
91b872537645a0bf307cc4ee73cc4591f749fd4c 16-Apr-2015 Elliott Hughes <enh@google.com> Implement mapLibraryName in Java.

No need for native code here.

Change-Id: Iaeb0369b5638a6681fd94fd999641801719aaea2
ang/System.java
629ef12e1110f512d2855f8b8f1b642ce160895a 15-Apr-2015 Narayan Kamath <narayan@google.com> Make Manifest#clone obey clone's contract.

We must call through to Object.clone to ensure that we
always return an object of the right type. If not, subclasses
will have to override clone() instead of calling through to
super.clone().

bug: 19748843
Change-Id: Ie2177bbc05c62281f48780e521ad66de3612561e
til/jar/Manifest.java
f6b0c8b47c903d47cedf182e5aa78276283a2f32 15-Apr-2015 Narayan Kamath <narayan@google.com> Fix bad negation in Collections#binarySearch.

bug: 19749094
Change-Id: Id1d7bcf4abebb423fd3bbb7c8f379bf9e6234969
til/Collections.java
bcba24e2b4d94b6b0743110c84eca20fa58b069c 14-Apr-2015 Nick Kralevich <nnk@google.com> StrictJarFile: better handle missing files

Ensure all manifest files are present in the jar.

Bug: 1162500
Change-Id: I36b40a34d5837b8ad4a0d13e7ea2e37ad7e51f3b
til/jar/StrictJarFile.java
46a77743404e903bb1257999adfe046427804230 27-Feb-2015 Kenny Root <kroot@google.com> Refactor security classes for static initialization

Split out security.properties I/O to a separate method returning
a Reader. This method can be intercepted at compile-time and
provide a StringReader with the content of the file. A reader is
necessary as Properties interally uses a reader and requires a
Charset to translate from an input-stream.

Refactor Services provider loading to first try the boot classpath
loader instead of the system class-loader. The former is accessible
during compile-time initialization and functionally equivalent.

Bug: 19498458
Bug: 19542228
Change-Id: I853952b83ca99006907c070734f767259c975517
ecurity/Security.java
787eb9996c0f9b32ae247ba072c048dceaa0a453 10-Apr-2015 Andreas Gampe <agampe@google.com> Libcore: Refactor TimeZone for compile-time initialization

Introduce a private inner class for custom-time-zone parsing. This
moves the Pattern field which cannot be compile-time initialized.

As a result, TimeZone, SimpleTimeZone & ZoneInfo can be initialized
in the boot image.

Bug: 19542228
Change-Id: I6fc8cb65975e14351a6bfc1ddfac175368efd1eb
til/TimeZone.java
8307aa0a24626f248a670118aad49793300337e8 11-Apr-2015 Andreas Gampe <agampe@google.com> Libcore: Make Date compile-time initializable

Move CREATION_YEAR to a static inner class.

Bug: 19542228
Change-Id: I3db699f8ad661305f5255ee730faeb21c2861dde
til/Date.java
3e1f5abf4a247bd3448d8e1e9901d22fbdf0d03a 08-Apr-2015 Neil Fuller <nfuller@google.com> Make ICU4J look for timezone updates in /data

Bug: 19941636
Change-Id: I4dbadfbfd4a8fbfeb3d580c073061710fd521fdd
ang/System.java
4eea13a9fc3d3a174ae7abc38578528a6c3fec00 08-Apr-2015 Neil Fuller <nfuller@google.com> Small documentation changes to System

Updates to documentation around lineSeparator.

Change-Id: I0b646c06ac85303e572e38738889a8247eef37a0
ang/System.java
3f1ba8fe1d0ea9c1b1d3059c536861ac08464a3d 07-Apr-2015 Narayan Kamath <narayan@google.com> Rename package to android.icu.* instead of com.android.ibm.icu.*.

Based on a discussion with the icu team.

Change-Id: I47a6b260a9348debd65282794996f7976b8bc008
ang/System.java
b6d280493ffca2b63c7b850360309521af2b962e 03-Apr-2015 Narayan Kamath <narayan@google.com> GZIPInputStream: Correctly handle extras in gzip headers.

We were peeking into the wrong field for the extra length.

bug: https://code.google.com/p/android/issues/detail?id=159340
Change-Id: Ib7ed400e3e119b1d6c95be49d25812c5c7f366b9
til/zip/GZIPInputStream.java
0e727b80b78942d6a3e77b0cc0665005ac963c82 03-Apr-2015 Alex Klyubin <klyubin@google.com> Merge "Expose getSpi from crypto operations as hidden API."
fe3469f59ea823c2ddb2671a4fe0568b25c83df6 03-Apr-2015 Narayan Kamath <narayan@google.com> GZIPInputStream: Fix handling of header CRCs.

This is the same mistake as public bug 159340, we were peeking
in the wrong buffer for the CRC.

Note that this is different from the member CRC, the latter is
the CRC of the actual data (not the header) and is mandatory.

Change-Id: I98d49bdd9d5ea93fe982783c8077531764ee5347
til/zip/GZIPInputStream.java
a812a87e69850d1492c45bd88d7ff3dbf21d5075 24-Mar-2015 Narayan Kamath <narayan@google.com> Don't use zip64 by default.

This change was breaking tools like dexmaker that would write
zipfiles to disk so that the runtime could read them.

We don't want to go back and amend the local file header, so
we just throw an IOException if somebody writes more than 4GB
of data to an entry that doesn't have a declared size. If the
entry has a declared size > 4GB, we can write the zip64 header
in advance.

bug: 19574093
Change-Id: I771e821996efd3ef4c3de5e02f5a0062e62f9244
til/zip/ZipOutputStream.java
ff8391a7f7f2181dba58ea6e7dd5928cff81167e 03-Apr-2015 Nicolas Geoffray <ngeoffray@google.com> Merge "Be consistent with the library path."
620bcb53ddc85a5c75237bda8dfebf16f754aa8a 02-Apr-2015 Nicolas Geoffray <ngeoffray@google.com> Be consistent with the library path.

For the boot class loader (loader == null) loadLibrary tries
to find the the full path of the library using java.library.path.
When actually loading the library, we need to use the same
java.library.path property in case the library has dependencies.

Change-Id: I2404d72f5c65c6a5ecfedc1efe879cfc9cef55ad
ang/Runtime.java
d0ef6d8b070d2892caf59d1f7501ff05667be6cc 27-Mar-2015 Narayan Kamath <narayan@google.com> Implement BreakIterator in terms of icu4j.

Note that we need manual range checks in our wrapper because
the ICU4J implementation will clamp offsets to either end of
the input text.

benchmark results :

text benchmark us linear runtime
LIPSUM BreakIterator 326.02 =====
LIPSUM IcuBreakIterator 333.47 ======
LONGPARA BreakIterator 227.67 ====
LONGPARA IcuBreakIterator 228.68 ====
GERMAN BreakIterator 79.09 =
GERMAN IcuBreakIterator 81.30 =
THAI BreakIterator 1654.11 ==============================
THAI IcuBreakIterator 1646.75 =============================
THAI2 BreakIterator 44.28 =
THAI2 IcuBreakIterator 42.67 =
TABS BreakIterator 12.79 =
TABS IcuBreakIterator 12.53 =
ACCENT BreakIterator 16.26 =
ACCENT IcuBreakIterator 15.37 =
EMOJI BreakIterator 17.71 =
EMOJI IcuBreakIterator 18.34 =
SPACES BreakIterator 16.86 =
SPACES IcuBreakIterator 15.78 =
EMPTY BreakIterator 9.22 =
EMPTY IcuBreakIterator 9.96 =
NEWLINE BreakIterator 11.08 =
NEWLINE IcuBreakIterator 9.96 =
BIDI BreakIterator 19.54 =
BIDI IcuBreakIterator 18.96 =

Change-Id: I72023dd605da8e33974aa3181506f0d9c7bc180e
ext/BreakIterator.java
ext/IcuIteratorWrapper.java
ext/RuleBasedBreakIterator.java
bd4a28864d189276f2e80be1abd7536b88508958 30-Mar-2015 Narayan Kamath <narayan@google.com> Override ICU4Js search path for ICU4C data.

Change-Id: I4dc6c40be400e298921c57f5c6d6c413edd70f68
ang/System.java
050e672aaaaa8f8c57788e8d551f43c5fbffe339 24-Mar-2015 Alex Klyubin <klyubin@google.com> Expose getSpi from crypto operations as hidden API.

This makes it possible for platform code to obtain the current SPI
implementation of Cipher, Signature, Mac, and KeyAgreement instances.

The current use case is to access additional information about these
crypto operations when they are backed by Android KeyStore.

NOTE: The getSpi API will not and cannot become public framework API.

Bug: 18088752
Change-Id: If575726d288eebc73ffa3209c316fad071a087fd
ecurity/Signature.java
2f4d25190a7d2cc8328a202417ca9077a02e6d9a 23-Mar-2015 Alex Klyubin <klyubin@google.com> Add libcore.net.NetworkSecurityPolicy.

This hidden libcore API is to be used by bundled network stacks to
determine whether cleartext network traffic is permitted. These stacks
cannot directly use the public Android framework API
android.security.NetworkSecurityPolicy because the framework package
typically compile-time depends on the packages offering these bundled
network stacks.

As an example, this CL makes java.util.logging.SocketHandler and
platform-provided URLConnection instances for the FTP protocol honor
this new flag.

To avoid duplication, the intention is that framework's
android.security.NetworkSecurityPolicy implementaion will switch to
this new libcore API to store/retrive the state of framework's
NetworkSecurityPolicy class.

Bug: 19215516
Change-Id: I78e348458975d69c52918582a43db25df87e2a15
til/logging/SocketHandler.java
7694b783f48e2cc57928b61c84fd90311cb0c35a 18-Jul-2014 Dmitriy Ivanov <dimitry@google.com> Pass getDexPath to Runtime.nativeLoad

getDexPath is used by Runtime.nativeLoad to
open libraries directly from apk. Given that
libraries are not compressed and are page-aligned.

Bug: 8076853
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
ang/Runtime.java
464b90443d0496c4d191d36f5266bb6a2b21e383 16-Mar-2015 Kenny Root <kroot@google.com> Merge "Late binding: specified Provider forces its use"
20e310656f03cd83355eae5cd25237f71b80341a 13-Mar-2015 Kenny Root <kroot@google.com> Late binding: specified Provider forces its use

If a Provider is specified in a call to Signature#getInstance,
Cipher#getInstance, KeyAgreement#getInstance, or Mac#getInstance,
it should return that provider no matter if the properties on that
provider say it should support it.

Bug: 19730263
Change-Id: I56045e4cb470a0e1aa0e108a443e04043467c475
ecurity/Signature.java
53009b25cac39d385f4b0f54af5db33d6db98ec7 16-Mar-2015 Andreas Gampe <agampe@google.com> Libcore: Fix superfluous ternary in BufferedInputStream

At the position, result is already checked to be positive.

Change-Id: I3847022820294f76b944ce49d9ef8e8629ddb350
o/BufferedInputStream.java
0202f7b40ca46f4555b788683d477585d20c11b1 13-Mar-2015 Sergio Giro <sgiro@google.com> Merge "java.lang.reflect: Use only relevant modifiers when converting to string"
e78f8ca1c55628312772c9c110d12fca09126a7e 11-Mar-2015 Sergio Giro <sgiro@google.com> java.lang.reflect: Use only relevant modifiers when converting to string

Some modifiers not relevant might be used to encode internal information
(eg bridge methods) that shouldn't be displayed when converting to string

bug: 18488857

Change-Id: Ie82ed513b58083a795549a708197f1db52ffb796
ang/reflect/Modifier.java
53813be98b3f1bb97d3b793d2a7af37646da7ed8 09-Mar-2015 Andreas Gampe <agampe@google.com> am d61d442a: Merge "Pre-initialize more by moving bad fields"

* commit 'd61d442a5cd0f0f2e1adca26d73f1423319e2110':
Pre-initialize more by moving bad fields
5f612d5ca50f6eb41e42ce00de13ef86a51dc08e 27-Feb-2015 Kenny Root <kroot@google.com> Pre-initialize more by moving bad fields

Some of the fields were causing the classes to not be initialized, so
move them to NoImagePreloadHolder. This will allow more of the boot
class path to be initialized at compile-time, while the holders can
still be initialized in the zygote.

This was separated out from https://android-review.googlesource.com/136700
and updated for zygote initialization.

Bug: 19498458
Bug: 19542228
Change-Id: If35af41c10e68c71f71b44ce0cc09c56dac310c6
ang/Math.java
til/Locale.java
8e2c78d4d7182024ea1b2fe7e4fd1847974d9912 27-Feb-2015 Narayan Kamath <narayan@google.com> am e0d58e42: Merge "Remove size check that was accidentally removed."

* commit 'e0d58e42984fe1646bec38f8ff5e50cbcfa10072':
Remove size check that was accidentally removed.
ceb6c677734eb163f60256a0d00d66c3a4e21eb3 27-Feb-2015 Narayan Kamath <narayan@google.com> am 26ef26ec: Merge "Implement zip64 support for ZipFile/ZipInputStream/ZipOutputStream."

* commit '26ef26ec963acca178c7d3d9781d84b38036469e':
Implement zip64 support for ZipFile/ZipInputStream/ZipOutputStream.
a50a2ffbd82c953aa3a1d832e311ed8c869f454e 27-Feb-2015 Narayan Kamath <narayan@google.com> Remove size check that was accidentally removed.

We can now accept sizes larger than 4GB, but negative
sizes should still be rejected.

Fixes harmony test ZipEntryTest#test_setSizeJ.

Change-Id: Ie226daecb378ae5627b404dba926d53143ec7774
til/zip/ZipEntry.java
12f5c69e074d6ef012706068416f0a61b70b4e52 27-Jan-2015 Narayan Kamath <narayan@google.com> Implement zip64 support for ZipFile/ZipInputStream/ZipOutputStream.

There are several open questions that I hope to resolve in future
changes :

- Our heuristics for detecting whether a zip outputstream should
switch over to zip64 or not are imprecise.

- Also, given that we now officially support zip64, we have to assume
new entries whose size is unknown need the zip64 header / footer.
This will make output files slightly larger and less compatible with
older tools. If we don't do this, we'll have to go back and rewrite &
compact parts of the stream we'd already flushed, which isn't always
possible. The other option is to assume zip32 for streams of unknown
length and throw if more than 4G of data is written to them.

Change-Id: Ibb4a97b5f83fd3ab850d7c407ecfda663968a6b9
til/zip/Zip64.java
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
f0260086575d0ec8ca0c783bf27f7ffc525a2d4b 23-Feb-2015 Narayan Kamath <narayan@google.com> am 5889c5c8: Merge "Clarify docs for CharsetEncoder#flush."

* commit '5889c5c8d2e814e9319135f52f1947c463c82561':
Clarify docs for CharsetEncoder#flush.
2ca6717e8ccb2e8c06a7020753095d55d8af5028 21-Feb-2015 Narayan Kamath <narayan@google.com> Clarify docs for CharsetEncoder#flush.

flush may return CoderResult.MALFORMED if the input was "incomplete",
say for eg. if the last char was one half of a surrogate pair.

Note that encoder subclasses cannot detect this inside encode()
because the overrideable encodeLoop() method isn't told whether it's
at the end of input or not.

This change also introduces a test to demonstrate this behaviour.

bug: 19185235
Change-Id: Ie1170fe1409a1abb883ef6f36ac8589855b3b2ab
io/charset/CharsetEncoder.java
1404d4401893306ac72a473807b4a39352fd8704 19-Feb-2015 Bill Yi <byi@google.com> Merge commit '405aeb8a97eb0a5194c2803dde3968e10e1e509e' into HEAD
0f702b5996488b8cc8cbe336e8098dd1b4de8dd3 18-Feb-2015 Narayan Kamath <narayan@google.com> Deal with quoted subformat patterns correctly.

This change might look like a hack, but the API it
implements is more than worthy of it.

bug: 19011159
Change-Id: I8a539f1b54282220fbb0a005a750819fa7873cc9
ext/MessageFormat.java
de75c0aa34c7db47ddec1704e94fa05c54687705 17-Feb-2015 Narayan Kamath <narayan@google.com> Fix handling of consecutive quotes in ChoiceFormat et al.

Two consecutive single quotes ('') must be interpreted as an
escaped single quite sequence. We were implementing it by simply
keeping track of whether the last character was a single quote.
This is insufficient for sequences of three or more quotes since
we shouldn't emit ('') for an escape sequence of ('''). We'll have
to keep track of the number of consecutive quotes we've seen in the
input instead.

This is a partial fix for the bug below. There appears to be another
bug in MessageFormat itself in its handling of subpatterns.

bug: 19011159
Change-Id: Ia71e5d8c1962356cabc265cf80ebc0a04ff84f17
ext/Format.java
c10ba1bf470b9ae0d9904e28105de5e679840cb9 17-Feb-2015 Narayan Kamath <narayan@google.com> Handle infinities correctly in ChoiceFormat.

We'd like ChoiceFormat.toPattern to emit a pattern that's parseable
by ChoiceFormat - which means we need an infinity that's parseable by
NumberFormat.parse().

Also, implement the nextDouble / previousDouble public API <sadface/>
in terms of Math.nextAfter and Math.nextUp.

bug: 19149384
Change-Id: Ieb13ee70c212d188ff9fde09463ced8d632f47ab
ext/ChoiceFormat.java
6f70a2e7c3b0aa783fa6b3ccbfb5c7f7d50e79a6 10-Feb-2015 Narayan Kamath <narayan@google.com> am a9c24ad8: Merge "Fix LocaleTest#testDefaultLocale."

* commit 'a9c24ad83f3cd18738268559169ba901b5f70232':
Fix LocaleTest#testDefaultLocale.
b30abe5c17c260b4181a7eba63022b8dea841ae6 10-Feb-2015 Narayan Kamath <narayan@google.com> Fix LocaleTest#testDefaultLocale.

The implementation considers user.locale / region / language
immutable if set at the command line.

For the purposes of this test, we'll have to resort to changing
the unchangeable by hand. Fortunately, we already have such a
function thanks to the native bridge.

bug: 19329061

Change-Id: I583a0da355503b547c60e2df6da4c23ac5882e4a
ang/System.java
9f66398cd4d7e2ddda74bf698c5e1f75c92407c4 07-Feb-2015 Elliott Hughes <enh@google.com> am c512e722: Merge "Explicitly state all File constructor NPEs."

* commit 'c512e722651ab516a01d84aacd93f264c09f5175':
Explicitly state all File constructor NPEs.
58967d946493826848ff23fa3e27635a29ea6f2b 07-Feb-2015 Elliott Hughes <enh@google.com> Explicitly state all File constructor NPEs.

I think I closed the previous bug report as "unless otherwise stated, you
should assume that passing null to anything gets you a NullPointerException",
but this is at least the second time this specific case has been reported as
a bug, so...

Bug: https://code.google.com/p/android/issues/detail?id=136551
Change-Id: I5993bbf405054f57cd4f7c05af38e6c9d66355e7
o/File.java
01d4fdc6bfcebc8caabd610dd2bf8c67a732532b 04-Feb-2015 Narayan Kamath <narayan@google.com> am 0951821e: Merge "CharsetEncoder.flush() should only call implFlush() once."

* commit '0951821efa25eed9d7b4372ee7ee8ac063682c68':
CharsetEncoder.flush() should only call implFlush() once.
3a37678cdea3ce0109c83c6db8ba42069ef2e691 03-Feb-2015 Fredrik Roubert <roubert@google.com> CharsetEncoder.flush() should only call implFlush() once.

Repeated calls to flush() should not result in repeated calls to
implFlush(), leaving CharsetEncoder implementations free to do such
things as unconditionally prepend headers in their implFlush(). ICU4J
does that.

bug: 19251672
Change-Id: Id6399c16a60b0ec7f73248e431741fe5432c9c3a
io/charset/CharsetEncoder.java
99ba2497d3234801f24a7829ff13803f3dd7afd4 22-Jan-2015 Narayan Kamath <narayan@google.com> am a8521691: Merge "Introduce user.locale [take 2]"

* commit 'a8521691a4a538600da8cd1b0b59ce23807a534c':
Introduce user.locale [take 2]
a8521691a4a538600da8cd1b0b59ce23807a534c 22-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Introduce user.locale [take 2]"
e001a6e4b9f965c18750f66e7648cd103cca7b2a 22-Jan-2015 Lorenzo Colitti <lorenzo@google.com> am 26bb4803: Merge "Use the IPv6 instead of the IPv4 wildcard address in sockets."

* commit '26bb48032cdcc8d69484ff168389c34e1f873250':
Use the IPv6 instead of the IPv4 wildcard address in sockets.
72ed50d1e9048b79efdb5b9e4ffb07c99a302d84 16-Jan-2015 Lorenzo Colitti <lorenzo@google.com> Use the IPv6 instead of the IPv4 wildcard address in sockets.

A few places in libcore consider the local address of an unbound
socket to be Inet4Address.ANY. For example, calling
getLocalAddress on an uncreated Socket will return 0.0.0.0, and
when creating a DatagramSocket, libcore attempts to bind it to
0.0.0.0 unless the caller specifies another address.

On Android, this is incorrect. All native socket filedescriptors
that underpin Java socket objects are created by IoBridge.socket,
and are dual-stack AF_INET6 sockets, not AF_INET sockets. When
such a socket is created, its local address is ::, not 0.0.0.0.
Thus, for example, calling getLocalAddress on a just-created
ServerSocket object will return ::. Binding to 0.0.0.0 is not
even allowed by os.bind, which silently converts it to :: instead
(in inetAddresstoSockaddr).

Therefore, accept reality and use :: instead of 0.0.0.0 in the
Java layer as well. Specifically:

1. Change DatagramSocket's constructors to bind to :: instead of
0.0.0.0. This is a complete no-op, because os.bind() silently
converts 0.0.0.0 into ::. Add a test for the other of the two
codepaths.
2. Change InetSocketAddress so that an uninitialized object has
an IP address of :: and not 0.0.0.0, and update its test. This
is unlikely to break anything short of an app that explicitly
depends on this behaviour, because os.bind() converts 0.0.0.0
to ::, and because any SocketAddress returned by any real
socket will never contain 0.0.0.0 anyway.
3. Change Socket so that calling getLocalAddress() when there is
no underlying socket file descriptor is will return :: instead
of 0.0.0.0. This is more correct, because it's consistent with
sockets that have been created, which will never have a local
address of 0.0.0.0.

Tested: vogar $(find libcore/*Socket*Test*) all passes on device.

Bug: 18094870
Change-Id: I9d60710fe945a99d6a5e65430248a889008ef4b1
et/DatagramSocket.java
et/InetSocketAddress.java
et/ServerSocket.java
et/Socket.java
61908bb6523ff12b53867e7bce15a672eca46e77 16-Jan-2015 Narayan Kamath <narayan@google.com> Introduce user.locale [take 2]

This reverts commit 5eba1f238e37e3fef73b492badb950225150cdcf and
adds additional code to set user.language / user.region for backwards
compatibility.

The original commit had a static initialization order bug, so this
change reorders static fields so that GRANDFATHERED_TAGS is initialized
before the default locale.

We also set user.language / user.region for backwards compatibility. The
android framework have been changed to pass in user.locale instead of
user.language / user.region but we parse that value and set
user.language / country for code that still relies on it.

bug: 17691569
Change-Id: Ie5e8ffe4bafa3977fea27289f9ffc5100288cab3
ang/System.java
til/Locale.java
a928a1fb36bfb962c3894ce2e976ff81e82345cc 21-Jan-2015 Narayan Kamath <narayan@google.com> am 70af3d94: Merge "Clarify comment on private method."

* commit '70af3d949171b22f70a87b1f0dde15f561ed4ca9':
Clarify comment on private method.
21d9af2f6e30f47f62497872ce57061501337122 20-Jan-2015 Narayan Kamath <narayan@google.com> Clarify comment on private method.

Make it clear that it's called from native code.

Change-Id: Ia44ba6fe70b6cbb559921553f3b137fd3bb0df2b
ang/System.java
66630ea2bf4c23d6396f24e5d3f56317efc980f0 20-Jan-2015 Neil Fuller <nfuller@google.com> am 934ecd56: Merge "Make socket binding behavior clearer"

* commit '934ecd5677fec1bae56662c10920a331e17eea81':
Make socket binding behavior clearer
7d5a8340b6f50d1d8677463897c3ba499fad3eb8 20-Jan-2015 Neil Fuller <nfuller@google.com> Make socket binding behavior clearer

Use of "localhost" to mean "the local host" and not "loopback" was
confusing.

Some docs lacked information.

InetSocketAddress was ambiguous around what was being described. Use
of "this socket" rather than "the socket [endpoint|address|]" makes
it sound like InetSocketAddress is a socket, not a socket's address.

Bug: 19065543
Change-Id: Ic7265464ba39ecace6640b8c4f7a9084ea6ae1d2
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/InetSocketAddress.java
et/ServerSocket.java
et/Socket.java
4f1fadcbb1c8766e737ee810e8888c6a5ae82e36 16-Jan-2015 Narayan Kamath <narayan@google.com> am 510742b0: Merge "Add a warning about relative paths to ZipEntry#getName."

* commit '510742b01e0662c1c6078783d0ef0c4184ba9945':
Add a warning about relative paths to ZipEntry#getName.
510742b01e0662c1c6078783d0ef0c4184ba9945 16-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Add a warning about relative paths to ZipEntry#getName."
f6f506cef650471dbe9dc380e8fdefb560ad0274 08-Jan-2015 Narayan Kamath <narayan@google.com> Add a warning about relative paths to ZipEntry#getName.

bug: 18644314
Change-Id: I62e94208392a5f22130ff603bfd1f2f9ec9ef81d
til/zip/ZipEntry.java
37cd4f5661de722acf3fbfd71cec3723239fa257 16-Jan-2015 Narayan Kamath <narayan@google.com> am 7861c3e6: Merge "Revert "Introduce user.locale.""

* commit '7861c3e60b7769a9cce11015a48842f1b1712360':
Revert "Introduce user.locale."
7861c3e60b7769a9cce11015a48842f1b1712360 16-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Revert "Introduce user.locale.""
5eba1f238e37e3fef73b492badb950225150cdcf 16-Jan-2015 Narayan Kamath <narayan@google.com> Revert "Introduce user.locale."

This reverts commit 7f6e083f86b711bf905edbf1932f6b35877f9d92.

Breaks an art test, not sure why.

Change-Id: Idbdb03b6e038b73ac07cf3343ff7ddd123d06d01
ang/System.java
til/Locale.java
0feb5cbdbb8dc2bd82aeb37625f2a7a067045b25 16-Jan-2015 Narayan Kamath <narayan@google.com> am a4fe2227: Merge "Introduce user.locale."

* commit 'a4fe2227d3c7e72b84d0ac6b3e15f811564b24ee':
Introduce user.locale.
a4fe2227d3c7e72b84d0ac6b3e15f811564b24ee 16-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Introduce user.locale."
7f6e083f86b711bf905edbf1932f6b35877f9d92 15-Jan-2015 Narayan Kamath <narayan@google.com> Introduce user.locale.

Behaves similar to {user.language, user.country} but is a BCP-47
tag that's parsed with Locale.forLanguageTag.

bug: 17691569

Change-Id: I7846a284cdd083233129f9adc0886098ee2ffbb8
ang/System.java
til/Locale.java
a7da7c3300632154a72a1983305b3db0f5078480 14-Jan-2015 Neil Fuller <nfuller@google.com> am 3cdad0e1: Merge "Fix confusing Selector docs"

* commit '3cdad0e18459a53bdf7e33c6509244a5928cefa5':
Fix confusing Selector docs
3cdad0e18459a53bdf7e33c6509244a5928cefa5 14-Jan-2015 Neil Fuller <nfuller@google.com> Merge "Fix confusing Selector docs"
9944af27afcb5d58293b4fd158abf6853505d4f5 14-Jan-2015 Neil Fuller <nfuller@google.com> Fix confusing Selector docs

Change-Id: Ifb2139c49a071dcf2e28e8df54e355321508f4db
io/channels/Selector.java
7cac0839477a6ac8f8a4111aacbdec3a52b61f9c 14-Jan-2015 Neil Fuller <nfuller@google.com> am 1a923668: Merge "Fix the hostname for the IPv6 loopback address"

* commit '1a923668463640b1e0cbdc9d90bc4530240fc75d':
Fix the hostname for the IPv6 loopback address
a43c5da446e8f02ebe23b6a026c25f4e25d89318 14-Jan-2015 Neil Fuller <nfuller@google.com> Fix the hostname for the IPv6 loopback address

Previously the hostname was "localhost", which
resolves to the IPv4 loopback address.

Also fixed the documentation for getAllByName(null)
which has returned the loopback addresses all the way
back to 2009 and not thrown an exception as
suggested in the docs.

Test fixes and new tests included.

Depends on commit 25147416bb105914c3cdf8fd65ca7cc20dae0f3e

Bug: 18991397
Bug: https://code.google.com/p/android/issues/detail?id=96801
Change-Id: I9723516a977e2a3b97412bc1d7e58b36df327feb
et/Inet6Address.java
et/InetAddress.java
f05f989bdeed23225f05744b9b942ac7b85dfc50 09-Jan-2015 Elliott Hughes <enh@google.com> am 6bfd8701: Merge "More FileDescriptor.isSocket cleanup."

* commit '6bfd8701461f0794a529e00dd12c61b67a5497d3':
More FileDescriptor.isSocket cleanup.
160fad7d429f32c4a6b9f1ac6bb028f59e736f46 09-Jan-2015 Elliott Hughes <enh@google.com> More FileDescriptor.isSocket cleanup.

Rename isSocket to isSocket$ since it's public @hide.

Make isSocket$ final, even though the class is final, so it's obvious from
grep that you can't accidentally override this. (The other public @hide
methods in this class were already explicitly marked final.)

Change-Id: I90563ca567857fa7d38b7ee8006f8abe6ca2db9a
o/FileDescriptor.java
54abd315f40479c09d571db4620eca02d2d92c14 07-Jan-2015 Elliott Hughes <enh@google.com> am ecd42914: Merge "Fix a javadoc typo in java.net.URL.equals."

* commit 'ecd42914677fde7762bd47e33d5a0dd81989c9e9':
Fix a javadoc typo in java.net.URL.equals.
bfb6633525beaccab203baebc5861acbe3088f4d 07-Jan-2015 Elliott Hughes <enh@google.com> Fix a javadoc typo in java.net.URL.equals.

Bug: https://code.google.com/p/android/issues/detail?id=92930
Change-Id: Id3bc22d16cf4f493e937ebc76ebacd6a01b6f454
et/URL.java
ca727d2f03b2b3ba19b7d43f20305aab3825eb1d 02-Jan-2015 Narayan Kamath <narayan@google.com> am 880bf04a: Merge "Extend ArrayList fastpath to Collections.sort(List<T>, Comparator<T>)."

* commit '880bf04a93307044ea608982b92a33c0995abf3a':
Extend ArrayList fastpath to Collections.sort(List<T>, Comparator<T>).
880bf04a93307044ea608982b92a33c0995abf3a 02-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Extend ArrayList fastpath to Collections.sort(List<T>, Comparator<T>)."
6701ba91372a2fc47c5d5ea94e941c5663082b26 02-Jan-2015 Narayan Kamath <narayan@google.com> am 7d286dee: Merge "Fix documentation for Calendar#clone."

* commit '7d286deeff7a2ba63d3981408654f527f7831ee3':
Fix documentation for Calendar#clone.
36776bc03ce03eef27c70a9750513ce6d6d19385 31-Dec-2014 Narayan Kamath <narayan@google.com> Extend ArrayList fastpath to Collections.sort(List<T>, Comparator<T>).

My original reasons for not extending it were bogus. We can safely
cast Object[] to T[] in this case.

Also tidy up the benchmark by changing buildList(.. boolean isArrayList)
to buildList(.. Class<T extends List<Integer> list.

AFTER

SortWithComparator_arrayList, arrayListLength=4} 10881.97 ns; σ=64.97 ns @ 3 trials
SortWithComparator_arrayList, arrayListLength=16} 33235.73 ns; σ=127.45 ns @ 3 trials
SortWithComparator_arrayList, arrayListLength=64} 130317.52 ns; σ=135.31 ns @ 3 trials
SortWithComparator_arrayList, arrayListLength=256} 495200.19 ns; σ=1120.86 ns @ 3 trials
SortWithComparator_arrayList, arrayListLength=1024} 1990796.02 ns; σ=19151.58 ns @ 6 trials

BEFORE

SortWithComparator_arrayList, arrayListLength=4} 40030.32 ns; σ=509.60 ns @ 10 trials
SortWithComparator_arrayList, arrayListLength=16} 122122.08 ns; σ=182.58 ns @ 3 trials
SortWithComparator_arrayList, arrayListLength=64} 457833.87 ns; σ=1311.54 ns @ 3 trials
SortWithComparator_arrayList, arrayListLength=256} 1764647.22 ns; σ=35150.74 ns @ 10 trials
SortWithComparator_arrayList, arrayListLength=1024} 7127679.90 ns; σ=122546.75 ns @ 10 trials

bug: 18821961
Change-Id: I22a18d99598dfacbdc54cf75e38dbc32ab027754
til/Collections.java
77ef2926d20998349254632052228bd456f82ed4 31-Dec-2014 Narayan Kamath <narayan@google.com> Fix documentation for Calendar#clone.

Also add a test to make the behaviour of clone explicit.
This should all be very obvious but it's probably best to
make it clear.

bug: https://code.google.com/p/android/issues/detail?id=3370
Change-Id: Ib17dccbf016a1dce4e21da089fd3597d6bfabe79
til/Calendar.java
cac1ef353ef9b8491233c5aa4c8f2389de2a4cf0 31-Dec-2014 Narayan Kamath <narayan@google.com> am f891c7de: Merge "Fix CharsetEncoder.canEncode for empty CharSequences"

* commit 'f891c7deeeeb20ef5b7217634365a2ed48c50050':
Fix CharsetEncoder.canEncode for empty CharSequences
241388858d1325689d8f557a53935c1a079e43f1 30-Dec-2014 Narayan Kamath <narayan@google.com> Fix CharsetEncoder.canEncode for empty CharSequences

Broken by change c0c629a1 in which we started checking whether
the encoded buffer was non-empty.

Fixes org.apache.harmony.tests.java.nio.charset.ASCIICharsetEncoderTest#testCanEncodeCharSequence

Change-Id: I9078f7f00a0f962e4f7eb113bdfa1445794d89b8
io/charset/CharsetEncoder.java
e3c1f1cc4ee7f9ac8a4de1bc7ffcb097b2273d5d 30-Dec-2014 Narayan Kamath <narayan@google.com> am 50e0273a: Merge "Add a zero-copy path for Collections.sort() on ArrayList."

* commit '50e0273a38619924b582b1e1394d6049dde13cda':
Add a zero-copy path for Collections.sort() on ArrayList.
fa080b83161fa8f2c538009b312d074dd17016bc 24-Dec-2014 Narayan Kamath <narayan@google.com> Add a zero-copy path for Collections.sort() on ArrayList.

Given that ArrayLists are array backed, we can sort the underlying
array in place. A similar optimisation can be applied to Vector and
CopyOnWriteArrayList but vector isn't used often enough to slow
everything else down with an instanceof check and nobody should be
daft enough to try sorting a CopyOnWriteArrayList.

Note that it's possible to apply the same optimisation to
Collections.sort(List<T>, Comparator<? super T>) but it involves a
larger refactoring to allow us to use Object[] instead of T[] and is
accompanied by a general loss of readability.

ArrayList performance improves for all array sizes :

BEFORE

Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=4} 39021.26 ns; σ=206.27 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=16} 120903.59 ns; σ=1188.88 ns @ 5 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=64} 435484.98 ns; σ=19141.88 ns @ 10 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=256} 1772876.81 ns; σ=5542.74 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=1024} 7289431.83 ns; σ=110869.13 ns @ 10 trials

AFTER

Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=4} 9161.79 ns; σ=90.04 ns @ 6 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=16} 29988.90 ns; σ=74.05 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=64} 118142.86 ns; σ=1133.52 ns @ 7 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=256} 456091.11 ns; σ=9110.18 ns @ 10 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=1024} 1851939.39 ns; σ=69542.41 ns @ 10 trials

For all other lists, there's no measurable difference for
most sizes. length == 4 is harder to be sure about, given the
large standard deviations and we'd expect the time spent in
instanceof to be larger relative to the rest of what's going on.

BEFORE

Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=4} 49002.02 ns; σ=1392.58 ns @ 10 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=16} 154967.88 ns; σ=332.29 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=64} 588207.14 ns; σ=1863.60 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=256} 2292967.79 ns; σ=4578.14 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=1024} 9299582.60 ns; σ=179459.24 ns @ 10 trials

AFTER

Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=4} 49324.98 ns; σ=240.86 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=16} 155639.91 ns; σ=215.12 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=64} 581950.81 ns; σ=938.11 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=256} 2285933.64 ns; σ=13265.42 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=1024} 8981475.84 ns; σ=431676.48 ns @ 10 trials

bug: 18821961

Change-Id: I30a3eaf89ff478663f555c93556167107da10873
til/Collections.java
58a7183a3669d2b887b568d4493c0baeded9452e 17-Dec-2014 Elliott Hughes <enh@google.com> am 9620c652: Merge "Fix poll to never return EINTR."

* commit '9620c65214b3dd47cf9fc73aa332050ea9f4bcc9':
Fix poll to never return EINTR.
fa542091e45db699a937c5ac0191194405107827 16-Dec-2014 Elliott Hughes <enh@google.com> Fix poll to never return EINTR.

Bug: 18759467
Change-Id: Ia5b97a55318b5990ad6b80d15641223aa4fb06f5
io/SelectorImpl.java
d9f7e57f5d09b587d8c8d1bd42b895f7de8fbf54 09-Dec-2014 Narayan Kamath <narayan@google.com> Update ByteBuffer positions in Posix.* functions.

Also add tests in libcore.io.OsTest and update (and simplify)
callers that were updating the position themselves.

bug: 18641009

(cherry picked from commit f3b61eaf1931ae8393e54202a717334a4971ebdf)

Change-Id: I8a810b2dfde7c13278807381bdfe7f532a3481a0
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/SocketChannelImpl.java
9409c9df2b8d0589d76eeb0d628768b6cd22b850 15-Dec-2014 Neil Fuller <nfuller@google.com> am 7c3ed526: Merge "When connecting to a SOCKS proxy, use the resolved IP"

* commit '7c3ed526ed9a4a508c3ae6d6e104f51dd9d7a1c1':
When connecting to a SOCKS proxy, use the resolved IP
ab5260f7d3c6e667268295dee39147adb74e6d66 15-Dec-2014 Neil Fuller <nfuller@google.com> am c489247c: Merge "Fix InetSocketAddress.getHostString(): return the name if available"

* commit 'c489247c66f2995adcd56293c5cb925f525965dd':
Fix InetSocketAddress.getHostString(): return the name if available
7c3ed526ed9a4a508c3ae6d6e104f51dd9d7a1c1 15-Dec-2014 Neil Fuller <nfuller@google.com> Merge "When connecting to a SOCKS proxy, use the resolved IP"
c489247c66f2995adcd56293c5cb925f525965dd 15-Dec-2014 Neil Fuller <nfuller@google.com> Merge "Fix InetSocketAddress.getHostString(): return the name if available"
fa790997cbbbdf0c9dd96e7f7f05645f60270cbc 12-Dec-2014 Elliott Hughes <enh@google.com> am d355c4a9: Merge "Add pipe2 and O_CLOEXEC to the libcore POSIX API."

* commit 'd355c4a9ff58b8a8f57209f2232ed2f170a7828c':
Add pipe2 and O_CLOEXEC to the libcore POSIX API.
0d8b5c3692c36837d22c4e7d9c4d7d95f6a10235 12-Dec-2014 Elliott Hughes <enh@google.com> Add pipe2 and O_CLOEXEC to the libcore POSIX API.

@hide right now, but we should expose these at some point.

Bug: 18719692
Change-Id: I0a73606cf089ed307d1ab2916a7df28b3c45aaf0
io/SelectorImpl.java
d35f03985d8e071790b726ab1d3d6c5309ddeb46 12-Dec-2014 Calin Juravle <calin@google.com> am b6609f09: Merge "Use EMPTY_ITERATOR for EmptyList"

* commit 'b6609f097c773b74ba070fab5b88b7d79c89d29f':
Use EMPTY_ITERATOR for EmptyList
02f20db142a5c169cb5d56654066bd77d8707768 12-Dec-2014 Calin Juravle <calin@google.com> Use EMPTY_ITERATOR for EmptyList

Change-Id: Ic286c8fa6b01ba21211c0bedac66fb1b15221b1a
til/Collections.java
e4182e4e8c5224dc62e43f318db60015da6a234e 10-Dec-2014 Narayan Kamath <narayan@google.com> am 522855c6: Merge "Update ByteBuffer positions in Posix.* functions." into lmp-mr1-dev

* commit '522855c67263abeca3a8359cd7e65705cfe3c4b4':
Update ByteBuffer positions in Posix.* functions.
f3b61eaf1931ae8393e54202a717334a4971ebdf 09-Dec-2014 Narayan Kamath <narayan@google.com> Update ByteBuffer positions in Posix.* functions.

Also add tests in libcore.io.OsTest and update (and simplify)
callers that were updating the position themselves.

bug: 18641009

Change-Id: Ie0bbde767489eec1a6ef0158f2b14853d4612f18
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/SocketChannelImpl.java
b3a4dd8402e39a4d1209515adaf01f6b288fcea9 08-Dec-2014 Neil Fuller <nfuller@google.com> When connecting to a SOCKS proxy, use the resolved IP

Noticed while inspecting the code. In HttpURLConnection a similar
change was made recently (commit
797fdc6cc6bf16372e9464f189b535148f944ce9).

Previously if the Proxy was specified with a resolved
InetSocketAddress (i.e. one with a specific IP address already
determined) the hostname would still be used to work out an IP
address to connect to. For host names with multiple IPs the host
connected to could be a different one than the one specified.

Now if the InetAddress has been resolved it will be used. In the
case where the InetAddress is bad this may delay DNS / resolution
errors to later in the connection process. It will, however, avoid
the "connect to a different host" issue, and avoid a reverse DNS
lookup here when the host is not yet known.

Change-Id: I46df5c38942f2d356ba2fd4541e0269021fd6496
et/PlainSocketImpl.java
ee458cf73d150be182b1797bc59043b131706f7f 03-Dec-2014 Neil Fuller <nfuller@google.com> Fix InetSocketAddress.getHostString(): return the name if available

getHostString() would return the IP address in one of the three
scenarios possible:

1) InetSocketAddress created with a name - already worked, name returned.
2) InetSocketAddress create with an InetAddress with only an address - already worked,
address returned.
3) InetSocketAddress create with an InetAddress with an address and name: would return
the address.

Change-Id: Id9d1addda5cef589ac56db5397e00e842cf8c5d7
et/InetAddress.java
et/InetSocketAddress.java
7e92357b0e1e836d82b16a27d16639969acf3274 03-Dec-2014 Narayan Kamath <narayan@google.com> am ea05f82a: Merge "Fix obsolete javadoc." into lmp-sprout-dev

* commit 'ea05f82ae3b260364a80815d5d6547785e1d7618':
Fix obsolete javadoc.
48068ccd3baead27c0ad476a9e4ba4cb6fa1ae8c 02-Dec-2014 Narayan Kamath <narayan@google.com> am acaaf855: Merge "Fix obsolete javadoc."

* commit 'acaaf855fa9a7e33194f4041a4beeacf78f87d52':
Fix obsolete javadoc.
dea9544e47401b9fb358e06a8354fd3e3690b6f9 02-Dec-2014 Narayan Kamath <narayan@google.com> Fix obsolete javadoc.

"user.home" and "java.io.tmpdir" are modifiable for backward
compatibility.

bug: 18587205

(cherry picked from commit 461f38f918a39a3747fd2f72393cc29a45232b1d)

Change-Id: I708515cf8b139645c26051105de3ba556f0da7a0
ang/System.java
461f38f918a39a3747fd2f72393cc29a45232b1d 02-Dec-2014 Narayan Kamath <narayan@google.com> Fix obsolete javadoc.

"user.home" and "java.io.tmpdir" are modifiable for backward
compatibility.

Change-Id: I9c24bc15fbabd319220caeb68829cdef6b5807c2
ang/System.java
ed4361c7a6653eb724fac98265199325ad6d3e2c 02-Dec-2014 Elliott Hughes <enh@google.com> am 0a392e0c: Merge "Expand on how to get fractional percentages."

* commit '0a392e0c50272ce5e30a51ff84a1c2afcbe42f6d':
Expand on how to get fractional percentages.
e6bab37897c3a3fed6a7494f5616d29cae6aa59e 01-Dec-2014 Elliott Hughes <enh@google.com> Expand on how to get fractional percentages.

Change-Id: Idb9889e572b449282a2588917d3cf2bf21ef62e2
ext/NumberFormat.java
774d1f14336a95ec956c5253bee40fd9ddddbfec 01-Dec-2014 Elliott Hughes <enh@google.com> am d9d4ec6f: Merge "Clarify the rounding behavior of a percent formatter."

* commit 'd9d4ec6fa57ae79c7a7bcca292e9e0676e50b4f1':
Clarify the rounding behavior of a percent formatter.
d9ce78b54034cac4887a3e29b0547a091484e4f7 01-Dec-2014 Elliott Hughes <enh@google.com> Clarify the rounding behavior of a percent formatter.

And demonstrate that we do actually obey the rounding mode.

Change-Id: Ibf187823b504c4c13e0d15816b109fd198a79789
ext/NumberFormat.java
47646649286f08bb5656c61b136b5b24cf854133 27-Nov-2014 Narayan Kamath <narayan@google.com> am 5e0ff7c5: Merge "Fix CharsetEncoder.canEncode for ignorable code points."

* commit '5e0ff7c58657cdd0eee6500f8654af94d90b85ce':
Fix CharsetEncoder.canEncode for ignorable code points.
c0c629a18d45985ef73a90b5440da1f087177d46 26-Nov-2014 Narayan Kamath <narayan@google.com> Fix CharsetEncoder.canEncode for ignorable code points.

We should check that the output buffer has at least a single
byte.

bug: 18474439

Change-Id: Iec8042f54133c77d962ed2c5c5ace25a8ce6dad2
io/charset/CharsetEncoder.java
fe165234feace5e1f847a6c3b93c693da1294a6a 24-Nov-2014 Narayan Kamath <narayan@google.com> am 870cd9bd: Merge "Improve javadoc for fractional seconds in date formats."

* commit '870cd9bd05a2968710ad5e0f1d6c4fc2bf6c80af':
Improve javadoc for fractional seconds in date formats.
870cd9bd05a2968710ad5e0f1d6c4fc2bf6c80af 24-Nov-2014 Narayan Kamath <narayan@google.com> Merge "Improve javadoc for fractional seconds in date formats."
cd74e09e0e3cdb5b349a766fb2902d87b3799a85 19-Nov-2014 Elliott Hughes <enh@google.com> Fix DecimalFormatSymbols.setCurrency.

We cache values from the Currency but can allow those cached values to be
overwritten, so even if a later call to setCurrency is for the same Currency
as last time, we can't assume that's a no-op.

Bug: 18437206
Bug: https://code.google.com/p/android/issues/detail?id=79925

(cherry picked from commit 54e10f16912a55513b8888fa7903d1e6bee4b4af)

Change-Id: Icd6aa1dfdc7945fd3904772f8970a1a94aaa0664
ext/DecimalFormatSymbols.java
ef50c6f7df8337b94b0a4c63da71151d3b24de62 19-Nov-2014 Elliott Hughes <enh@google.com> am aff22a6d: Merge "Fix DecimalFormatSymbols.setCurrency."

* commit 'aff22a6ddb474b00719dea04d8a4258b8773d0d0':
Fix DecimalFormatSymbols.setCurrency.
54e10f16912a55513b8888fa7903d1e6bee4b4af 19-Nov-2014 Elliott Hughes <enh@google.com> Fix DecimalFormatSymbols.setCurrency.

We cache values from the Currency but can allow those cached values to be
overwritten, so even if a later call to setCurrency is for the same Currency
as last time, we can't assume that's a no-op.

Bug: 18437206
Bug: https://code.google.com/p/android/issues/detail?id=79925
Change-Id: Ic44dbc66a190567438b8b9f866f2a6cdee693e10
ext/DecimalFormatSymbols.java
e669c320afb614b0b8f1eeca1430da271cbef3ce 18-Nov-2014 Narayan Kamath <narayan@google.com> Improve javadoc for fractional seconds in date formats.

bug: https://code.google.com/p/android/issues/detail?id=78859
Change-Id: Ic411ca057685717b9bed8e450601f7d8e646a0c1
ext/SimpleDateFormat.java
cc4202a7301dee6d7ef41d9ebf97f848b1edc10f 17-Nov-2014 Narayan Kamath <narayan@google.com> am c820ad52: Merge "Set random seeds post fork."

* commit 'c820ad5233494b0c3e7c33342687698cb124bdab':
Set random seeds post fork.
7c22337691326a03386e42a32becbeb2c2dc7f06 14-Nov-2014 Narayan Kamath <narayan@google.com> Set random seeds post fork.

Gets rid of static Random objects from various classes and
makes them use Math.random instead. Also add hidden APIs to
set the random seed post fork (where we're single threaded).

This has the nice side effect of fixing a performance bug
related to linpack (11388705) where threads were serializing
on Math.class while calling Math.random.

bug: https://code.google.com/p/android/issues/detail?id=79143
bug: 11388705
Change-Id: Ide3a7d17fe855a8086601348be87a890e4c42ab4
o/File.java
ang/Math.java
til/concurrent/ConcurrentSkipListMap.java
5ac7145969eab6e60e2897b0f4945870ed861d19 04-Nov-2014 Narayan Kamath <narayan@google.com> am 390d972a: am 2b32e9ac: Merge "Use equals for comparing percent strings."

* commit '390d972a2a09b9cf03024d91a53e224f91a88e6d':
Use equals for comparing percent strings.
390d972a2a09b9cf03024d91a53e224f91a88e6d 04-Nov-2014 Narayan Kamath <narayan@google.com> am 2b32e9ac: Merge "Use equals for comparing percent strings."

* commit '2b32e9ac55dc769211ce73d9140b7ec9f0a7f54d':
Use equals for comparing percent strings.
773c665755e7040b13e68c73041df95fa713ecef 04-Nov-2014 Narayan Kamath <narayan@google.com> Use equals for comparing percent strings.

bug: 18235329
bug: 15476051

(cherry picked from commit f412a78060760e0aa41bc75a5ab115b6369016de)

Change-Id: Ie39e9e014075331aaf5c6b27212fdfdfc42e0380
ext/DecimalFormatSymbols.java
f412a78060760e0aa41bc75a5ab115b6369016de 04-Nov-2014 Narayan Kamath <narayan@google.com> Use equals for comparing percent strings.

bug: 18235329
bug: 15476051
Change-Id: I33fd9df777cf62688476de36ccea4fe944358f60
ext/DecimalFormatSymbols.java
1692a5c0dfa77c27db5c60e2c76ff33a12613308 29-Oct-2014 Narayan Kamath <narayan@google.com> am f9e4afff: am bb23450e: Merge "Allow "_" in URIs."

* commit 'f9e4afffa4c4067fd8ac6d647acdb70415af4d55':
Allow "_" in URIs.
f9e4afffa4c4067fd8ac6d647acdb70415af4d55 29-Oct-2014 Narayan Kamath <narayan@google.com> am bb23450e: Merge "Allow "_" in URIs."

* commit 'bb23450e9101061e636afb15aaebcfa5ed9724c1':
Allow "_" in URIs.
b7c19f8cd0f12a3b6ea6c9353f88f1e39fd58372 27-Oct-2014 Narayan Kamath <narayan@google.com> Allow "_" in URIs.

Note that this is contrary to RFC-2396, which only allows alphanumeric
characters and hyphens. We need this change because internet hosts out
there clearly don't care enough about standards.

bug: 18023709

(cherry picked from commit 435edc3fa9abd3f8d324c9dd4279a165051052ba)

Change-Id: I5a2ccad41f302b36b0703ae381f0a9954266ff26
et/URI.java
435edc3fa9abd3f8d324c9dd4279a165051052ba 27-Oct-2014 Narayan Kamath <narayan@google.com> Allow "_" in URIs.

Note that this is contrary to RFC-2396, which only allows alphanumeric
characters and hyphens. We need this change because internet hosts out
there clearly don't care enough about standards.

bug: 18023709

Change-Id: I9459f58d49ccc68af887a14c889eaa60b6c3150d
et/URI.java
66636a1da0fb894f403e9a9ebc8508ad6a278565 28-Oct-2014 Narayan Kamath <narayan@google.com> am ab385d6e: Merge "Fix javadoc links for property related methods."

* commit 'ab385d6e896e56385ee03bae0b58213a2cb71cae':
Fix javadoc links for property related methods.
aefa568bcd74855edd0d5998107d2402582c5f31 28-Oct-2014 Elliott Hughes <enh@google.com> am fbcc49e3: Merge "Wire up frameworks notifications of 12/24 hour preferences."

* commit 'fbcc49e3f15856bfcf8965772151161671443b7e':
Wire up frameworks notifications of 12/24 hour preferences.
1306f17bbc688939b437cff3517dd212dff404a2 24-Oct-2014 Narayan Kamath <narayan@google.com> am a88669a4: Fix javadoc links for property related methods.

* commit 'a88669a4d18a0c0e281d4165d6d80baa69452631':
Fix javadoc links for property related methods.
03bd709268cb182cc021e49c2a0d465c4b03ef54 24-Oct-2014 Elliott Hughes <enh@google.com> am 5309a0c2: Merge "autoclose all <a name> tags so they don\'t disappear on web site"

* commit '5309a0c2567efb1f349171906c023f3f02846280':
autoclose all <a name> tags so they don't disappear on web site
a88669a4d18a0c0e281d4165d6d80baa69452631 24-Oct-2014 Narayan Kamath <narayan@google.com> Fix javadoc links for property related methods.

The list of unchangeable properties is at #getProperty
and not #setProperty.

bug: 17645282

(cherry picked from commit 8940f9c1623644206ec2281e9f71ef8df9b9a38a)

Change-Id: Ief3cf78088e800ffb58e67e1f2d075fbc8ec31f7
ang/System.java
8940f9c1623644206ec2281e9f71ef8df9b9a38a 24-Oct-2014 Narayan Kamath <narayan@google.com> Fix javadoc links for property related methods.

The list of unchangeable properties is at #getProperty
and not #setProperty.

bug: 17645282
Change-Id: Ic8433ac9d96c0de795e3615c1644500c1bd2f9ed
ang/System.java
edd0557c18d37d6eec32a00cdeb4bb01f823fac3 23-Oct-2014 Elliott Hughes <enh@google.com> am 0836eb61: Wire up frameworks notifications of 12/24 hour preferences.

* commit '0836eb6118ddedbfe420b5d6ff98f07adf5a5d23':
Wire up frameworks notifications of 12/24 hour preferences.
0836eb6118ddedbfe420b5d6ff98f07adf5a5d23 22-Oct-2014 Elliott Hughes <enh@google.com> Wire up frameworks notifications of 12/24 hour preferences.

Bug: 10361358

(cherry picked from commit cafe1a748caf89091d2f1c3956a43daf23b9403b)

Change-Id: I2629bbad0737bc5836afa7cfe4a9667095df0357
ext/DateFormat.java
fbcc49e3f15856bfcf8965772151161671443b7e 23-Oct-2014 Elliott Hughes <enh@google.com> Merge "Wire up frameworks notifications of 12/24 hour preferences."
cafe1a748caf89091d2f1c3956a43daf23b9403b 22-Oct-2014 Elliott Hughes <enh@google.com> Wire up frameworks notifications of 12/24 hour preferences.

Bug: 10361358
Change-Id: I62ffdc987e55bca70889f611c2e5c5c91a650bd9
ext/DateFormat.java
306c10a52f6619ad794ffedfa4c1d515bc4c7d12 22-Oct-2014 smain@google.com <smain@google.com> am 5be6ff73: am 259a7497: am 936306df: autoclose all <a name> tags so they don\'t disappear on web site

* commit '5be6ff73065daac6bb53508df5191ebac4f96aea':
autoclose all <a name> tags so they don't disappear on web site
06e18a8d500857031757dfbc712fe7630a26baa4 22-Oct-2014 Elliott Hughes <enh@google.com> am 9dc6462d: am 811476ae: am 76e91645: Update "4.? (STOPSHIP)" to "5.0 (Lollipop)" in Locale javadoc.

* commit '9dc6462dadef792beb05eff2c41822c7729425ad':
Update "4.? (STOPSHIP)" to "5.0 (Lollipop)" in Locale javadoc.
5be6ff73065daac6bb53508df5191ebac4f96aea 22-Oct-2014 smain@google.com <smain@google.com> am 259a7497: am 936306df: autoclose all <a name> tags so they don\'t disappear on web site

* commit '259a74974e047702383ea00f90634cd4d36b4472':
autoclose all <a name> tags so they don't disappear on web site
9dc6462dadef792beb05eff2c41822c7729425ad 22-Oct-2014 Elliott Hughes <enh@google.com> am 811476ae: am 76e91645: Update "4.? (STOPSHIP)" to "5.0 (Lollipop)" in Locale javadoc.

* commit '811476ae7f33ed6d45924d9abd76a5eec9e9adc4':
Update "4.? (STOPSHIP)" to "5.0 (Lollipop)" in Locale javadoc.
8233f5fe9bf0cf5c8723b1122ad7880214a6ab8b 22-Oct-2014 smain@google.com <smain@google.com> autoclose all <a name> tags so they don't disappear on web site

<a> tags with the name attribute---used to create a page anchor---must be
closed immediately and not contain any text because, in order to make the
appropriate content visible below the site's "sticky header" when the anchor
is followed, CSS is used to hide the <a name> element and position it
up higher by an offset equal to the height of the sticky header.

So, do not place text inside an <a> tag with the name attribute.

(cherry-pick of 936306df62d7d44a806fbeb789c6432e7c325981.)

Change-Id: Icae1b1f0716aa02d003f921b8e430ad3c99f26d0
ang/Character.java
ecurity/SecureRandom.java
ext/DecimalFormat.java
ext/MessageFormat.java
til/Locale.java
til/Properties.java
til/regex/Pattern.java
til/zip/Deflater.java
936306df62d7d44a806fbeb789c6432e7c325981 22-Oct-2014 smain@google.com <smain@google.com> autoclose all <a name> tags so they don't disappear on web site

<a> tags with the name attribute---used to create a page anchor---must be
closed immediately and not contain any text because, in order to make the
appropriate content visible below the site's "sticky header" when the anchor
is followed, CSS is used to hide the <a name> element and position it
up higher by an offset equal to the height of the sticky header.

So, do not place text inside an <a> tag with the name attribute.

Change-Id: Icae1b1f0716aa02d003f921b8e430ad3c99f26d0
ang/Character.java
ecurity/SecureRandom.java
ext/DecimalFormat.java
ext/MessageFormat.java
til/Locale.java
til/Properties.java
til/regex/Pattern.java
til/zip/Deflater.java
76e916456153c0fed205c9d706fba7f2dedccc8f 22-Oct-2014 Elliott Hughes <enh@google.com> Update "4.? (STOPSHIP)" to "5.0 (Lollipop)" in Locale javadoc.

Bug: 18074200
Change-Id: I38f8fef6eb5a100f7ef3a1b9bc6640895c85b387
til/Locale.java
f42e86691629e8245d64381c8bba40330b2778e3 17-Oct-2014 Narayan Kamath <narayan@google.com> am 1f7fcec1: Merge "Fix resource leak in StrictJarFile."

* commit '1f7fcec1e92df937952e9996a7fc42947501e1d9':
Fix resource leak in StrictJarFile.
c9986bf6626aecaceac337fe2847a0d2e7e6e34a 17-Oct-2014 Narayan Kamath <narayan@google.com> am 1f7fcec1: Merge "Fix resource leak in StrictJarFile."

* commit '1f7fcec1e92df937952e9996a7fc42947501e1d9':
Fix resource leak in StrictJarFile.
b369ebdb7fcad44420b43593e908183f95bfa8ea 02-Oct-2014 Narayan Kamath <narayan@google.com> Fix resource leak in StrictJarFile.

Verifier.readCertificates and isSignedJar can throw
SecurityException. We should clean up the RandomAccessFile
we've created when that happens.

bug: 17441127
Change-Id: I22532a9660e3a132b700abb32fdabf44b27794bc
til/jar/StrictJarFile.java
fa1ab1d7aaa558994815d217d4eeca7e07ff57b3 09-Oct-2014 Elliott Hughes <enh@google.com> Support DecimalFormatSymbols' percent symbol being a string.

Bug: 15476051

(cherry picked from commit a68116c0d8ff9cd517d6b765bf2b8930ed9a3e12)

Change-Id: I70ff647dd20b263596685598186ee2f55e1ef8fa
ext/DecimalFormatSymbols.java
ef25ebaacff28bee4aca220b9ab32967cb187044 09-Oct-2014 Elliott Hughes <enh@google.com> am a96d6871: Merge "Support DecimalFormatSymbols\' percent symbol being a string."

* commit 'a96d6871503966e8589ee8d929acc68ee1e4d59c':
Support DecimalFormatSymbols' percent symbol being a string.
fcc19aa354bd202f1c7064b8ceb5e56f30c12162 09-Oct-2014 Elliott Hughes <enh@google.com> am a96d6871: Merge "Support DecimalFormatSymbols\' percent symbol being a string."

* commit 'a96d6871503966e8589ee8d929acc68ee1e4d59c':
Support DecimalFormatSymbols' percent symbol being a string.
a68116c0d8ff9cd517d6b765bf2b8930ed9a3e12 09-Oct-2014 Elliott Hughes <enh@google.com> Support DecimalFormatSymbols' percent symbol being a string.

Bug: 15476051
Change-Id: I75514c497f18366b2e1320ea6a62df025a50114f
ext/DecimalFormatSymbols.java
82326af0b2065b460eaf98bdb6b59ac1a4947a31 07-Oct-2014 Elliott Hughes <enh@google.com> am 7d7c4807: Merge "Fix missing word in Timer docs."

* commit '7d7c48079d8ac61068cac7caf0072fa6c1fbe0a2':
Fix missing word in Timer docs.
3903b7fec19f4fac967a1e500b5f9da24a297e8d 07-Oct-2014 Elliott Hughes <enh@google.com> am 7d7c4807: Merge "Fix missing word in Timer docs."

* commit '7d7c48079d8ac61068cac7caf0072fa6c1fbe0a2':
Fix missing word in Timer docs.
9649aa3bb09defb1dc3415222789b47854949b0e 07-Oct-2014 Elliott Hughes <enh@google.com> Fix missing word in Timer docs.

Bug: https://code.google.com/p/android/issues/detail?id=77177

(cherry picked from commit f8055ee123d48b9238dd5e3e5551d4cb3f9a8933)

Change-Id: Ib978abd1f6cf17b4bde43f648aff3edebfab42c7
til/Timer.java
7d7c48079d8ac61068cac7caf0072fa6c1fbe0a2 07-Oct-2014 Elliott Hughes <enh@google.com> Merge "Fix missing word in Timer docs."
f8055ee123d48b9238dd5e3e5551d4cb3f9a8933 07-Oct-2014 Elliott Hughes <enh@google.com> Fix missing word in Timer docs.

Bug: https://code.google.com/p/android/issues/detail?id=77177
Change-Id: Ia05cdbe5f6da9faf9a8976c50ce4a469acd0b179
til/Timer.java
31ff7fdc2378331b624bc8601db1e2a395c31118 04-Oct-2014 Narayan Kamath <narayan@google.com> am fd193075: am 56661840: Make "user.home" changeable.

* commit 'fd193075de801d117022ac6f93dbacac1d6c6e2b':
Make "user.home" changeable.
1ff9989b099fa716fda9571da56ced253a613698 04-Oct-2014 Narayan Kamath <narayan@google.com> am 56661840: Make "user.home" changeable.

* commit '566618403d002719a94a6624a4ae032409318866':
Make "user.home" changeable.
566618403d002719a94a6624a4ae032409318866 03-Oct-2014 Narayan Kamath <narayan@google.com> Make "user.home" changeable.

For backward compatibility. This property has always been
empty on android (and is documented as such).

This also includes a fix to treat setProperties(null) properly
to keep the test runners happy.

bug: 13238872
Change-Id: I5157fad30c4d07fb2baeeaf50e696fdcba5f1cdd
ang/System.java
82bce58034e24501e7a03a43076ec218922056a6 02-Oct-2014 Calin Juravle <calin@google.com> am acb298a9: am f8638c30: Add method for initializing unchangeable system properties.

* commit 'acb298a9e2807eaecfd0a503fb2fb4eba61eb2b4':
Add method for initializing unchangeable system properties.
ac650337dd922d742b609f30df922adf2ab8f38d 02-Oct-2014 Calin Juravle <calin@google.com> am f8638c30: Add method for initializing unchangeable system properties.

* commit 'f8638c30c92778d307d056fa61448584141c3f05':
Add method for initializing unchangeable system properties.
e499f031d8887d8f7481c3308983d58b7f6bf2aa 01-Oct-2014 Calin Juravle <calin@google.com> Add method for initializing unchangeable system properties.

This is useful when the environment needs to change under native bridge
emulation.

Bug: 17713104

(cherry picked from commit f8638c30c92778d307d056fa61448584141c3f05)

Change-Id: If5568d06ec3f7c497653204decc2dafea5fabd01
ang/System.java
f8638c30c92778d307d056fa61448584141c3f05 01-Oct-2014 Calin Juravle <calin@google.com> Add method for initializing unchangeable system properties.

This is useful when the environment needs to change under native bridge
emulation.

Bug: 17713104
Change-Id: I074e45a60e5f2e798d6759a134ad637763d791ca
ang/System.java
2c2875ce086f2eafedd5f7f7d077c97e24d75a6b 06-Sep-2014 jgu21 <jinghui.gu@intel.com> Libcore: Allow "os.arch" system property to be changed

In a native bridge environment, it is necessary to change the "os.arch"
system property to reflect the emulated architecture.

(cherry picked from commit a1bb82d0c77c4f0f1c7807caac2a4e526ffe4240)

Bug: 17671501

Change-Id: Iefdaa84d1804b0d0b170eded36ebe7c24111c13c
Signed-off-by: jgu21 <jinghui.gu@intel.com>
ang/System.java
ac11925e7559f51844da79b7f62d27f26ecf9c86 25-Sep-2014 Andreas Gampe <agampe@google.com> am c5152705: Merge "Libcore: Allow "os.arch" system property to be changed"

* commit 'c5152705f26bc21f27d09107c645f47e730e8762':
Libcore: Allow "os.arch" system property to be changed
7ecc435b38338d4ea1dddc08928008daa0e6c8ee 25-Sep-2014 Andreas Gampe <agampe@google.com> am c5152705: Merge "Libcore: Allow "os.arch" system property to be changed"

* commit 'c5152705f26bc21f27d09107c645f47e730e8762':
Libcore: Allow "os.arch" system property to be changed
a1bb82d0c77c4f0f1c7807caac2a4e526ffe4240 06-Sep-2014 jgu21 <jinghui.gu@intel.com> Libcore: Allow "os.arch" system property to be changed

In a native bridge environment, it is necessary to change the "os.arch"
system property to reflect the emulated architecture.

Change-Id: I0b93da93251c6b4638de786bf98cf99df07c3fc2
Signed-off-by: jgu21 <jinghui.gu@intel.com>
ang/System.java
cdb15cded439701ba4d656583f8eb2c6f55498bb 23-Sep-2014 Elliott Hughes <enh@google.com> am a94333ea: Merge "Revert "Make parameter name match comments for sdk build.""

* commit 'a94333ea68a8877e8bdd53c0dcddec4cb0cc7acf':
Revert "Make parameter name match comments for sdk build."
7ca5d693b6b32d5f3382a2a96e499d6920ba4cc6 23-Sep-2014 Elliott Hughes <enh@google.com> am a94333ea: Merge "Revert "Make parameter name match comments for sdk build.""

* commit 'a94333ea68a8877e8bdd53c0dcddec4cb0cc7acf':
Revert "Make parameter name match comments for sdk build."
5be13eee4813bcdef1fe23bd9376cbd5c96dd3a6 23-Sep-2014 Elliott Hughes <enh@google.com> Revert "Make parameter name match comments for sdk build."

This reverts commit 716ec14a8b68157293c33b3bdd79a6ecc57f579b.
ang/StrictMath.java
76f599b161f52e331f26a7da950fbb3931713f8e 23-Sep-2014 Elliott Hughes <enh@google.com> am c65e2912: Merge "Revert "Implements some StrictMath functions for improved performance.""

* commit 'c65e2912c305acf0078979ebde6126c0abf5a482':
Revert "Implements some StrictMath functions for improved performance."
7c7f021868fc718973cf1499e38bedd383cef853 23-Sep-2014 Elliott Hughes <enh@google.com> am c65e2912: Merge "Revert "Implements some StrictMath functions for improved performance.""

* commit 'c65e2912c305acf0078979ebde6126c0abf5a482':
Revert "Implements some StrictMath functions for improved performance."
130893bd0f3ca148fea10e09d92f27c98dbbf49d 23-Sep-2014 Elliott Hughes <enh@google.com> Revert "Implements some StrictMath functions for improved performance."

This reverts commit 165e2b4075dadb99afc0856ab3c698809a6355a2.
ang/StrictMath.java
4cc1c67c065453aba33ddeb5b1910544a7f895f0 16-Sep-2014 Neil Fuller <nfuller@google.com> am 64bbdb2e: Merge "Removing some compiler-warning suppressions from EnumMap"

* commit '64bbdb2e53712e7acc77fbb8b61a8888767610e0':
Removing some compiler-warning suppressions from EnumMap
2ddda0d33da3f9461c5a388ffab4343c9e8cdf4a 16-Sep-2014 Neil Fuller <nfuller@google.com> am 64bbdb2e: Merge "Removing some compiler-warning suppressions from EnumMap"

* commit '64bbdb2e53712e7acc77fbb8b61a8888767610e0':
Removing some compiler-warning suppressions from EnumMap
64bbdb2e53712e7acc77fbb8b61a8888767610e0 16-Sep-2014 Neil Fuller <nfuller@google.com> Merge "Removing some compiler-warning suppressions from EnumMap"
a9f1fb9100f9f84f55c0572940a214a106e93f14 15-Sep-2014 Neil Fuller <nfuller@google.com> Removing some compiler-warning suppressions from EnumMap

The original motivation was to fix a report that
line 162 does not compile with newer compilers:
https://code.google.com/p/android/issues/detail?id=73244

There are a lot of compiler warning suppressions which made
the problem less obvious than it should have been.
The fact it compiled before was possibly a compiler bug.
This change removes a lot of the suppression, and where it
cannot be removed it narrows the scope to just local-variable
declarations. One method-level suppression remains.

This commit also adds a bug fix for situations where the raw
type is being used and an EnumMap is being created from an
existing Map. Previously a NullPointerException would have been
thrown if the first key found was not actually an enum, now a
ClassCastException will be thrown.

Some additional comments have been added and some loops made
into foreach.

Bug: https://code.google.com/p/android/issues/detail?id=73244
Change-Id: I7f23744dc55237a94e5906e77720a9595caa64e8
til/EnumMap.java
101453242e50e7be845de9b7be0d7f18d60cac7d 09-Sep-2014 Andreas Gampe <agampe@google.com> Libcore: Change miranda modifier flag

Flag was changed in ART. Move accordingly.

Bug: 16161620

(cherry picked from commit 93b153dea95bfa5068d2146228d62c3e4e905da2)

Change-Id: I2f591d53b7d1559171e70aaaf22225d94b4882f5
ang/reflect/Modifier.java
28ca30d49c3bd9aaece14376cdabc433eb172e1c 14-Sep-2014 Mathieu Chartier <mathieuc@google.com> am 78c348a0: am 84a0fc43: Merge "Fix race between finalizeAllEnqueued and GC" into lmp-dev

* commit '78c348a005136b41a7764927891e604aeec4d818':
Fix race between finalizeAllEnqueued and GC
4c1daa0bba8fdd583581bdcd6ceb423631172f71 12-Sep-2014 Mathieu Chartier <mathieuc@google.com> Fix race between finalizeAllEnqueued and GC

Problem: GC uses pendingNext field for its internal references. This
causes a race where the GC can see the sentinel finalizer reference
through the internal doubly linked list and scan it before the
referent is marked, resulting in the pendingNext being part of a GC
internal reference queue. Then when we updated the pendingNext to
make a circular list it broke the list since the node never reached
the head.

The solution is to use native code so that we can use the same lock
that the GC uses when enqueing references and retry if the GC
changed the pendingNext.

Bug: 17462553

(cherry picked from commit e928a238e5e7f7b9fd74ed460f7e7943484d96af)

Change-Id: I6b68ca210bdda3c2468c5519d423f0bb1f00fc14
ang/ref/FinalizerReference.java
84a0fc4379e4366668b6c82242726a83935f10a7 14-Sep-2014 Mathieu Chartier <mathieuc@google.com> Merge "Fix race between finalizeAllEnqueued and GC" into lmp-dev
790344a10ebec0c6de629de7279a6261a77f3a8d 13-Sep-2014 Andreas Gampe <agampe@google.com> am f6966fbc: am 6a032a9d: Merge "Libcore: Change miranda modifier flag" into lmp-dev

* commit 'f6966fbcd0bb47d646526fcae73844fc60360608':
Libcore: Change miranda modifier flag
6a032a9d6a98f36a5e4f481353fe385a7a5f91fc 12-Sep-2014 Andreas Gampe <agampe@google.com> Merge "Libcore: Change miranda modifier flag" into lmp-dev
e928a238e5e7f7b9fd74ed460f7e7943484d96af 12-Sep-2014 Mathieu Chartier <mathieuc@google.com> Fix race between finalizeAllEnqueued and GC

Problem: GC uses pendingNext field for its internal references. This
causes a race where the GC can see the sentinel finalizer reference
through the internal doubly linked list and scan it before the
referent is marked, resulting in the pendingNext being part of a GC
internal reference queue. Then when we updated the pendingNext to
make a circular list it broke the list since the node never reached
the head.

The solution is to use native code so that we can use the same lock
that the GC uses when enqueing references and retry if the GC
changed the pendingNext.

Bug: 17462553

Change-Id: I0388f289a83d9b48e88129fe5b4b49ace4c5a1ca
ang/ref/FinalizerReference.java
4e95d23e24ff6fd2810ee5cff409a9f1764eb003 10-Sep-2014 Neil Fuller <nfuller@google.com> Introduce checks for integer overflow during division.

Historically, Android would refuse to
perform calculations on memory grounds for large values
or would cast to an int and produce incorrect result for
diffScales outside of the int range.

This change adds a check to prevent scale overflow for
large scale division.

Bug: 17393664

(cherry picked from commit f7cf74a44b2f5ff863de0d82d2efb6d17240ab3e)

Change-Id: I94c829f184804a4fcbed67a180b7ce9684652311
ath/BigDecimal.java
984c6d0f2a4ee6bde4969b892ff06a876d69427d 11-Sep-2014 Neil Fuller <nfuller@google.com> am 43edd425: Merge "Introduce checks for integer overflow during division."

* commit '43edd4252569280730d7e81f6209df0adac23dda':
Introduce checks for integer overflow during division.
43edd4252569280730d7e81f6209df0adac23dda 11-Sep-2014 Neil Fuller <nfuller@google.com> Merge "Introduce checks for integer overflow during division."
70eee6b78e8d9051627f2fdf258a0dafb766297d 10-Sep-2014 Elliott Hughes <enh@google.com> am 3de4fce3: Merge "High CPU load in java.nio using poll"

* commit '3de4fce30986f4c1af6637e2fff51cdd99c795f0':
High CPU load in java.nio using poll
8806710d7a5cd6a168f2463de21498c58f70948a 04-Sep-2014 Przemyslaw Jakwert <przemyslaw2.jakwert@sonymobile.com> High CPU load in java.nio using poll

Sometimes when phone goes out of coverage CPU is
stuck at high load when it should not.

System.os.poll() returns the number of file descriptors
ready to be processed, but since they all have
revent=POLLERR, they are not handled/sent to the
application. Next time application does Selector.select(),
native will not block since there are FDs which have to
be processed and Java will discard them again.

As a result, Selector.select() gets called again and again,
producing 100% CPU load per thread that polls for FDs with
POLLERR set.

The fix is to add POLLERR handling (POLLHUP is being
handled already).

Bug: 17456151

(cherry picked from commit f41df4f9710dafffdedb5fa6c40550532069036a)

Change-Id: I3de249f5cac575da76cc16cdc7b986fb66417e04
io/SelectorImpl.java
f41df4f9710dafffdedb5fa6c40550532069036a 04-Sep-2014 Przemyslaw Jakwert <przemyslaw2.jakwert@sonymobile.com> High CPU load in java.nio using poll

Sometimes when phone goes out of coverage CPU is
stuck at high load when it should not.

System.os.poll() returns the number of file descriptors
ready to be processed, but since they all have
revent=POLLERR, they are not handled/sent to the
application. Next time application does Selector.select(),
native will not block since there are FDs which have to
be processed and Java will discard them again.

As a result, Selector.select() gets called again and again,
producing 100% CPU load per thread that polls for FDs with
POLLERR set.

The fix is to add POLLERR handling (POLLHUP is being
handled already).

Bug: 17456151
Change-Id: I04bbb8e64bf64aee1e95ea7a1a2e1d16c6e1c990
io/SelectorImpl.java
f7cf74a44b2f5ff863de0d82d2efb6d17240ab3e 10-Sep-2014 Neil Fuller <nfuller@google.com> Introduce checks for integer overflow during division.

Historically, Android would refuse to
perform calculations on memory grounds for large values
or would cast to an int and produce incorrect result for
diffScales outside of the int range.

This change adds a check to prevent scale overflow for
large scale division.

Bug: 17393664
Change-Id: I090c271bb02379f35d3c4392aa38be2bb0cf431f
ath/BigDecimal.java
93b153dea95bfa5068d2146228d62c3e4e905da2 09-Sep-2014 Andreas Gampe <agampe@google.com> Libcore: Change miranda modifier flag

Flag was changed in ART. Move accordingly.

Bug: 16161620
Change-Id: I2f591d53b7d1559171e70aaaf22225d94b4882f5
ang/reflect/Modifier.java
365ea82a5c83d18f1630b7cf232f8499d9613dc0 05-Sep-2014 Mathieu Chartier <mathieuc@google.com> Change ReferenceQueue.add to append at end of the unenqueued list

We now append the singly linked list at the end of the queue.
Previously the list was added after the first element of the
unenqueued list.

Bug: 17381967

(cherry picked from commit 37477444ae4d6fae52258f9ea85d32d5a87ebef2)

Change-Id: Ie6680df476518236037254546380a8255ad801ac
ang/ref/ReferenceQueue.java
d01ab521b9702058a9a357481e25fbb9af1a8fcc 05-Sep-2014 Mathieu Chartier <mathieuc@google.com> am f48abd8f: Merge "Change ReferenceQueue.add to append at end of the unenqueued list"

* commit 'f48abd8f339755928b516dca8a939a5b7b799bd4':
Change ReferenceQueue.add to append at end of the unenqueued list
37477444ae4d6fae52258f9ea85d32d5a87ebef2 05-Sep-2014 Mathieu Chartier <mathieuc@google.com> Change ReferenceQueue.add to append at end of the unenqueued list

We now append the singly linked list at the end of the queue.
Previously the list was added after the first element of the
unenqueued list.

Bug: 17381967
Change-Id: I6d4eb1053e5a2babd559e410b42344a04490e7b5
ang/ref/ReferenceQueue.java
d0ce966016703de5783ac5097131d7a738d8b007 05-Sep-2014 Elliott Hughes <enh@google.com> Merge "DecimalFormatSymbols with a null locale should throw." into lmp-dev
33a6b48cc987df975752cdfe91ea2bc918f974f2 05-Sep-2014 Narayan Kamath <narayan@google.com> am c9a79e62: Merge "DecimalFormatSymbols with a null locale should throw."

* commit 'c9a79e62ee08665ce46fb08c8d1f659d4e78c058':
DecimalFormatSymbols with a null locale should throw.
87e82b7e4d81bfe955a2a2bd4ddf6eb6cc3995e0 05-Sep-2014 Narayan Kamath <narayan@google.com> DecimalFormatSymbols with a null locale should throw.

We left this out when manually auditing the list of classes
that don't throw and silently use the default (like Calendar)
vs those that do. See bugs 16938922 and 15849709.

bug: 17394277

(cherry picked from commit fba9a7e32be3a80df36fe7b3f6ee839b68f35d2e)

Change-Id: I84ae39442b4ba69296f3e85344fa4d7936ecbb81
ext/DecimalFormatSymbols.java
fba9a7e32be3a80df36fe7b3f6ee839b68f35d2e 05-Sep-2014 Narayan Kamath <narayan@google.com> DecimalFormatSymbols with a null locale should throw.

We left this out when manually auditing the list of classes
that don't throw and silently use the default (like Calendar)
vs those that do. See bugs 16938922 and 15849709.

bug: 17394277

Change-Id: I6e1dae3c9251dfd48221914351a504f24f4bdf5d
ext/DecimalFormatSymbols.java
bf02b3f81048b0d81b3f0999675071c91c2f17e5 04-Sep-2014 Mathieu Chartier <mathieuc@google.com> am f9ac85ca: am 2cc3d41f: Fix race in finalizeAllEnqueued.

* commit 'f9ac85ca7f1a22c088b8eb9887910e7cc2e9abf8':
Fix race in finalizeAllEnqueued.
de49a22034cfb5b50467cde52cdcb268d6b7423a 04-Sep-2014 Mathieu Chartier <mathieuc@google.com> Fix race in finalizeAllEnqueued.

The problem was as follows:
The GC finishes and enqueues all cleared references on the
ReferenceQueue.unenqueued list. Then someone calls
finalizeAllEnqueued which enqueues a finalizer reference directly on
the finalizer reference queue. However the recently cleared references
had not yet been processed by the ReferenceQueueDaemon resulting
in the sentinal being finalized before the objects which were freed
in the GC.

The fix is enqueuing the sentinel finalizer reference on the unenqueued
queue.

(cherry picked from commit 2cc3d41ff2dfd673fa1ab4ef2a46525933d523ec)

Change-Id: I0598199ef56aa8bd9e1fa40c39d50b2785dc5c10
ang/ref/FinalizerReference.java
2cc3d41ff2dfd673fa1ab4ef2a46525933d523ec 04-Sep-2014 Mathieu Chartier <mathieuc@google.com> Fix race in finalizeAllEnqueued.

The problem was as follows:
The GC finishes and enqueues all cleared references on the
ReferenceQueue.unenqueued list. Then someone calls
finalizeAllEnqueued which enqueues a finalizer reference directly on
the finalizer reference queue. However the recently cleared references
had not yet been processed by the ReferenceQueueDaemon resulting
in the sentinal being finalized before the objects which were freed
in the GC.

The fix is enqueuing the sentinel finalizer reference on the unenqueued
queue.

Bug: 17371542
Bug: 17381967

Change-Id: I0455c665558397b70a88a97c59fe50090fa57401
ang/ref/FinalizerReference.java
29e1d1de298b8c17365edb2beb2d28d76260e7e5 04-Sep-2014 Neil Fuller <nfuller@google.com> am fc5a9bde: Merge "Fix apache-harmony logging tests"

* commit 'fc5a9bde9565f9d6d5aaf1155743a669c37f7f08':
Fix apache-harmony logging tests
fc5a9bde9565f9d6d5aaf1155743a669c37f7f08 04-Sep-2014 Neil Fuller <nfuller@google.com> Merge "Fix apache-harmony logging tests"
c46b8c831e3c77c83aeaab54c83f914b6b471b0a 01-Sep-2014 Neil Fuller <nfuller@google.com> Fix apache-harmony logging tests

Changed SocketHandler to re-introduce a "socket != 0"
check unintentionally removed by commit
232c91dce1760b180155256d1896d0d80375ff6d.

Some failures are the result of the test code being newer
than the libcore code. Android took its last libcore update
from apache-harmony some time after r820767 but before r929953
and its test-code update at r1097236. This explains a few
things.

Updated FileHandler to deal with null system properties.
This is an equivalent change to
http://svn.apache.org/viewvc?view=revision&revision=935099

Updated XMLFormatter to handle basic XML escaping. This is
an equivalent change to
http://svn.apache.org/viewvc?view=revision&revision=929953

Unsuppress tests that are fixed by this.

Bug: 13882147
Change-Id: I36321b488da6d4e08fbb0d28d0e366f9b06e6371
til/logging/FileHandler.java
til/logging/SocketHandler.java
til/logging/XMLFormatter.java
91dc2dd3a30952ab4ab962cb885b43e81f39c739 04-Sep-2014 Neil Fuller <nfuller@google.com> Merge "Fix SDK and docs build."
e42c720f66e21651d2101930c22f11441e47b308 09-Jan-2014 Eino-Ville Talvala <etalvala@google.com> Fix SDK and docs build.

Replace {@link} references to hidden methods with {@code}.

(cherry picked from commit f73b1089c7236a7268ccce10546cc340a36f8c4b)

Change-Id: Iff245542979c2bbcea8b6c4b4632547c6aac4da4
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
8f3b150cd86c2eb35229806fda6928501da27cac 26-Aug-2014 Elliott Hughes <enh@google.com> Keep qtaguid quiet by not trying to untag non-sockets.

(cherry-pick of f6cf9efb212e572dcd2e902ca461af6323793dbf.)

Bug: 17203955
Change-Id: I0999fc0ff295986b92e31568d96e321b9e7ffb2c
o/FileDescriptor.java
36111b0acfacaff4d391392e7ddc60274d377fcd 03-Sep-2014 Elliott Hughes <enh@google.com> am 3c4eb717: am 2086177b: Merge "Keep qtaguid quiet by not trying to untag non-sockets." into lmp-dev

* commit '3c4eb717a8dabae361477f613223feb0d3dfaaf6':
Keep qtaguid quiet by not trying to untag non-sockets.
2086177b09d7e5f41c062dab9ee7345e8ba565dd 02-Sep-2014 Elliott Hughes <enh@google.com> Merge "Keep qtaguid quiet by not trying to untag non-sockets." into lmp-dev
f6cf9efb212e572dcd2e902ca461af6323793dbf 26-Aug-2014 Elliott Hughes <enh@google.com> Keep qtaguid quiet by not trying to untag non-sockets.

Bug: 17203955
Change-Id: I0999fc0ff295986b92e31568d96e321b9e7ffb2c
o/FileDescriptor.java
38157bed6b89d9d39f4541d1bdef10518e5728af 28-Aug-2014 Neil Fuller <nfuller@google.com> am 7f9653f5: am 55848681: Add additional field checks for deserialization.

* commit '7f9653f5d02beff35b8704b3a075f2e581db6135':
Add additional field checks for deserialization.
55848681427721532161c63b43b3f99e912d071c 22-Aug-2014 Neil Fuller <nfuller@google.com> Add additional field checks for deserialization.

Check that a field is not static when deserializing.

Contains some additional tests to confirm and document behavior
and prevent regressions for field deserialization.

Bug: 17202597
Change-Id: I80fe0f1f15b36852de09320a4daa89333e753903
(cherry picked from commit f4d72bcf5a9caa1d6cac74a018ab68dd87ec6d83)
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
3b08bc4980125367384de5b59db985d08fdc2019 23-Aug-2014 Ian Rogers <irogers@google.com> am ec494368: Merge "Avoid wrapping Class in WeakReference when class loader is null."

* commit 'ec494368f467ca5235a6a52ff6b03b97141fa17d':
Avoid wrapping Class in WeakReference when class loader is null.
9332d00472681d8c17296a73a8957183c2572fec 22-Aug-2014 Ian Rogers <irogers@google.com> Avoid wrapping Class in WeakReference when class loader is null.

Fix a missing case from one constructor by delegating to another.

Change-Id: I8b85c97586dde2d72c9ac21216c594aa810d761b
o/ObjectStreamField.java
627b9fa96b52aca1dde43686ad7eb279768f882a 15-Aug-2014 Narayan Kamath <narayan@google.com> Fix abuse of Runtime.freeMemory.

Runtime.freeMemory is the largest allocation that's
possible *without a heap expansion*. That's a poor proxy
for "can i allocate this byte array" and leads to flaky
CTS tests.

bug: 17021619

(cherry picked from commit df7e1dbcd0ff712f39b8e80023228ea4eb8531c2)

Change-Id: I58dd8c006316e6f1195172cff8a262a96269c2b8
ath/Multiplication.java
e5782859bcb60e27fa3548a96431c57f66128368 22-Aug-2014 Narayan Kamath <narayan@google.com> am 4dbeaf5c: Merge "Fix abuse of Runtime.freeMemory."

* commit '4dbeaf5cb275de51dd057939643a5d860c58c5a2':
Fix abuse of Runtime.freeMemory.
df7e1dbcd0ff712f39b8e80023228ea4eb8531c2 15-Aug-2014 Narayan Kamath <narayan@google.com> Fix abuse of Runtime.freeMemory.

Runtime.freeMemory is the largest allocation that's
possible *without a heap expansion*. That's a poor proxy
for "can i allocate this byte array" and leads to flaky
CTS tests.

bug: 17021619
Change-Id: I108138bf2402e899a40a0b3081c083f733e7c999
ath/Multiplication.java
a2b0bd79c0b938c1f3faee3305b57278954a3d88 15-Aug-2014 Narayan Kamath <narayan@google.com> am a6bb8774: Merge "Fix parsing of fractional seconds."

* commit 'a6bb8774bf6ef792eb4af227b135b6cad815a1e3':
Fix parsing of fractional seconds.
6673173f156316105e18c52b03057cd621361a7e 14-Aug-2014 Narayan Kamath <narayan@google.com> Fix parsing of fractional seconds.

We were just parsing them as millisecond values, which is wrong.
".1" fractional second is 100 milliseconds (we were parsing it as 1 ms),
and ".765432" fractional seconds is 765 milliseconds (we were
parsing it as 765432ms.

In most cases, this was hidden by the fact that we were formatting
such values incorrectly as well.

bug: 16969112

(cherry picked from commit e73ebc998a5b4017e805d750b395603d953d3c0c)

Change-Id: I8401cfa65d3d6d424ae0b962e8c045d65a776183
ext/SimpleDateFormat.java
e73ebc998a5b4017e805d750b395603d953d3c0c 14-Aug-2014 Narayan Kamath <narayan@google.com> Fix parsing of fractional seconds.

We were just parsing them as millisecond values, which is wrong.
".1" fractional second is 100 milliseconds (we were parsing it as 1 ms),
and ".765432" fractional seconds is 765 milliseconds (we were
parsing it as 765432ms.

In most cases, this was hidden by the fact that we were formatting
such values incorrectly as well.

bug: 16969112
Change-Id: Id287684f78691090ac4a6c3029d7909f2c1e1310
ext/SimpleDateFormat.java
e4f01dff49442840faa828dcff0d1583a2e68530 12-Aug-2014 Narayan Kamath <narayan@google.com> Allow Calendar.getInstance to be called with a null Locale.

LocaleData.get was changed to throw for null locales instead
of falling back to the default, so we need to adjust callers
accordingly.

Turns out all other callers would've thrown anyway (for different
reasons) so this change makes those exceptions explicit and
adds tests for them.

bug: 16938922

(cherry picked from commit 148de94b69ad9ed98ebb1adf0e8eb1b1e9e33e1f)

Change-Id: Id89961c9b9524776ef13f57d97b2bb73e19b4eb1
ext/DateFormat.java
ext/NumberFormat.java
til/Calendar.java
til/Currency.java
13a167ae0b96040a0ca74f83b0cc922478273e82 14-Aug-2014 Narayan Kamath <narayan@google.com> am 0dcfa1d0: Merge "Allow Calendar.getInstance to be called with a null Locale."

* commit '0dcfa1d088f114eb92a96b09eebf6172428ea6b5':
Allow Calendar.getInstance to be called with a null Locale.
148de94b69ad9ed98ebb1adf0e8eb1b1e9e33e1f 12-Aug-2014 Narayan Kamath <narayan@google.com> Allow Calendar.getInstance to be called with a null Locale.

LocaleData.get was changed to throw for null locales instead
of falling back to the default, so we need to adjust callers
accordingly.

Turns out all other callers would've thrown anyway (for different
reasons) so this change makes those exceptions explicit and
adds tests for them.

bug: 16938922
Change-Id: I3e77435a6b414b002b96a4f8deb44b51591c5a51
ext/DateFormat.java
ext/NumberFormat.java
til/Calendar.java
til/Currency.java
16ddb06693586116b02889d2ae75f472ea86e78a 12-Aug-2014 Jeff Hao <jeffhao@google.com> am eaed9b61: Merge "Make parameter name match comments for sdk build."

* commit 'eaed9b618b3d0b40d6d9a453f4cf8c6bf812f077':
Make parameter name match comments for sdk build.
f3d5d74d97845437eef2958297280b7b63223c45 12-Aug-2014 Jeff Hao <jeffhao@google.com> am 5fc90ef3: Merge "Implements some StrictMath functions for improved performance."

* commit '5fc90ef30f7c5c5864dae47a8c9f2ac557e62b0d':
Implements some StrictMath functions for improved performance.
165e2b4075dadb99afc0856ab3c698809a6355a2 09-Aug-2014 Emma Meersman <emeersman@google.com> Implements some StrictMath functions for improved performance.

The functions ceil, floor, hypot, IEEEremainder, nextafter, and rint
have all been implemented in Java to save the native call. Benchmarking
numbers to show this performance improvement are included:

Native call (before change):
benchmark=Ceil: 97.40 ns; σ=0.02 ns @ 3 trials
benchmark=Floor: 98.73 ns; σ=0.02 ns @ 3 trials
benchmark=Hypot: 714.62 ns; σ=0.44 ns @ 3 trials
benchmark=IEEEremainder: 180.31 ns; σ=0.08 ns @ 3 trials
benchmark=NextAfterD: 110.47 ns; σ=0.02 ns @ 3 trials
benchmark=NextAfterF: 96.20 ns; σ=0.01 ns @ 3 trials
benchmark=Rint: 92.21 ns; σ=0.02 ns @ 3 trials

Java implementation (after change):
benchmark=Ceil: 47.32 ns; σ=0.01 ns @ 3 trials
benchmark=Floor: 42.03 ns; σ=0.00 ns @ 3 trials
benchmark=Hypot: 69.42 ns; σ=0.37 ns @ 3 trials
benchmark=IEEEremainder: 49.64 ns; σ=0.04 ns @ 3 trials
benchmark=NextAfterD: 63.32 ns; σ=0.17 ns @ 3 trials
benchmark=NextAfterF: 64.67 ns; σ=0.12 ns @ 3 trials
benchmark=Rint: 31.10 ns; σ=0.41 ns @ 10 trials

Change-Id: I9ee926514c0661cdb7a1e6ae3acfe5c31a4b9f20
ang/StrictMath.java
716ec14a8b68157293c33b3bdd79a6ecc57f579b 12-Aug-2014 Jeff Hao <jeffhao@google.com> Make parameter name match comments for sdk build.

Change-Id: I4dba2cfe07cf0c5ce28a0ff4540aa68d9c664a2a
ang/StrictMath.java
01dc548e40d242636223d457b0e48845d7027f34 08-Aug-2014 Jeff Hao <jeffhao@google.com> am cf521925: Merge "Implements some math functions for faster performance"

* commit 'cf5219256c9a44e9b215ac645c1823238ebd31d7':
Implements some math functions for faster performance
cf5219256c9a44e9b215ac645c1823238ebd31d7 08-Aug-2014 Jeff Hao <jeffhao@google.com> Merge "Implements some math functions for faster performance"
7190b61c84c049a117c9218ecf7584b579b9f650 08-Aug-2014 Narayan Kamath <narayan@google.com> am 7033b1a7: Merge "Variants are case sensitive."

* commit '7033b1a77271044b40c1c598c55b4135fc1a146b':
Variants are case sensitive.
4ddaa41a0b03823742021992d2da86b78f5af034 08-Aug-2014 Narayan Kamath <narayan@google.com> Variants are case sensitive.

Yet we were incorrectly upper-casing them inside forLanguageTag.

bug: 16811867

(cherry picked from commit 544adffddd26dcaa63255396bcfff8c935a28872)

Change-Id: Ide9d9632a3e357728685dd0cde127f025d34113b
til/Locale.java
3544ec2598d2e9fde608d4c23720dfe2f2c18711 08-Aug-2014 Piotr Jastrzebski <haaawk@google.com> am b00b6b6e: Merge "Remove nameLength field from ZipEntry."

* commit 'b00b6b6ee612e57097cf878dd7b41fbeece11b58':
Remove nameLength field from ZipEntry.
544adffddd26dcaa63255396bcfff8c935a28872 08-Aug-2014 Narayan Kamath <narayan@google.com> Variants are case sensitive.

Yet we were incorrectly upper-casing them inside forLanguageTag.

bug: 16811867
Change-Id: I088161c4c7769908f35b9f2b7d945fb1cd1fd7ac
til/Locale.java
8c585e912ae4fd7b0b6f5a2e2ddabed6c70289cf 07-Aug-2014 Piotr Jastrzebski <haaawk@google.com> Remove nameLength field from ZipEntry.

It seems that this field is never used outside the internal constructor so it
can be a local variable instead.

Change-Id: I2aa26fb3fd13c571224a9aee14c7eea93e5c9591
til/zip/ZipEntry.java
8157e6a43292925d7ef4eef0280256bf482bb4ae 07-Aug-2014 Narayan Kamath <narayan@google.com> am 16e0e17c: Merge "Revert "Remove nameLength field from ZipEntry.""

* commit '16e0e17c53f24e694314bec7a658f650d206da58':
Revert "Remove nameLength field from ZipEntry."
c48199457bc0ed96404414ba4d4ad15e4f0fd6bb 07-Aug-2014 Narayan Kamath <narayan@google.com> Revert "Remove nameLength field from ZipEntry."

This reverts commit c4da34ca5792e0c73577f868249fdfe8a11a01f6.

Change-Id: I1b93ecfcb8a867a670af717eb25c7076b7097d5c
til/zip/ZipEntry.java
73d2f49f1f8377ab02cee4e051afc6019bdaed1a 07-Aug-2014 Piotr Jastrzebski <haaawk@google.com> am 11940e20: Merge "Remove nameLength field from ZipEntry."

* commit '11940e20d7967330b369c4d7317294fd45339e59':
Remove nameLength field from ZipEntry.
c4da34ca5792e0c73577f868249fdfe8a11a01f6 07-Aug-2014 Piotr Jastrzebski <haaawk@google.com> Remove nameLength field from ZipEntry.

It seems that this field is never used outside the internal constructor so it
can be a local variable instead.

Change-Id: Icd9e009a24ae22da8f5dfd18b9f0ab80913129d4
til/zip/ZipEntry.java
426c1801d4ac7b2c09b30d165902e6d3b33b01f8 01-Aug-2014 Narayan Kamath <narayan@google.com> am c4cddc7c: Merge "Don\'t account buffer.arrayOffset() twice."

* commit 'c4cddc7cfdd8793ee8bf7d4754917456427ea486':
Don't account buffer.arrayOffset() twice.
94fc61e248aeb44e946139177699d5e87901b4c3 31-Jul-2014 Narayan Kamath <narayan@google.com> am 4f18e98e: Merge "Fix LocaleInternalsTest."

* commit '4f18e98ed6890e5de18e04492efd693d19ce7017':
Fix LocaleInternalsTest.
603980f72e5fd57e0e2fa5a096d38c1443c899da 31-Jul-2014 Neil Fuller <nfuller@google.com> am 8ebeea5e: Merge "Make some DateFormatSymbols fields private"

* commit '8ebeea5e5e81e2b5738f3dc382f5520eadf9b99f':
Make some DateFormatSymbols fields private
3b8f0286509a116326dc5d65fcbed1c93f85d2a4 31-Jul-2014 Neil Fuller <nfuller@google.com> am f814c4f5: Merge "Fix the OOME in ScannerParseLargeFileBenchmarkTest"

* commit 'f814c4f5445887275d9d58d21843e6d80fbdae27':
Fix the OOME in ScannerParseLargeFileBenchmarkTest
a3c7ce6ee877f73d6e0629bcb8d4cb2b123f3261 30-Jul-2014 Neil Fuller <nfuller@google.com> am 1ff54651: Merge "Change the DateFormatSymbols serialized form"

* commit '1ff5465107e518d45cadeebbe70d23e2a8f8c56e':
Change the DateFormatSymbols serialized form
4e4b93ffe988b0a597835d852489573b57e0f3fe 30-Jul-2014 Narayan Kamath <narayan@google.com> Don't account buffer.arrayOffset() twice.

data[OUTPUT_OFFSET] from the perspective of native
code must always be the offset from the start of the
buffer passed in to it.

Change-Id: I4a5c9595aebd105c57ce2239dc95cf85d5bd6256
io/charset/CharsetEncoderICU.java
599d7b789d5a72f61589c3b0f98da57179128684 30-Jul-2014 Elliott Hughes <enh@google.com> am fd094c48: Merge "Fix Character.getDirectionality."

* commit 'fd094c48fce10bf12593ed057ebc11ef56969df5':
Fix Character.getDirectionality.
f814c4f5445887275d9d58d21843e6d80fbdae27 31-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Fix the OOME in ScannerParseLargeFileBenchmarkTest"
4b116a2f5d3c6e2a0a7fe39d5eb956563138d542 20-Jun-2014 Neil Fuller <nfuller@google.com> Fix the OOME in ScannerParseLargeFileBenchmarkTest

Scanner had no mechanism for recovering buffer space it didn't
need.

Now, if the buffer is more than 50% full of ignorable characters
the remaining characters are shuffled to the beginning to recover
space. For most expected usecases this means that the buffer will
stay 1k and contain up to 512 characters of useful data. A
growable, circular character buffer could have been introduced
to avoid the copy but is not worth the effort.

Previously the buffer would double in size until the data or memory
was exhausted, and each read would also double in size to fill the
empty half of the buffer. This was fine providing the input
could fit in memory.

On top of that the 1k, 2k, 4k, etc. buffer was repeatedly turned
into a String and passed to the (native) matcher, and then the
matcher was told to ignore more than half of it.

As a consequence of keeping the buffer a fixed size (and only
filling 50% of it at a time), this change may cause a performance
regression: for most usecases where delimiters are closer together
than 512 bytes, reads after the first will now usually be 512 bytes
and not the 1k, 2k, 4k, etc. it was previously.

Having fixed the test so it doesn't OOM, the test now
takes 6 minutes to pass on host and so is unsuitable for inclusion
in CTS tests and so is being suppressed.

This change also includes so tidy up changes to the test and the
Scanner class.

The implementation could no doubt be improved but the API makes
it inherently slow. It would be surprising if anybody uses the
Scanner class on Android with so many better alternatives.

Bug: 14865710
Change-Id: I40a7fc0c2bfaf6db4e42108efe417303e76bde24
til/Scanner.java
386d30705bc91f8dd82843544f033595478b083b 30-Jul-2014 Narayan Kamath <narayan@google.com> Fix LocaleInternalsTest.

- After the new Java forLanguageTag implementation, bogus
locales really do result in "und".
- Fix a regression in unicode extension parsing, where we
would always add a "null" to the keyword set.
- Improve test assertions so that the reason for failure
is obvious.

bug: 15849709
Change-Id: I26fb348b872badb7844587cf290429e15dbb0f0e
til/Locale.java
f042be4f160f526c14fa68fdce578f2a0dbf222e 31-Jul-2014 Neil Fuller <nfuller@google.com> Make some DateFormatSymbols fields private

locale and zoneStrings are not accessed outside of
DateFormatSymbols.

Bug: 16502916
Change-Id: I67907cf6b0ebc2e6a2dd0bfe8728ba6d0487d5a3
ext/DateFormatSymbols.java
2c4a09f2af911621b415e84ee028b768ee0a3fcb 29-Jul-2014 Elliott Hughes <enh@google.com> Fix Character.getDirectionality.

Previously we'd throw ArrayIndexOutOfBoundsException for U+2066..U+2069.
Now we'll return DIRECTIONALITY_UNDEFINED. I've exposed (via @hide) the
underlying icu4c implementation so that frameworks code at least can work
with the new explicit bidi formatting characters.

Bug: 15492712
Change-Id: I96583c7e1c6be26d3f1a857615a1042d58e9feaf
ang/Character.java
562ef053263cf7efccb6640c027b9d015956741e 12-Jul-2014 Michael Chen <themichaelchen@google.com> Implements some math functions for faster performance

Changes cosh, exp, expm1, log, log10, sinh, cbrt,
asin, acos, atan, tanh, log1p
These functions are now implemnted in java to
save the overhead of a jni call

Change-Id: I4d3b70dd1693378af5b04cbbe0fecd95d97c1cff
ang/StrictMath.java
6f4727820142e9c60dbcace544ef1836963d441a 24-Jul-2014 Jeff Hao <jeffhao@google.com> am ec37ab85: Merge "Modified array threshold length for primitive types in arraycopy function."

* commit 'ec37ab85016cd6bd9aa91652abc67013d7c1c68e':
Modified array threshold length for primitive types in arraycopy function.
e870184b66f9cd3b7c7ffd0eea07415a2cc61f4b 24-Jul-2014 Neil Fuller <nfuller@google.com> am 421b940c: Merge "Throw an error when parsing an obviously bad Double"

* commit '421b940ceb2b7868adf441464f0cfcf4ed7ef24b':
Throw an error when parsing an obviously bad Double
1ff5465107e518d45cadeebbe70d23e2a8f8c56e 30-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Change the DateFormatSymbols serialized form"
f39e1d71b478bafac028043a59683dfbed1d9df0 29-Jul-2014 Neil Fuller <nfuller@google.com> Change the DateFormatSymbols serialized form

Adding locale to the serialized form of
DateFormatSymbols.

Some duplicated code around the generation of
numeric / offset timezone strings (e.g. GMT+08:00) has
been removed. A new hidden method has been added
to TimeZone to create this string.

The timezone string lookup has been moved into
LocaleData and it now has a single path rather
than treating the customZoneStrings path as special.

customZoneStrings has been removed from
DateFormatSymbols because it would potentially
have an incorrect value after serialization and
it is no longer required.

Bug: 16502916
Change-Id: I2b317e34ba4772beb372a75dd08c95113408b9cc
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
til/TimeZone.java
b25a5dc22577161c537360456f9320f0f672aa0e 23-Jul-2014 Neil Fuller <nfuller@google.com> Throw an error when parsing an obviously bad Double

Thanks to Robbie Hott for the bug report.

Bug: https://code.google.com/p/android/issues/detail?id=71216
Change-Id: I402fa27e0b90c1c1d26169d79c7061e4a2caa138
ang/StringToReal.java
a48f80599f124e5d3ae0ad8add06efe86b4b0cde 24-Jul-2014 Emma Meersman <emeersman@google.com> Modified array threshold length for primitive types in arraycopy function.

As a result of improved benchmarking, the arraycopy function runs 35% faster
on average than a straight call to the native code for arrays of length 32 or shorter.

Bug: 7103825
Change-Id: I68600b01a6218d761be874528cfa70de56efdfdc
ang/System.java
304845737660e2650533b9cd9a956cfb3f15fb63 23-Jul-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 2f60eb71 to lmp-dev-plus-aosp

Change-Id: I61baa98db9826b020ecc8c46e7d23e5ded9423b7
64b51e385637e69f466cc21e5ad7422625cfc9ba 23-Jul-2014 Narayan Kamath <narayan@google.com> am df624c1c: Fix handling of invalid locales in Date/DecimalFormatSymbols.

* commit 'df624c1cc36dc17e4051d1100a3400aeb4252511':
Fix handling of invalid locales in Date/DecimalFormatSymbols.
df624c1cc36dc17e4051d1100a3400aeb4252511 25-Jun-2014 Narayan Kamath <narayan@google.com> Fix handling of invalid locales in Date/DecimalFormatSymbols.

For locales whose language code is "und" we use Locale.ROOT
instead. This also fixes two other corner cases :

- We were using the wrong locale to fetch timezone strings
when the input locale was null. we now use the same locale
throughout by making sure we don't perform any subsititutions
in LocaleData.get.

- Adds a clearer comment about the broken serialization
behaviour.

bug: 15849709

(cherry picked from commit 043a1424a4e3bbb5abc9d9e11c9c088b20f4ca7d)

Change-Id: I716fb421fb8643dedebb3a7797a76ed1dd86c548
ext/DateFormatSymbols.java
ext/DecimalFormatSymbols.java
ac89b307fd132d44ac55b9109833730cbc2e86fc 21-Jul-2014 Narayan Kamath <narayan@google.com> Implement Locale.forLanguageTag in java.

This prevents us from having to parse ICU locale IDs
or construct them in java. Note that the changes to
LocaleTest bring us in line with the spec (some of the
previous tests demonstrated wonky ICU4C behaviour we
didn't want).

This change includes a minor fix to unicode extension
parsing, we now accept keywords with empty values which
the spec allows.

bug: 15661724
bug: 15849709

(cherry picked from commit bf098bb6345b0917d645d809f4d703e6a0c904f4)

Change-Id: I9b5417dd32bd758655085a484db071959edb774e
til/Locale.java
4314c9fa56c277db2f6b6d89649d0f1ee4736780 18-Jul-2014 Narayan Kamath <narayan@google.com> Expand visibility of adjustLanguageCode.

There's already one copy in the frameworks (in the resource
system) and we will need to add another copy to the code that
sets system locales from the SIM.

(cherry picked from commit a29f321f2d347bfc0f0d7886fc74dcbbb4cd2432)

Change-Id: Ib2c48a4f5f1085080f62c7a4322d9da57bbeab41
til/Locale.java
5c0472fd7c53464e526bb833707551d85dbafec1 25-Jun-2014 Narayan Kamath <narayan@google.com> Fix handling of invalid locales in Date/DecimalFormatSymbols.

For locales whose language code is "und" we use Locale.ROOT
instead. This also fixes two other corner cases :

- We were using the wrong locale to fetch timezone strings
when the input locale was null. we now use the same locale
throughout by making sure we don't perform any subsititutions
in LocaleData.get.

- Adds a clearer comment about the broken serialization
behaviour.

bug: 15849709

Change-Id: I95e7eb0ccb7458711038ce9b1c76b3279acda9d6
ext/DateFormatSymbols.java
ext/DecimalFormatSymbols.java
ba65bb691010117b5eff232688236f93e3ed7b8c 22-Jul-2014 Neil Fuller <nfuller@google.com> am 1debf796: Merge "Support for a android.text.format.Time implemented entirely in Java"

* commit '1debf79647da22cf39dd5b4d0db2e008026fbc60':
Support for a android.text.format.Time implemented entirely in Java
d3e2f95f43c9c2097011b1764d2c70f326ee07f8 22-Jul-2014 Narayan Kamath <narayan@google.com> am 2dd07802: Merge "Implement Locale.forLanguageTag in java."

* commit '2dd07802d570b35981f923aa29e25315b51edc5c':
Implement Locale.forLanguageTag in java.
b816126ef059e1a4f9b2805f45f44e32c1e49e49 22-Jul-2014 Narayan Kamath <narayan@google.com> am 749935fc: Merge "Expand visibility of adjustLanguageCode."

* commit '749935fc9575be6411967d37ae6c938b4ff5bea5':
Expand visibility of adjustLanguageCode.
4e22e1d4a9fcaea1336ac404fd92130cb52d32ed 22-Jul-2014 Mathieu Chartier <mathieuc@google.com> am a0310712: Merge "Make ByteBuffer.allocateDirect be 8 byte aligned."

* commit 'a0310712dd8f99266ff8d1013de2e9aa24c1fb2b':
Make ByteBuffer.allocateDirect be 8 byte aligned.
882daa8bc4ea578e11e7ff986a1a036dd9f21027 21-Jul-2014 Mathieu Chartier <mathieuc@google.com> Make ByteBuffer.allocateDirect be 8 byte aligned.

Bug: 16449607

(cherry picked from commit fb6c80875a8a8d0a9628562f89c250b6a962e824)

Change-Id: Id8771d6e9624c36b963466f91d0d1cb6703266d2
io/ByteBuffer.java
0411fe0516257a28ac5bb7e7b6ce6a58c53b4efa 18-Jul-2014 Narayan Kamath <narayan@google.com> Unhide.

Change-Id: I9191f37f08f93ca9182ea669494602bcaad083cd
til/IllformedLocaleException.java
0785676ad838b48512fde6bef58c380daf11994f 17-Jul-2014 Neil Fuller <nfuller@google.com> Support for a android.text.format.Time implemented entirely in Java

Bug: 15765976
Change-Id: Ic743168a54ff96e5403a9c73c27eeb7d482a01dc
til/GregorianCalendar.java
bf098bb6345b0917d645d809f4d703e6a0c904f4 21-Jul-2014 Narayan Kamath <narayan@google.com> Implement Locale.forLanguageTag in java.

This prevents us from having to parse ICU locale IDs
or construct them in java. Note that the changes to
LocaleTest bring us in line with the spec (some of the
previous tests demonstrated wonky ICU4C behaviour we
didn't want).

This change includes a minor fix to unicode extension
parsing, we now accept keywords with empty values which
the spec allows.

bug: 15661724
bug: 15849709

Change-Id: If9417ab4cb545fdb8b9a0a47a7eade6ebbe33ba8
til/Locale.java
749935fc9575be6411967d37ae6c938b4ff5bea5 22-Jul-2014 Narayan Kamath <narayan@google.com> Merge "Expand visibility of adjustLanguageCode."
a29f321f2d347bfc0f0d7886fc74dcbbb4cd2432 18-Jul-2014 Narayan Kamath <narayan@google.com> Expand visibility of adjustLanguageCode.

There's already one copy in the frameworks (in the resource
system) and we will need to add another copy to the code that
sets system locales from the SIM.

Change-Id: I24d88ea8da0c4f1de26dde2f86e4880507b1da4b
til/Locale.java
a0310712dd8f99266ff8d1013de2e9aa24c1fb2b 22-Jul-2014 Mathieu Chartier <mathieuc@google.com> Merge "Make ByteBuffer.allocateDirect be 8 byte aligned."
fb6c80875a8a8d0a9628562f89c250b6a962e824 21-Jul-2014 Mathieu Chartier <mathieuc@google.com> Make ByteBuffer.allocateDirect be 8 byte aligned.

Bug: 16449607

Change-Id: I4a854d55f49fe709965c6b6a769fb58c356627dc
io/ByteBuffer.java
ec0d62c123863f63a184106a03e0cc6ea1c4690e 18-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Add a cache for ZoneInfo objects in Java" into lmp-dev
60226561d5af59bc47ee70a4988633050e6fc62e 17-Jul-2014 Neil Fuller <nfuller@google.com> Add a cache for ZoneInfo objects in Java

This mirrors the single-item cache in localtime.c.

This is in preparation for an upcoming change to migrate
android.format.text.Time over to Java. It will be making
use of the Java ZoneInfo instead of the native
equivalent.

The Java cache has a size of 1 like the bionic one,
though this can easily be increased.

Given the default TimeZone / ZoneInfo was always
pinned, in many cases the memory usage will not
go up noticeably. In scenarios where applications load
timezones besides the default a cache size of 1 potentially
increases pinned memory usage by one ZoneInfo plus
the overhead of the prototype object held by the cache
(which is never returned to callers).

An example ZoneInfo is "Europe/London", which has ~190
transitions (1 int + 1 byte) and ~6 types (1 int + 1 byte).
Overhead of other fields is ~ 13 bytes, plus the ID string.

190 * (4 + 1) + 6 * (4 + 1) + 13 = 993 bytes.

The prototypes held by the cache share the majority of their
memory with their clones returned from
ZoneInfo.makeTimeZone() and so the overhead of introducing
the cache itself should be in the order of a few tens of
bytes at most.

In future we may want to increase the cache size to 2 in
order to support apps that compare / switch timezones to
increase the odds of the default remaining in the cache.
Sizes above 2 look increasingly specialist.

LMP cherry-pick notes: This is a cherry-pick of the final
patch. In master, an original patch was reverted and then
the revert was reverted with an added fix. The comment
above is from the original commit. The fixed version
included:

Contains a fix for when the timezone ID is not found.
This includes a new test.

(cherry picked from d3d39ab8df5c4f6ae663613dc3617ba300282315)

Change-Id: I4c145942b6603e0e62badfd052b5716fd68769d2
til/TimeZone.java
8acf1a7ee895565ab92626540308f3d893f88005 23-Jun-2014 Neil Fuller <nfuller@google.com> Fix UnmodifiableEntrySet.toArray() ordering

toArray() was returning entries in reverse order.
toArray(T[]) was correct.

Thanks to Chris Povirk for discovering.

The fix is simple.

Change includes additional tests to avoid regressions.
Test & support code has been cleaned up a little to
improve coverage and make it (slightly) less horrible.

Bug: https://code.google.com/p/android/issues/detail?id=72073
(cherry picked from commit 244e90adfe67264364de88df0fd741db0eb12b7f)

Change-Id: Ief017ca70863b799242ccfd04b8827e548548ea4
til/Collections.java
d3d39ab8df5c4f6ae663613dc3617ba300282315 17-Jul-2014 Neil Fuller <nfuller@google.com> Revert "Revert "Add a cache for ZoneInfo objects in Java""

This reverts commit 01b6a878d10ee68db87c3d85d137e81a5257a78a.

Contains a fix for when the timezone ID is not found.
This includes a new test.

Change-Id: I2e5e669782ea6caf4e97153ed6b63ca6ee4ef50d
til/TimeZone.java
f99103104229560d50e581f88f82e510bb6f3053 17-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Revert "Add a cache for ZoneInfo objects in Java""
01b6a878d10ee68db87c3d85d137e81a5257a78a 17-Jul-2014 Neil Fuller <nfuller@google.com> Revert "Add a cache for ZoneInfo objects in Java"

This reverts commit a6e8689807f5a8bb9470ce7c26a47455d2d0608d.

Change-Id: I17a0262d169db3418f2f8888195381f778975dc4
til/TimeZone.java
9a497b6d3b95d774f28f0203409ce6ebf6cb1241 17-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Fix UnmodifiableEntrySet.toArray() ordering"
a6e8689807f5a8bb9470ce7c26a47455d2d0608d 16-Jul-2014 Neil Fuller <nfuller@google.com> Add a cache for ZoneInfo objects in Java

This mirrors the single-item cache in localtime.c.

This is in preparation for an upcoming change to migrate
android.format.text.Time over to Java. It will be making
use of the Java ZoneInfo instead of the native
equivalent.

The Java cache has a size of 1 like the bionic one,
though this can easily be increased.

Given the default TimeZone / ZoneInfo was always
pinned, in many cases the memory usage will not
go up noticeably. In scenarios where applications load
timezones besides the default a cache size of 1 potentially
increases pinned memory usage by one ZoneInfo plus
the overhead of the prototype object held by the cache
(which is never returned to callers).

An example ZoneInfo is "Europe/London", which has ~190
transitions (1 int + 1 byte) and ~6 types (1 int + 1 byte).
Overhead of other fields is ~ 13 bytes, plus the ID string.

190 * (4 + 1) + 6 * (4 + 1) + 13 = 993 bytes.

The prototypes held by the cache share the majority of their
memory with their clones returned from
ZoneInfo.makeTimeZone() and so the overhead of introducing
the cache itself should be in the order of a few tens of
bytes at most.

In future we may want to increase the cache size to 2 in
order to support apps that compare / switch timezones to
increase the odds of the default remaining in the cache.
Sizes above 2 look increasingly specialist.

Change-Id: I0b7daa8ad5d334c8d421dfaa6e0421d3c181a915
til/TimeZone.java
7fdd2c384f5b419e360017ffe640af1246123534 15-Jul-2014 Ed Heyl <edheyl@google.com> reconcile aosp (86eae8dd1e7405394f0e9efe1252575ef9a9674c) after branching. Please do not merge.

Change-Id: Iae444b6b2840916ef9a4d0962a55a74f650bd5a5
ecurity/Security.java
86eae8dd1e7405394f0e9efe1252575ef9a9674c 11-Jul-2014 Kenny Root <kroot@google.com> Merge "Invalidate cache of default SocketFactory"
d45744281bc05a21aec647fbd2cccdaedf9e1ff1 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

(cherry-pick of f39b5ca3c6378c3c36c63889577004b9693ea9c6.)

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
et/URLConnection.java
0aff1dd0b4be1b8d8cb45b59079ca883a1b3205a 17-Jun-2014 Elliott Hughes <enh@google.com> Remove.

(cherry-pick of 63744c884dd4b4f4307f2b021fb894af164972af.)

Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
ang/Character.java
et/HttpCookie.java
et/SocketOption.java
et/StandardSocketOptions.java
io/DatagramChannelImpl.java
io/MembershipKeyImpl.java
io/MulticastMembershipHandler.java
io/NioUtils.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/AlreadyBoundException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/MembershipKey.java
io/channels/MulticastChannel.java
io/channels/NetworkChannel.java
io/channels/SeekableByteChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
til/Currency.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
e3a2ac80b02175d3d4965b7942918421e7c2676c 08-Jul-2014 Narayan Kamath <narayan@google.com> Unhide.

Change-Id: I8fbc8f19fdf4a8ffbbc5d3c0a121e68f7f30162e
til/Locale.java
75e74175182241553d35d593691064fbefddf516 01-Jul-2014 Narayan Kamath <narayan@google.com> am a92e8e0f: am ed3ee85f: Merge "Revert "Rename Arrays.ArrayList to Arrays.ArrayAdapter.""

* commit 'a92e8e0fa83ff37f7802bb1faef25275733facbd':
Revert "Rename Arrays.ArrayList to Arrays.ArrayAdapter."
a92e8e0fa83ff37f7802bb1faef25275733facbd 01-Jul-2014 Narayan Kamath <narayan@google.com> am ed3ee85f: Merge "Revert "Rename Arrays.ArrayList to Arrays.ArrayAdapter.""

* commit 'ed3ee85f37dbe2fc4517cc296dd4a59edac558bc':
Revert "Rename Arrays.ArrayList to Arrays.ArrayAdapter."
095e5569717ecaa8e430c22ffd8afb68d1154821 01-Jul-2014 Narayan Kamath <narayan@google.com> am 7cdc5042: am f9a56a30: Merge "Rename Arrays.ArrayList to Arrays.ArrayAdapter."

* commit '7cdc504277a4d182bde24f3f04ce938bf0c0ea50':
Rename Arrays.ArrayList to Arrays.ArrayAdapter.
7cdc504277a4d182bde24f3f04ce938bf0c0ea50 01-Jul-2014 Narayan Kamath <narayan@google.com> am f9a56a30: Merge "Rename Arrays.ArrayList to Arrays.ArrayAdapter."

* commit 'f9a56a30e71e90303e47768bdde8dd4feed36279':
Rename Arrays.ArrayList to Arrays.ArrayAdapter.
738c833d38d41f8f76eb7e77ab39add82b1ae1e2 25-Jun-2014 Neil Fuller <nfuller@google.com> Add additional checks in ObjectInputStream

Thanks to Jann Horn for reporting a bug in ObjectInputStream
and sending the initial patch.

Add some checks that the class of an object
being deserialized still conforms to the requirements
for serialization.

Add some checks that the class being deserialized matches
the type information (enum, serializable, externalizable)
held in the stream.

Delayed static initialization of classes until the
type of the class has been validated against the stream
content in some cases.

Added more tests.

Bug: 15874291
Change-Id: I0f0fe68e0d21e041c5160482113ae847c357b8f5
o/ObjectInputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
efc3147aae95283aa41e9aba10b54abac3cb90b1 27-Jun-2014 Kenny Root <kroot@google.com> Invalidate cache of default SocketFactory

Currently the default SocketFactory is set once and never invalidated.
Use the Services cache version number to know when to invalidate our
cache.

This increases the time to get the default implementation from 63ns to
97ns on a Nexus 7 (2013) aka deb.

Change-Id: I5d46f02fccaa25e5bcea69d5ca0e4924290cf0e1
ecurity/Security.java
aff7ffc8614d439740e2b4d692925e6712015f43 27-Jun-2014 Andreas Gampe <agampe@google.com> am 0e028e62: am c41d038e: Merge "Fix System.arraycopy"

* commit '0e028e6200c1b19a4664f959f0a68b13f4973ed2':
Fix System.arraycopy
0e028e6200c1b19a4664f959f0a68b13f4973ed2 27-Jun-2014 Andreas Gampe <agampe@google.com> am c41d038e: Merge "Fix System.arraycopy"

* commit 'c41d038e5f55d993b6074e1567c268fb170b6c41':
Fix System.arraycopy
5ef6d301b4b9bdb610e0e84960ac81aff3d7605e 27-Jun-2014 Elliott Hughes <enh@google.com> am d6862d90: am a9640416: Merge "Fix a faulty Julian day computation."

* commit 'd6862d909fd177b5bce85aeee600ac47f67af5ce':
Fix a faulty Julian day computation.
d6862d909fd177b5bce85aeee600ac47f67af5ce 27-Jun-2014 Elliott Hughes <enh@google.com> am a9640416: Merge "Fix a faulty Julian day computation."

* commit 'a9640416956fac998d3a69ec05ded7eaec80dddf':
Fix a faulty Julian day computation.
c880d337f6c26d89e8511a1f7b002a0a03554850 27-Jun-2014 Jeff Hao <jeffhao@google.com> am e9c531e9: am 57d2d897: Merge "Fixed build for arraycopy with objects."

* commit 'e9c531e9a4bd4b1346f08b59044c763ae1fb3175':
Fixed build for arraycopy with objects.
e9c531e9a4bd4b1346f08b59044c763ae1fb3175 27-Jun-2014 Jeff Hao <jeffhao@google.com> am 57d2d897: Merge "Fixed build for arraycopy with objects."

* commit '57d2d897b8dccee54ee88fdf8e851b15f8a35d2a':
Fixed build for arraycopy with objects.
4b999a474eb92e0b89a34de56f3f7979fd491aa1 01-Jul-2014 Narayan Kamath <narayan@google.com> Rename Arrays.ArrayList to Arrays.ArrayAdapter.

Looking at Arrays.asList in isolation, it's easy to
assume that the method returns a java.util.ArrayList
instead of a private static class with the same name
and different behaviour.

Change-Id: Icd75a4a3d0e21c1302ca766e529172cf2de30c2c
til/Arrays.java
4aec69133b8fc525362f4d2b861e5bcc4a7828d2 01-Jul-2014 Narayan Kamath <narayan@google.com> Revert "Rename Arrays.ArrayList to Arrays.ArrayAdapter."

This reverts commit 4b999a474eb92e0b89a34de56f3f7979fd491aa1.

Change-Id: Ifd70798e74357ffe14cbc659ad49a9853b3be8c6
til/Arrays.java
65773c804f3fdc6c373f25f641d4e5f671d6f00a 26-Jun-2014 Jeff Hao <jeffhao@google.com> am fd2ca69a: am 42a6d80d: Merge "Expanded arraycopy function to deal with more types and updated benchmarking."

* commit 'fd2ca69a09c4efe76244f2fcf2612a0ff8b82d08':
Expanded arraycopy function to deal with more types and updated benchmarking.
fd2ca69a09c4efe76244f2fcf2612a0ff8b82d08 26-Jun-2014 Jeff Hao <jeffhao@google.com> am 42a6d80d: Merge "Expanded arraycopy function to deal with more types and updated benchmarking."

* commit '42a6d80d91d8f33162b8946e6fc05e8b43833ca7':
Expanded arraycopy function to deal with more types and updated benchmarking.
57d2d897b8dccee54ee88fdf8e851b15f8a35d2a 27-Jun-2014 Jeff Hao <jeffhao@google.com> Merge "Fixed build for arraycopy with objects."
5bd063897de96e8560638d779c87670834cdba14 27-Jun-2014 Emma Meersman <emeersman@google.com> Fixed build for arraycopy with objects.

Enabled arraycopy to call native code when passed two objects.

Change-Id: I77f9455550acc53ab59ec2dc85cb1fe4d75583c9
ang/System.java
242e5a64fe6162291a478d7dd183c0dcdf312b19 27-Jun-2014 Andreas Gampe <agampe@google.com> Fix System.arraycopy

The generic version of arraycopy does not work. Remove it.

Change-Id: I524289874cfbf62ed0af3c91264180041342c3f1
ang/System.java
a9640416956fac998d3a69ec05ded7eaec80dddf 27-Jun-2014 Elliott Hughes <enh@google.com> Merge "Fix a faulty Julian day computation."
fda7c027e360292edfa4d32fadd2844efaa5f9d7 26-Jun-2014 Elliott Hughes <enh@google.com> Fix a faulty Julian day computation.

The use of Calendar.MILLISECONDS was wrong, as was the use of
ZONE_OFFSET without DST_OFFSET. The existing code pretty much
only works for the values tested in the unit test! This patch
adds new tests to make up for that.

I've also added calls to Calendar.clear to ensure we're not
leaking SECONDS and MILLISECONDS from the Calendar instances (which
get initialized to the current wall clock) into our test values.
This hasn't mattered in the past, but actually does matter here
because tests like isMidnight measure down to the millisecond.

Bug: https://code.google.com/p/android/issues/detail?id=72356
Signed-off-by: jasper tsai <jasper3_tsai@asus.com>
Signed-off-by: hellena shih <hellena_shih@asus.com>
Change-Id: I7d57590a95d3f026bdf1b991e0b1ddb47ba9af37
til/Calendar.java
til/GregorianCalendar.java
42a6d80d91d8f33162b8946e6fc05e8b43833ca7 26-Jun-2014 Jeff Hao <jeffhao@google.com> Merge "Expanded arraycopy function to deal with more types and updated benchmarking."
f14b3694de2011c0c44beac9e0f8b9871ba888db 18-Jun-2014 Emma Meersman <emeersman@google.com> Expanded arraycopy function to deal with more types and updated benchmarking.

Runs 48% faster on average for short arrays of length 16-128, depending on the type. Defaults to
native code for longer arrays.

Bug: 7103825
Change-Id: I70ca8f4a379600917e5bc103364af0637f18e03a
ang/System.java
244e90adfe67264364de88df0fd741db0eb12b7f 23-Jun-2014 Neil Fuller <nfuller@google.com> Fix UnmodifiableEntrySet.toArray() ordering

toArray() was returning entries in reverse order.
toArray(T[]) was correct.

Thanks to Chris Povirk for discovering.

The fix is simple.

Change includes additional tests to avoid regressions.
Test & support code has been cleaned up a little to
improve coverage and make it (slightly) less horrible.

Bug: https://code.google.com/p/android/issues/detail?id=72073
Change-Id: I42ff90e0f592482289cd0cd9fdbdaabf0c17ad93
til/Collections.java
8e580fa5705019decefac99035704ac56cba5e7c 23-Jun-2014 Elliott Hughes <enh@google.com> Merge "@hide."
f53e9d6701c6bd9730acb7c6f960a84461e95e4a 23-Jun-2014 Neil Fuller <nfuller@google.com> am 3568b562: am c477bf9e: Merge "Unimplement Console.readPassword and remove test"

* commit '3568b5622585cdde1f15503784971653710fc2aa':
Unimplement Console.readPassword and remove test
3568b5622585cdde1f15503784971653710fc2aa 23-Jun-2014 Neil Fuller <nfuller@google.com> am c477bf9e: Merge "Unimplement Console.readPassword and remove test"

* commit 'c477bf9eaf4553ed55b9d26c6bd65be3cc5665c6':
Unimplement Console.readPassword and remove test
fe4f216fd6ef2518bfefd6b7970f60befacf5cdd 23-Jun-2014 Elliott Hughes <enh@google.com> @hide.

Change-Id: I4d266414cb6ef7bc2785d9ccb9b4f672c04c781d
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/RecursiveAction.java
til/concurrent/RecursiveTask.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/TransferQueue.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
c477bf9eaf4553ed55b9d26c6bd65be3cc5665c6 23-Jun-2014 Neil Fuller <nfuller@google.com> Merge "Unimplement Console.readPassword and remove test"
1f3014901704f3ae81538773b8a0b382945adc8d 20-Jun-2014 Neil Fuller <nfuller@google.com> Unimplement Console.readPassword and remove test

ConsoleTest.test_readPassword* fails CTS tests.

Context: Under standard Android applications the
System.console() method will return null.

The Console.readPassword() method must turn off echo.

Under automated tests the ConsoleTest is exercising
a Console object with fake stdout / stdin streams to
get around the absence of a System.console().

setEcho() is hardcoded to use stdin / stdout in
the native code. Under the test runners stdin / stdout
are not connected to a TTY leading to a ENOTTY.

Under Android readPassword is unimportant. Rather than leaving
untested security-related code the password methods are being
unimplemented. It is unlikely this code has ever been used on
Android given the absence of a System Console instance.

Bug: 12491103
Change-Id: I755c014e6b53236f5bef0535be137dd721918b44
o/Console.java
3b9d704b6ed8668493a1246a9ea1bc30fa8a2e2b 19-Jun-2014 Neil Fuller <nfuller@google.com> am 3019fd32: am c7531024: Merge "Fix for currency symbol coming from the default locale"

* commit '3019fd32394a00d61bc05ce4e7cb3c949f6143ee':
Fix for currency symbol coming from the default locale
3019fd32394a00d61bc05ce4e7cb3c949f6143ee 19-Jun-2014 Neil Fuller <nfuller@google.com> am c7531024: Merge "Fix for currency symbol coming from the default locale"

* commit 'c7531024059932aab5f03c4dd6f3d8b5491ed226':
Fix for currency symbol coming from the default locale
8192a4ef251310a92b20c590e1186736c2c48263 19-Jun-2014 Neil Fuller <nfuller@google.com> am b8586cf5: am 9aad5527: Merge "CTS fix: Signature2Test.test_clone()"

* commit 'b8586cf5e48f81987b11d3b206f9a9f6f0ae6dbf':
CTS fix: Signature2Test.test_clone()
b8586cf5e48f81987b11d3b206f9a9f6f0ae6dbf 19-Jun-2014 Neil Fuller <nfuller@google.com> am 9aad5527: Merge "CTS fix: Signature2Test.test_clone()"

* commit '9aad55279f870ac0dec65f0fe87af6e2fe79bf1b':
CTS fix: Signature2Test.test_clone()
a1eb5e8aa202df11f7b43d4b3dea74a9cc18229d 18-Jun-2014 Narayan Kamath <narayan@google.com> am 9f4d9667: am cac5dab2: Merge "Fix getISO3Country and getISO3Language."

* commit '9f4d966767bdf4fba4735aacc72d32cbb07fd4fd':
Fix getISO3Country and getISO3Language.
9f4d966767bdf4fba4735aacc72d32cbb07fd4fd 18-Jun-2014 Narayan Kamath <narayan@google.com> am cac5dab2: Merge "Fix getISO3Country and getISO3Language."

* commit 'cac5dab299b4e83dbf9c41c1d253a427828d127b':
Fix getISO3Country and getISO3Language.
9aad55279f870ac0dec65f0fe87af6e2fe79bf1b 19-Jun-2014 Neil Fuller <nfuller@google.com> Merge "CTS fix: Signature2Test.test_clone()"
142b0399f6ea20d46033fba94718bb22c3b4b7cc 18-Jun-2014 Neil Fuller <nfuller@google.com> CTS fix: Signature2Test.test_clone()

Previously it would throw a NullPointerException. Fixing that
rendered the Signature cloneable and the test assertions failing.

The test now passes but is of questionable value except to prove
the absence of RuntimeException.

Change-Id: I2a5b160f0914837b37b801e16b8a3717d00fd94e
ecurity/Signature.java
8d07b07a3ed315c2e1c469d3769cf1df3f49e58b 18-Jun-2014 Neil Fuller <nfuller@google.com> Fix for currency symbol coming from the default locale

NumberFormat.setCurrency() (actually DecimalFormat) was using
currency.getSymbol() without passing the format's locale. This
caused the default Locale to be used to look up the symbol.

The fix uses the format locale, not the default. A test has
been added to demonstrate the problem / fix.

To avoid having the NativeDecimalFormat know about the locale class,
the symbol is passed as an argument rather than the Currency object.
This is an internal API.

Making this change showed an issue with Currency.getSymbol():
For Locales without a country the currency code would be returned
and not a symbol.

ICU provides language-level symbols so this was not the best
we could do. Since the code was previously using the default
Locale, and the default locale usually has a country it was
not previously obvious.

testBug71369 broke because of this second issue. The code is also
fixed here.

This was discovered while investigating bug 71369 but is not
related.

Change-Id: If0ce280aefb042fe8f7ca126cced090b9268a866
ext/DecimalFormat.java
til/Currency.java
280a6d7eff0147bfbabe6d407e68ee911ebcb469 18-Jun-2014 Anwar Ghuloum <anwarg@google.com> am 4aadbe01: Merge "Remove more." into lmp-preview-dev

* commit '4aadbe01b75956c4a1c5af56723e5e6e3da25c47':
Remove more.
ca6c2dfd21fef61f179223fb710db791802068d5 18-Jun-2014 Narayan Kamath <narayan@google.com> Fix getISO3Country and getISO3Language.

For backward compatibility, locales constructed with 3 letter
countries and languages must return those languages and countries
from these methods. With our strict language tag interpretation, these
were being omitted or transformed to und.

We fix this by passing only the language code (or the country code
with a fixed language) down to ICU, which will then deal with it
correctly.

bug: 15638049

Change-Id: I517a82496a2a4c36b1ae9234f7d2d4eb89b34ffe
til/Locale.java
6188cc840d4987d2445740ce8a13dd335b6c6f73 17-Jun-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of 63744c88 to master

Change-Id: I2dbbda225d0fbe61da34f93abbb466ed490ba405
4aadbe01b75956c4a1c5af56723e5e6e3da25c47 17-Jun-2014 Anwar Ghuloum <anwarg@google.com> Merge "Remove more." into lmp-preview-dev
63744c884dd4b4f4307f2b021fb894af164972af 17-Jun-2014 Elliott Hughes <enh@google.com> Remove.

Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
ang/Character.java
et/HttpCookie.java
et/SocketOption.java
et/StandardSocketOptions.java
io/DatagramChannelImpl.java
io/MembershipKeyImpl.java
io/MulticastMembershipHandler.java
io/NioUtils.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/AlreadyBoundException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/MembershipKey.java
io/channels/MulticastChannel.java
io/channels/NetworkChannel.java
io/channels/SeekableByteChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
til/Currency.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
f39b5ca3c6378c3c36c63889577004b9693ea9c6 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
et/URLConnection.java
c51b9a446b24dedea02f32adfa44222a139fd6bc 16-Jun-2014 Elliott Hughes <enh@google.com> am e8a95806: @hide.

* commit 'e8a958066d95a4e15a9834e8b9067d106efd9b53':
@hide.
e8a958066d95a4e15a9834e8b9067d106efd9b53 15-Jun-2014 Elliott Hughes <enh@google.com> @hide.

Change-Id: Ieacf34a7b850910e70ae54f738608509e2c39e2e
ang/Character.java
et/HttpCookie.java
et/SocketOption.java
et/StandardSocketOptions.java
et/URLConnection.java
io/channels/AlreadyBoundException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/MembershipKey.java
io/channels/MulticastChannel.java
io/channels/NetworkChannel.java
io/channels/SeekableByteChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
til/Currency.java
til/IllformedLocaleException.java
til/Locale.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/RecursiveAction.java
til/concurrent/RecursiveTask.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/TransferQueue.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
324bf991656e86dce9a58c82123d4b0390a393b5 16-Jun-2014 Narayan Kamath <narayan@google.com> am 9e8e91cd: am 67831d38: Merge "Pass BCP-47 tags and not Locale.toString results to ICU."

* commit '9e8e91cd9808d4d5d959743bcd96d2c30b9e9ef4':
Pass BCP-47 tags and not Locale.toString results to ICU.
9e8e91cd9808d4d5d959743bcd96d2c30b9e9ef4 16-Jun-2014 Narayan Kamath <narayan@google.com> am 67831d38: Merge "Pass BCP-47 tags and not Locale.toString results to ICU."

* commit '67831d38a1c4ea5419f3c61bf4cbcef3704a96d9':
Pass BCP-47 tags and not Locale.toString results to ICU.
9cf8ea5cb1870b84de6e77d000ae53d54c828f68 12-Jun-2014 Narayan Kamath <narayan@google.com> am 92bd303d: Merge "Implement Locale.toLanguageTag without ICU support."

* commit '92bd303dd51f3d20ee1e48c8cf422d414b7cefcd':
Implement Locale.toLanguageTag without ICU support.
159973cc791d457defee8538008283277977f23c 12-Jun-2014 Narayan Kamath <narayan@google.com> am 9cf8ea5c: am 92bd303d: Merge "Implement Locale.toLanguageTag without ICU support."

* commit '9cf8ea5cb1870b84de6e77d000ae53d54c828f68':
Implement Locale.toLanguageTag without ICU support.
a94266074c7b82720fd2cecfb37ab8da85f1b296 30-May-2014 Elliott Hughes <enh@google.com> Pass BCP-47 tags and not Locale.toString results to ICU.

ICU can't handle the new toString forms for scripts etc.
and it's also guaranteed to deal with BCP-47 tags correctly.

Most of the changes in this patch are required to keep
backwards compatibility for getDisplayCountry string etc. in
the face of the transformations toLanguageTag performs.

A few tests were changed, but for the better.

The tagalog -> filipino charlie foxtrot will be dealt with
in a follow up change.

Co-Authored-By: Narayan Kamath <narayan@google.com>

Change-Id: Ia7f26d92a0e38c4bbb1d839c0fbd8ad16a473bf5
ang/CaseMapper.java
ext/BreakIterator.java
til/Currency.java
til/Locale.java
12ca8820818b604c6fc30f025857ec443c83d4a3 11-Jun-2014 Narayan Kamath <narayan@google.com> Implement Locale.toLanguageTag without ICU support.

This is the first part of an effort to avoid having
to construct and parse ICU locale IDs and to instead
use language tags as inputs to all ICU APIs.

Only one minor unit test adjustment was required, and
that change brings the test closer in line with the
spec.

Change-Id: I8abc0e3b868dd73e4fb9e36b6db19853eb99e6ac
til/Locale.java
c628ada2adf271fb22c1fb3bbaa7632f3de512cb 06-Jun-2014 Elliott Hughes <enh@google.com> am 6231ec14: am d6e67fd7: Merge "Improve the load/loadLibrary documentation."

* commit '6231ec14b2de561049d8a6030639bf65d709abdd':
Improve the load/loadLibrary documentation.
6231ec14b2de561049d8a6030639bf65d709abdd 06-Jun-2014 Elliott Hughes <enh@google.com> am d6e67fd7: Merge "Improve the load/loadLibrary documentation."

* commit 'd6e67fd7082cf8c6ef5544dc740f9052add21538':
Improve the load/loadLibrary documentation.
71cbf28e3323dc9f0898deff6904cdedcbb88c59 06-Jun-2014 Elliott Hughes <enh@google.com> Improve the load/loadLibrary documentation.

Also improve the exception detail message for the default case.

Experience with third-party app developers is that the current documentation
is unhelpful and the current exception detail message is misleading. If we
didn't have to use the existing ClassLoader API, we could actually list the
exact pathnames we'd tried.

Change-Id: I31e1980addf34d6ada6a112949801c970f73bd2b
ang/Runtime.java
ang/System.java
a87d87cd6e6c10e7a7b7f6db25390038a882d37d 04-Jun-2014 Neil Fuller <nfuller@google.com> am 1163499c: am 1c4ee545: Merge "Add interruptibility/wake on close to FileChannel.lock()"

* commit '1163499ceae64096abc0a87a6e7cb9c83412dad9':
Add interruptibility/wake on close to FileChannel.lock()
1163499ceae64096abc0a87a6e7cb9c83412dad9 04-Jun-2014 Neil Fuller <nfuller@google.com> am 1c4ee545: Merge "Add interruptibility/wake on close to FileChannel.lock()"

* commit '1c4ee545fb6868b76d4d56dd19a8b66186acc2f6':
Add interruptibility/wake on close to FileChannel.lock()
1c4ee545fb6868b76d4d56dd19a8b66186acc2f6 04-Jun-2014 Neil Fuller <nfuller@google.com> Merge "Add interruptibility/wake on close to FileChannel.lock()"
8add3229ceb13f2aa5d15b84cc59f5ecc6b90214 17-Apr-2014 Neil Fuller <nfuller@google.com> Add interruptibility/wake on close to FileChannel.lock()

There is no obvious way of automated testing given the test
would have to spawn a separate process to lock a file (and
flock is not available on devices). It has been tested
manually with multiple processes on host and a device.

Bug: 13927110
Change-Id: Ie2e565d4965e7aa6392b0eb32e55cdf50d7f61c5
io/FileChannelImpl.java
93c782b0480fb3dc6ccd5ed7ac017dff7500e7d8 03-Jun-2014 Neil Fuller <nfuller@google.com> am 0b945c6f: am 47526606: Merge "Fix BufferTest.testAccess"

* commit '0b945c6f4d079ee1d8f9578c48e8788c2e6a1cae':
Fix BufferTest.testAccess
0b945c6f4d079ee1d8f9578c48e8788c2e6a1cae 03-Jun-2014 Neil Fuller <nfuller@google.com> am 47526606: Merge "Fix BufferTest.testAccess"

* commit '47526606b5a41fc7d345c5f4c7680ee89554864d':
Fix BufferTest.testAccess
ec3a12ddb18aaf37575ceb00e158f2bda5796629 02-Jun-2014 Neil Fuller <nfuller@google.com> Fix BufferTest.testAccess

Commit b327df0b7d83f079856304830ff4da92b4a5ea1f fixed three
tests but broke BufferTest.testAccess. This fixes all of them.

This ordering of state / argument checks appears consistent
with the checks in DirectByteBuffer for other, similar methods
such as putShort:
1) this.isAccessible
2) this.isReadOnly
3) Argument validity checks

Change-Id: I4e93129ae0f3008ee4894f840d69ae71586b9f07
io/ByteBuffer.java
aba7e787fc0cda822d7ac49d25e3c674540cb8e0 27-May-2014 Kenny Root <kroot@google.com> am 3491a169: am ec629db8: am 4fee9a24: Merge "ECParameterSpec: move curve selection to non-final"

* commit '3491a1692cfcb36fbb842ef3ab3a2dabc64ef870':
ECParameterSpec: move curve selection to non-final
3491a1692cfcb36fbb842ef3ab3a2dabc64ef870 27-May-2014 Kenny Root <kroot@google.com> am ec629db8: am 4fee9a24: Merge "ECParameterSpec: move curve selection to non-final"

* commit 'ec629db86302432d8f731d17f67f2e48e879e220':
ECParameterSpec: move curve selection to non-final
a99c6e9a3341711ca47a61a9f0fe69441e831a38 27-May-2014 Kenny Root <kroot@google.com> ECParameterSpec: move curve selection to non-final

This allows us to set the curve name in unbundled apps.

Change-Id: Ie869b80aa7f70c7ed56cc7d8232df8ee0c2159f7
ecurity/spec/ECParameterSpec.java
d2acf680466588826cbb40bd0c96fe2f89c65b4c 23-May-2014 Neil Fuller <nfuller@google.com> am eb9c4ad6: am 04769b3a: am 392ca3ac: Merge "Change exception priority for ByteBuffer.put(null)"

* commit 'eb9c4ad64768d86a488fbf7b50bb51ca68a3c208':
Change exception priority for ByteBuffer.put(null)
eb9c4ad64768d86a488fbf7b50bb51ca68a3c208 23-May-2014 Neil Fuller <nfuller@google.com> am 04769b3a: am 392ca3ac: Merge "Change exception priority for ByteBuffer.put(null)"

* commit '04769b3a84567a4bd83a4c1a43dfa41882666be2':
Change exception priority for ByteBuffer.put(null)
b327df0b7d83f079856304830ff4da92b4a5ea1f 21-May-2014 Neil Fuller <nfuller@google.com> Change exception priority for ByteBuffer.put(null)

Commit 7e02765b7ada4e85f941f0a6b0fc60a8a76301f3
made ByteBuffer.put(null) throw a NullPointerException
if the ByteBuffer was read only. Previously it would
throw a ReadOnlyBufferException. The priority
of exceptions is unclear, but this returns the behavior
to what it was before and fixes 3 CTS tests:

ReadOnlyWrappedByteBufferTest.testPutByteBuffer
ReadOnlyHeapByteBufferTest.testPutByteBuffer
ReadOnlyDirectByteBufferTest.testPutByteBuffer

Change-Id: I90dd4b6969a4f31a26651d7b35758f899cc020b4
io/ByteBuffer.java
486f90b8babb37fdf90153abff2e7e66680c266d 21-May-2014 Neil Fuller <nfuller@google.com> Merge "Fix merge for System.java"
a359fef674d3d8dcaf1cc4fe643d4d21f7eb8352 21-May-2014 Neil Fuller <nfuller@google.com> Fix merge for System.java

If9306b2ce447eabbf2c1f9f1bd05c371a0cccde5 reintroduced some lines
removed by I1457a63ead89fa8f8aeabc002c0b9038295b886e

Re-removing them.

Change-Id: I24b1d94f4317c5fb12454110e2676b6bfc9cb646
ang/System.java
0e855a3acddaae1d1b9702ffdae60173f8fe3bf5 21-May-2014 Kenny Root <kroot@google.com> am 2e59b067: am ec90ce29: am 96817bc3: Merge "Signature: remove unnecessary throw on clone"

* commit '2e59b067fea75d34fc4bb7c45d7d5ded89eca1ed':
Signature: remove unnecessary throw on clone
2e59b067fea75d34fc4bb7c45d7d5ded89eca1ed 21-May-2014 Kenny Root <kroot@google.com> am ec90ce29: am 96817bc3: Merge "Signature: remove unnecessary throw on clone"

* commit 'ec90ce29fdac44151935a92307084e3e7ff4d132':
Signature: remove unnecessary throw on clone
6e97aa9434d135cd0ebe2bd70b7876ad88cc1be2 20-May-2014 Kenny Root <kroot@google.com> am 5c9b8798: am 64fe658e: am f7a15ff4: Merge "MessageDigest: remove unnecessary throw on clone"

* commit '5c9b879857439d465360246e153bfbcf44df1031':
MessageDigest: remove unnecessary throw on clone
5c9b879857439d465360246e153bfbcf44df1031 20-May-2014 Kenny Root <kroot@google.com> am 64fe658e: am f7a15ff4: Merge "MessageDigest: remove unnecessary throw on clone"

* commit '64fe658e29c0b395b8f4c6794e67c1ab0f07b7b4':
MessageDigest: remove unnecessary throw on clone
76b889a697b7408b6721b1e9592334c8d36fdeeb 16-May-2014 Kenny Root <kroot@google.com> Signature: remove unnecessary throw on clone

If a class couldn't be cloned, it would throw its own exception.
Instead, rely on the default implementation of "clone" to give a better
error message when the target class isn't cloneable.

Change-Id: I2cae9cdad9b4a7cf7fe50f7ad37fd22c1a97c825
ecurity/Signature.java
ecurity/SignatureSpi.java
f7a15ff43004414e1eaa35872e9307383bdf84e4 20-May-2014 Kenny Root <kroot@google.com> Merge "MessageDigest: remove unnecessary throw on clone"
875d3c90f395109a30ed12f8f83ad001d2ae7439 16-May-2014 Kenny Root <kroot@google.com> MessageDigest: remove unnecessary throw on clone

If a class couldn't be cloned, it would throw its own exception.
Instead, rely on the default implementation of "clone" to give a better
error message when the target class isn't cloneable.

Change-Id: Id37013515d49cb69b5683a0632cfddb0fb325dc0
ecurity/MessageDigest.java
b1f8f72562a11c6ee33097ae3662e7e202f5871a 19-May-2014 Lajos Molnar <lajos@google.com> am 19a10ba3: am 9f977fa9: am 6b9a7d3e: Merge "DirectByteBuffer: allow 0-size MappedByteBuffers starting at NULL"

* commit '19a10ba322556e052a1abac69edc02fc2b2a2163':
DirectByteBuffer: allow 0-size MappedByteBuffers starting at NULL
19a10ba322556e052a1abac69edc02fc2b2a2163 19-May-2014 Lajos Molnar <lajos@google.com> am 9f977fa9: am 6b9a7d3e: Merge "DirectByteBuffer: allow 0-size MappedByteBuffers starting at NULL"

* commit '9f977fa97630092c831d52a15d24f87c7e87c876':
DirectByteBuffer: allow 0-size MappedByteBuffers starting at NULL
e30eaf6894647ecf5e1ec3ec5ac8221e41b4d170 17-May-2014 Lajos Molnar <lajos@google.com> DirectByteBuffer: allow 0-size MappedByteBuffers starting at NULL

Bug: 14297827
Change-Id: I53ae796f9a59c70cc8250477ab51c57ea728e43b
io/MemoryBlock.java
e90b14b0655822af2dc75433c95176ea09d2cf09 15-May-2014 Neil Fuller <nfuller@google.com> am f1247bc4: am ac9e8299: am 76886eb3: Merge "Removing data hacks from ICU root.txt"

* commit 'f1247bc449879d2db4202def2336cf2511d47edb':
Removing data hacks from ICU root.txt
f1247bc449879d2db4202def2336cf2511d47edb 15-May-2014 Neil Fuller <nfuller@google.com> am ac9e8299: am 76886eb3: Merge "Removing data hacks from ICU root.txt"

* commit 'ac9e8299ee56ca34109c6f41f4aba433ced0fa2d':
Removing data hacks from ICU root.txt
76886eb39ac2e44075f0df90addae83933268722 15-May-2014 Neil Fuller <nfuller@google.com> Merge "Removing data hacks from ICU root.txt"
7e3af357a564428de9d4708d0dff034fd17bf317 15-May-2014 Neil Fuller <nfuller@google.com> am 012aab92: am 0b1640c6: am ab49c858: Merge "Fix decoding of jar: URLs"

* commit '012aab927d9210a42d513fe38d2934dc66d5422d':
Fix decoding of jar: URLs
012aab927d9210a42d513fe38d2934dc66d5422d 15-May-2014 Neil Fuller <nfuller@google.com> am 0b1640c6: am ab49c858: Merge "Fix decoding of jar: URLs"

* commit '0b1640c6eee44e0d38ca079d3c8ea39ecb0c3213':
Fix decoding of jar: URLs
ab49c8586b1c74e16bf1e7d16e0dee5c7814f8cd 15-May-2014 Neil Fuller <nfuller@google.com> Merge "Fix decoding of jar: URLs"
e4a3071d6f5b8ef0f9d86463524491ce0091c62a 08-May-2014 Neil Fuller <nfuller@google.com> Removing data hacks from ICU root.txt

Previously, the upstream ICU data was modified
to support special short codes (e.g. PST, CET) so that
they were recognized when parsing/formatting in all
locales with SimpleDateFormat.parse()/format().

In an effort to more-closely replicate ICU this change
does *not* introduce special casing for short /
abbreviated names from Java APIs.

This may have impact for applications that use
Date.toString() (but not Date.parse()),
SimpleDateFormat.parse(), SimpleDateFormat.format(),
and anything that uses TimeZone methods that deal in
formatting and zone strings (e.g. getZoneStrings(),
getDisplayName()).

Details:

Date.parse() is unaffected because it handles abbreviated
names only, is not internationalized and contains a set
of recognized strings. Date.toString() is affected because
it relies on SimpleDateFormat for formatting.

ICU still supports abbreviated / short names for
locales where those terms are considered unambiguous for
residents of that locale. For example, "PST" is still parsed /
formatted in Locale.US when using SimpleDateFormat.
However, with this change "PST" will not be parsed/formatted
other locales such as Locale.FRANCE, Locale.UK.

If SimpleDateFormat.format() / TimeZone.getDisplayName() cannot
find a short / abbreviated name for a timezone in the
specified/defaulted locale, then a GMT offset is output as per
the docs.

Of particular note are methods that rely on Locale.getDefault()
and/or Locale.getTimeZone(). Most user-facing usecases are
expected to be unaffected. For example, US users will continue
to see / enter PST. Applications that were previously
parsing a date string containing (for example) PST but relying
on the default locale will start seeing failures.

Most of the changes are in tests that were hardcoding
expected strings or relying on the default locale.

This change is associated with a change in external/icu4c:
I04acd15c62d49c0cf30cc63f60db320bdb8e22e9

This commit also includes minor test changes related to
parsing/formatting dates where the default device locale
is assumed to be US (or other English-speaking locale).
Date-related tests that were relying on the default locale
and broke when it was set to a non-English script are now
explicitly setting it.

Note: The tests all rely on the CtsTestRunner / Vogar
resetting the default Locale / TimeZone between each test.

Bug: 11413756
Change-Id: I9ae6397cf5335ef325aedb6472d0d66a6127e1dd
ext/SimpleDateFormat.java
37b050b2a191930e06cb35667e6fd96af9c78141 14-May-2014 Neil Fuller <nfuller@google.com> Fix decoding of jar: URLs

Previously the URL was not decoded. Therefore:

new URL("jar:file:///my%20dir/file.jar!/").openConnection()

would have expected to find a jar file "/my%20dir/file.jar"
and not "/my dir/file.jar".

libcore.net.url.FileURLConnection does work properly and does
the same kind of decoding included here.

This fixes:
org.apache.harmony.tests.java.net.JarURLConnectionTest.test_getURLEncodedEntry

Bug: 14811628
Change-Id: Ie1622bd3e9064c210f503bd54219b89e36aadc0e
et/JarURLConnection.java
3e58734d651080009c9190c7062837fca5c7cf4e 13-May-2014 Paul Jensen <pauljensen@google.com> Add support for network-specific host name resolution.

For now all such support is hidden.

Change-Id: I932f73158a8f6e3ccc36c319d138180dff2aa070
et/AddressCache.java
et/InetAddress.java
d149dc6b2fe3bce5c7ad27ea0c4f369c01e7e001 13-May-2014 Neil Fuller <nfuller@google.com> am ff582a5e: am 424b079e: am c03fdbde: Merge "Fix ObjectInputStream proxy de-serialization"

* commit 'ff582a5e591946d1eb5d4ce238bf170c86d5e731':
Fix ObjectInputStream proxy de-serialization
ff582a5e591946d1eb5d4ce238bf170c86d5e731 13-May-2014 Neil Fuller <nfuller@google.com> am 424b079e: am c03fdbde: Merge "Fix ObjectInputStream proxy de-serialization"

* commit '424b079e88ca4ffe52b250fad4d534ffb58302a6':
Fix ObjectInputStream proxy de-serialization
c03fdbdeda2f1885039f51c7eb1527eac7078a2c 13-May-2014 Neil Fuller <nfuller@google.com> Merge "Fix ObjectInputStream proxy de-serialization"
be69af034f8e996f0152790df1acc39fa94e25de 12-May-2014 Neil Fuller <nfuller@google.com> Fix ObjectInputStream proxy de-serialization

Proxies were always being deserialized using the System
classloader. In Android apps the System classloader
is not correct: the app's classes (interfaces, etc.)
are loaded by the app classloader.

This was already a solved problem for normal classes
so the fix is trivial.

Bug: 13751920
Change-Id: Ia5accbbcb89e1b9bbafb27b5dbc0fc24650b0a1d
o/ObjectInputStream.java
ceadf062d023645e402184b01c85e3d6e403e912 12-May-2014 Narayan Kamath <narayan@google.com> am 430c0367: am cd8ce955: am 01a1441d: Merge "Fix mapping for Field.TIME_ZONE."

* commit '430c03678cf1d3601565f4cdb80884d70580b9b6':
Fix mapping for Field.TIME_ZONE.
430c03678cf1d3601565f4cdb80884d70580b9b6 12-May-2014 Narayan Kamath <narayan@google.com> am cd8ce955: am 01a1441d: Merge "Fix mapping for Field.TIME_ZONE."

* commit 'cd8ce9550bc059576e8012556f820578ed7e8cc2':
Fix mapping for Field.TIME_ZONE.
01a1441df76f62e74c5a9ed76ff8feeff8dc454a 12-May-2014 Narayan Kamath <narayan@google.com> Merge "Fix mapping for Field.TIME_ZONE."
749eafc168d949df027395e6bc271ca34f335447 12-May-2014 Lajos Molnar <lajos@google.com> am 93b28739: am 28ae9615: am a2385153: Merge changes I726f16f9,Idd2f4ef1

* commit '93b28739a602839a92b6332839cacac6d7151b31':
DirectByteBuffer: add setAccessible()
Better protection against accessing freed DirectByteBuffers
93b28739a602839a92b6332839cacac6d7151b31 12-May-2014 Lajos Molnar <lajos@google.com> am 28ae9615: am a2385153: Merge changes I726f16f9,Idd2f4ef1

* commit '28ae9615170bac91eb89fd3098d8c8b19bec759e':
DirectByteBuffer: add setAccessible()
Better protection against accessing freed DirectByteBuffers
923706a429d78650a2a5f05c169b59174be1ee53 09-May-2014 Lajos Molnar <lajos@google.com> DirectByteBuffer: add setAccessible()

Bug: 14297827
Change-Id: I726f16f9a15f894b99a93c84aca820f5c1b994e5
io/ByteBuffer.java
io/DirectByteBuffer.java
io/MemoryBlock.java
7e02765b7ada4e85f941f0a6b0fc60a8a76301f3 28-Apr-2014 Lajos Molnar <lajos@google.com> Better protection against accessing freed DirectByteBuffers

Expand preventing access of freed buffers, so duplicated ByteBuffers
also become inaccessible when the original buffer is freed.

Throw IllegalStateException in ByteBuffer.put(ByteBuffer) when either
source or destination buffer is inaccessible.

Bug: 11512044
Change-Id: Idd2f4ef1f3d66b4209441bf4014ccd4aad9d850b
io/ByteBuffer.java
io/DirectByteBuffer.java
io/MemoryBlock.java
78b660e21412ff36d3eed179ff400d8fa690267e 12-May-2014 Narayan Kamath <narayan@google.com> Fix mapping for Field.TIME_ZONE.

This partially reverts 018b61546e.

Commit 018b61546e claims to fix a few failing tests, but the
tests in question pass even without this section of this
change. Commit 018b61546e also causes interoperability issues
with the RI and causes DateFormatFieldTest to fail.

More fundamentally, the mapping between Field.TIME_ZONE and
Calendar.ZONE_OFFSET seems incorrect because the format classes
manipulate Calendar#zone via setTimeZone and getTimeZone and
do not directly modify the Calendar.ZONE_OFFSET / DST_OFFSET
fields.

bug: 12782114
Change-Id: Id3703a9f4e2ff3e3b24d4a45205722f72f440ba8
ext/DateFormat.java
007945d23d8df43aa89d3a30177cae6e82c73d8e 12-May-2014 Narayan Kamath <narayan@google.com> am ee998bd7: am 3ba6fc84: am 0a2ddb63: Merge "Remove test for unsupported GregorianCalendar functionality."

* commit 'ee998bd77e0367865b524cdbd4a0659a0b5d8bd5':
Remove test for unsupported GregorianCalendar functionality.
ee998bd77e0367865b524cdbd4a0659a0b5d8bd5 12-May-2014 Narayan Kamath <narayan@google.com> am 3ba6fc84: am 0a2ddb63: Merge "Remove test for unsupported GregorianCalendar functionality."

* commit '3ba6fc848a3080c09326399793231323188dca91':
Remove test for unsupported GregorianCalendar functionality.
5eea675931db0bf976c2347f4e3b7e4703d337a4 08-May-2014 Narayan Kamath <narayan@google.com> Remove test for unsupported GregorianCalendar functionality.

Also adds an explanatory comment and makes the
intent of the implementation clearer without changing
any of the functionality.

TL;DR - there doesn't appear to be any sensible way
to provide any sort of consisent semantics if we plan
on supporting these fields.

bug: 12778197

Change-Id: Iadaaaa5d4bdddec4aceca498ffc870edf2cbefed
til/GregorianCalendar.java
227aa3595fe72830189bd9a251a08771a9a75f71 08-May-2014 Kenny Root <kroot@google.com> am 77bb39bb: am 2cbfef72: am 13bb5c1b: Merge "Add CRLReason and friends"

* commit '77bb39bb029f1a731c2ee34eeffebfa52bb8dfab':
Add CRLReason and friends
9da72df81dcc8a335629f1aa43a5abfb9d370e2d 08-May-2014 Mathieu Chartier <mathieuc@google.com> am 9847de33: am 2df76ca9: am ce2bc2c4: Merge "Handle Reference.get in native code."

* commit '9847de337d000056f4fd8121c4b11b1f16a4f312':
Handle Reference.get in native code.
77bb39bb029f1a731c2ee34eeffebfa52bb8dfab 08-May-2014 Kenny Root <kroot@google.com> am 2cbfef72: am 13bb5c1b: Merge "Add CRLReason and friends"

* commit '2cbfef72ec2046d77d983bc106a3cfb3d69e9bf0':
Add CRLReason and friends
13bb5c1b5d3ccd844f330734f46d1f7dd27f9094 08-May-2014 Kenny Root <kroot@google.com> Merge "Add CRLReason and friends"
f7d0a1e9fc6408eaeda0b60a19f33008320f4228 06-May-2014 Kenny Root <kroot@google.com> Add CRLReason and friends

New API for getting the revocation reason. Add tests and exceptions
associated with it.

Change-Id: Ifd6444ab966c984312f069a6ee330d255110ea85
ecurity/cert/CRLReason.java
ecurity/cert/CertificateRevokedException.java
ecurity/cert/X509CRLEntry.java
9847de337d000056f4fd8121c4b11b1f16a4f312 08-May-2014 Mathieu Chartier <mathieuc@google.com> am 2df76ca9: am ce2bc2c4: Merge "Handle Reference.get in native code."

* commit '2df76ca9c08da5828c261ff15f276ad59838bc1b':
Handle Reference.get in native code.
ce2bc2c4f5282f977b444886ba910e5b1928ef72 08-May-2014 Mathieu Chartier <mathieuc@google.com> Merge "Handle Reference.get in native code."
72c2105a65ad3384a077a09968c182785d3f5a02 08-May-2014 Neil Fuller <nfuller@google.com> Merge "Unhide further 1.7-era APIs"
e9ed1b1450852172a48f9811ebb09d25f2f7e140 08-May-2014 Neil Fuller <nfuller@google.com> Unhide further 1.7-era APIs

Change-Id: I15ef2991b03a9503d6917a7f3351b32f42f662fb
et/HttpCookie.java
io/channels/DatagramChannel.java
io/channels/FileLock.java
io/channels/MembershipKey.java
io/channels/MulticastChannel.java
til/Currency.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
a0388edc7d40569ba2258e294ceeee7826799465 08-May-2014 Narayan Kamath <narayan@google.com> am d4eddceb: am d78ce77e: am d8eb43c1: Merge "Change ReferenceQueue order from LIFO to FIFO."

* commit 'd4eddceb2ce267d38b93b7a96011164b1efb66d2':
Change ReferenceQueue order from LIFO to FIFO.
1087fe2b4fa187e358137c86486645f781c354fb 07-May-2014 Kenny Root <kroot@google.com> am 982fb068: am 14f4875c: am db3cbbc3: Merge "Add java.security.cert.Extension interface"

* commit '982fb06853ed14a38dbf300f633b8a5c9ef6a722':
Add java.security.cert.Extension interface
d4eddceb2ce267d38b93b7a96011164b1efb66d2 07-May-2014 Narayan Kamath <narayan@google.com> am d78ce77e: am d8eb43c1: Merge "Change ReferenceQueue order from LIFO to FIFO."

* commit 'd78ce77e7adcc844e6f507d6e394ff0354bb0ca1':
Change ReferenceQueue order from LIFO to FIFO.
982fb06853ed14a38dbf300f633b8a5c9ef6a722 07-May-2014 Kenny Root <kroot@google.com> am 14f4875c: am db3cbbc3: Merge "Add java.security.cert.Extension interface"

* commit '14f4875cedd807a57aacad981ec083cfa3326f03':
Add java.security.cert.Extension interface
d8eb43c1072f8467ae01ab93944c1032c94c6ccc 07-May-2014 Narayan Kamath <narayan@google.com> Merge "Change ReferenceQueue order from LIFO to FIFO."
3470d3bcf6d4d25e22ba85e50a499165d59ce4c2 06-May-2014 Mathieu Chartier <mathieuc@google.com> Handle Reference.get in native code.

This enables us to have mostly concurrent reference processing in the
GC. Reference.get() may block if references are being processed.

Bug: 14381653

Change-Id: I7cf6ef34b08f804897c8e6d5e9e6ae94420dc489
ang/ref/Reference.java
4782c2cdea4fc7d070c9dac560380cc45852babc 06-May-2014 Kenny Root <kroot@google.com> Add java.security.cert.Extension interface

Also convert our existing Extension class to implement this interface.

Change-Id: I123ef6aa4f89897037e51f221c8c5a7994ac2a01
ecurity/cert/Extension.java
eb3e5888d4b3c17b5b6e977440178e88ba174f93 30-Apr-2014 Elena Sayapina <elena.v.sayapina@intel.com> Change ReferenceQueue order from LIFO to FIFO.

LIFO order of FinalizerReference.queue breaks runFinalization().
runFinalization() creates a Sentinel finalizable object and waits
for it to be finalized. As FinalizerReference.queue is LIFO,
the Sentinel object is placed at the beginning of the queue and
then gets finalized first. So the method returns even though
objects placed in the queue before the Sentinel are not finalized.

This patch changes the queue order to FIFO to ensure that all
elements enqueued before the Sentinel are finalized before it.

bug: https://code.google.com/p/android/issues/detail?id=37980

Change-Id: Ie6bc96e6a3759bc36ce6586066052b6d6bbe8d52
Signed-off-by: Elena Sayapina <elena.v.sayapina@intel.com>
ang/ref/ReferenceQueue.java
5c727bda02e78806081a0e874cd6ee4d4ed06d2b 02-May-2014 Paul Duffin <paulduffin@google.com> am c3eed594: am f6696d69: am eec4356c: Merge "Improve detection of CloseGuard protected resource leakage"

* commit 'c3eed594ffd6b488b5771cd1e6a9a4c44aa0826b':
Improve detection of CloseGuard protected resource leakage
c3eed594ffd6b488b5771cd1e6a9a4c44aa0826b 02-May-2014 Paul Duffin <paulduffin@google.com> am f6696d69: am eec4356c: Merge "Improve detection of CloseGuard protected resource leakage"

* commit 'f6696d69727e1089f5608b0c3772ced3c347df7e':
Improve detection of CloseGuard protected resource leakage
a6f350c645dbb66d68cc2b03afb8f2eeaa88fbba 28-Feb-2014 Paul Duffin <paulduffin@google.com> Improve detection of CloseGuard protected resource leakage

* Add CloseGuardMonitor to intercept and collate CloseGuard reports and if
necessary throw an exception listing the resource leaks.
* Add ResourceLeakageDetector to abstract away the CloseGuardMonitor which will
not work on RI.
* Add AbstractResourceLeakageDetectorTestCase as a base class for tests
that need to detect resource leaks, in future this could be handled by
modifications to Cts and Vogar test runners.
* Remove CloseGuardTester and its sole usage in ProcessBuilderTest.
* Remove CloseGuardGuard from within URLConnectionTest
* Change ZipFileTest, ProcessBuilderTest, URLConnectionTest to use new
mechanism, fix issues that are identified and do some cleanup/remove
duplicated code.

Bug: https://code.google.com/p/android/issues/detail?id=66383
Change-Id: Id026dbb6bc66091a15f07329e6371cd0d1f32cf5
til/zip/ZipFile.java
0c5c34824d6b75a40c937c450f1ed68de05355a7 30-Apr-2014 Kenny Root <kroot@google.com> am 721a363c: resolved conflicts for merge of a47fb6d2 to klp-modular-dev

* commit '721a363c366af7b5472b3632efc33760dbb9c1a0':
Add API to check certificate chain signatures
721a363c366af7b5472b3632efc33760dbb9c1a0 30-Apr-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of a47fb6d2 to klp-modular-dev

Change-Id: Id6645384548e547ed10fedf67b50f769eec3f846
7130d8c23ad64b3dd8ff1433e8566a6df5f9d93a 30-Apr-2014 Kenny Root <kroot@google.com> am d7ffdab9: resolved conflicts for merge of 45cd6f51 to klp-modular-dev

* commit 'd7ffdab9dbd6cb10cf45fa841c7f9e8e406133bb':
Revert "Add API to check certificate chain signatures"
d7ffdab9dbd6cb10cf45fa841c7f9e8e406133bb 30-Apr-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of 45cd6f51 to klp-modular-dev

Change-Id: Ic2f144d268c8b10eb9628b695ea95003cf40aac2
a47fb6d2e4b059301145005a91de06c49fde9421 30-Apr-2014 Kenny Root <kroot@google.com> am f5efc79f: am 93868a24: am 5c5adbdb: am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit 'f5efc79f4cdd3aab545718de6cdc6f6d95f48f37':
Add API to check certificate chain signatures
f5efc79f4cdd3aab545718de6cdc6f6d95f48f37 30-Apr-2014 Kenny Root <kroot@google.com> am 93868a24: am 5c5adbdb: am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '93868a24eab785cd24f43df7a67705c0421b64ea':
Add API to check certificate chain signatures
45cd6f51ff8dc1ecadbb7abc5a979502b07b05a9 30-Apr-2014 Kenny Root <kroot@google.com> am f437cb11: am 4bbd5d45: am ce07d1e8: am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit 'f437cb1175440de35bc775eb79a5774105d13780':
Revert "Add API to check certificate chain signatures"
93868a24eab785cd24f43df7a67705c0421b64ea 30-Apr-2014 Kenny Root <kroot@google.com> am 5c5adbdb: am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '5c5adbdbd25f88190d83ad87a27596bb97f71551':
Add API to check certificate chain signatures
f437cb1175440de35bc775eb79a5774105d13780 30-Apr-2014 Kenny Root <kroot@google.com> am 4bbd5d45: am ce07d1e8: am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '4bbd5d45bffa91f41136709ed6ce45c56192711c':
Revert "Add API to check certificate chain signatures"
5c5adbdbd25f88190d83ad87a27596bb97f71551 30-Apr-2014 Kenny Root <kroot@google.com> am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '87c8e6c1e0cce2a98931562df131f87c13434441':
Add API to check certificate chain signatures
4bbd5d45bffa91f41136709ed6ce45c56192711c 30-Apr-2014 Kenny Root <kroot@google.com> am ce07d1e8: am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit 'ce07d1e8436d22dca6cf8a375f636680e3aca472':
Revert "Add API to check certificate chain signatures"
ce07d1e8436d22dca6cf8a375f636680e3aca472 30-Apr-2014 Kenny Root <kroot@google.com> am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '45583d7167741140dba89ec3c8156d9f42313fcb':
Revert "Add API to check certificate chain signatures"
c81569dc4e9dece8b36a5125c7182de98eafa729 30-Apr-2014 Kenny Root <kroot@google.com> am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '2b55660319da1aa8167a301d0d6a9f71d117f05a':
Add API to check certificate chain signatures
2b55660319da1aa8167a301d0d6a9f71d117f05a 30-Apr-2014 Kenny Root <kroot@google.com> am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit 'd3d58171cc734f59faa5a03ce1cd5d5c00e9ffbd':
Add API to check certificate chain signatures
d3d58171cc734f59faa5a03ce1cd5d5c00e9ffbd 30-Apr-2014 Kenny Root <kroot@google.com> am 2bc5e811: Add API to check certificate chain signatures

* commit '2bc5e811a817a8c667bca4318ae98582b0ee6dc6':
Add API to check certificate chain signatures
f26ef9f930dec2ded4f7359d61f5ad9fc5a50031 30-Apr-2014 Kenny Root <kroot@google.com> am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '50256449a12a7cd311c6b8e2baf0c46d61757043':
Revert "Add API to check certificate chain signatures"
50256449a12a7cd311c6b8e2baf0c46d61757043 30-Apr-2014 Kenny Root <kroot@google.com> am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '9cd5caece4cf5d64898e9241c79194c0a9f52d24':
Revert "Add API to check certificate chain signatures"
9cd5caece4cf5d64898e9241c79194c0a9f52d24 30-Apr-2014 Kenny Root <kroot@google.com> am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '8c9ea6916a5bb232fe1bfd6d61194196685fe81c':
Revert "Add API to check certificate chain signatures"
2bc5e811a817a8c667bca4318ae98582b0ee6dc6 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

Bug: 13678484
Change-Id: I01cddef287767422454de4c5fd266c812a04d570
til/jar/JarFile.java
til/jar/JarVerifier.java
8c9ea6916a5bb232fe1bfd6d61194196685fe81c 30-Apr-2014 Kenny Root <kroot@google.com> Revert "Add API to check certificate chain signatures"

This reverts commit f8986a989759c43c155ae64f9a3b36f670602521.

Bug: 13678484
Change-Id: Ie2e44c60cc025a8a1e54aa7a6fb4b251ad363aae
til/jar/JarFile.java
til/jar/JarVerifier.java
dbb6b44240b9ab10f31824987445ee7c8e1b53a1 29-Apr-2014 Kenny Root <kroot@google.com> Revert "Add API to check certificate chain signatures"

This reverts commit 323493b69a33b17d06909f31ec58ff73bcb32e86.

This is fixed in frameworks/base with commit
d061458a208cfa4b136883e7a91ffffc5f527f8f

Bug: 13678484
Change-Id: I11b7c4f11cc2b315b5ff5434d9118620648ca00f
til/jar/JarFile.java
til/jar/JarVerifier.java
til/jar/StrictJarFile.java
de916a09d6fe2fc76e423022214ed9eac57e4f8c 29-Apr-2014 Neil Fuller <nfuller@google.com> am 8f5ff15d: am 97e35de3: Merge "1.7 interoperability changes for FileLock"

* commit '8f5ff15dc0428bbef5911776ae1f4d2730de4ed4':
1.7 interoperability changes for FileLock
8f5ff15dc0428bbef5911776ae1f4d2730de4ed4 29-Apr-2014 Neil Fuller <nfuller@google.com> am 97e35de3: Merge "1.7 interoperability changes for FileLock"

* commit '97e35de30fcddd7eaa0d6eb7a100bcf9bdd824a1':
1.7 interoperability changes for FileLock
a10637a26dc17501789edde0f4675e1639741f71 12-Mar-2014 Neil Fuller <nfuller@google.com> 1.7 interoperability changes for FileLock

Adding acquiredBy(). This method is effectively a synonym for
channel().

Change-Id: Ifa0b89debb42a7181f1f5f188ae7175970286adb
io/channels/FileLock.java
2c15765476ac9dedc3989c9811e1a8cddb6e8324 28-Apr-2014 Neil Fuller <nfuller@google.com> am a349e439: am f84885a4: Merge "Revert "Add 1.7 methods to TimeZone / SimpleTimeZone""

* commit 'a349e4398e557f730115c77bafc7113880c691e1':
Revert "Add 1.7 methods to TimeZone / SimpleTimeZone"
a349e4398e557f730115c77bafc7113880c691e1 28-Apr-2014 Neil Fuller <nfuller@google.com> am f84885a4: Merge "Revert "Add 1.7 methods to TimeZone / SimpleTimeZone""

* commit 'f84885a4cb1e50442776c84105d113cb4d9008a8':
Revert "Add 1.7 methods to TimeZone / SimpleTimeZone"
7ebbf2f04e2d9692c4c00d87f4c41d2ed63a5669 23-Apr-2014 Neil Fuller <nfuller@google.com> Revert "Add 1.7 methods to TimeZone / SimpleTimeZone"

This reverts commit 15737123c4b241c331e0090d311afb9631c3cf1b.

See the conversation on the original change I45d89cf0f30b49bb77c6dcfdae1a81edea40a2d4
and Ifa0b89debb42a7181f1f5f188ae7175970286adb.

Trading this API change for one in FileLock which is more useful.
This API change was of questionable value.

Change-Id: I8cf977acceededfe3ee13bf91af3fe4f5b84cfc2
til/TimeZone.java
7406d4e17dd39f3531e764ec7788b1f8dec99971 25-Apr-2014 Elliott Hughes <enh@google.com> am 3eb545e3: am 85fa4285: Merge "Groundwork towards making the Libcore.os functionality public."

* commit '3eb545e382a12565ed8779632015d736d6f5c32c':
Groundwork towards making the Libcore.os functionality public.
3eb545e382a12565ed8779632015d736d6f5c32c 25-Apr-2014 Elliott Hughes <enh@google.com> am 85fa4285: Merge "Groundwork towards making the Libcore.os functionality public."

* commit '85fa4285b3679120ee2d3dc5750a1e620de0449d':
Groundwork towards making the Libcore.os functionality public.
85fa4285b3679120ee2d3dc5750a1e620de0449d 25-Apr-2014 Elliott Hughes <enh@google.com> Merge "Groundwork towards making the Libcore.os functionality public."
5d930cadc8f62aee5f18e7921296fe66a54f18ab 24-Apr-2014 Elliott Hughes <enh@google.com> Groundwork towards making the Libcore.os functionality public.

Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
o/File.java
o/FileDescriptor.java
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
ang/ProcessManager.java
ang/Runtime.java
ang/System.java
et/DatagramSocket.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetUnixAddress.java
et/NetworkInterface.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/IoVec.java
io/MappedByteBuffer.java
io/MemoryBlock.java
io/MulticastMembershipHandler.java
io/PipeImpl.java
io/SelectorImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
ff28d7dda151ffde36c04130c9969fbde94ddfca 24-Apr-2014 Calin Juravle <calin@google.com> am 65df257d: am 940ad9d1: Merge "Support explicit + in Byte, Short, Integer, Long."

* commit '65df257d8e5c456a4637ea649db93b433a959287':
Support explicit + in Byte, Short, Integer, Long.
a3b305f5ddf077ba06e2f3122fe68130570acef0 24-Apr-2014 Calin Juravle <calin@google.com> am e6988582: am 41f4f550: Merge "Fix UUID#parseString in the presence of explicit + signs."

* commit 'e6988582d2a81202a9e45aaa000e65b50df9e5dc':
Fix UUID#parseString in the presence of explicit + signs.
38250d9cd5328b9d1ca563ad017974813ea580a0 24-Apr-2014 Calin Juravle <calin@google.com> am a303fa39: am a6735a1f: Merge "Disallow explicit signs in SocketHandler port parsing."

* commit 'a303fa39e9ce96e9cfaff2c581dfa81683d1a4de':
Disallow explicit signs in SocketHandler port parsing.
1167ea7f607ebcc713e665f503efa451002c3923 24-Apr-2014 Calin Juravle <calin@google.com> am c8a8ba2f: am 9064b9e1: Merge "Disallow explicit signs in java.sql.Timestamp#valueOf()"

* commit 'c8a8ba2fb15a87f134ed564a60c2fd0223fb3124':
Disallow explicit signs in java.sql.Timestamp#valueOf()
65df257d8e5c456a4637ea649db93b433a959287 24-Apr-2014 Calin Juravle <calin@google.com> am 940ad9d1: Merge "Support explicit + in Byte, Short, Integer, Long."

* commit '940ad9d1b5c89c5db932c7865ffec4ffb872c82b':
Support explicit + in Byte, Short, Integer, Long.
e6988582d2a81202a9e45aaa000e65b50df9e5dc 24-Apr-2014 Calin Juravle <calin@google.com> am 41f4f550: Merge "Fix UUID#parseString in the presence of explicit + signs."

* commit '41f4f5501af5f216e4cc232b1b9d7c5a28a70d2a':
Fix UUID#parseString in the presence of explicit + signs.
a303fa39e9ce96e9cfaff2c581dfa81683d1a4de 24-Apr-2014 Calin Juravle <calin@google.com> am a6735a1f: Merge "Disallow explicit signs in SocketHandler port parsing."

* commit 'a6735a1f3cbe90f6f6555b4ebf10573a760bdb32':
Disallow explicit signs in SocketHandler port parsing.
6b40837ee3a023bba698c38fd6d6e46ae0065a55 25-Mar-2014 Calin Juravle <calin@google.com> Support explicit + in Byte, Short, Integer, Long.

Bug: 5239391
Change-Id: I2b25228815d70d570d537db0ed9b5b759f25b5a3
ang/Integer.java
ang/Long.java
41f4f5501af5f216e4cc232b1b9d7c5a28a70d2a 24-Apr-2014 Calin Juravle <calin@google.com> Merge "Fix UUID#parseString in the presence of explicit + signs."
a6735a1f3cbe90f6f6555b4ebf10573a760bdb32 24-Apr-2014 Calin Juravle <calin@google.com> Merge "Disallow explicit signs in SocketHandler port parsing."
c8a8ba2fb15a87f134ed564a60c2fd0223fb3124 24-Apr-2014 Calin Juravle <calin@google.com> am 9064b9e1: Merge "Disallow explicit signs in java.sql.Timestamp#valueOf()"

* commit '9064b9e19187fc52329c4342051f925c9d3a674a':
Disallow explicit signs in java.sql.Timestamp#valueOf()
9064b9e19187fc52329c4342051f925c9d3a674a 24-Apr-2014 Calin Juravle <calin@google.com> Merge "Disallow explicit signs in java.sql.Timestamp#valueOf()"
ae6e60bf18b455b1134b8b57a56b37cc588e179d 16-Apr-2014 Calin Juravle <calin@google.com> Fix UUID#parseString in the presence of explicit + signs.

Also added Long#parsePositiveLong(String, int).

Bug: 5239391
Change-Id: Iaa0bbd3a7f8a13c3e48abb1a7e7508e48615b11c
ang/Long.java
til/UUID.java
232c91dce1760b180155256d1896d0d80375ff6d 16-Apr-2014 Calin Juravle <calin@google.com> Disallow explicit signs in SocketHandler port parsing.

Bug: 5239391
Change-Id: Ifa6bc6b352c283e8f6913b4905a9541df7355915
til/logging/SocketHandler.java
91916bf7febac5618c5bc8d1773910a4314c0b4b 16-Apr-2014 Calin Juravle <calin@google.com> Disallow explicit signs in java.sql.Timestamp#valueOf()

The implementation was cleaned up:
- removed useless checks and improved a few other
- fixed variable names
- fixed badTimestampString

Bug: 5239391
Change-Id: I51ea2ba848b0c2d2d2f26807a1c56e7e015ef9f4
ql/Timestamp.java
fc81794e5a8ac51bf6aaf0cde6845dd0e6737359 24-Apr-2014 Kenny Root <kroot@google.com> Merge "JarFile: improve documentation of cert-related methods"
6d0857e6d6e5bd15ed8a9852c9542b0fcbc1d767 24-Apr-2014 Kenny Root <kroot@google.com> JarFile: improve documentation of cert-related methods

The JarEntry documentation did not mention what guarantees are made by
the API. Add the explicit documentation so no one makes a mistake about
the guarantees.

Bug: 13678484
Change-Id: I36d99098cb7a50e3b8a61bb025e6367c43427f04
til/jar/JarEntry.java
4b158b39dbf8c9b387eedac33fea44f800a12672 22-Apr-2014 Kenny Root <kroot@google.com> JarFile: Avoid reconstructing chains for CodeSigners

Instead of collapsing certificate chains and then rebuilding it, keep
track of the certificate chains and collapse them for getCertificates
calls.

Change-Id: Ife4c186cdcabfcd9dd6fbfe992c1d4c1dfa28f53
til/jar/JarEntry.java
til/jar/JarVerifier.java
til/jar/StrictJarFile.java
a12a32a2cfb04b6e6c9679686fd6f4df49458366 23-Apr-2014 Neil Fuller <nfuller@google.com> am 38f2ba65: am 4d402932: Merge "libcore changes to support asynchronous close interruption"

* commit '38f2ba6505b1d500cbdcbeff4038ebcf2502c957':
libcore changes to support asynchronous close interruption
38f2ba6505b1d500cbdcbeff4038ebcf2502c957 23-Apr-2014 Neil Fuller <nfuller@google.com> am 4d402932: Merge "libcore changes to support asynchronous close interruption"

* commit '4d402932d370f12f43045518dac4eeef542648c4':
libcore changes to support asynchronous close interruption
4d402932d370f12f43045518dac4eeef542648c4 23-Apr-2014 Neil Fuller <nfuller@google.com> Merge "libcore changes to support asynchronous close interruption"
4f86d3afcab915cbc5014135abbdd5a1cd03095f 22-Apr-2014 Calin Juravle <calin@google.com> am d193f765: am e2564f4a: Merge "@hide Integer#parsePositiveInt(String)"

* commit 'd193f765fb6489fb6a045c91cfb7701459ce2909':
@hide Integer#parsePositiveInt(String)
71876109f8449c17ebc39df523da858577a95c0a 22-Apr-2014 Calin Juravle <calin@google.com> am 2dda53d8: am 5d5c657b: Merge "Disallow explicit signs in java.sql.Date#valueOf()"

* commit '2dda53d8f6db2448612e48e6fcc98e3c69edee4e':
Disallow explicit signs in java.sql.Date#valueOf()
8fd85f49c6689a98a4f9981b0a4b4b13358f6c13 22-Apr-2014 Neil Fuller <nfuller@google.com> am 5c3502f3: am 0d18ebc5: Merge "Change DecimalFormat.setRoundingMode() behavior to stay in spec"

* commit '5c3502f3d13ef2bebdeba86b9d7839ad834ce583':
Change DecimalFormat.setRoundingMode() behavior to stay in spec
69d2f0da613820b7b5cfee9d8af908c2b2fde414 22-Apr-2014 Elliott Hughes <enh@google.com> am 3735133e: am 570512fb: Merge "Fix build (javadoc @link tags)."

* commit '3735133ef679a7a91f3c2465692d725e4c71a3e6':
Fix build (javadoc @link tags).
08a7d35341be3983ccdfc805986dfd72f4d0759f 22-Apr-2014 Elliott Hughes <enh@google.com> am 2f727a24: am 2704e87d: Merge "Allow empty rules in a RuleBasedCollator."

* commit '2f727a24d92062997e71f1067b2d4ad589c4e58c':
Allow empty rules in a RuleBasedCollator.
afda352532761937fa65b91fe8497b13585c606a 22-Apr-2014 Elliott Hughes <enh@google.com> am 05d6a055: am abe8c4ce: Merge "Fix typo in Locale docs."

* commit '05d6a055464fd71f108cafd971dcc6da2e22348e':
Fix typo in Locale docs.
1a2a13b886081e2e1f698ae94b38a4e153a11c4e 22-Apr-2014 Elliott Hughes <enh@google.com> am 31da85a9: am 453ed110: Merge "Track the icu4c 53 update in the Locale documentation."

* commit '31da85a95b80cc3f25bc2313d64b8caded457323':
Track the icu4c 53 update in the Locale documentation.
7594c10560b778041324e76a60f6b030d6066274 22-Apr-2014 Elliott Hughes <enh@google.com> am 7f7f25a6: am 4b7bd914: Merge "Updated documentation for RuleBasedCollator."

* commit '7f7f25a64a04de3c7fd5970f5d6b43bef017378d':
Updated documentation for RuleBasedCollator.
f62affecd53a2caef7b5ef39d7cd7d60d6ac8874 22-Apr-2014 Elliott Hughes <enh@google.com> am 3df173cd: am 5d51965a: Merge "Update collation tests for icu4c 53."

* commit '3df173cd6c2e73219c754dbb80be5a362f2e8f54':
Update collation tests for icu4c 53.
d193f765fb6489fb6a045c91cfb7701459ce2909 22-Apr-2014 Calin Juravle <calin@google.com> am e2564f4a: Merge "@hide Integer#parsePositiveInt(String)"

* commit 'e2564f4aefc33a87d27bbdaa4239d7deb771dd63':
@hide Integer#parsePositiveInt(String)
2dda53d8f6db2448612e48e6fcc98e3c69edee4e 22-Apr-2014 Calin Juravle <calin@google.com> am 5d5c657b: Merge "Disallow explicit signs in java.sql.Date#valueOf()"

* commit '5d5c657b0101123d8c4de4a316f50a2a76c41a46':
Disallow explicit signs in java.sql.Date#valueOf()
5c3502f3d13ef2bebdeba86b9d7839ad834ce583 22-Apr-2014 Neil Fuller <nfuller@google.com> am 0d18ebc5: Merge "Change DecimalFormat.setRoundingMode() behavior to stay in spec"

* commit '0d18ebc5a68d096ce2aa5b5af09bb38453007d7c':
Change DecimalFormat.setRoundingMode() behavior to stay in spec
3735133ef679a7a91f3c2465692d725e4c71a3e6 22-Apr-2014 Elliott Hughes <enh@google.com> am 570512fb: Merge "Fix build (javadoc @link tags)."

* commit '570512fb007d91863f00f5c820472da6c9b5d7dc':
Fix build (javadoc @link tags).
2f727a24d92062997e71f1067b2d4ad589c4e58c 22-Apr-2014 Elliott Hughes <enh@google.com> am 2704e87d: Merge "Allow empty rules in a RuleBasedCollator."

* commit '2704e87d8c586bf41dd601f38e77cfe5acdf4737':
Allow empty rules in a RuleBasedCollator.
05d6a055464fd71f108cafd971dcc6da2e22348e 22-Apr-2014 Elliott Hughes <enh@google.com> am abe8c4ce: Merge "Fix typo in Locale docs."

* commit 'abe8c4ce82803a2044f23996872d5a7fd5d2328b':
Fix typo in Locale docs.
31da85a95b80cc3f25bc2313d64b8caded457323 22-Apr-2014 Elliott Hughes <enh@google.com> am 453ed110: Merge "Track the icu4c 53 update in the Locale documentation."

* commit '453ed110a1bddfa6743bf913363d95ce894d9770':
Track the icu4c 53 update in the Locale documentation.
7f7f25a64a04de3c7fd5970f5d6b43bef017378d 22-Apr-2014 Elliott Hughes <enh@google.com> am 4b7bd914: Merge "Updated documentation for RuleBasedCollator."

* commit '4b7bd914b393e5578dbc4bd339f6fa2c72699cfe':
Updated documentation for RuleBasedCollator.
3df173cd6c2e73219c754dbb80be5a362f2e8f54 22-Apr-2014 Elliott Hughes <enh@google.com> am 5d51965a: Merge "Update collation tests for icu4c 53."

* commit '5d51965a75dfbdc6ac7dcbd6f6c8e41f29472782':
Update collation tests for icu4c 53.
f0d40d662d9dfdb04215c718961765837d2cf00c 11-Apr-2014 Neil Fuller <nfuller@google.com> libcore changes to support asynchronous close interruption

Previously AsynchronousSocketCloseMonitor was used to handle
socket interruption on close. To support the same for
FileChannel it has been renamed to AsynchronousCloseMonitor.
The Java class was already called this.

FileInputStream, FileOutputStream, RandomAccessFile will
now throw IOException if a connection is closed by another
thread during read. Thread.interrupt() continues to have no effect
on streams.

FileChannel will now throw AsynchronousCloseException during
reads and writes if the file is closed, per the documentation.

FileChannel will now throw ClosedByInterruptException during
reads and writes if the thread reading/writing is interrupted.

Note: FileChannel.lock() will probably still not not throw
AsynchronousCloseException, though it probably should.

This change also has impact on external/conscrypt and
frameworks/base.

Change-Id: I37de3e7d1a005a73821221e6156d10b95c595d7a
Bug: 13927110
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
et/InetAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/NioUtils.java
io/SelectorImpl.java
io/SocketChannelImpl.java
5ed386f09eb34e054c5638ca39eeb310480fc189 22-Apr-2014 Calin Juravle <calin@google.com> @hide Integer#parsePositiveInt(String)

Bug: 5239391
Change-Id: I01632d4846342293e881553feee3ae40f97e2443
ang/Integer.java
5d5c657b0101123d8c4de4a316f50a2a76c41a46 22-Apr-2014 Calin Juravle <calin@google.com> Merge "Disallow explicit signs in java.sql.Date#valueOf()"
0b2a71a20a34a89fb770acf877c751e0443f46e8 16-Apr-2014 Calin Juravle <calin@google.com> Disallow explicit signs in java.sql.Date#valueOf()

Bug: 5239391
Change-Id: I52bd621bd6ed46d1ae01abf1be25d1ac3c76d7e0
ang/Integer.java
ql/Date.java
0d18ebc5a68d096ce2aa5b5af09bb38453007d7c 22-Apr-2014 Neil Fuller <nfuller@google.com> Merge "Change DecimalFormat.setRoundingMode() behavior to stay in spec"
b9c3557fb8d2d9a1f9fe9f8c7ec0b058758b6db6 22-Apr-2014 Elliott Hughes <enh@google.com> Fix build (javadoc @link tags).

Change-Id: If0cb922427a826cad16c8be8a78cdfbccc218c32
ext/RuleBasedCollator.java
3e3ea7374ec174050c91066bf2e3b154bffd4e96 22-Apr-2014 Elliott Hughes <enh@google.com> Allow empty rules in a RuleBasedCollator.

This is allowed by the CLDR specification, and we were already allowing
most forms of empty rules, just not the zero-length string.

Change-Id: I3c2a020aac23e54f8044defbfe2e2a5b600e454c
ext/RuleBasedCollator.java
f6ab0423b298d2251bf7a0c6ad6d5639481a3929 22-Apr-2014 Elliott Hughes <enh@google.com> Fix typo in Locale docs.

Change-Id: I1fd60e1b23ebf02a4a242d622312502b941ddd1e
til/Locale.java
453ed110a1bddfa6743bf913363d95ce894d9770 22-Apr-2014 Elliott Hughes <enh@google.com> Merge "Track the icu4c 53 update in the Locale documentation."
4b7bd914b393e5578dbc4bd339f6fa2c72699cfe 22-Apr-2014 Elliott Hughes <enh@google.com> Merge "Updated documentation for RuleBasedCollator."
582a8e343e0fa159954eb8b70b8c4e06147bc60e 22-Apr-2014 Elliott Hughes <enh@google.com> Track the icu4c 53 update in the Locale documentation.

Also add links to the icu4c release notes. These aren't particularly useful
because they're a bit low-level for our audience, and we've often skipped
multiple releases, but it can't really hurt.

Change-Id: I5243b4a041470cec17ebf39a5da8ce6cbe270e86
til/Locale.java
55dfcd8b9609f112b0542af6a705080d98e00d2a 18-Apr-2014 ccornelius <ccornelius@google.com> Update collation tests for icu4c 53.

As of ICU 53, rule strings must begin with a reset '&'.
http://www.unicode.org/reports/tr35/tr35-35/tr35-collation.html#Rules

Also, fewer collation elements exist in ICU 53 because ae-ligature maps to
two rather than three logical collation elements. Now the last one
yields only one CollationElementIterator value rather than two.

Finally, it's no longer possible to switch from forward to backward iteration
without calling reset/setOffset/setText. This used to be undefined behavior
but is now checked.

Change-Id: I663a2b229e551cd6f5753ddae0660f813dbbf866
ext/CollationElementIterator.java
1c13b45d19d7c9ab363c5984c2a9f329a67ef6f4 21-Apr-2014 Elliott Hughes <enh@google.com> Updated documentation for RuleBasedCollator.

Change-Id: Ia927033773ea3ad6c417306cbbfffc4afe08fab5
Signed-off-by: Markus Scherer <mscherer@google.com>
ext/RuleBasedCollator.java
bfd49325a4faf257cf9519fc1030f35b3fb4abb8 19-Apr-2014 Kenny Root <kroot@google.com> am 1f3d5000: Add API to check certificate chain signatures

* commit '1f3d5000f4adedf68d0f332a4c9ee377377bcef9':
Add API to check certificate chain signatures
2b09d623c3fc221a0105c2c42061949cbb734cfe 19-Apr-2014 Kenny Root <kroot@google.com> am 5079856d: resolved conflicts for merge of e897e2dc to klp-modular-dev

* commit '5079856d43c7202303632d12eba91149a11c2bfd':
Add API to check certificate chain signatures
1f3d5000f4adedf68d0f332a4c9ee377377bcef9 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

(cherry-pick of f8986a989759c43c155ae64f9a3b36f670602521)

Bug: 13678484
Change-Id: I6ad8a168adf6a33b9155f416ed22852ded221382
(cherry picked from commit 323493b69a33b17d06909f31ec58ff73bcb32e86)
til/jar/StrictJarFile.java
5079856d43c7202303632d12eba91149a11c2bfd 19-Apr-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of e897e2dc to klp-modular-dev

Change-Id: Ic367fd179fd402eadb4f3c5c0585ad9c17370002
e897e2dcdafb0c633d0af05400d8e123018ad1d7 19-Apr-2014 Kenny Root <kroot@google.com> am 80eedbe2: am dafee327: am e09807c8: am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit '80eedbe289fa735193d2eeea58da7f9d1fcf2b2f':
Add API to check certificate chain signatures
80eedbe289fa735193d2eeea58da7f9d1fcf2b2f 19-Apr-2014 Kenny Root <kroot@google.com> am dafee327: am e09807c8: am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit 'dafee327892728c3632f2fa959c2790f7ea3049f':
Add API to check certificate chain signatures
dafee327892728c3632f2fa959c2790f7ea3049f 19-Apr-2014 Kenny Root <kroot@google.com> am e09807c8: am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit 'e09807c800605d8b90d21fd8cfad72698c78e52d':
Add API to check certificate chain signatures
e09807c800605d8b90d21fd8cfad72698c78e52d 19-Apr-2014 Kenny Root <kroot@google.com> am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit 'c935abb878175b2e9914235a182a96ab9bebe0c3':
Add API to check certificate chain signatures
c79a75f3e6f450890847fd090f529c731dbd595f 19-Apr-2014 Kenny Root <kroot@google.com> am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit '928d0707bca6781234d887a255931b95257e156c':
Add API to check certificate chain signatures
928d0707bca6781234d887a255931b95257e156c 18-Apr-2014 Kenny Root <kroot@google.com> am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit '6640b107e33042d6c7445d88119c92bd020cdc22':
Add API to check certificate chain signatures
6640b107e33042d6c7445d88119c92bd020cdc22 18-Apr-2014 Kenny Root <kroot@google.com> am f8986a98: Add API to check certificate chain signatures

* commit 'f8986a989759c43c155ae64f9a3b36f670602521':
Add API to check certificate chain signatures
323493b69a33b17d06909f31ec58ff73bcb32e86 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

(cherry-pick of f8986a989759c43c155ae64f9a3b36f670602521)

Bug: 13678484
Change-Id: I6ad8a168adf6a33b9155f416ed22852ded221382
til/jar/JarFile.java
til/jar/JarVerifier.java
til/jar/StrictJarFile.java
f8986a989759c43c155ae64f9a3b36f670602521 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

Bug: 13678484
Change-Id: I6ad8a168adf6a33b9155f416ed22852ded221382
til/jar/JarFile.java
til/jar/JarVerifier.java
d0527ce80b43ae72338744c36f730866f581fdb3 17-Apr-2014 Calin Juravle <calin@google.com> am 37f258e5: am fbf2c0ec: Merge "Add parsePositiveInt for internal use."

* commit '37f258e551baa48805b2e58811c1cf959f57fde6':
Add parsePositiveInt for internal use.
37f258e551baa48805b2e58811c1cf959f57fde6 17-Apr-2014 Calin Juravle <calin@google.com> am fbf2c0ec: Merge "Add parsePositiveInt for internal use."

* commit 'fbf2c0ecb09fceac7173b6891548409312e23f2f':
Add parsePositiveInt for internal use.
1c0b7ebc23b17f10b877e7be45781b62b8c87f1b 16-Apr-2014 Calin Juravle <calin@google.com> Add parsePositiveInt for internal use.

It will help fix issues caused by allowing explicit '+' sign in
numerical strings.

Bug: 5239391
Change-Id: I95b4db1a06a35d5ef72b28c4764a0190f10c55c8
ang/Integer.java
c96651d01dc87a20aa718d60feaff6611451852e 09-Apr-2014 Neil Fuller <nfuller@google.com> Change DecimalFormat.setRoundingMode() behavior to stay in spec

The serialization tests revealed that some DecimalFormat instances
could not be round-tripped. The reason is that the setRoundingMode()
method was setting a non-zero rounding increment, which cannot
be persisted, and also creates patterns that are outside of the
DecimalFormat spec.

Addressed the fact that ICU4C appears to support
RoundingMode.UNNECESSARY now by deleting special-case code.

Changed SerializationStressTest to use canonical DecimalFormat
patterns:

The ones chosen had a couple things that were not ideal:
1) Putting '-' in quotes causes ICU (for non-obvious reasons)
treat the negative pattern prefix as not being default. Default
in this case means "the positive prefix with a preceding '-'.
Removing the quotes meant it would recognize the pattern as
not needing everything after ;., so the pattern would be shrunk.
2) The positive pattern was also not one ICU could deal with
fully. ICU changed "#.#" to "#0.#" at parse time (which can be
corrected with a setMinimumIntegerDigits(0)). It's not clear why
ICU cannot deal with parsing "#.#" when it can produce it, but
there is a long comment in decimfmt.cc suggesting it is
intentional and to avoid format producing empty strings.

The pattern has been changed to one that ICU can handle and would
choose when the various serialized fields are read back. This is
necessary because NativeDecimalFormat compares the patterns and
not just the serialized fields. Leaving the pattern check part of
equals() means that two non-spec patterns will not be considered
equal(), which is important while Android allows non-spec patterns.
Restricting support in DecimalFormat to the documented subset of
characters is not worth the effort and may cause problems
elsewhere.

Change-Id: I2de588458b86619733c0dc1692d526f179059910
Bug: 11668227
ext/DecimalFormat.java
2e3d5f9bf77d8e82a9f9e6c966ff85521d0e1629 14-Apr-2014 Narayan Kamath <narayan@google.com> am 743f7d5f: am a5cfa107: Merge "Set ICU\'s default locale from Locale.getDefault."

* commit '743f7d5f35ac4d350788cd6a69872616d18e58cd':
Set ICU's default locale from Locale.getDefault.
743f7d5f35ac4d350788cd6a69872616d18e58cd 13-Apr-2014 Narayan Kamath <narayan@google.com> am a5cfa107: Merge "Set ICU\'s default locale from Locale.getDefault."

* commit 'a5cfa107e2e5cb1510155712a2cb3037fe0d1e40':
Set ICU's default locale from Locale.getDefault.
a5cfa107e2e5cb1510155712a2cb3037fe0d1e40 12-Apr-2014 Narayan Kamath <narayan@google.com> Merge "Set ICU's default locale from Locale.getDefault."
de0eb683370d789e7bb25673b350b8dbf2ba5d69 11-Apr-2014 Narayan Kamath <narayan@google.com> Set ICU's default locale from Locale.getDefault.

bug: 2541757
Change-Id: I5de58be7e8a701f2c40182ea54bceff85ec1aad2
til/Locale.java
25e4ddbf41859b8e38fb8d826c9876bf25a54ee6 11-Apr-2014 Calin Juravle <calin@google.com> am 9ae2323e: am 71aab661: Merge "Don\'t allow explicit signs in URL port numbers."

* commit '9ae2323e27c7964cb2dc6ab50bbee1cd82c90fca':
Don't allow explicit signs in URL port numbers.
a41120bed93409304b18a45b058bec7111903549 11-Apr-2014 Calin Juravle <calin@google.com> am c766471e: am a4d97e18: Merge "Don\'t allow explicit signs in URI port numbers."

* commit 'c766471e47bbd346b14622f1112c6700b58c6009':
Don't allow explicit signs in URI port numbers.
9ae2323e27c7964cb2dc6ab50bbee1cd82c90fca 11-Apr-2014 Calin Juravle <calin@google.com> am 71aab661: Merge "Don\'t allow explicit signs in URL port numbers."

* commit '71aab6611a9de904af6b94bfb70176455d984913':
Don't allow explicit signs in URL port numbers.
c766471e47bbd346b14622f1112c6700b58c6009 11-Apr-2014 Calin Juravle <calin@google.com> am a4d97e18: Merge "Don\'t allow explicit signs in URI port numbers."

* commit 'a4d97e186e6532a77ed31fd89bcad03fb1e6f381':
Don't allow explicit signs in URI port numbers.
bb3195ff5c5fa60456fe86927bee3aebcbe867aa 10-Apr-2014 Calin Juravle <calin@google.com> Don't allow explicit signs in URL port numbers.

Bug: 5239391
Change-Id: Iea158e19de2ace224f29c07c56811b7eab9c0eb9
et/URLStreamHandler.java
30fac583a89ef577ed74629c41c1bea1ffbee4e8 10-Apr-2014 Calin Juravle <calin@google.com> Don't allow explicit signs in URI port numbers.

Bug: 5239391
Change-Id: I26fb1042d169d545a793e47596f4f8a94dd09530
et/URI.java
46deacd78e6981e04fa30b8a957ae646a01a426d 10-Apr-2014 Narayan Kamath <narayan@google.com> am 7cace5df: am d689dcb6: Merge "Fix Locale.getDisplayName."

* commit '7cace5dfba39b7e06ceeeb244059478e98e44858':
Fix Locale.getDisplayName.
7cace5dfba39b7e06ceeeb244059478e98e44858 10-Apr-2014 Narayan Kamath <narayan@google.com> am d689dcb6: Merge "Fix Locale.getDisplayName."

* commit 'd689dcb6e42dd1268402dcd385dbe8810afe039a':
Fix Locale.getDisplayName.
9acf622d505661055339de7fa3f8a86cd2b61f20 09-Apr-2014 Narayan Kamath <narayan@google.com> Fix Locale.getDisplayName.

- Don't append the country instead of the script.
- Ensure that there's a "," separating the country and
the script.
- Add missing tests for Locale#getDisplayName when scripts
and variants are present.

bug: 13790258
Change-Id: I7a3f3db73879755fa8159f94a378bc585c779cc2
til/Locale.java
9e3faa5bbfb8d9f35c5b325d345549beea888055 08-Apr-2014 Adam Hampson <ahampson@google.com> am 7a219d5e: resolved conflicts for merge of a6c26760 to klp-modular-dev-plus-aosp

* commit '7a219d5ef2533053876eb5c10ea7362663331a4e':
DO NOT MERGE Make system properties read only.
7a219d5ef2533053876eb5c10ea7362663331a4e 08-Apr-2014 Adam Hampson <ahampson@google.com> resolved conflicts for merge of a6c26760 to klp-modular-dev-plus-aosp

Change-Id: If9306b2ce447eabbf2c1f9f1bd05c371a0cccde5
eac95336d177366b2f2da2110db39abbc49f524a 17-Feb-2014 Narayan Kamath <narayan@google.com> DO NOT MERGE Fix Preferences related tests, document limitations.

- The default Preferences factory methods are entirely
useless on android. "java.home" points to a location
in a read-only partition and "user.home" is set to "/"
which apps are not allowed to write to. A strong warning
has been added against these methods.

- We continue to support the underlying default preferences
implementation (even though there's no way to use the impl.
directly except by reflection) to help apps transition *just
in case* they were manually massing "user.home" and "java.home".

- Add a fake preferences factory that allows us to
use a new (temporary) preferences root for every test.
Fixed a test interdependency issue that was uncovered
by this change.

(cherry picked from commit b27fd46c694f8ee4118d6b9bdd61741472ee92b5)

Bug: 13763685
Bug: 13763900

Change-Id: I6019441c65b398376d84264f1e4c9776507533eb
til/prefs/FilePreferencesFactoryImpl.java
til/prefs/FilePreferencesImpl.java
til/prefs/Preferences.java
a6c26760ff2f6d3ae5794f5b15509f965b991f17 14-Feb-2014 Narayan Kamath <narayan@google.com> DO NOT MERGE Make system properties read only.

The issue is that some parts of the system libraries
(and the runtime) assume that these properties are
immutable. This change enforces that notion and makes
behaviour a lot more predictable.

This is not a backwards compatible change, but based
on analysis of code available to me I couldn't find any
instances where this change would break any application.

Has the side effect of fixing..

(cherry-picked from commit f63153ac0ec510b0111d01805097bbd08ccf64ab)

Bug: 13763685
Bug: 13763900

Change-Id: I60c73713c97a4721d0b9781010333a9e9c883534
ang/System.java
93fdc1ef9d8a221207fb6c668a883e92b7d84f84 14-Feb-2014 Narayan Kamath <narayan@google.com> DO NOT MERGE Remove use of file absolute paths.

An absolute path is derived from a relative path by
appending the value of "user.dir" to it. "user.dir" is
populated by the VM by calling getcwd(3). All apps
forked from zygote end up with a "user.dir" (and a current
working directory) value of "/".

This, along with change 417621196b855 (which prevents
"user.dir" from being changed by apps) will make file handling
a lot more consistent. In particular 417621196 ensures that

- The output of getAbsolutePath can never change for a given
relative path.
- File.getPath() and File.getAbsolutePath() become interchangeable
wrt. lower level (Libcore.os) APIs.

(cherry picked from commit 5fecee2da855e92afbcba3a231f4685a56f17967)

Bug: 13763685
Bug: 13763900

Change-Id: I5598a2b1c5de65b59d69324f98656ffe031290f0
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
ff4d3dc9ffc14e71bd5918f0492f6182a3752609 04-Apr-2014 Neil Fuller <nfuller@google.com> DO NOT MERGE Fix broken CTS HttpCookie test

Added some test cases and corrected the test to conform
to the RI behavior.

(cherry picked from commit 154d3fb470158aa01cae000781d0d65cf4c186dd)

Change-Id: Ib32baf2e923c50fca1a5a4cb7cbd7f55ed70e760
Bug: 13748507
et/HttpCookie.java
bb99ef0166c208b2a40008062f35d767a5a20f19 07-Apr-2014 Neil Fuller <nfuller@google.com> am e05b49cc: am 23bdc757: Merge "Fix broken CTS HttpCookie test"

* commit 'e05b49cc2e55d4e23135a69f199b5fb09d94c4f5':
Fix broken CTS HttpCookie test
23bdc7577d354d43481cbab83b18bc2a86396953 07-Apr-2014 Neil Fuller <nfuller@google.com> Merge "Fix broken CTS HttpCookie test"
154d3fb470158aa01cae000781d0d65cf4c186dd 04-Apr-2014 Neil Fuller <nfuller@google.com> Fix broken CTS HttpCookie test

Added some test cases and corrected the test to conform
to the RI behavior.

Change-Id: Ib32baf2e923c50fca1a5a4cb7cbd7f55ed70e760
Bug: 13748507
et/HttpCookie.java
075965c5e6dbc9e3d5510ab935ebb2f8e63b5797 05-Apr-2014 Elliott Hughes <enh@google.com> am 551c38a1: am d1c5e1ff: Merge "Fix Greek uppercasing."

* commit '551c38a1bb85b7f06f55311ea00d2ce3377dbae1':
Fix Greek uppercasing.
a2f8e8a253a93c8df8b0e6f458f4c573d48b9ed9 05-Apr-2014 Elliott Hughes <enh@google.com> Fix Greek uppercasing.

This matches Chrome's behavior.

Bug: 13246961
Change-Id: I1954da3116a1759cb650bffed558dced5770e3ec
ang/CaseMapper.java
36677446b46509f1074ca00f71e91716d2325313 04-Apr-2014 Elliott Hughes <enh@google.com> am 875b6eb3: am df945d72: Merge "Finish moving away from LD_LIBRARY_PATH on Android."

* commit '875b6eb3ca5f4f096193150c4e6e28d2afe73bc2':
Finish moving away from LD_LIBRARY_PATH on Android.
1bc030b6c8a52e1911efcd58d6fbc7f982649167 04-Apr-2014 Elliott Hughes <enh@google.com> Finish moving away from LD_LIBRARY_PATH on Android.

We'll still use LD_LIBRARY_PATH if it's set, for testing or for the
host, but we now ask the dynamic linker what to do.

Bug: 12585421
Change-Id: I1457a63ead89fa8f8aeabc002c0b9038295b886e
ang/System.java
c3b9d6036048d5c5d5eae0e64860f7f845f31a3e 26-Mar-2014 Dmitriy Ivanov <dimitry@google.com> am 41db81da: am f9901b2d: Merge "Remove redundant parameters from fullFieldsCalc"

* commit '41db81dac45e2ab14dcda7edb2b648fbe8365c64':
Remove redundant parameters from fullFieldsCalc
0b294a56aa669731450110cabbf74a71c2011684 20-Mar-2014 Dmitriy Ivanov <dimitry@google.com> Remove redundant parameters from fullFieldsCalc

Change-Id: I1d4fd83dd9bb99c0ea37a1530ae6aafee1935a74
til/GregorianCalendar.java
d5556772acc27e45b5060544ffdbd96099817394 21-Mar-2014 Narayan Kamath <narayan@google.com> am 9079159a: am eb5a9394: Merge "Fix test failures due to the ICU-52 update."

* commit '9079159a43b4a39126ae709c7abf327a86a6501b':
Fix test failures due to the ICU-52 update.
60a27a2be820124baa3bac417ac6828ede3d1bd8 20-Mar-2014 Narayan Kamath <narayan@google.com> Fix test failures due to the ICU-52 update.

Some of the failures were due to the fact that we stopped
parsing numbers like "36-" for RTL locales, and others were
due to the fact that we were using reference equality for
comparing minusSign.

Change-Id: I239e6b8b77165a4665c554e46e6fb652beec2ec2
ext/DecimalFormatSymbols.java
13862a4de475595f5c600fd44b6220dadcb57f99 14-Mar-2014 Narayan Kamath <narayan@google.com> am 1e504d53: am c0e4c40b: Merge "Don\'t assume minusSign is a single char."

* commit '1e504d53789a2cdc4fad825be52424ca52f1c54f':
Don't assume minusSign is a single char.
4f3bca749bdc8be8abf7555b315f308a2c8c14a7 13-Mar-2014 Narayan Kamath <narayan@google.com> Don't assume minusSign is a single char.

Locales like arabic have a multi char minusSign in
their locale data.

The only difficulty here is presented by DecimalFormatSymbols,
which is a public API and expects the minus sign to be
a single codepoint. The API has been changed to return the
first character of the minusSign string for getMinusSign, which
seems like the least bad option at this point.

This change also removes a workaround for cases where ICU
parsed (2445-) as (-2445) for RTL locales. ICU-52 doesn't do
this anymore.

The serialized form hasn't been modified either, since it's
public API as well and it isn't easy to expand to a String
without awkward semantics.

bug: 13410257

Change-Id: I0e575b7eea0fd811ccb9fb5dc04e20d2e0fa13bf
ext/DecimalFormatSymbols.java
ext/SimpleDateFormat.java
til/Formatter.java
54166e4a8ed944a800e48d79f18a6a909d683a20 12-Mar-2014 Neil Fuller <nfuller@google.com> am 864ab9c0: am e6e7947c: Merge "Add 1.7 methods to TimeZone / SimpleTimeZone"

* commit '864ab9c0814e58568415badff2e077f424411ef5':
Add 1.7 methods to TimeZone / SimpleTimeZone
3be63364299c07bd8d10b7d52d8fcf79b14350d2 12-Mar-2014 Neil Fuller <nfuller@google.com> am d787230d: am 3537f581: Merge "Add Java 1.7 APIs: ZipFile, ZipInputStream, ZipOutputStream"

* commit 'd787230d4a384d3aaf32f444dfc4165ae2a45e92':
Add Java 1.7 APIs: ZipFile, ZipInputStream, ZipOutputStream
e6e7947cef6e6299d617b8efbe108d1c89a8f91d 12-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add 1.7 methods to TimeZone / SimpleTimeZone"
de6139c4a84f320aa4ca9b5044fdbc4a2a9c5d26 12-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add APIs for better interoperability with Java 1.7"
15737123c4b241c331e0090d311afb9631c3cf1b 12-Mar-2014 Neil Fuller <nfuller@google.com> Add 1.7 methods to TimeZone / SimpleTimeZone

The RI documents the required implementation.

Unlike the RI, SimpleTimeZone in Android does not override
the TimeZone implementation: it seems pointless to do so
given it appears to rely on the implementation details of
another method (inDaylightTime()) which can, itself, be
overridden.

Change-Id: I45d89cf0f30b49bb77c6dcfdae1a81edea40a2d4
til/TimeZone.java
3537f5811df63fa05faeca2bb85364dd03322fca 12-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add Java 1.7 APIs: ZipFile, ZipInputStream, ZipOutputStream"
e3d756c5dae1af2aa5f0ad8bc7f133df3e7401eb 11-Mar-2014 Neil Fuller <nfuller@google.com> Add Java 1.7 APIs: ZipFile, ZipInputStream, ZipOutputStream

Add constructor support for the character encoding to use.

When reading a ZipFile this is used for the file comment and for
entry names and comments when a zip entry is not self-described
as UTF-8 encoded.

When writing a zip file the character encoding determines the
encoding used for the file comment, entry names and comments.

The default for reading and writing when the character encoding
is not specified remains as UTF-8.

Additional fix:
ZipOutputStream: null comments no longer cause NullPointerException.

Change-Id: I7cadfa939377d0f87fd5503dae2a0b2dbac2ba39
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
8c28d9770968592e7c6e484a1fe5cee6550019f8 11-Mar-2014 Neil Fuller <nfuller@google.com> am fb618c40: am 5a692fa8: Merge "Add Currency.getNumericCode()"

* commit 'fb618c40308003f728a5a73e39c1c9427234ad45':
Add Currency.getNumericCode()
5a692fa8cdeec7eee42482f78187bb76be5a87db 11-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add Currency.getNumericCode()"
d627bd4525e41b0503f94c2887c3e01618c73105 10-Mar-2014 Neil Fuller <nfuller@google.com> Add Currency.getNumericCode()

getNumericCode() was added in Java 1.7. It returns the ISO 4217
numeric code for a currency.

Change-Id: I8404703e749b3324bbcb89ecf6d8d64b95a030a3
til/Currency.java
be9f292a660fef91843fe6ffbdf750a6876f1ac6 11-Mar-2014 Narayan Kamath <narayan@google.com> am 48002c5f: am 43ec94e3: Merge "Use the correct buffer size for the Pushback stream."

* commit '48002c5f4a74db6cf4b4afeda2b64868918ca7f4':
Use the correct buffer size for the Pushback stream.
bb65253db600d05ca6eeedc6d076f6af20680f99 10-Mar-2014 Narayan Kamath <narayan@google.com> Use the correct buffer size for the Pushback stream.

The maximum number of bytes we can push back to the
stream is the actual size of the DeflaterInputStream
buffer (buf.length) and not the default size (BUF_LENGTH).

bug: https://code.google.com/p/android/issues/detail?id=66409
Change-Id: I78a80b6ced8606602361abd8a969fa6f8227596c
til/zip/GZIPInputStream.java
7113751e69e4f472dfc89afce4c1888ac67adb9c 10-Mar-2014 Neil Fuller <nfuller@google.com> am bdd079be: am 883084f7: Merge "Add 1.7 methods to HttpCookie."

* commit 'bdd079be12a800e1f16ae9f9df3c0ec66ea6f6d2':
Add 1.7 methods to HttpCookie.
883084f7eac26f1fdd79858c8bd2e68600011b0b 10-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add 1.7 methods to HttpCookie."
8621348d05b28d7626e76fcea3ea6f45099a9157 07-Mar-2014 Neil Fuller <nfuller@google.com> Add APIs for better interoperability with Java 1.7

Must be committed at the same time as the change in framework
to update the public API footprint.

See commit 38ce4c0f83d4ac35c4c63fecf7c8775f9b16f6da in framework/base.

Change-Id: I71a88b09feef8bc2b50b3aeafc3be5863eea3063
et/SocketOption.java
et/StandardSocketOptions.java
et/URLConnection.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/AlreadyBoundException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/NetworkChannel.java
io/channels/SeekableByteChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
3bb69fa0b8fe5119c3f19cd7f5d725118aa506af 07-Mar-2014 Neil Fuller <nfuller@google.com> Add 1.7 methods to HttpCookie.

Adding isHttpOnly() and setHttpOnly(). Added more
documentation around the specifications supported since
the HttpOnly attribute was added by RFC 6265. Improved
documentation around toString() because I found the method
confusing, plus RFC 6265 goes back to a simpler format
than the RFC it obsoletes meaning callers should use
version 0 not version 1.

Change-Id: Ie52ea80dc5bd7d1575fcaccde70976ed29729817
et/HttpCookie.java
a546519ee95ed1a2f71fc41fe938e1b219a5f4f9 03-Mar-2014 Neil Fuller <nfuller@google.com> am 142040c5: am 5a57ed5f: Merge "Implementation of MulticastChannel."

* commit '142040c58de47e84a4f47f9ef39f71c28b88350e':
Implementation of MulticastChannel.
5a57ed5f213aad62255884b2eacb6aece630e9ed 03-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Implementation of MulticastChannel."
b99b9a42d6052c1f6a7f17ce4bf8cfad2333e6e9 03-Mar-2014 Neil Fuller <nfuller@google.com> am 15fd9ffc: am 4189a6e1: Merge "Tests and docs updates for OkHttp update."

* commit '15fd9ffc26bee80f2cef513b962667038f90b3d8':
Tests and docs updates for OkHttp update.
4189a6e183e8c38992df6de29321733fad06e50a 03-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Tests and docs updates for OkHttp update."
fac5764b33d8c3cd63e00531838d748c708a4b5c 01-Mar-2014 Ian Rogers <irogers@google.com> am e7aaeb94: am a7e33c3a: Merge "Add unpadded array allocations."

* commit 'e7aaeb94e0e59a79edc3215054c98a05999a1219':
Add unpadded array allocations.
a7e33c3aeaf50c7b3a3ea77a10a1d5872026f1dd 01-Mar-2014 Ian Rogers <irogers@google.com> Merge "Add unpadded array allocations."
10af76d5af1d87686ff9ab8d00f3dadc15a84fb7 28-Feb-2014 Ian Rogers <irogers@google.com> Add unpadded array allocations.

Unpadded array allocations avoid unused bytes following arrays. API conventions
follow those of newNonMovableArray.
Dalvik implementation assume dlmalloc allocation properties, ART implementation
is handled by resizing the array post-allocation:
https://android-review.googlesource.com/83670
Add VMRuntimeTest to check the properties of the array allocation routines.
Change java.lang.reflect.Array.newInstance to compare more probable array types
before less probable ones.

Bug: 13028925.

Change-Id: Icf6bfb1aa5ad4faa062b393082c689b6118a84b5
ang/reflect/Array.java
b8d16154cf66c619a24449040d4576b61098e7fb 13-Feb-2014 Narayan Kamath <narayan@google.com> Tidy up Console, fix ConsoleTest

- Use a more specific exception type. The use of
IOException led me to believe that the constructor
was performing i/o ops on the underlying file
descriptors. (They were not.)

- Delete a test that asserted that System.console() was
always non-null. It will be non-null only for command
line apps (tests run from vogar), and not for
"regular" android apps (tests run from CTS) because
stdin / stdout will not be TTY devices regular apps.

bug: 12490236

(cherry-picked from 7fbd82c654d1ad2348769b9340a1181abfa98fe9)

Change-Id: I8c1e37bcb21de5862dc8ea198852995a020437a7
o/Console.java
60f79119fd7e37c459a96888594f90d86bab5535 27-Feb-2014 Neil Fuller <nfuller@google.com> Tests and docs updates for OkHttp update.

OkHttp has made various changes. This fixes the known
breakages before the update is applied.

1) Chunk length is no longer honored exactly. The
API docs have been updated to reflect this.

2) testConnectViaHttpsWithSSLFallback simulated an SSL
handshake failure by closing the socket. This is no longer
sufficient to trigger the fallback behavior after OkHttp change
46a0852. testSslFallback tests an actual handshake failure and
provides coverage. testConnectViaHttpsWithSSLFallback
has therefore been removed.

3) testRetryableRequestBodyAfterBrokenConnection is similar to
testConnectViaHttpsWithSSLFallback. Previously it passed because
of the SSL fallback behavior. That fallback no longer happens.
It is possible this was actually supposed to be checking the
internal RetryableOutputStream. Now OkHttp does not retry
connections after the connection is made it is not possible
to test the request body is "replayed" to the server.

4) testNonRetryableRequestBodyAfterBrokenConnection: Related to
3 above. It was testing that fixed length request bodies are not
retryable. This test continues to pass with OkHttp but only
because it fails to retry generally, not because of the request
body and therefore the test is misleading.

Change-Id: If430bce75ad5b2fd5ace38d0f65d9c4af56b88df
et/HttpURLConnection.java
df29508a7aa622f265aaebdc472eb7d679185ebb 30-Jan-2014 Neil Fuller <nfuller@google.com> Implementation of MulticastChannel.

Note: ProtocolFamily / StandardProtocolFamily /
DatagramChannel.open(ProtocolFamily) have not been
implemented.

There is a related change to libnativehelper that
must be merged at the same time to avoid
build breakage. See
https://android-review.googlesource.com/#/c/81371/

Bug: 12464155
Change-Id: I07fc049b429a2d373e9bd7b07149632f5cd69f9d
et/MulticastSocket.java
io/DatagramChannelImpl.java
io/MembershipKeyImpl.java
io/MulticastMembershipHandler.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/DatagramChannel.java
io/channels/MembershipKey.java
io/channels/MulticastChannel.java
21661bb99ed18bb68f0fd82e587f38b2fc7f9056 27-Feb-2014 Narayan Kamath <narayan@google.com> am e6cc3919: am dc22c511: Merge "Add a stub set24HourTimeFormat function for the framework."

* commit 'e6cc3919f4a7ae539afa1e1e2d6bbf5c80409058':
Add a stub set24HourTimeFormat function for the framework.
68d78caff1997dd870f0265c1c642288aee6e653 25-Feb-2014 Narayan Kamath <narayan@google.com> Add a stub set24HourTimeFormat function for the framework.

ActivityThread will call through to DateFormat.set24HourTimeFormat
during the app startup flow, or when the 24 hour setting changes.

Change-Id: I2b6a10ff66d86e780779c46c1665f77cdef66305
ext/DateFormat.java
2b9b8abd4d8730e3b5b866781d0d98eafba7c35d 26-Feb-2014 Paul Duffin <paulduffin@google.com> am e17d6518: am f5fe8b73: Merge "Improve error message when attempting to open an empty zip"

* commit 'e17d65189025ff5d7fbe02a478b71a6b9af2af30':
Improve error message when attempting to open an empty zip
f5fe8b735bc185d1221c9e0ec07de87aea2723ff 26-Feb-2014 Paul Duffin <paulduffin@google.com> Merge "Improve error message when attempting to open an empty zip"
ef164bf196538c04f499dcbb49a389c70ff5601a 26-Feb-2014 Paul Duffin <paulduffin@google.com> Improve error message when attempting to open an empty zip

The bug report states that the behaviour of ZipFile has changed between 4.3 and
4.4 when opening an empty zip file. I did some investigation and it appears as
though the reference implementation also throws an exception in that case so I
decided that 4.4 is working as designed. However, to make it clearer I made a
minor change to explicitly check for an empty zip file so that we can report a
slightly improved message explaining that they are not supported. I added a
test for various forms of empty streams and zip files and removed part of an
older test from harmony tests as it is no longer necessary.

Bug: https://code.google.com/p/android/issues/detail?id=65380
Change-Id: I1f2fcbf6bbaedb7dbccf8dd4f1cec4e330274524
til/zip/ZipFile.java
9d1e4333c2d839c0848f710c1c4aee630f568df1 26-Feb-2014 Paul Duffin <paulduffin@google.com> am 2b0948a9: am 5357ce35: Merge "Corrected documentation of OutputStreamWriter.close()"

* commit '2b0948a94fb7cd261864a7b214089894f7fb1e8c':
Corrected documentation of OutputStreamWriter.close()
50cf702adbc10d34e6488786870c4a500fbf2c4c 26-Feb-2014 Paul Duffin <paulduffin@google.com> Corrected documentation of OutputStreamWriter.close()

Made it clear that close() does not flush the underlying stream. That behaviour
is in line with reference implementation.

Bug: https://code.google.com/p/android/issues/detail?id=65245
Change-Id: Id84986c58bc86cc0b1d4ec5b6c1a2fd925c39c18
o/OutputStreamWriter.java
7cfdcf6549021ef49cfe6e8b4d17301784cfd720 20-Feb-2014 Neil Fuller <nfuller@google.com> am 2b55850b: am 01252476: Merge "Addition of 1.7 methods to URLConnection."

* commit '2b55850bd9857b588808045cd4a0194ab66c1601':
Addition of 1.7 methods to URLConnection.
2587ef91ba693d73e97704e8163c050b286e7330 14-Feb-2014 Neil Fuller <nfuller@google.com> Addition of 1.7 methods to URLConnection.

URLConnection.getHeaderLong() and
URLConnection.getContentLengthLong().
These methods are required by okhttp.

Changed JarURLConnectionImpl.getContentLength() to return -1
when the size of an entry cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Changed FileURLConnection.getContentLength() to return -1
when the size of the file cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Change-Id: Ib43e68a2536c2602b4c7ee0cda68fa1f90045f57
et/URLConnection.java
63b03efcdae8d346433ca7254c4d85dcc36a7b50 19-Feb-2014 Narayan Kamath <narayan@google.com> am 78936256: am 02c8419e: Merge "Fix Preferences related tests, document limitations."

* commit '789362569a4d407c1dfbd0f926e7de93a2eddb97':
Fix Preferences related tests, document limitations.
92544b59918e46dcf6be2e3a256cc3fa63d5ef2f 19-Feb-2014 Narayan Kamath <narayan@google.com> am b881bb53: am 2f859bf4: Merge changes I60c73713,I5598a2b1

* commit 'b881bb5323abd532d7640c5c4fa21d3e2621ab5a':
Make system properties read only.
Remove use of file absolute paths.
b27fd46c694f8ee4118d6b9bdd61741472ee92b5 17-Feb-2014 Narayan Kamath <narayan@google.com> Fix Preferences related tests, document limitations.

- The default Preferences factory methods are entirely
useless on android. "java.home" points to a location
in a read-only partition and "user.home" is set to "/"
which apps are not allowed to write to. A strong warning
has been added against these methods.

- We continue to support the underlying default preferences
implementation (even though there's no way to use the impl.
directly except by reflection) to help apps transition *just
in case* they were manually massing "user.home" and "java.home".

- Add a fake preferences factory that allows us to
use a new (temporary) preferences root for every test.
Fixed a test interdependency issue that was uncovered
by this change.

Change-Id: I6019441c65b398376d84264f1e4c9776507533eb
til/prefs/FilePreferencesFactoryImpl.java
til/prefs/FilePreferencesImpl.java
til/prefs/Preferences.java
f63153ac0ec510b0111d01805097bbd08ccf64ab 14-Feb-2014 Narayan Kamath <narayan@google.com> Make system properties read only.

The issue is that some parts of the system libraries
(and the runtime) assume that these properties are
immutable. This change enforces that notion and makes
behaviour a lot more predictable.

This is not a backwards compatible change, but based
on analysis of code available to me I couldn't find any
instances where this change would break any application.

Has the side effect of fixing..

bug: 12491204
bug: 12491159

Change-Id: I60c73713c97a4721d0b9781010333a9e9c883534
ang/System.java
5fecee2da855e92afbcba3a231f4685a56f17967 14-Feb-2014 Narayan Kamath <narayan@google.com> Remove use of file absolute paths.

An absolute path is derived from a relative path by
appending the value of "user.dir" to it. "user.dir" is
populated by the VM by calling getcwd(3). All apps
forked from zygote end up with a "user.dir" (and a current
working directory) value of "/".

This, along with change 417621196b855 (which prevents
"user.dir" from being changed by apps) will make file handling
a lot more consistent. In particular 417621196 ensures that

- The output of getAbsolutePath can never change for a given
relative path.
- File.getPath() and File.getAbsolutePath() become interchangeable
wrt. lower level (Libcore.os) APIs.

Change-Id: I5598a2b1c5de65b59d69324f98656ffe031290f0
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
9f63e01824ad0188f0c26c9bb6648cb30e58bc27 14-Feb-2014 Narayan Kamath <narayan@google.com> am 8b2aa43a: am 71eec882: Merge "Tidy up Console, fix ConsoleTest"

* commit '8b2aa43a812437e78a610369ccf80dfcdc45b081':
Tidy up Console, fix ConsoleTest
7fbd82c654d1ad2348769b9340a1181abfa98fe9 13-Feb-2014 Narayan Kamath <narayan@google.com> Tidy up Console, fix ConsoleTest

- Use a more specific exception type. The use of
IOException led me to believe that the constructor
was performing i/o ops on the underlying file
descriptors. (They were not.)

- Delete a test that asserted that System.console() was
always non-null. It will be non-null only for command
line apps (tests run from vogar), and not for
"regular" android apps (tests run from CTS) because
stdin / stdout will not be TTY devices regular apps.

bug: 12490236
Change-Id: I8c1e37bcb21de5862dc8ea198852995a020437a7
o/Console.java
0bfe89bd3de94789f2eb2d44629741b5e04d3dcc 13-Feb-2014 Kenny Root <kroot@google.com> am 3da375c0: am 17d1f4d1: Merge "Late binding: support children of Signature"

* commit '3da375c064314f4d4d028c54967638d8d5ac686b':
Late binding: support children of Signature
a1d3d08ab0c896316da98e9b4e83e9bdda211eb0 13-Feb-2014 Neil Fuller <nfuller@google.com> am a26bf8a4: am 28261e44: Merge "Adding additional methods to NetworkChannel."

* commit 'a26bf8a49489733acb7c042090b9a48dd0ec1f99':
Adding additional methods to NetworkChannel.
b81ec2b01e6cd5e613146cadd6b9628cbd26f31b 12-Feb-2014 Kenny Root <kroot@google.com> Late binding: support children of Signature

The way Signature is a class of SignatureSpi allows you to register a
provider that returns a direct child of Signature. Support that by
checking if it's a subclass before trying to wrap it in SignatureImpl.

Bug: 12971079
Change-Id: I76b03f0962fe1b6ae95f205588c17d54b4bf504c
ecurity/Signature.java
cc239254d8f6c42e4b695cbf4938a9e75091c854 11-Feb-2014 Neil Fuller <nfuller@google.com> am d64e9771: am 58ac1fd0: Merge "Implementing bind() and getLocalAddress() for NIO2."

* commit 'd64e9771dcac308826c56d64b95aaa85685abb37':
Implementing bind() and getLocalAddress() for NIO2.
ff81b740a338ba964e0ba1c40d925fb2ceb37bf2 20-Jan-2014 Neil Fuller <nfuller@google.com> Adding additional methods to NetworkChannel.

Adding NetworkChannel.supportedOptions(), NetworkChannel.getOption(),
NetworkChannel.setOption(). A lot of the changes are in documentation
and tests.

Bug: 12464155
Change-Id: Ifa56843a8823b6b9cbd262409adc2450b401c654
et/MulticastSocket.java
et/SocketOption.java
et/SocketOptions.java
et/StandardSocketOptions.java
io/DatagramChannelImpl.java
io/NioUtils.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/DatagramChannel.java
io/channels/NetworkChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
47ae0b5a1d96c8030e0963ccc5b44c3ee66aaec3 20-Jan-2014 Neil Fuller <nfuller@google.com> Implementing bind() and getLocalAddress() for NIO2.

This change introduces NetworkChannel, but only bind() and
getLocalAddress() methods. To avoid breaking existing Android
applications that extend ServerSocketChannel, DatagramChannel and
SocketChannel the methods have been added with concrete
implementations that throw exceptions rather than leaving them
abstract.

In channel tests, usages of channel.socket().bind() and
channel.socket().getLocalSocketAddress() have been changed to
channel.bind() and channel.getLocalAddress(), since the behavior is
close enough and the tests should be written against the channel APIs
as much as possible. Tests have been added for new methods.

Removed further overriding in
DatagramChannelImpl.DatagramSocketAdapter and
SocketChannelImpl.SocketAdapter which revealed some bugs and lack of
clarity in the docs for the socket methods:

Improved the documentation for DatagramSocket.getLocalAddress(),
DatagramSocket.getLocalSocketAddress(),
ServerSocket.getInetAddress(), ServerSocket.getLocalPort(),
ServerSocket.getLocalSocketAddress(), Socket.getLocalAddress(),
Socket.getLocalPort(), Socket.getLocalSocketAddress(). These methods
treat special cases differently.

Fixed a bug in DatagramSocket.getLocalSocketAddress() where it would
incorrect throw an exception if the socket has been closed, which
contradicts the (updated) documentation and the RI. It now returns
null. Added tests.

Fixed a bug in Socket.close(): a closed socket would still report as
being connected. Added tests.

Fixed a bug in Socket.startupSocket() - the socket was recording it
was being bound, but was not updating the cached local address. This
method is called during ServerSocketChannel.accept() and would cause
the socket to report its local address as being the wildcard address,
when it is not. Added a test.

Change-Id: Ibec8527e1c72597e268d23e6c1f03eb16e46cdc4
Bug: 12464155
et/DatagramSocket.java
et/ServerSocket.java
et/Socket.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/AlreadyBoundException.java
io/channels/DatagramChannel.java
io/channels/NetworkChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
2f9ef996b34a0352ac8551fcd98b1ff73d78dcfc 08-Feb-2014 Mathieu Chartier <mathieuc@google.com> am 1a7c4806: am 506021c4: Merge "Avoid running Runtime.gc() until we need to run finalization."

* commit '1a7c4806520e0d99a48590af79041cf76e67587f':
Avoid running Runtime.gc() until we need to run finalization.
506021c4348ca13bc9a2734b9880c12576286c4f 07-Feb-2014 Mathieu Chartier <mathieuc@google.com> Merge "Avoid running Runtime.gc() until we need to run finalization."
730b59036a64c485b0a00ccf4878f120511f2614 06-Feb-2014 Kenny Root <kroot@google.com> am f40fbe23: am 19a25cc3: Merge "Late binding: reinitializing causes selection"

* commit 'f40fbe23b46f3092d2925dfb40a39cb9b7c751d0':
Late binding: reinitializing causes selection
beff0f1375b635c692d48190aa69a06986b5111f 06-Feb-2014 Kenny Root <kroot@google.com> Late binding: reinitializing causes selection

The Sun PKCS#11 document says that calling initialization with different
keys causes a new provider and service will be chosen. Currently the RI
fails these tests, but it seems like the correct thing to do.

Change-Id: Ie40d8ef5f0996477e157ffbc0d9f145448df3df1
ecurity/Signature.java
b5b3f5639edb55739eeef6b5d87c9a751e5acbaf 06-Feb-2014 Kenny Root <kroot@google.com> am f80ee977: am b5b01fe5: Merge "Late binding: add support to Signature"

* commit 'f80ee977579c46c089e907d93d1e923489098b4b':
Late binding: add support to Signature
c539bff0ece3ed8a7546336cdf3b205a518a2a26 06-Feb-2014 Kenny Root <kroot@google.com> Late binding: add support to Signature

This adds support for late binding (or delayed selection) to the
Signature class. This allows the selection of the SignatureSpi based on
what kind of Key class is used to initSign(...) or initVerify(...)

Change-Id: I9d397a3aab48b49dfdf91af4ab7caceeff4822d8
ecurity/Signature.java
29a61c513b36f87932d77480268f10180011eaff 05-Feb-2014 Kenny Root <kroot@google.com> am 42b9374f: am a6d2e94e: Merge "Improve JCE getInstance documentation"

* commit '42b9374fd1dbae40f1a7757332cfd9c2bf25822f':
Improve JCE getInstance documentation
0a64887ae9127d081fc6e312ba1f06f727453800 05-Feb-2014 Kenny Root <kroot@google.com> Improve JCE getInstance documentation

If a Provider instance is supplied, it will be asked directly to satisfy
the request. Make that clear in the documentation.

Change-Id: I06b945a540b99db970b96a37e312f1e0fae93bf9
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/SecureRandom.java
ecurity/Signature.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/cert/CertificateFactory.java
930e26f0f59c0ce1020524269c82492f3c4ea722 28-Jan-2014 Mathieu Chartier <mathieuc@google.com> Avoid running Runtime.gc() until we need to run finalization.

This prevents excessive explicit GC which are called from apps to get
good GC behavior on Dalvik. Calling System.gc() does not help on ART
since GC for alloc is much rarer.

If running finalizers is requested following a System.gc we remember
that a GC was requested and perform it ahead of finalization.

Bug: 12004934

Change-Id: Id1343ce8b5378c5f53c1e5649c06ddd045f56a3b
ang/System.java
69e29b8f55e1dbb7bdfe86233893bc8aa2e430eb 04-Feb-2014 Elliott Hughes <enh@google.com> am 70e4cdb5: am 918d6b88: Merge "Be more consistent with L suffixes in NIOAcccess."

* commit '70e4cdb5eaca94af7758bff9f0c0fa8d7c978102':
Be more consistent with L suffixes in NIOAcccess.
026a0cd7e57d6163ad90695a8b61341915802907 04-Feb-2014 Elliott Hughes <enh@google.com> Be more consistent with L suffixes in NIOAcccess.

Change-Id: I664cdc40da85fa7e300a7e34ab970607a4cc0794
Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
io/NIOAccess.java
afa22f4992902e0205b62f5bae17408b3d49ee17 01-Feb-2014 Elliott Hughes <enh@google.com> am 9f852db5: am 85f90146: Merge "Move the hidden File.readlink into Libcore.os."

* commit '9f852db5fa5180a5d192c263251c0983ac12d3f3':
Move the hidden File.readlink into Libcore.os.
096395fbb26d4f514f234bc2998206e533c31fa1 01-Feb-2014 Elliott Hughes <enh@google.com> am 52f25714: am a835db15: Merge "Rename our \'realpath\' because it isn\'t the same as realpath(3)."

* commit '52f257142f6a3a35adb9e85f31dab4147a1a1e34':
Rename our 'realpath' because it isn't the same as realpath(3).
0b6b3e10459fc3a3f4dd280dab8d4a145f7bf2f0 01-Feb-2014 Elliott Hughes <enh@google.com> Move the hidden File.readlink into Libcore.os.

Change-Id: Ia983909e62d3806027dff870f0148dd07c31bf01
o/File.java
a835db1569500fbe17943412990e49bee58f6081 01-Feb-2014 Elliott Hughes <enh@google.com> Merge "Rename our 'realpath' because it isn't the same as realpath(3)."
da40cad9e1c10000e00e6b0d808e646f79566816 01-Feb-2014 Kenny Root <kroot@google.com> am 3452af26: am 85ec182b: Merge "Remove DRLCertFactory"

* commit '3452af2636b3e0bf1a7007230097dd170144c6e6':
Remove DRLCertFactory
88f0e15c54d5469fb55cb67c8a2b0cceaed34074 31-Jan-2014 Kenny Root <kroot@google.com> Remove DRLCertFactory

No longer needed since Conscrypt is the main provider.

Change-Id: I6cee3c33c00822cc320780d63cb76f42e6be2b71
ecurity/Security.java
ecurity/security.properties
081c0de9231d6fc2aa5e24bdcc21b5cde8a30f2b 31-Jan-2014 Elliott Hughes <enh@google.com> Rename our 'realpath' because it isn't the same as realpath(3).

Change-Id: I7b830d485c1ff769993233b7ea69e36b354f3259
o/File.java
2d96b3f6884966d6f0f920bb305dcbdad107d9a1 31-Jan-2014 Neil Fuller <nfuller@google.com> am 4370dc02: am 5bdb797e: Merge "Refactoring in preparation for NIO2 changes."

* commit '4370dc026c3c9f679f858ee6bbe7b7f56c290ca7':
Refactoring in preparation for NIO2 changes.
a5a51da0b7e0536f2ea6765acc25a780b680571b 31-Jan-2014 Neil Fuller <nfuller@google.com> am ba94d0cf: am e528b497: Merge "Introduction of SeekableByteChannel."

* commit 'ba94d0cf1db6aaf8249e84cc7030d6ea3a446cde':
Introduction of SeekableByteChannel.
5bdb797e4f545c6b16f44523cdab2500460f290d 30-Jan-2014 Neil Fuller <nfuller@google.com> Merge "Refactoring in preparation for NIO2 changes."
75463642d0228edb3b7e22faacaaf4084f24dc16 23-Jan-2014 Neil Fuller <nfuller@google.com> Introduction of SeekableByteChannel.

Note: FileChannel continues to implement ByteChannel for
now. Otherwise the API is visibly changed because SeekableByteChannel
is hidden.

Change-Id: If20c8c211e0a1f6003763ac702b2e2f8ad37e293
io/channels/FileChannel.java
io/channels/SeekableByteChannel.java
933fbbf606268eec9fc430632b8bca7002a833b3 14-Jan-2014 Neil Fuller <nfuller@google.com> Refactoring in preparation for NIO2 changes.

Making the various Socket/Channel classes more consistent with each
other for synchronizing state between the Channel, Socket and the OS.
This is in preparation for NetworkChannel.bind().
Synchronizing state revealed a test that relied upon a Socket from a
channel not reporting isConnected() properly after a connect(). Tests
have been updated.

Reading the local address back from the OS revealed that Android is
using IPv6 and reports the string equivalent of IPv4's 0.0.0.0 as
"::". Updated a test that was relying on the string form.

Calling connect() twice on a DatagramSocket appears inconsistent with
itself and Channel and other Sockets. A pure DatagramSocket switches
over to the new remote address. I have changed the Channel-backed
DatagramSocket to throw an IllegalStateException exception, and have
created a bug to discuss making the calls more consistent.

Socket has been modified to avoid using the address field to store
the local address after a bind(). This field is documented as holding
the remote address, not the local.

Changed implementation of SocketChannelImpl.socket().getInputStream()
and SocketChannelImpl.socket().getOutputStream() to use the one that
is implemented by Socket and not a custom NIO-based implementation.
The use of NIO provided two parallel implementations for the same
thing. This change alters behavior when attempting to read zero bytes
and when a Channel is in non-blocking mode: now it throws
IllegalBlockingModeException rather than
ArrayIndexOutOfBoundsException. The tests have been updated.

Various tidying up changes to introduce @Override, remove
unnecessarily initialized local variables, fields, semi-colons,
javadocs and imports. Added close() calls for objects during tests
that were cluttering the logs.

Modified IoBridge.connect() to be void. Adjusted SocketChannelImpl
accordingly and tidied up impossible cases. Modified
SocketChannel.connect() so that it always returns false in
non-blocking mode. This looks like an existing bug:
it would previously have returned true, even though the connection
was potentially still pending. Tests have been added.

Also tidied up SocketChannelImpl.finishConnect() - it was potentially
resetting the isBound state.

Change-Id: Ic7943615b4b763f77e74397e0e91a62edc7d7017
bug: 12464155
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
et/ServerSocket.java
et/Socket.java
et/SocketImpl.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
a8bf72c3d96d8d161afa5a3388eef65a67e3488c 29-Jan-2014 Neil Fuller <nfuller@google.com> am 55b900b9: am 39c6db60: am 7df405b5: Merge "Fixing FileChannel.truncate() / position()"

* commit '55b900b9c3ad86169f50e50f21dc54d907e6d655':
Fixing FileChannel.truncate() / position()
7df405b5d80a5b16bc27c479c49a452976edb136 29-Jan-2014 Neil Fuller <nfuller@google.com> Merge "Fixing FileChannel.truncate() / position()"
2ab477d44b0788c1fe6eaec1c97c94ec992008d7 29-Jan-2014 Elliott Hughes <enh@google.com> am 59e2c03f: am 1f63f846: am e6604f35: Merge "Fix Matcher.group documentation."

* commit '59e2c03f2f47632286e2fc38a9069f49d058158b':
Fix Matcher.group documentation.
5b87698ae6d115bfa40f6953b2f5daf20124e14b 28-Jan-2014 Elliott Hughes <enh@google.com> Fix Matcher.group documentation.

It turns out that any @param or @return gunk gets inherited even if you
supply new body text. So fix MatchResult's javadoc and make it clear
that Matcher just inherits. (I'm not sure I even knew MatchResult existed.)

Bug: https://code.google.com/p/android/issues/detail?id=64643
Change-Id: Iee86a026a2b72676af9c54627525bceb482b9f63
til/regex/MatchResult.java
til/regex/MatchResultImpl.java
til/regex/Matcher.java
a990ad5c834bd3292f8f4c5e45c7ff117ffae5ec 27-Jan-2014 Neil Fuller <nfuller@google.com> Fixing FileChannel.truncate() / position()

According to the docs, after calling truncate(x), if position() > x, position()
should be made to equal x. Note: It is to be set to x, not to the actual size
of the file, since truncate() doesn't actually grow the file. Subsequent writes
will grow the file to position().

Bug: 12757843
Change-Id: I5df1fbd59f1a8610bc60575dfa7f1396baf3ed47
io/FileChannelImpl.java
io/channels/FileChannel.java
7406cdec54fe7ca69b12e1a85328f7ecbeee7029 23-Jan-2014 Narayan Kamath <narayan@google.com> Merge "Unhide java7 locale & script related changes."
a4baa42fea28ba67ef9c70c70a5699bba75e2ce8 20-Jan-2014 Narayan Kamath <narayan@google.com> am 99508591: am 00492d3a: am 5f99aecb: Merge "Fix javadoc for Character.UnicodeScript."

* commit '9950859173d5e08de09be24e1945c234610b520c':
Fix javadoc for Character.UnicodeScript.
3475bdd0a5784c95431c643235bc2da6d44f446e 20-Jan-2014 Narayan Kamath <narayan@google.com> Fix javadoc for Character.UnicodeScript.

- Fix missing whitespace between @code and its contents
- Add a @since tag.

Change-Id: I0faad6971285a20c6988da434e376515acb5bd0b
ang/Character.java
b1cf3153bfa1e336668dc2bbd76bbee41181e4a8 20-Jan-2014 Narayan Kamath <narayan@google.com> Unhide java7 locale & script related changes.

Change-Id: I4af57ebe1082e5a37a6e2b4f805a2d66ce9ab555
ang/Character.java
til/IllformedLocaleException.java
til/Locale.java
7f2ed8a57ab6420b515bf0db313d6a1623e7191e 17-Jan-2014 Narayan Kamath <narayan@google.com> am 8ab7f34e: am 2fca46c1: am 09618019: Merge "java7: Implement new Locale APIs."

* commit '8ab7f34e3864d11a8f8b642560a01bb4cb186260':
java7: Implement new Locale APIs.
096180191ebdbe4e5474490eb24e802c3e6ba626 17-Jan-2014 Narayan Kamath <narayan@google.com> Merge "java7: Implement new Locale APIs."
c5b1eb191102a20bc0626aea955aba417e337fbc 10-Jan-2014 Narayan Kamath <narayan@google.com> java7: Implement new Locale APIs.

Most validation and sanity checking is performed entirely
in java. We use ICU only for converting back and forth
between Locale objects and BCP-47 language tags
(toLanguageTag & forLanguageTag).

The new APIs also add support for script subtags and
manipulation of unicode locale extensions.

Note that we do not implement
IllformedLocaleException.getErrorIndex. If anyone complains
or if it proves useful somehow, we could plumb the information
through from ICU if required.

bug: 8992787
Change-Id: I9b2d7f8d17f970d1b57111dcfe92c16e68b0fa67
til/IllformedLocaleException.java
til/Locale.java
b1702fe5cf3cc5712c9f6844062c0a6c807d8887 16-Jan-2014 Kenny Root <kroot@google.com> am 3ec1ac9b: am d4c03a41: am 8e7c3337: Merge "CipherInputStream: increase buffers for speed"

* commit '3ec1ac9ba9a826247dfa437377bfe72adc8758ae':
CipherInputStream: increase buffers for speed
29d763959dd79e8aeacf2674c074d708d596477a 15-Jan-2014 Kenny Root <kroot@google.com> CipherInputStream: increase buffers for speed

This increases speed of CipherInputStreamBenchmark from 606ms to 28.5ms.

Bug: 12246774
Change-Id: If61c0a055fe1b8e87909711b15d0441fcdbe46c7
o/BufferedInputStream.java
98813bc3c0dce67f7be3d529ce282541c315c468 13-Jan-2014 Narayan Kamath <narayan@google.com> am 72d2882f: am 6ded9ec0: am fdbcd4fb: Merge "java7: Implement Character.UnicodeScript"

* commit '72d2882f5effe8fd57c78fda18d80d0bba61bf40':
java7: Implement Character.UnicodeScript
fdbcd4fbefa4ff049029f87660409f29c057433b 13-Jan-2014 Narayan Kamath <narayan@google.com> Merge "java7: Implement Character.UnicodeScript"
2779e93ce6c80c01b3b5f9333c0ace643d4e3c1b 13-Jan-2014 Calin Juravle <calin@google.com> am dc04553b: am 881725b4: am 874403b8: Merge "Invalidate DirectByteBuffers when freed."

* commit 'dc04553bec4ecac7a1dbbe0572cf164ecd88af72':
Invalidate DirectByteBuffers when freed.
874403b8efb4cd00f7fe867312728cd991222df0 13-Jan-2014 Calin Juravle <calin@google.com> Merge "Invalidate DirectByteBuffers when freed."
48819fe0b9130618a430ec52b3f8526c4c0a5f8a 09-Jan-2014 Narayan Kamath <narayan@google.com> java7: Implement Character.UnicodeScript

Implemented in terms of u_getPropertyValueEnum(UCHAR_SCRIPT,)
and uscript_getScript from ICU4C.

Since the Java 7 API specifies a subset of scripts known to
ICU4C, we map scripts not specified in the API to
UnicodeScript.UNKNOWN.

Like the UnicodeBlock API, our matching is far more lenient than
the RI.

Change-Id: I5247baddb2dde42d6a2042609370daeb616fe419
ang/Character.java
77c1cbc9eb6fac1549b98c553ea2df2beee66422 10-Jan-2014 Calin Juravle <calin@google.com> Invalidate DirectByteBuffers when freed.

Calls to DirectByteBuffer#free() will invalidate the buffer:
- isValid() will return false;
- subsequent operations which touch the inner buffer will
throw IllegalStateException.

Note: NioUtils#freeDirectByteBuffer can also be used to
invalidate the buffer.

Bug: 11512044
Change-Id: I78e00dc12b0dbfbd1be6af28bef2413053fb15cb
io/ByteBuffer.java
io/DirectByteBuffer.java
io/MemoryBlock.java
988c37b2b7ae314fd137fe3a103147322b515776 10-Jan-2014 Elliott Hughes <enh@google.com> am 5934401f: am d3a9f5bf: am d1e95700: Merge "Improve the Matcher documentation."

* commit '5934401f8450d0913d9e70d07f522791d77225f0':
Improve the Matcher documentation.
d1e95700f052dc5197ce807447d1f2bd8ac11aa7 10-Jan-2014 Elliott Hughes <enh@google.com> Merge "Improve the Matcher documentation."
434b6476e95c83878b0fd65704e14c128e65a428 10-Jan-2014 Narayan Kamath <narayan@google.com> am 76809ddc: am 7e9c2fc2: am 179cde43: Merge "Removing the nestedException field from ObjectOutputStream."

* commit '76809ddc7126d0b9462237b7d221676328fec608':
Removing the nestedException field from ObjectOutputStream.
086002299f96dbbec18a061e812dc1cb79cb1f10 09-Jan-2014 Neil Fuller <nfuller@google.com> Removing the nestedException field from ObjectOutputStream.

The creation of the StreamCorruptedException in the constructor adds expense.
A common usage of ObjectOutputStream in Android is to write Serializable
objects into a Parcel, which uses a ByteArrayOutputStream and should never fail
with an IOException. This change should provide a small speed up and reduce
memory usage for the common case.

StreamCorruptedException is intended for use when reading from an ObjectStream
and it is no longer used. Also, by throwing a new exception the root cause
(either the original failure, or of the failure to write the exception to the
output stream) is obscured. Of the two possible exceptions that could be thrown
it seems best to throw the original and swallow the second. Added documentation.
Small risk of externally visible changes if callers are depending on the exact
class of the exception thrown but the use of StreamCorruptedException is not
documented and is unlikely to break anybody.

Also tidying up other simple code problems:
1) Unused parameter on writeEnumDesc()
2) Removing the getFieldL native method. It is never called and does not appear
to be backed by any native code.
3) Removing unnecessary initialization of local variables.

bug: 6447733
Change-Id: If062aa8d376019ed0c8db969e8161f18898e64e5
o/ObjectOutputStream.java
f537f38b68f06b0bc10c19393b337a40ef7234bd 10-Jan-2014 Elliott Hughes <enh@google.com> Improve the Matcher documentation.

Bug: https://code.google.com/p/android/issues/detail?id=64643
Change-Id: Iae7f8faa10c23bd82dbc1466fb3aea2d2db07f16
til/regex/Matcher.java
f73b1089c7236a7268ccce10546cc340a36f8c4b 09-Jan-2014 Eino-Ville Talvala <etalvala@google.com> Fix SDK and docs build.

Replace {@link} references to hidden methods with {@code}.

Change-Id: I5996c4d14b7870051082826dd3cfe1951e22f787
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
7cbd35cb9bfe02f74080f7ec48c0ef55e7f4d1b4 09-Jan-2014 Narayan Kamath <narayan@google.com> Merge "Unhide java7 API in java.util.concurrent."
6d7851f45fd35ee156adb7c34c03daa7f01ab32f 08-Jan-2014 Narayan Kamath <narayan@google.com> Unhide java7 API in java.util.concurrent.

Change some comments to remove references to
CountedCompleter (which is a java 8 API).

Change-Id: Iea1e93b75384dafffc96b2f49262a470942135a3
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/RecursiveAction.java
til/concurrent/RecursiveTask.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/TransferQueue.java
til/concurrent/atomic/Fences.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
992cf02ded7fed6d57a5b64ffc87fcd116ee8ef8 07-Jan-2014 John Spurlock <jspurlock@google.com> GZIPInputStream: avoid leaks in init.

If we throw inside the ctor, it is impossible for clients
to pass the CloseGuard test for the associated Inflater.

Change-Id: I6c4e66a98742fbd15bcdd03aa03e2fa7e33e110b
til/zip/GZIPInputStream.java
7c5795d6ebac1919f37076881038c8a4c7df56f1 20-Dec-2013 Narayan Kamath <narayan@google.com> Merge "Move DeleteOnExit to libcore.io."
3a134c58302d6acf59336a4d7d0a70d574ffd493 20-Dec-2013 Narayan Kamath <narayan@google.com> Move DeleteOnExit to libcore.io.

Also makes the constructor private & a field final.

Change-Id: I1df833cee5f4217bd800c36104da2a76a1f1877d
o/File.java
8a246b1fceebc62282122680e11fe08d4f36b239 20-Dec-2013 Narayan Kamath <narayan@google.com> Allow multiple gzip members in gzip streams.

We look for the gzip magic bytes at the end of every
member and try to decompress the remainder of the
stream if we find it.

Note that this changes the behaviour of this class wrt.
the underlying stream: It is no longer self limiting. It
will attempt to read past the gzip trailer to look for
more data to decompress. Before this change, it would've
been possible to (hackily) consume the rest of the compressed
stream directly by inspecting the value of
InflaterInputStream.inf.getRemainingBytes(). It's no longer
possible to sensibly support that.

bug: https://code.google.com/p/android/issues/detail?id=63873

Change-Id: I818f77c052a811ed98b76243f2ad8a1a4d236d70
til/zip/GZIPInputStream.java
til/zip/Inflater.java
14dade3dfbf9933fd179af0d5f1f87ae6f608418 17-Dec-2013 Narayan Kamath <narayan@google.com> Make DeflaterInputStream#available more consistent.

- We now guarantee that available() returns 0 iff.
deflater.finished() == true. Note that this is still
inconsistent with the specification of InputStream#available.

- Remove an unnecessary array copy in DeflaterInputStream#read.

- Remove tests that expect an IllegalArgumentException for
negative skip count values. The InputStream spec doesn't mandate
that we must throw here, and it's better to be consistent with
every othem InputStream specialization in the code.

- Remove obsolete failures from brokentests.txt.

bug: 12189307

Change-Id: Ie9b1ad5d7c050b005b5f6f44a5a283bfdaeb1e81
til/zip/DeflaterInputStream.java
939d2d74a21edd7f6ffa06645d8a50dde16463ca 17-Dec-2013 Narayan Kamath <narayan@google.com> Throw an NPE in a more obvious manner.

Also remove tests with broken expectations that were never
implemented.

Change-Id: I5eb60d3e6dfb8ead6e23941fca1bc19f79c4a158
til/jar/Attributes.java
85dab151e734557d356fb45c45cf7d4548dd6fdc 30-Sep-2013 Kenny Root <kroot@google.com> Late binding: add support to Cipher

This enables late binding support for Cipher algorithms. It will now pay
attention to SupportedKeyClasses and SupportedKeyFormats after the
Cipher#init(...) is called on the instance instead of selecting the
provider when Cipher#getInstance(...) creates the instance.

Change-Id: I27802f1f8b96d81dd2a269741d080dbe68232c9f
ecurity/Provider.java
ecurity/Security.java
0e645fcef9417b180c661961c49b188afac70c5f 12-Dec-2013 Narayan Kamath <narayan@google.com> Merge "Fix a CharsetEncoder bug."
91bb19d2ef9822cfb50fd1191cdb3ee06e2939b9 27-Nov-2013 Narayan Kamath <narayan@google.com> Fix a CharsetEncoder bug.

When malformed or unmappable characters span input
buffers, we'd end up setting a negative position on the
buffer.

Also fix up a few test cases which were wrong in
several ways.
- One test was simply checking for the wrong sort
of exception (unmappable vs malformed)
- Another test was expecting encode() to throw an
error (and ignoring flush) but the API allows flush
to throw an error instead of encode.

bug: 10729779

Change-Id: I6560b749ca2445651d61ca651f8a5e388cf1c1b0
io/charset/CharsetEncoderICU.java
d37c7be7972b0236cf60bc2010be2327a603e682 12-Dec-2013 Elliott Hughes <enh@google.com> Fix a read/write typo.

Bug: https://code.google.com/p/android/issues/detail?id=62726
Change-Id: I1113be8745da7bc17c22057e0be78411dd66a745
o/ObjectOutput.java
d00b7c375c1c39d113a306adc298dada35122766 09-Dec-2013 Kenny Root <kroot@google.com> Late binding: supportsParameter is not newInstance

newInstance should not call supportsParameter since they're not the same
thing. It is type-specific how the parameter is used, so it's not
necessarily the parameter used for the constructor.

The constructor type supplied to newInstance is only used for CertStore,
but CertStore does not support the supportsParameter call. This was
causing CertStore-related tests to fail since newInstance called into
supportsParameter.

Additionally, to make sure we throw the correct exceptions, we need to
keep a list of valid parameters for all the types we know about. Right
now this just means moving the special case that existed before into a
HashMap and adding null entries for the other types we know about.
Adding the null types allows the disambiguation from types we don't know
about so we can throw an exception when a constructor parameter is
supplied to a type that should not take one.

Change-Id: Ia1755481df1bfa9f76dc4cf7eee5c966a8019396
ecurity/Provider.java
6d8a4f15d3dd10d2599fc9a236b5bbd8bd8f2776 09-Dec-2013 Kenny Root <kroot@google.com> Late binding: address review comments

The parameter could still be null at this point, but it should not be
accepted since null obviously wouldn't match one of the given key
classes or formats.

Change-Id: I0ab4d6dc0d805232bf1b487320802b7a910ccc16
ecurity/Provider.java
0c1869ed7f46baf764f9daf4e64c77cd7fbd3516 29-Nov-2013 Narayan Kamath <narayan@google.com> Add a JNI wrapper over libziparchive.

All functions delegate directly to the native code. We
do not perform any sort of central directory or local file
related lookups in the java layer.

For each entry, libziparchive gives us an offset to the start
of data for the entry and the compressed size. We use a
RandomAccessFile to seek to that offset and then construct an
InputStream that's bounded between [offset, offset + compressed_size).

We reuse existing code (JarVerifier / Manifest) for certificate
validation & collection.

bug: 10193060

Change-Id: I21eb4e6dc6aa8749e3f63830f9799e1f621d26e6
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarVerifier.java
til/jar/StrictJarFile.java
til/zip/ZipEntry.java
til/zip/ZipFile.java
96b5cd9e9282467a854ad7cf05ccb3f9904af530 05-Dec-2013 Narayan Kamath <narayan@google.com> Fix Signature#getInstance.

The returned class didn't override the full set of
SignatureSpi methods, meaning that some method calls
wouldn't be sent down to the SPI delegate.

Also add some missing @Override annotations, remove
pointless comments and make a private field final.

bug: https://code.google.com/p/android/issues/detail?id=63139
Change-Id: I00762213a4afad0dc69e385105043b01aa77bb95
ecurity/Signature.java
1bb8f7e39ce504504e0576dcb784406949ca506e 05-Dec-2013 Kenny Root <kroot@google.com> Late binding: Provider.Service#supportsParameter

First step in late-binding support. This will be used later to support
late binding by rejecting possible providers using the supportsParameter
call.

This allows security providers to specify attributes in their
registration that allow the Security framework to filter them out
earlier instead of failing on instantiation. The attributes supported in
this change are SupportedKeyClasses and SupportedKeyFormats.

Change-Id: Iee954e2b6c95c41d3b45aa738e869471fbe14341
ecurity/Provider.java
3e478f0dbd7bb982fb36d96bfec09f14271d9c05 04-Dec-2013 Xizhi Zhu (Steven) <xizhi.zhu@gmail.com> Used constant time comparison to avoid timing attacks.

The previous implementation leaves a chance for timing attacks.

Change-Id: I7db4ca25de0ed89723af37655e1a25e15750fd31
Signed-off-by: Xizhi Zhu <xizhi.zhu@gmail.com>
ecurity/MessageDigest.java
466cd23668f659aa859921e3475fe09f3f6a0789 27-Nov-2013 Narayan Kamath <narayan@google.com> Merge "Fix an ASCIICharsetEncoderTest testcase."
bd024cc687470a008999d96fd3af4a1261413d55 26-Nov-2013 Narayan Kamath <narayan@google.com> Fix several decoder bugs.

- NativeConverter should report unterminated character
sequences to managed code.
- CharsetDecoderIcu should report those errors correctly
from flush()
- InputStreamReader should check the return value of
flush() and not ignore it altogether.

bug: 11665359
bug: 10729779

Change-Id: Ic678a645a4ef2b3fe70e2c900c0cd393679f1037
o/InputStreamReader.java
io/charset/CharsetDecoderICU.java
f15b280ac1c2e32f7becdb314440c2999dc8d204 26-Nov-2013 Narayan Kamath <narayan@google.com> Fix an ASCIICharsetEncoderTest testcase.

Deal with truncated char sequences correctly.

bug: 10729779
Change-Id: I232b0ec899084270a6d621e6c7292ef8b94f8f7d
io/charset/CharsetEncoderICU.java
0cd5793c546811f24a9d193bfe164d9fac8f2a6e 25-Nov-2013 Narayan Kamath <narayan@google.com> am 38bf01ef: am 59872bf3: Merge "Fix stream flushing when SYNC_FLUSH is set."

* commit '38bf01efaad2db7267b5881baed6276f767ba6d3':
Fix stream flushing when SYNC_FLUSH is set.
86ffcb99f901809c923fc8f1dbce0d39a9cf6080 22-Nov-2013 Narayan Kamath <narayan@google.com> Fix stream flushing when SYNC_FLUSH is set.

bug: https://code.google.com/p/android/issues/detail?id=62589
Change-Id: I8d569b8ecf21857df5f3d1e8ad88cd95139ab09c
til/zip/DeflaterOutputStream.java
6be37f5f3d46daecf6c0d3e1078e25cca3ce4732 22-Nov-2013 The Android Open Source Project <initial-contribution@android.com> Merge commit '0a56e711dc7b1a310f57c58f5cb61add4808f713' into HEAD

Change-Id: I883352e71c7d5f057764bdb822836023e57b6ba9
9d1efd271bf631776e0e5ec3418f94592b730743 22-Nov-2013 Narayan Kamath <narayan@google.com> am f36ad155: am d60fc5d0: Merge "Don\'t turn on sync flush by default."

* commit 'f36ad15527edc489b9f7c8baee298d121ed76aae':
Don't turn on sync flush by default.
f36ad15527edc489b9f7c8baee298d121ed76aae 22-Nov-2013 Narayan Kamath <narayan@google.com> am d60fc5d0: Merge "Don\'t turn on sync flush by default."

* commit 'd60fc5d021a7b9d32042ab88a34a7fbdb5f3d5f8':
Don't turn on sync flush by default.
fc806e9720a2d3e1026accb1512841ae530be59c 22-Nov-2013 Narayan Kamath <narayan@google.com> am eaa0add6: am 48132b98: Merge "Minor cleanup of deepHashCode / deepEquals."

* commit 'eaa0add6aaa503221a530d346a3b4a066bc46449':
Minor cleanup of deepHashCode / deepEquals.
eaa0add6aaa503221a530d346a3b4a066bc46449 22-Nov-2013 Narayan Kamath <narayan@google.com> am 48132b98: Merge "Minor cleanup of deepHashCode / deepEquals."

* commit '48132b983c042646324666fa401768f92e4713c9':
Minor cleanup of deepHashCode / deepEquals.
c57d3bbeb0059318deb0deb1c173035002fec259 22-Nov-2013 Narayan Kamath <narayan@google.com> am 0af9d85d: am 2e8bdf33: Merge "Make PipedWriter#flush throw if the reader is closed."

* commit '0af9d85d7071ca74b12418595b8c42533007fad5':
Make PipedWriter#flush throw if the reader is closed.
c3ebf15fd3e23fbde95700866b447e8769cb9cb6 22-Nov-2013 Narayan Kamath <narayan@google.com> am 2376ea8c: am 270ee7a8: Merge "Document some surprising GregorianCalendar behavior."

* commit '2376ea8c093f83a3109f9e53f4859f174c7f74a6':
Document some surprising GregorianCalendar behavior.
16e51356fde1352cad638511a0e483b95a9da1f1 22-Nov-2013 Narayan Kamath <narayan@google.com> am 7e528a4a: am bd03ef07: Merge "Improve URI.equals performance."

* commit '7e528a4abc3001c269142c4e3b8e17427d932ba0':
Improve URI.equals performance.
d6aba0dcafb39f47c7dbb5f4849ba404c0a1b06c 22-Nov-2013 Narayan Kamath <narayan@google.com> am 7420e424: am 68cf52ad: Merge "Clean up & fix PipedInputStreamTest."

* commit '7420e4247b897a723c6a04c05e70eebcd556af8d':
Clean up & fix PipedInputStreamTest.
0af9d85d7071ca74b12418595b8c42533007fad5 22-Nov-2013 Narayan Kamath <narayan@google.com> am 2e8bdf33: Merge "Make PipedWriter#flush throw if the reader is closed."

* commit '2e8bdf3373bd03428d5e122868e760b7e1377a46':
Make PipedWriter#flush throw if the reader is closed.
2376ea8c093f83a3109f9e53f4859f174c7f74a6 22-Nov-2013 Narayan Kamath <narayan@google.com> am 270ee7a8: Merge "Document some surprising GregorianCalendar behavior."

* commit '270ee7a8ac9a4289070cb4c48dcd440637b79f28':
Document some surprising GregorianCalendar behavior.
7e528a4abc3001c269142c4e3b8e17427d932ba0 22-Nov-2013 Narayan Kamath <narayan@google.com> am bd03ef07: Merge "Improve URI.equals performance."

* commit 'bd03ef0737fcf43d654840987ea2f3f1b5dadffa':
Improve URI.equals performance.
7420e4247b897a723c6a04c05e70eebcd556af8d 22-Nov-2013 Narayan Kamath <narayan@google.com> am 68cf52ad: Merge "Clean up & fix PipedInputStreamTest."

* commit '68cf52ad370bed0652d50feeda8f56f044e0874e':
Clean up & fix PipedInputStreamTest.
ef52f50af5f5f5f234b73e638755731c5a49d6b2 21-Nov-2013 Narayan Kamath <narayan@google.com> Don't turn on sync flush by default.

Sync flush can be dangerous if used incorrectly (overly frequently
flushes can result in bad compression rations), also flush() here
has slightly different semantics from usual stream flushes (in that
they rarely affect the contents of the streams themselves).

See related issue:
https://code.google.com/p/android/issues/detail?id=62589

Change-Id: I97389c5924f3c338913df39830f27aedbfc3c440
til/zip/GZIPOutputStream.java
09940729ddaf3bfdfa5a04ac69d18b3d84c8b663 18-Nov-2013 Narayan Kamath <narayan@google.com> Minor cleanup of deepHashCode / deepEquals.

These methods used equals() comparisons where identity
checks would've sufficient. As expected, this results in a
small but measurable performance increase on both art
& dalvik.

---------------------- After --------------
ART:
arrayLength benchmark us linear runtime
1 DeepHashCode 8.08 =
1 Equals 17.68 =
4 DeepHashCode 8.63 =
4 Equals 18.20 =
16 DeepHashCode 19.59 =
16 Equals 41.19 =
256 DeepHashCode 255.41 =
256 Equals 483.61 ==
2048 DeepHashCode 2321.91 ==============
2048 Equals 4932.40 ==============================
Dalvik:
arrayLength benchmark us linear runtime
1 DeepHashCode 32.7 =
1 Equals 65.3 =
4 DeepHashCode 34.4 =
4 Equals 67.7 =
16 DeepHashCode 76.0 =
16 Equals 142.8 =
256 DeepHashCode 755.6 =
256 Equals 1515.6 ===
2048 DeepHashCode 6915.4 ===============
2048 Equals 13786.6 ==============================

------------------------ Before --------------------
Art:
arrayLength benchmark us linear runtime
1 DeepHashCode 8.13 =
1 Equals 17.86 =
4 DeepHashCode 8.63 =
4 Equals 18.92 =
16 DeepHashCode 19.59 =
16 Equals 40.89 =
256 DeepHashCode 253.88 =
256 Equals 477.02 ==
2048 DeepHashCode 2795.26 ================
2048 Equals 4962.11 ==============================

Dalvik:
arrayLength benchmark us linear runtime
1 DeepHashCode 32.8 =
1 Equals 66.7 =
4 DeepHashCode 34.4 =
4 Equals 70.1 =
16 DeepHashCode 74.1 =
16 Equals 147.9 =
256 DeepHashCode 805.0 =
256 Equals 1573.2 ===
2048 DeepHashCode 7253.4 ===============
2048 Equals 14349.8 ==============================

bug: 9320068

Change-Id: Id73bf38dd0777b2ec9004a2941523d082bbc74c9
til/Arrays.java
0048bf7983e68d6d99b7b1332db8a2239de50949 19-Nov-2013 Narayan Kamath <narayan@google.com> Make PipedWriter#flush throw if the reader is closed.

bug: 11666814
Change-Id: I25dc56f5e50e0cfb14e5781e953115864be612a9
o/PipedReader.java
o/PipedWriter.java
270ee7a8ac9a4289070cb4c48dcd440637b79f28 20-Nov-2013 Narayan Kamath <narayan@google.com> Merge "Document some surprising GregorianCalendar behavior."
4eb6dd5362871b00084b2fe0cfb4f4b87f052d4c 20-Nov-2013 Narayan Kamath <narayan@google.com> Document some surprising GregorianCalendar behavior.

bug: https://code.google.com/p/android/issues/detail?id=61993

Change-Id: I1725808187f23ddaa6ab1d14348c3b7702a5f833
til/GregorianCalendar.java
0b217ad34f025aedbba468e248303bdc8b2e5df0 19-Nov-2013 Narayan Kamath <narayan@google.com> Improve URI.equals performance.

The main improvement is that we're vastly reducing
the amount of garbage this method creates.

Also, get rid of some incorrect checks and add a new
benchmark test case.

Before vs. After:

URI Equals 1540.1 =
URI EqualsWithHeavilyEscapedComponent 11921397.1 ==============================

URI Equals 1337.2 =
URI EqualsWithHeavilyEscapedComponent 588934.3 ==============================

Change-Id: I9ddb87b8267f0ac6a3ac85c2989cc0dd305ef6a1
et/URI.java
19509358bac0d311c0eeecc8c12b2cd3d0d635d4 19-Nov-2013 Narayan Kamath <narayan@google.com> Clean up & fix PipedInputStreamTest.

Add additional documentation where necessary.

bug: 11666814
Change-Id: I622d180c89f835e9466c7efe8f6a079c2516b73f
o/PipedInputStream.java
o/PipedOutputStream.java
284abb4cc77f4f68499fe3d28e638bc0e5fd4c57 14-Nov-2013 Elliott Hughes <enh@google.com> am 08cb1939: am ef6fd3c8: Merge "Tidy up some of the deflater documentation."

* commit '08cb1939eeed6fa9a1bb44fd14c24b2d25c3244a':
Tidy up some of the deflater documentation.
08cb1939eeed6fa9a1bb44fd14c24b2d25c3244a 14-Nov-2013 Elliott Hughes <enh@google.com> am ef6fd3c8: Merge "Tidy up some of the deflater documentation."

* commit 'ef6fd3c86bb5186469343d8220713be854947c7a':
Tidy up some of the deflater documentation.
a98ba29c98e7941698ce79232b328ceaba07cbc1 14-Nov-2013 Elliott Hughes <enh@google.com> Tidy up some of the deflater documentation.

Bug: https://code.google.com/p/android/issues/detail?id=61841
Change-Id: I91f200865834e9bce17cf116e6359b9fea385693
til/zip/Deflater.java
til/zip/InflaterInputStream.java
3e645a5beec837600997656ec286eb364b3a928c 13-Nov-2013 Narayan Kamath <narayan@google.com> am 2c1a7907: am 7462be28: Merge "Make some sense of Jar parsing / verification"

* commit '2c1a790793f67f53dc0cc66765c60c178516632b':
Make some sense of Jar parsing / verification
2c1a790793f67f53dc0cc66765c60c178516632b 13-Nov-2013 Narayan Kamath <narayan@google.com> am 7462be28: Merge "Make some sense of Jar parsing / verification"

* commit '7462be2874160fc50f21e3de0a0daebb44fad7bd':
Make some sense of Jar parsing / verification
1222b64d823e028efa6f02b08a55d788bfd57b16 07-Nov-2013 Narayan Kamath <narayan@google.com> Make some sense of Jar parsing / verification

This is the first step towards the end goal of
decoupling JarVerifier / Manifest & ManifestReader
from the public API classes JarFile & JarInputStream.

- This removes some horrible looking hacks

My goal is to decouple JarVerifier / Manifest &
ManifestReader from JarFile / ZipFile and friends.

This also necessiated a pretty big rewrite of JarInputStream
and hopefully it reads a lot clearer now.

- Fix some weird variable naming & null checks
- Remove some horrible message passing code between
JarInputStream and ZipInputStream
- Also, create a BAOS with the appropriate size,
if available.

Tested: harmony/archive.tests.java.util.jar.JarInputStreamTest
Tested: harmony/archive.tests.java.util.jar.JarFileTest

bug: 10193060

Change-Id: I7c39f2cc92a62a2110627ee6473df43d3efb3fe3
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/zip/ZipInputStream.java
0f702e293cb57da788261a80abc84391543f6791 13-Sep-2013 Elliott Hughes <enh@google.com> Clean up CharsetDecoder and CharsetEncoder.

This patch also fixes a few bugs, and a few test bugs, and then the bugs
exposed by fixing those tests.

(cherry picked from commit 6ad37f500b023ef09fd177ad8cd8e2ba0b842cae)

Change-Id: Ia58d30e414cc59c27a1d259e8056523d6df2c6bc
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
ecaad2eb243bfad1533d4d8c37903462c4e8a624 02-Oct-2013 Hiroshi Yamauchi <yamauchi@google.com> Fix a CTS SystemTest.testArrayCopyNull failure due to

a3eb10feba1c3479ad99ef5c5323d011a5365f4b

(cherry picked from commit 73d6e091ebad0ac8b046787cb561af10ffb1477d)

Change-Id: I887ba21cba79d1d9b29dad17017d16bcd7296bba
ang/System.java
bbd614097092aab00a97813fa0bdaa10cd3b3f2b 01-Aug-2012 Ian Rogers <irogers@google.com> Move (double|float)To(Long|Int)Bits into Java code.

(cherry picked from commit e6b64228bbced53d952ba64a3f6ce95f69ce0368)

Change-Id: I8685fcac437a38df4a2105244b8482f84cd746d1
ang/Double.java
ang/Float.java
32254e6ea30b2a5a261979cdfcf0702ef869743f 07-Nov-2013 Brian Carlstrom <bdc@google.com> Merge "Revert "Fix the HashMap performance regression.""
4c53e2a95910ab8ff82f0dbb34fdec69a07365f6 07-Nov-2013 Brian Carlstrom <bdc@google.com> Merge changes Ia515759d,I5243c012

* changes:
A simple set of JNI argument passing tests.
Fix an array copy optimization bug.
6700ff25c868ded76d3d2e3b837b3c25fac1d62f 07-Nov-2013 Brian Carlstrom <bdc@google.com> Merge "A char array copy optimization (libcore)."
2255d0e9fe90f59867527c0ac2e84daa0cd221c8 07-Nov-2013 Narayan Kamath <narayan@google.com> am cea1e839: Merge "Fix a few more oddities in JarFile"

* commit 'cea1e83975cbc62536468cbfa25308c9aef0dfa1':
Fix a few more oddities in JarFile
82b4bd4b109e700e2c06fc5657f5958601e97241 07-Nov-2013 Narayan Kamath <narayan@google.com> am 692543a3: Merge "Remove non-api use of Vector."

* commit '692543a3cd6145b5fc49afa4873f9fd2b1463c9e':
Remove non-api use of Vector.
ac9ede5af6bee11a6362533f8eb54d1ba6c386da 07-Nov-2013 Narayan Kamath <narayan@google.com> am 46bf3637: Merge "Make effectiveDirectAddress final."

* commit '46bf363768c4bd8da416333f6d238ea93637c4e9':
Make effectiveDirectAddress final.
8e7269f4cf396274f1b9f710ddca779ed2147cd0 07-Nov-2013 Narayan Kamath <narayan@google.com> am 0851829f: Merge "Don\'t force MemoryBlocks on classes that don\'t care."

* commit '0851829f89172a6861da283d97eaee1f02badaf7':
Don't force MemoryBlocks on classes that don't care.
913d5005ab8ce6f2542766b67e6486b4e5d1f11f 06-Nov-2013 Narayan Kamath <narayan@google.com> Fix a few more oddities in JarFile

- Make fields final where they can be made so
- Make an anonymous class static and move its
definition outside a function

Change-Id: I15846d2308ced2d3b2d6f3e015930c58adab0dfa
til/jar/JarEntry.java
til/jar/JarFile.java
3769c4580d3c66ead7ec552acd1f53fc7d4a4460 06-Nov-2013 Narayan Kamath <narayan@google.com> Remove non-api use of Vector.

Also gets rid of some unnecessary allocations.

Change-Id: I9dd8caa5505472293b1829e0ac1825a0e1c6255a
til/jar/JarVerifier.java
2589e301d1fb85960045c9ef29682d7e73b1aee7 05-Nov-2013 Narayan Kamath <narayan@google.com> Make effectiveDirectAddress final.

Also add a unit test to make sure elementSizeShift
is set correctly.

Change-Id: Ia6c797001a768fa1c3136d475f2ac0e047b35fb0
io/Buffer.java
io/ByteArrayBuffer.java
io/ByteBuffer.java
io/ByteBufferAsCharBuffer.java
io/ByteBufferAsDoubleBuffer.java
io/ByteBufferAsFloatBuffer.java
io/ByteBufferAsIntBuffer.java
io/ByteBufferAsLongBuffer.java
io/ByteBufferAsShortBuffer.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/DirectByteBuffer.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/MappedByteBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
44bc12dfe2e22cfb86dd619f35f040f3e0628aab 01-Mar-2013 Elliott Hughes <enh@google.com> Revert "Fix the HashMap performance regression."

This reverts commit e2f220961759e31c94bfa770b6a6ddbf019c16d9, which
is not needed in dalvik-dev.

Bug: 8290590

(cherry picked from commit 5dae6c76579dd59717fcb379060d9b27ad368107)

Change-Id: Ic0333b886575ef578fb088a3e85c769670f8fe85
til/HashMap.java
til/LinkedHashMap.java
9edc1d397e9de3d50cbebd550262a51a6926e924 22-Aug-2013 Hiroshi Yamauchi <yamauchi@google.com> A char array copy optimization (libcore).

- Based on measurements, copy char by char for arrays of length <= 64.
- With this change, the Ritz MemAllocBench got ~25% faster on Nexus 4
and ~20% faster on host.
- This change only handles arraycopy calls in the core libraries and
char arrays with the rest future work.

Bug: 7103825

(cherry picked from commit a3eb10feba1c3479ad99ef5c5323d011a5365f4b)

Change-Id: Ic002ced3bc2f2a682cd4b8cec07ede990edd7463
ang/System.java
369c46ce938ac502b2d005cdc8464cd19d771de3 15-Oct-2013 Hiroshi Yamauchi <yamauchi@google.com> Fix an array copy optimization bug.

When we copy within the same array, we need to take care of
overlapping range cases and copy backward in some cases. Verifed with
TestBigDecimal and CTS tests.api.java.math.BigDecimalTest.

Bug: 11233386
Bug: 9986565

(cherry picked from commit 7f2504897c33ab3c312028b4546818bc2d037bc7)

Change-Id: I5243c01222c58c137ad2595048372022c689576d
ang/System.java
ac96decfea84ebdccb308492acb01454c8823c2c 05-Nov-2013 Narayan Kamath <narayan@google.com> Don't force MemoryBlocks on classes that don't care.

Only MappedByteBuffer and DirectByteBuffer need to know
about this abstraction.

Change-Id: I293284c8b8a73ac01463337dc8a1e22d16cd378d
io/Buffer.java
io/ByteArrayBuffer.java
io/ByteBuffer.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/MappedByteBuffer.java
io/ShortBuffer.java
92918daeb43dbb9079f1f856c5a18329da82c15a 04-Nov-2013 Oliver Woodman <olly@google.com> Merge "Make getInetAddress generate less garbage." into klp-dev
87093a8b17f669c5c1487549a43e2b811b6fafea 04-Nov-2013 Oliver Woodman <olly@google.com> Merge "Remove UnsafeByteSequence." into klp-dev
93da7dfb1f3c08400831606d3666569be8a7c067 30-Oct-2013 Narayan Kamath <narayan@google.com> Remove use of UnsafeByteSequence.

We get most of the way there with BAOS in this use case,
except that we pay for additional locking and a call to
Charsets.forName.

JarFileBenchmark results :

AFTER
0% filename=/system/framework/bouncycastle.jar 989706.59 ns; stddev=28699.19 ns @ 10 trials
33% filename=/system/framework/core.jar 1115640.38 ns; stddev=13687.70 ns @ 10 trials
67% filename=/system/framework/framework.jar 1027097.16 ns; stddev=33908.38 ns @ 10 trials

BEFORE
0% filename=/system/framework/bouncycastle.jar 1016998.68 ns; sttdev=9393.46 ns @ 3 trials
33% filename=/system/framework/core.jar 1163348.29 ns; sttdev=42646.58 ns @ 10 trials
67% filename=/system/framework/framework.jar 1042157.91 ns; sttdev=32679.86 ns @ 10 trials

(Cherry picked from b7d186b5f0d2a6406146ad1f366642d86f5e6933)

Bug: b/11411129
Change-Id: Ib94789fb8396b4f2aad31cc8232b6f0bb0672238
til/jar/ManifestReader.java
c7b35cdea3d660c8d4b77e11fa0ef19f6ca17db9 30-Oct-2013 Narayan Kamath <narayan@google.com> Remove UnsafeByteSequence.

Replace it with a smaller, less general class for reading
the contents of a file into a byte array or a string.

Remove the need for an additional buffer and instead read
the contents of the file directly into a buffer owned by
FileReader. Optimise for the case where the length
of the file is known.

This imposes the additional restriction on callers that the
path of the file they're reading is an absolute path. I've
checked that all callers obey that currently.

(Cherry picked from b0674a77ed67e30f2510064b89151002d7f2eb2a)

Bug: b/11411129
Change-Id: Ic020a45051416f2de9a2f78bd5f99a21feff17df
ang/UnsafeByteSequence.java
671a834be6d345a7df01ba19407dd1c96509c785 29-Oct-2013 Narayan Kamath <narayan@google.com> Make getInetAddress generate less garbage.

This function is now on the critical path for URLConnection
since OkHttp calls it to figure out what the MTU for the
NetworkInterface is.

This function performs poorly when there are a large
number of interfaces available.

- Read /proc/net/if_inet6 exactly once, instead of
once per interface.
- List the contents of /sys/class/net exactly once,
and not once per interface.

Also adds a couple of tests for if_inet6 parsing.

TODO: Add a "zero copy" version of UnsafeByteSequence
and then move readIntFile over to that version.

(Cherry picked from ab6d858336e6db8b5117b78837fee2a9f35fdf2c)

Bug: b/11411129

Change-Id: Ieb1d5f0beaf462721f897a5f6376a4587f3aebaf
et/NetworkInterface.java
b4ae662bab0ea279b136b5f462635d335a610570 01-Nov-2013 Narayan Kamath <narayan@google.com> am 6ce57c99: Merge "Remove UnsafeByteSequence."

* commit '6ce57c994dcb3a7a6e22fa45fd489e54960458d3':
Remove UnsafeByteSequence.
b0674a77ed67e30f2510064b89151002d7f2eb2a 30-Oct-2013 Narayan Kamath <narayan@google.com> Remove UnsafeByteSequence.

Replace it with a smaller, less general class for reading
the contents of a file into a byte array or a string.

Remove the need for an additional buffer and instead read
the contents of the file directly into a buffer owned by
FileReader. Optimise for the case where the length
of the file is known.

This imposes the additional restriction on callers that the
path of the file they're reading is an absolute path. I've
checked that all callers obey that currently.

Change-Id: Ic020a45051416f2de9a2f78bd5f99a21feff17df
ang/UnsafeByteSequence.java
e806161e098daf0707355610ebb943889b78f396 31-Oct-2013 Elliott Hughes <enh@google.com> am 098bb42a: Merge "Fix java.util.Random performance regression."

* commit '098bb42a1d39e180dd4bf8de0f6c6707cdd366d7':
Fix java.util.Random performance regression.
c5722b61dd9da95dd0f05cd7f57027b88bf16dd3 31-Oct-2013 Mathieu Chartier <mathieuc@google.com> Fix java.util.Random performance regression.

With the monitor change in ART, getting the identity hash code of an
object puts the hash code in the lock word. This hurts performance
if you synchronize on said object since it makes it that we always
go slow path for monitor enter and exit. Although the fix
allocates a new object in the Random constructor, it should not cause
performance problems assuming people don't excessively create new
random number generators.

Change-Id: I750e57fb7c5f70e66ad85d19e2c065e9e52a613f
til/Random.java
c2e813f18927dd44dcddadd3ed41b1b1d25d55da 30-Oct-2013 Narayan Kamath <narayan@google.com> am 9f7d979e: Merge "Remove use of UnsafeByteSequence."

* commit '9f7d979e81187d085d13047ecde3400a7916f40f':
Remove use of UnsafeByteSequence.
b7d186b5f0d2a6406146ad1f366642d86f5e6933 30-Oct-2013 Narayan Kamath <narayan@google.com> Remove use of UnsafeByteSequence.

We get most of the way there with BAOS in this use case,
except that we pay for additional locking and a call to
Charsets.forName.

JarFileBenchmark results :

AFTER
0% filename=/system/framework/bouncycastle.jar 989706.59 ns; stddev=28699.19 ns @ 10 trials
33% filename=/system/framework/core.jar 1115640.38 ns; stddev=13687.70 ns @ 10 trials
67% filename=/system/framework/framework.jar 1027097.16 ns; stddev=33908.38 ns @ 10 trials

BEFORE
0% filename=/system/framework/bouncycastle.jar 1016998.68 ns; sttdev=9393.46 ns @ 3 trials
33% filename=/system/framework/core.jar 1163348.29 ns; sttdev=42646.58 ns @ 10 trials
67% filename=/system/framework/framework.jar 1042157.91 ns; sttdev=32679.86 ns @ 10 trials

Change-Id: Ib94789fb8396b4f2aad31cc8232b6f0bb0672238
til/jar/ManifestReader.java
2ac4552fe88e3f85a0b7d53d17e90aa05832ba2f 30-Oct-2013 Narayan Kamath <narayan@google.com> am 8457464b: Merge "Remove some reflection from java.util.jar.Manifest."

* commit '8457464b56a9cd47e362d2bbbcd61d98fbb15b94':
Remove some reflection from java.util.jar.Manifest.
825452a333b2429a5649761b8fcc4a65cfcc41d4 30-Oct-2013 Narayan Kamath <narayan@google.com> Remove some reflection from java.util.jar.Manifest.

The "fast path" broke the ByteArrayInputStream contract
that the array that backs it should never change.

Change-Id: I8d3f2995d9a1cd0712fb2bf26f387340b5f4f9fd
til/jar/Manifest.java
f98984498daf9805b940c2b304572a677cc4aa79 30-Oct-2013 Narayan Kamath <narayan@google.com> am 676ce12e: Merge "Make getInetAddress generate less garbage."

* commit '676ce12e65abd5a9b5aae9662e4a78f6b0cb1487':
Make getInetAddress generate less garbage.
ab6d858336e6db8b5117b78837fee2a9f35fdf2c 29-Oct-2013 Narayan Kamath <narayan@google.com> Make getInetAddress generate less garbage.

This function is now on the critical path for URLConnection
since OkHttp calls it to figure out what the MTU for the
NetworkInterface is.

This function performs poorly when there are a large
number of interfaces available.

- Read /proc/net/if_inet6 exactly once, instead of
once per interface.
- List the contents of /sys/class/net exactly once,
and not once per interface.

Also adds a couple of tests for if_inet6 parsing.

TODO: Add a "zero copy" version of UnsafeByteSequence
and then move readIntFile over to that version.

bug: 11411129
Change-Id: Ieb1d5f0beaf462721f897a5f6376a4587f3aebaf
et/NetworkInterface.java
2b3e7f088598d3a750e3bfd02d06813d75ed6aa5 29-Oct-2013 Elliott Hughes <enh@google.com> am a431b0b9: Merge "Fix a java.util.Timer documentation typo."

* commit 'a431b0b96ee96c316e2b9d5b3b8024c034b4e172':
Fix a java.util.Timer documentation typo.
8827d2815c80c042e0c2235c5b7212227029fbf6 29-Oct-2013 Elliott Hughes <enh@google.com> Fix a java.util.Timer documentation typo.

Bug: https://code.google.com/p/android/issues/detail?id=61577
Change-Id: I3f585d8de79ab41df7a2fce684cbd6c5b4eb9375
til/Timer.java
23c359e0d0170d905340d8afd80c7833e0966034 23-Oct-2013 Narayan Kamath <narayan@google.com> am 569ee5e9: Merge "Fix a bug in AbstractStringBuilder#deleteCharAt0"

* commit '569ee5e9d7be50257e96409d0886f0c899f718e6':
Fix a bug in AbstractStringBuilder#deleteCharAt0
cb3a4d2fd82759b64c13f60643b4450a5236885f 21-Oct-2013 Narayan Kamath <narayan@google.com> Fix a bug in AbstractStringBuilder#deleteCharAt0

Deleting the last char in the buffer should trigger
a buffer copy if it's shared, otherwise the last
character of any Strings that share this buffer might
change.

Fix this by rewriting deleteCharAt0 in terms of delete0
after performing the right set of range checks.

Also, add a few more tests for delete().

This corrects the errors made in ag/68250 where I assumed
that we should throw if start == count.

Change-Id: I5ef0dbea212e87f1221f4daeead290e4442dc197
ang/AbstractStringBuilder.java
32ddd00f00bd1727bf7bb803fb5836ce531e5e1c 18-Oct-2013 Elliott Hughes <enh@google.com> am 24c44b46: Merge "Revert "Fix a bug in AbstractStringBuilder#deleteCharAt0""

* commit '24c44b46d7ecf99fdb31ec630c12403933f1e32a':
Revert "Fix a bug in AbstractStringBuilder#deleteCharAt0"
f752cb7846153b618823e6cb21e94f5bd1ee6f4a 18-Oct-2013 Elliott Hughes <enh@google.com> Revert "Fix a bug in AbstractStringBuilder#deleteCharAt0"

This reverts commit 3d625c0f09e99a3fff2ff2cb12700bdeeede335a.

Change-Id: I865284848d9bc4b361679c46dc7164a54eb5f556
ang/AbstractStringBuilder.java
d1dde5b07ce3844986e9e78252ea2b0afe70a9e4 18-Oct-2013 Narayan Kamath <narayan@google.com> am 510a94df: Merge "Fix a bug in AbstractStringBuilder#deleteCharAt0"

* commit '510a94df8b924552edd195a800f4243ccf228b0b':
Fix a bug in AbstractStringBuilder#deleteCharAt0
3d625c0f09e99a3fff2ff2cb12700bdeeede335a 17-Oct-2013 Narayan Kamath <narayan@google.com> Fix a bug in AbstractStringBuilder#deleteCharAt0

Deleting the last char in the buffer should trigger
a buffer copy if it's shared, otherwise the last
character of any Strings that share this buffer might
change.

To fix this, rewrite deleteCharAt0 in terms of delete0
and fix delete0 to throw when start == count == end.

This issue has been around since cupcake or earlier.

https://code.google.com/p/android/issues/detail?id=60639

Change-Id: I34ed1e20220391c5ac648c0f874be10c87801d9b
ang/AbstractStringBuilder.java
4a7dad55632a4b8ae5a0326faf0bc536eb9cb1fb 16-Oct-2013 Elliott Hughes <enh@google.com> am f81c365a: Merge "Improve SocketChannel documentation."

* commit 'f81c365ac1664a2339cbad371d25f0620aa8ebc7':
Improve SocketChannel documentation.
f81c365ac1664a2339cbad371d25f0620aa8ebc7 16-Oct-2013 Elliott Hughes <enh@google.com> Merge "Improve SocketChannel documentation."
e511aea1e52d9b7f5d7b1e43d0bd915e775f1177 16-Oct-2013 Elliott Hughes <enh@google.com> am 0f4e2c63: Merge "Use @throws rather than the deprecated and unusual @exception."

* commit '0f4e2c632a4891fb3519a062ae58958017c6378f':
Use @throws rather than the deprecated and unusual @exception.
2b76e189396417017cb84776d7466940c6fe2f3c 16-Oct-2013 Elliott Hughes <enh@google.com> Improve SocketChannel documentation.

Bug: https://code.google.com/p/android/issues/detail?id=61006
Change-Id: I37d96034922ff53c263363a7543a46fb9cafd133
io/channels/SocketChannel.java
38f3983aed5a093c17d1f68c1517bbc72c2862ea 15-Oct-2013 Elliott Hughes <enh@google.com> Use @throws rather than the deprecated and unusual @exception.

Change-Id: I69d94fae14a6153ef227352e1e159697db8d618d
ang/AbstractStringBuilder.java
ang/StringToReal.java
io/Buffer.java
io/ByteBuffer.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/ShortBuffer.java
io/SocketChannelImpl.java
ecurity/GuardedObject.java
ecurity/cert/Certificate.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
til/LinkedHashMap.java
til/TreeSet.java
til/jar/Attributes.java
til/jar/JarEntry.java
til/zip/Deflater.java
til/zip/ZipOutputStream.java
7aa074aba165b0df6b5d47386853ac5edb6907ac 15-Oct-2013 Elliott Hughes <enh@google.com> am 9b3e8afc: Merge "Improve the charAt documentation."

* commit '9b3e8afcd31ca87a561fd42032472b07c683f9e9':
Improve the charAt documentation.
adf1aa88864d176ab08f95b9ea6fffc744b64ae7 15-Oct-2013 Elliott Hughes <enh@google.com> Improve the charAt documentation.

Bug: https://code.google.com/p/android/issues/detail?id=61010
Change-Id: Iecdda7dfd9d47b2269ae7713b4a7cdb340f9219a
ang/AbstractStringBuilder.java
ang/CharSequence.java
io/CharBuffer.java
ba7e87db8b9a121e8fb3f8ee868f27054b124825 02-Oct-2013 Kenny Root <kroot@google.com> am 34f81a14: ZipFile: fix comparison for offset, pt 2

* commit '34f81a14c7c4002ab141ba90b2498974211b7df2':
ZipFile: fix comparison for offset, pt 2
8e3ffa3d68611664ab5dceb8b918d9528458ea3b 02-Oct-2013 Kenny Root <kroot@google.com> am a0f57f03: Merge "ZipFile: fix comparison for offset" into klp-dev

* commit 'a0f57f03512611f0c734d1cf00602f5c08bc593d':
ZipFile: fix comparison for offset
34f81a14c7c4002ab141ba90b2498974211b7df2 02-Oct-2013 Kenny Root <kroot@google.com> ZipFile: fix comparison for offset, pt 2

Also remove the "byteOffset" value for the length calculation.

Bug: 10947135
Change-Id: I6cbe3ed5552cd595020e8f3d0099daab6cada88e
til/zip/ZipFile.java
81e81ce7aa930332cbc35d06809b11b6d8fe2251 27-Sep-2013 Kenny Root <kroot@google.com> ZipFile: fix comparison for offset

The "byteOffset" value for the reading buffer was being checked against
the RandomAccessFile length value which didn't make much sense. Remove
that line to restore sanity.

Bug: 10947135
Change-Id: I4f85f5f1e162aeb19ff876a32e5b22bb876aacdb
til/zip/ZipFile.java
2c9e33e32f89dd6c8461474cdd8949f1b06adca3 13-Sep-2013 Elliott Hughes <enh@google.com> am 16882522: Merge "Clean up CharsetDecoder and CharsetEncoder."

* commit '16882522e9c5fd8e153b45b25df6bcf70fabb914':
Clean up CharsetDecoder and CharsetEncoder.
16882522e9c5fd8e153b45b25df6bcf70fabb914 13-Sep-2013 Elliott Hughes <enh@google.com> Merge "Clean up CharsetDecoder and CharsetEncoder."
6ad37f500b023ef09fd177ad8cd8e2ba0b842cae 13-Sep-2013 Elliott Hughes <enh@google.com> Clean up CharsetDecoder and CharsetEncoder.

This patch also fixes a few bugs, and a few test bugs, and then the bugs
exposed by fixing those tests.

Change-Id: Id52f8d9d8c812847ed7af36e8f8721c933f819c1
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
92489df467c195d2d86f39ebb2850f738231f39b 13-Sep-2013 Kenny Root <kroot@google.com> am 7cf6bbf9: Merge "Make documentation on InputStream#skip more clear"

* commit '7cf6bbf93d07301b2f2341872a0a6d400e836b07':
Make documentation on InputStream#skip more clear
e7dc52f0cbb61a61b9908a9b1e7b58a34e12a06c 12-Sep-2013 Kenny Root <kroot@google.com> Make documentation on InputStream#skip more clear

On first reading the documentation for InputStream#skip seemed to imply
that 0 was only returned when n was 0. Reworded this to make it clearer
to the reader that sentence only applies when n is less than 0.

Change-Id: I5b3d70f87551cc54d80da7d978c2187a78bc39c1
o/InputStream.java
329464137899a6d5613e366089b782a4ca582a5a 11-Sep-2013 Kenny Root <kroot@google.com> am b241b288: Merge "Revert "Revert "Reconcile differences between zip implementations""" into klp-dev

* commit 'b241b2887828e09eeda73e56a4b7e9533e042d01':
Revert "Revert "Reconcile differences between zip implementations""
3d2b2ad2cd1f05ba72a550082083da4b5898f30b 11-Sep-2013 Kenny Root <kroot@google.com> Revert "Revert "Reconcile differences between zip implementations""

This reverts commit c2bcd6f029fa02657889af1120f2eaaf73da968e.

Bug: 10424836
Change-Id: I63f801c4f451383bfadd9c76f99c3ebb2726e7b0
til/zip/ZipEntry.java
til/zip/ZipFile.java
5ed6e03e99ab6f54dadedf4c3cca7305d1ac1c7a 11-Sep-2013 Brian Carlstrom <bdc@google.com> am bb12b6a4: Merge "Revert "Reconcile differences between zip implementations"" into klp-dev

* commit 'bb12b6a4e849b30b423713643c11079018a91539':
Revert "Reconcile differences between zip implementations"
c2bcd6f029fa02657889af1120f2eaaf73da968e 11-Sep-2013 Kenny Root <kroot@google.com> Revert "Reconcile differences between zip implementations"

This reverts commit bb68396d3c4262760055101cbf18c80999c692f5.

Change-Id: I56daf02fe24cc592844a5d0a9f1ca7432da2293e
til/zip/ZipEntry.java
til/zip/ZipFile.java
858605b33ed433b2ff34edf61134650c4799d969 11-Sep-2013 Kenny Root <kroot@google.com> am 2c8b5b68: Merge "Reconcile differences between zip implementations" into klp-dev

* commit '2c8b5b68ed8ffcf426946ba418b0ab44b4adc400':
Reconcile differences between zip implementations
bb68396d3c4262760055101cbf18c80999c692f5 21-Aug-2013 Kenny Root <kroot@google.com> Reconcile differences between zip implementations

Reconcile the difference between ZipFileRO and java.util.ZipFile to have
the same behavior.

Bug: 10424836
Change-Id: I6dcbb5234142dc8574052be2b18f062ef2e93b02
til/zip/ZipEntry.java
til/zip/ZipFile.java
75f27e89f4e07e3804875645e13f56478670bd63 10-Sep-2013 Elliott Hughes <enh@google.com> am 01315a97: Merge "Fix a bug in DateFormat, clean up some SimpleDateFormat tests."

* commit '01315a97ca26347c3d47859cfe6a92c60c03dc39':
Fix a bug in DateFormat, clean up some SimpleDateFormat tests.
018b61546e6a69ff9c5105ec017c85df641766c4 10-Sep-2013 Elliott Hughes <enh@google.com> Fix a bug in DateFormat, clean up some SimpleDateFormat tests.

We failed a couple of tests because of an assumption about the default
time zone:

junit.framework.AssertionFailedError: Wrong format: " d" expected: 12 result: 11
at java.text.SimpleDateFormatTest.test(SimpleDateFormatTest.java:55)
at org.apache.harmony.tests.java.text.SimpleDateFormatTest.test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition(SimpleDateFormatTest.java:347)

junit.framework.AssertionFailedError: Wrong result: h input: 12 expected: Thu Jan 01 00:00:00 UTC 1970 result: Thu Jan 01 08:00:00 UTC 1970
at java.text.SimpleDateFormatTest.parse(SimpleDateFormatTest.java:86)
at org.apache.harmony.tests.java.text.SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition(SimpleDateFormatTest.java:546)

Cleaning up the tests and merging OldSimpleDateFormatTest into
SimpleDateFormatTest accidentally made one of our tests more
strict, at which point it failed because we weren't updating the
FieldPosition for 'z' or 'Z' when formatting or parsing. So this
patch fixes that by mapping the DateFormat.Field to the appropriate
int for Calendar.

Change-Id: If4b2f2c02d8ccd50d96d77df3b60e1c1d65ae666
ext/DateFormat.java
826908ba13d4f2073498772497a85686e5e2d907 04-Sep-2013 Elliott Hughes <enh@google.com> am 084a11c9: There\'s no space in "KitKat".

* commit '084a11c99172f083b0887438428a0df91065a1ed':
There's no space in "KitKat".
084a11c99172f083b0887438428a0df91065a1ed 04-Sep-2013 Elliott Hughes <enh@google.com> There's no space in "KitKat".

Just a kind of groove between the bars.

Change-Id: I311f14c3910646ab1716961d5be03b1457a61905
til/Locale.java
1bbe93d326ab27dbd12156f82ba303def435cb5e 03-Sep-2013 Elliott Hughes <enh@google.com> am 413d4592: Use the docs-approved Android x.y (Name) format consistently.

* commit '413d4592ee114eac81014af4b6347e73873ce8ce':
Use the docs-approved Android x.y (Name) format consistently.
413d4592ee114eac81014af4b6347e73873ce8ce 03-Sep-2013 Elliott Hughes <enh@google.com> Use the docs-approved Android x.y (Name) format consistently.

Also include the API level where the reason for mentioning the version
is an API difference (as opposed to simply a behavioral difference).

Change-Id: Idd69630fc5d6f6f0bd5d1c524cb32fd8c2fb750d
et/HttpURLConnection.java
ext/SimpleDateFormat.java
til/Locale.java
0930425fc3c583de22eea5286e0b20384b42c481 31-Aug-2013 Elliott Hughes <enh@google.com> am 3ea6d4db: Merge "Wrong bit masks: always return false"

* commit '3ea6d4db17fc7c939293d6303e319bb897190309':
Wrong bit masks: always return false
229269b70bb8d0819c475bd675740465c063e0c8 31-Aug-2013 Elliott Hughes <enh@google.com> am 922ce230: Merge "Fix harmony java.text test failures."

* commit '922ce2301f54eb3a9e8879d73aec5a14ed27d066':
Fix harmony java.text test failures.
3ea6d4db17fc7c939293d6303e319bb897190309 31-Aug-2013 Elliott Hughes <enh@google.com> Merge "Wrong bit masks: always return false"
922ce2301f54eb3a9e8879d73aec5a14ed27d066 31-Aug-2013 Elliott Hughes <enh@google.com> Merge "Fix harmony java.text test failures."
74473971cc9d960376295fbcc430320c9ed62991 29-Aug-2013 Elliott Hughes <enh@google.com> Fix harmony java.text test failures.

There were plenty of bad tests here, but there were some real bugs too.

* DecimalFormat was only handling RoundingMode.UNNECESSARY for double
formatting.

* DecimalFormat was not ensuring that it's superclass' fields were
being correctly updated.

* NumberFormat was throwing NPE for a null object because of an
improved detail message, despite being specified to throw IAE.

* We weren't mapping NumberFormat.Field instances to the corresponding icu4c
UNUM_x_FIELD constant, so we weren't actually setting FieldPosition
objects correctly.

* SimpleDateFormat was not formatting milliseconds correctly with 'S'.

* NativeDecimalFormat wasn't handling JNI NewString OOME correctly.

Bug: 2528220
Bug: 3056865
Bug: 3057080
Bug: 3057090
Change-Id: Iac11f902f2e9649e596e7e7b7bc501b13e956fca
ext/Bidi.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/FieldPosition.java
ext/NumberFormat.java
ext/SimpleDateFormat.java
4d75d062fa8392cb914829394f8bc76822fbc741 29-Aug-2013 You Kim <you.kim72@gmail.com> Wrong bit masks: always return false

Typo in java.util.concurrent.ConcurrentHashMap.contendedLock()

Change-Id: I672c9c82e095c3471e40b7db0945349a9065f206
til/concurrent/ConcurrentHashMap.java
ffb89a3567411de5e3483fcbfb208f866840a456 28-Aug-2013 Kenny Root <kroot@google.com> am b1f05c97: Merge "Add missing closing paren to DSAParams doc"

* commit 'b1f05c9760568fbf192bbeea4b04f9a8a427dd61':
Add missing closing paren to DSAParams doc
773bfea1f9e2fd26eb7e860e2c0d62f4211ed880 28-Aug-2013 Kenny Root <kroot@google.com> Add missing closing paren to DSAParams doc

Change-Id: I8a40a03fee4c0f048f70af2286ae3a78da9e6ad4
ecurity/interfaces/DSAParams.java
c57660eaa458d1833ff04cdea0a2f599fdc5a0df 27-Aug-2013 Elliott Hughes <enh@google.com> am 08d54f2a: Merge "Fix German date parsing."

* commit '08d54f2ade97bdb71ef2e518a93bf3d09a64bcb2':
Fix German date parsing.
482b89bdd3e2069852061909f35823ab7dba844f 27-Aug-2013 Elliott Hughes <enh@google.com> Fix German date parsing.

CLDR changed German from having a mix of 3- and 4-character abbreviated month
names (such as "Juli" and "Aug"[ust]) to having only 4-character names by
adding periods to the end of abbreviated names (giving "Juli" and "Aug.").
This means that a date formatted with the old data (by jb-mr1, say) can't
be parsed with the new data (in jb-mr2, say). Work around this by doing what
icu4c's SimpleDateFormat::parse does --- accepting "xxx" as a match for "xxx.".

Bug: https://code.google.com/p/android/issues/detail?id=59383
Bug: 10511599

(cherry picked from commit df0ad3c0e7a4b15fc7ac16b7aaf6be3e7acfa309)

Change-Id: Iefa65f8399a5657f7060d40baab43f909d4b0481
ext/SimpleDateFormat.java
df0ad3c0e7a4b15fc7ac16b7aaf6be3e7acfa309 27-Aug-2013 Elliott Hughes <enh@google.com> Fix German date parsing.

CLDR changed German from having a mix of 3- and 4-character abbreviated month
names (such as "Juli" and "Aug"[ust]) to having only 4-character names by
adding periods to the end of abbreviated names (giving "Juli" and "Aug.").
This means that a date formatted with the old data (by jb-mr1, say) can't
be parsed with the new data (in jb-mr2, say). Work around this by doing what
icu4c's SimpleDateFormat::parse does --- accepting "xxx" as a match for "xxx.".

Bug: https://code.google.com/p/android/issues/detail?id=59383
Bug: 10511599
Change-Id: I021ea8ffeea37ea2cae943a84cdd2babb337301d
ext/SimpleDateFormat.java
3b91d105cbd66fabcb5f4bf5d7a257cb58364bbb 27-Aug-2013 Elliott Hughes <enh@google.com> Merge "Improve the sort documentation slightly." into klp-dev
223ab34ad4890414b278a1e7893a99220c8f3203 27-Aug-2013 Elliott Hughes <enh@google.com> Fix ByteBuffer.duplicate documentation.

Bug: https://code.google.com/p/android/issues/detail?id=59403

(cherry picked from commit 1c298efc60083a2ce5bdbf3febb942f5ce4c621d)

Change-Id: Iff5df247768e87cc92cb7dcc390fe58dc738642f
io/ByteBuffer.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/ShortBuffer.java
8691dcf7c114c429dc451b306dcfd399b9aa4e45 27-Aug-2013 Elliott Hughes <enh@google.com> Improve the sort documentation slightly.

Make it a little clearer when ClassCastException can be thrown.

Bug: 10491028

(cherry picked from commit 35def4c9d5fb52e0eb2cb4fa7d8d10618d7e8baa)

Change-Id: I421fb03e8a58fdfebce86f434bf8813075d9bf2f
til/Arrays.java
til/Collections.java
1345c429dd172cb672332181fdf7376a92c7f15b 27-Aug-2013 Elliott Hughes <enh@google.com> am 9868ccd0: Merge "Fix ByteBuffer.duplicate documentation."

* commit '9868ccd02b6a8a8425c7fe7427033aa7fa6fdead':
Fix ByteBuffer.duplicate documentation.
36446f87db1ff9ec1fa10faa4d80cff95d781756 27-Aug-2013 Elliott Hughes <enh@google.com> am 55a005a7: Merge "Improve the sort documentation slightly."

* commit '55a005a777ab4ef60ea6069176a46fbed5721b84':
Improve the sort documentation slightly.
9868ccd02b6a8a8425c7fe7427033aa7fa6fdead 27-Aug-2013 Elliott Hughes <enh@google.com> Merge "Fix ByteBuffer.duplicate documentation."
1c298efc60083a2ce5bdbf3febb942f5ce4c621d 27-Aug-2013 Elliott Hughes <enh@google.com> Fix ByteBuffer.duplicate documentation.

Bug: https://code.google.com/p/android/issues/detail?id=59403
Change-Id: I5107cb8e5c486fcf1fa9080c5c248a63d8d50665
io/ByteBuffer.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/ShortBuffer.java
35def4c9d5fb52e0eb2cb4fa7d8d10618d7e8baa 27-Aug-2013 Elliott Hughes <enh@google.com> Improve the sort documentation slightly.

Make it a little clearer when ClassCastException can be thrown.

Bug: 10491028
Change-Id: I05647f888c3aec02949408acf40390fcec1cc703
til/Arrays.java
til/Collections.java
224eac38f9d12acf212022fe2275117c01ba8b3d 22-Aug-2013 Vladimir Marko <vmarko@google.com> Fix PriorityQueue.removeAt(.), call siftUp(.) if needed.

Bug: 10424240

(cherry picked from commit cc9eae501ba0064681e44e175f2afdc6c190d9ca)

Change-Id: Id62d69926235912d047c71975bdb541f1cf67ad7
til/PriorityQueue.java
a6c449700d27f6440c18c4f4c2a608a4bd40f528 22-Aug-2013 Elliott Hughes <enh@google.com> am a48bdc23: Merge "Fix PriorityQueue.removeAt(.), call siftUp(.) if needed."

* commit 'a48bdc23fc37b44ded3618a96d274d04c9eb6aab':
Fix PriorityQueue.removeAt(.), call siftUp(.) if needed.
cc9eae501ba0064681e44e175f2afdc6c190d9ca 22-Aug-2013 Vladimir Marko <vmarko@google.com> Fix PriorityQueue.removeAt(.), call siftUp(.) if needed.

Bug: 10424240
Change-Id: I6bbe0bb4da008bc9b7c0b006985fa7d5631b094f
til/PriorityQueue.java
613ebea3da2d973bbe6496d6e57eb4c8d75b148e 21-Aug-2013 Kenny Root <kroot@google.com> Fix extra and comment ordering in ZipEntry reading

(cherry picked from commit c242577b1569f97f806ef176e4549141df147b78)

Bug: 10424836
Change-Id: I99e6722ef898baa7f9a2d56e84e88aae5a6c9f4a
til/zip/ZipEntry.java
574d4b1c619d802347b36c968758b1672268f681 21-Aug-2013 Kenny Root <kroot@google.com> am 99aaedc2: Merge "Fix extra and comment ordering in ZipEntry reading"

* commit '99aaedc26d15bff0760ecb44e5e80d399f5cd691':
Fix extra and comment ordering in ZipEntry reading
99aaedc26d15bff0760ecb44e5e80d399f5cd691 21-Aug-2013 Kenny Root <kroot@google.com> Merge "Fix extra and comment ordering in ZipEntry reading"
c242577b1569f97f806ef176e4549141df147b78 21-Aug-2013 Kenny Root <kroot@google.com> Fix extra and comment ordering in ZipEntry reading

Change-Id: I99e6722ef898baa7f9a2d56e84e88aae5a6c9f4a
til/zip/ZipEntry.java
15f84c5d814595fd3ac757890c4b2715d052b936 21-Aug-2013 Elliott Hughes <enh@google.com> am 74ba1d83: Merge "Fix Fix all backwards (-1 == x) tests."

* commit '74ba1d8397674ff54f7ec8def7c7cc86abeb6f49':
Fix Fix all backwards (-1 == x) tests.
87c12db778a8d8621d885b5b92e86b905d0f210c 21-Aug-2013 Henrik Baard <henrik.baard@sonymobile.com> Fix Fix all backwards (-1 == x) tests.

Change-Id: I37ea9729cca6324af44a7dd7358fe030c1fe2b21
o/BufferedInputStream.java
20bcec87d24710e0d0469020f8738583218ab5bb 21-Aug-2013 Elliott Hughes <enh@google.com> Merge "Fix java.util.Scanner bugs." into klp-dev
bfd75e1f43a71cad8aaa67fe87b1c2ca8f6d8b28 21-Aug-2013 Elliott Hughes <enh@google.com> am 0c325125: Merge "Clarify that nanoTime works between processes"

* commit '0c3251258bdbcc9c77797ba9b7566814eede3749':
Clarify that nanoTime works between processes
2f0f3abdc79453f62c6404e62a55f860589e40d8 20-Aug-2013 Elliott Hughes <enh@google.com> am d9763d2d: Merge "Fix java.util.Scanner bugs."

* commit 'd9763d2df166b08322c7017f22dc6cde01358d98':
Fix java.util.Scanner bugs.
aa4fd93a51d2463736631f383378723c0634ffe1 20-Aug-2013 Elliott Hughes <enh@google.com> am 16088967: Merge "Fix all backwards (-1 == x) tests."

* commit '16088967bccc9e86d77c3eff4efc20426fe1ed46':
Fix all backwards (-1 == x) tests.
577a49d540a7191fbb3c15311f6229e7a75ed6e6 20-Aug-2013 Glenn Kasten <gkasten@google.com> Clarify that nanoTime works between processes

(cherry-pick of a00497d7629726a7d258cefb7318d4ee2cd10c56.)

Change-Id: I16800bdc8fb1fe45128d3f2f8be97bd7977f8a63
ang/System.java
84dc741f553e9f1f98456fe983bff2fb9914d727 20-Aug-2013 Elliott Hughes <enh@google.com> Fix java.util.Scanner bugs.

Also improve the documentation for java.util.regex.Matcher and unify the Scanner tests.

Bug: 10310707
Bug: https://code.google.com/p/android/issues/detail?id=40555

(cherry picked from commit 56ff05b16d4a82bc2386082409c78c3d94e0df01)

Change-Id: I4d7ff44a77768821970c9bab560d5facdb75e1b9
til/Scanner.java
til/regex/Matcher.java
d9763d2df166b08322c7017f22dc6cde01358d98 20-Aug-2013 Elliott Hughes <enh@google.com> Merge "Fix java.util.Scanner bugs."
454684cbffa16064281c824b0c89c2407c48a26c 20-Aug-2013 Elliott Hughes <enh@google.com> Fix all backwards (-1 == x) tests.

Change-Id: Idbee45f00da4e107fcdcf0b4c66f3a485c9e1972
o/BufferedInputStream.java
til/EnumMap.java
56ff05b16d4a82bc2386082409c78c3d94e0df01 20-Aug-2013 Elliott Hughes <enh@google.com> Fix java.util.Scanner bugs.

Also improve the documentation for java.util.regex.Matcher and unify the Scanner tests.

Bug: 10310707
Bug: https://code.google.com/p/android/issues/detail?id=40555
Change-Id: I97bd8243845aaa31c084c8424eceb41bbcd8ebbd
til/Scanner.java
til/regex/Matcher.java
a00497d7629726a7d258cefb7318d4ee2cd10c56 20-Aug-2013 Glenn Kasten <gkasten@google.com> Clarify that nanoTime works between processes

Change-Id: I7b71096aa5189c6f31d18931ebe95dc20478a9f1
ang/System.java
ac237f25ddde747c8ace3b0cdf6c46755f7e6fad 20-Aug-2013 Elliott Hughes <enh@google.com> am f8b8752f: Merge "Fix Selector\'s handling of POLLHUP."

* commit 'f8b8752fbd17032200d1da81e84543702faba218':
Fix Selector's handling of POLLHUP.
a7f57f4eeb646195183b6a7fecf38cf35b37b196 20-Aug-2013 Elliott Hughes <enh@google.com> Fix Selector's handling of POLLHUP.

Bug: 10310709

(cherry picked from commit ed3322f25d79b6607fc314d75f96d46b7c783f43)

Change-Id: I3f9ce080170ed49f46650420673ca27863381852
io/SelectorImpl.java
ed3322f25d79b6607fc314d75f96d46b7c783f43 20-Aug-2013 Elliott Hughes <enh@google.com> Fix Selector's handling of POLLHUP.

Bug: 10310709
Change-Id: I5e4f0def0a5dd0aacc28012373884053aad30bdc
io/SelectorImpl.java
ecf40f195f858228bc4919fdb462d47440e45a16 19-Aug-2013 Elliott Hughes <enh@google.com> am 5368649d: Merge "Improve the Random.next documentation."

* commit '5368649d72f73024396649439a02c4873ff42578':
Improve the Random.next documentation.
70472307c91efa252485136ba61d9a27f8137bc3 19-Aug-2013 Elliott Hughes <enh@google.com> Improve the Random.next documentation.

Change-Id: Iee5a82d48f107d85101bf8c40f173d6d29915b8e
til/Random.java
ce0a61aeee907b9bc576fb30826c72fa1150e502 17-Aug-2013 Elliott Hughes <enh@google.com> am f4ba11ac: Merge "Fix a bunch of Charset tests."

* commit 'f4ba11accbbda9fa136510304174579a0f23c65b':
Fix a bunch of Charset tests.
f5d8857b623192a985e449453de5bf1efaa4ea79 16-Aug-2013 Elliott Hughes <enh@google.com> Fix a bunch of Charset tests.

The isRegistered test is still failing. The problem is that icu4c's
convrtrs.txt has names like "windows-1252" that are both the canonical
name for one charset and an alias for another legacy charset. I need
to work out how to resolve that.

Bug: 10210999

(cherry picked from commit ea1caf4ccc5c2255f384c0774aa9e055763a6a41)

Change-Id: I83cf1b9ae1d29f9956f443ef914a3e473e0f4692
io/charset/Charset.java
f4ba11accbbda9fa136510304174579a0f23c65b 17-Aug-2013 Elliott Hughes <enh@google.com> Merge "Fix a bunch of Charset tests."
f7f4ef9667c3c48cb396827d89ebb2286d13fba3 17-Aug-2013 Elliott Hughes <enh@google.com> am a4d8429f: Merge "Synced java.util.concurrent library up to 2013.07.01."

* commit 'a4d8429f8b1062fee0b1ded9b653bd06f66f23ec':
Synced java.util.concurrent library up to 2013.07.01.
a4d8429f8b1062fee0b1ded9b653bd06f66f23ec 17-Aug-2013 Elliott Hughes <enh@google.com> Merge "Synced java.util.concurrent library up to 2013.07.01."
ea1caf4ccc5c2255f384c0774aa9e055763a6a41 16-Aug-2013 Elliott Hughes <enh@google.com> Fix a bunch of Charset tests.

The isRegistered test is still failing. The problem is that icu4c's
convrtrs.txt has names like "windows-1252" that are both the canonical
name for one charset and an alias for another legacy charset. I need
to work out how to resolve that.

Bug: 10210999
Change-Id: If3425321c814622e4f54b2efca95a767bd16c080
io/charset/Charset.java
75a06e56a4cc4599946e21422513e4bafa759509 09-Jul-2013 Calin Juravle <calin@google.com> Synced java.util.concurrent library up to 2013.07.01.

Compared to the reference code base I re-added
AbstracMap as a base class for ConcurrentHashMap.

Change-Id: I0751638784e962425418ea8640721c00d7200873
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/CountedCompleter.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
a5f118521e68d6fe33e639dd004a4457b5c40e09 14-Aug-2013 Elliott Hughes <enh@google.com> am b8e456e3: More Charset test fixes.

* commit 'b8e456e3b6d9184d81760a9b68cd1103e610846a':
More Charset test fixes.
b8e456e3b6d9184d81760a9b68cd1103e610846a 14-Aug-2013 Elliott Hughes <enh@google.com> More Charset test fixes.

Bug: 10210999

(cherry picked from commit c44b103bfd1a79762811d2125e9b94ce37300a44)

Change-Id: If28d9e2eb3d1d148863f0a08c1e17371918fcaa2
io/charset/Charset.java
2eed3c29d4c902b960e19f2f8de1f2dbfd96a315 14-Aug-2013 Elliott Hughes <enh@google.com> Merge "More Charset test fixes."
4db411a41dab6ab7bf71fcb3e7dbabbe9c64f4d1 14-Aug-2013 Elliott Hughes <enh@google.com> am dc531917: Merge "Remove the unimplemented java.text.spi and java.util.spi packages."

* commit 'dc531917bd4e01cf63b79e3795809b065feccf48':
Remove the unimplemented java.text.spi and java.util.spi packages.
71dc4f7d4829335f7aba5414b43d16cd316ba22f 31-Jul-2013 Brian Carlstrom <bdc@google.com> Refactor ART java.lang.reflect implementation

Bug: 10014286.

(cherry picked from commit 1222a700a25956b0e3634731160017f0d3aa0585)

Change-Id: Ic5672489f6c028d47e6c2a499d6a2bbdd5cc4e4c
ang/reflect/Modifier.java
c44b103bfd1a79762811d2125e9b94ce37300a44 14-Aug-2013 Elliott Hughes <enh@google.com> More Charset test fixes.

Bug: 10210999
Change-Id: Ie0686dae1e0b9dc016c1e99af8d9d4e146d73abd
io/charset/Charset.java
75fe6e1ac1d72f8efc01e68a98ccab6513366ebf 14-Aug-2013 Elliott Hughes <enh@google.com> Remove the unimplemented java.text.spi and java.util.spi packages.

These were never implemented, and can't be implemented given our icu4c-based
i18n implementation.

Change-Id: Ie1f264186b4d8a86e64906715d09a681b3c12445
ext/spi/BreakIteratorProvider.java
ext/spi/CollatorProvider.java
ext/spi/DateFormatProvider.java
ext/spi/DateFormatSymbolsProvider.java
ext/spi/DecimalFormatSymbolsProvider.java
ext/spi/NumberFormatProvider.java
til/spi/CurrencyNameProvider.java
til/spi/LocaleNameProvider.java
til/spi/LocaleServiceProvider.java
til/spi/TimeZoneNameProvider.java
9edca89080204647492b04f848107bcb90798a1c 14-Aug-2013 Elliott Hughes <enh@google.com> Work around icu4c causing canEncode to always return true for surrogates.

Bug: 10310751

(cherry picked from commit bb317b5a6ff071ee4ffa0b4e811367be962238b7)

Change-Id: Id31ea5715c1e3f744ed8eb33d6a7f3cca03159d1
io/charset/CharsetEncoder.java
bb317b5a6ff071ee4ffa0b4e811367be962238b7 14-Aug-2013 Elliott Hughes <enh@google.com> Work around icu4c causing canEncode to always return true for surrogates.

Bug: 10310751
Change-Id: I4631dbe0a4bd836af1057d95ba1b58bf704816eb
io/charset/CharsetEncoder.java
b70d0551100794ca2687bec0115571f9fab52fe4 13-Aug-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of 465008a4 to jb-mr2-dev-plus-aosp

Change-Id: Ic74f1a90347998122c69b312cb591ecbf09323de
465008a40dee670be5fec7fc4de77eba93fa0aef 13-Aug-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of 15fd7684 to jb-mr2-dev

Change-Id: I08a339b40bef989b54f5952b89cb41ad3385e8cc
15fd7684de1af7d5f9e76d5bb8695c1fda036ad0 13-Aug-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of 6ee07507 to jb-mr1-dev-plus-aosp

Change-Id: Iea67d0b1dd161ea565d31af29f15ee5c1892915e
0ec7b45b6b5b0262de4f0238d627ccbca7e91a83 13-Aug-2013 Elliott Hughes <enh@google.com> am bd825a7c: am 9f178544: am 44e8930b: Bumper ZipFile/ZipEntry backport.

* commit 'bd825a7c910cafd07ebc48c28dded158f29767cc':
Bumper ZipFile/ZipEntry backport.
bd825a7c910cafd07ebc48c28dded158f29767cc 13-Aug-2013 Elliott Hughes <enh@google.com> am 9f178544: am 44e8930b: Bumper ZipFile/ZipEntry backport.

* commit '9f1785441b6e81fe158b735c089758fde3b657ed':
Bumper ZipFile/ZipEntry backport.
9f1785441b6e81fe158b735c089758fde3b657ed 13-Aug-2013 Elliott Hughes <enh@google.com> am 44e8930b: Bumper ZipFile/ZipEntry backport.

* commit '44e8930b48015aacbad027c5a8d9a4c7e00e329e':
Bumper ZipFile/ZipEntry backport.
44e8930b48015aacbad027c5a8d9a4c7e00e329e 06-Aug-2013 Elliott Hughes <enh@google.com> Bumper ZipFile/ZipEntry backport.

Bug: https://code.google.com/p/android/issues/detail?id=58465
Bug: 8219321
Bug: 8476102
Bug: 8617715
Bug: 9695860
Bug: 9950697
Bug: 10148349
Bug: 10227498
Change-Id: I94c3e9664a429c94c336115618a46283a13996e0
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
4f048e215773f825ec8129363fd2eb989b6a272f 09-Aug-2013 Elliott Hughes <enh@google.com> am fdf82f8b: Merge "Fix various Charset tests, clean up the implementation."

* commit 'fdf82f8ba94915a263b418350c3b55ab42002841':
Fix various Charset tests, clean up the implementation.
8405b26225d88812bb336b2b6c0181266768c3f0 06-Aug-2013 Elliott Hughes <enh@google.com> Disallow filenames containing NUL bytes.

C code gets confused by such filenames, and even if we can handle them,
they're a misleading and of questionable utility because a valid pathname
can't contain a NUL byte.

Bug: https://code.google.com/p/android/issues/detail?id=58465
Bug: 10148349
Change-Id: I3f7e1a17c526b6bb5752dae82610125ad2648d54
(cherry picked from commit b1d05573ae20cdd3d5b4e25f905ce44c8f7d5c0e)
til/zip/ZipEntry.java
5ec6bf8d033754e06a463adb091d2c0afd0755ac 08-Aug-2013 Elliott Hughes <enh@google.com> Fix various Charset tests, clean up the implementation.

Bug: 10211558
Bug: 10211378
Change-Id: Ib3f97430f62163c0459c53e0c282ae0ca840e0af
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
io/charset/CharsetEncoderICU.java
io/charset/CoderResult.java
87f155f5761977276cd2aff66afe9312aefec02d 08-Aug-2013 Chad Brubaker <cbrubaker@google.com> Use uncompressed size for uncompressed zip entries

Use the uncompressed size when setting the length of entries stored
without compression, conistent with the other Zip implementations.

Bug: 10148349
Change-Id: I7559a32b1190d27d9e8e2bd3dd419171e971644d
til/zip/ZipFile.java
edbebbc8658a3517b9223b1b27927fdffd500661 07-Aug-2013 Elliott Hughes <enh@google.com> am 5a846f38: Merge "Improve a constant name and related comments."

* commit '5a846f3874cc3e0fa67e5dee1c5a8f83d9d440d6':
Improve a constant name and related comments.
a925c59e2a7a6ddc40f8bbc6e28697d7add63497 07-Aug-2013 Elliott Hughes <enh@google.com> am 0a1664dd: Merge "Rename InitManifest to ManifestReader."

* commit '0a1664ddae59d0be08955264e9c32eaca76f09ec':
Rename InitManifest to ManifestReader.
0e1d1de2f98541c57b222a7733b4492450dae733 06-Aug-2013 Elliott Hughes <enh@google.com> Merge "Fix ZipFile local file entry parsing."
16a25028cb607a2ea27908858ef5363c0b20e0b6 06-Aug-2013 Elliott Hughes <enh@google.com> Improve a constant name and related comments.

Change-Id: I607a084a31a9e941d17938eec10239776b19882a
til/zip/ZipOutputStream.java
3a99bc391e224b8f1d371955c61dd47642e25b53 06-Aug-2013 Elliott Hughes <enh@google.com> Rename InitManifest to ManifestReader.

Change-Id: I4bb53d7a625324c5b7ca28a3dc0759f2b107825f
til/jar/InitManifest.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/jar/ManifestReader.java
40996320ce46ca44f68b911f3b9e2bcdcf1168db 06-Aug-2013 Elliott Hughes <enh@google.com> am 31694145: Merge "Cache the few unique Attributes.Name values."

* commit '3169414555baa35aeca4028a5abda543a37c45cc':
Cache the few unique Attributes.Name values.
59675dbb837c2a92352032e2ef0c8fc3305da9c8 06-Aug-2013 Elliott Hughes <enh@google.com> Cache the few unique Attributes.Name values.

Google+ was seeing ~8k duplicate names. Their real fix is to not
accidentally cause us to parse their jar manifest, but we shouldn't
be unnecessarily wasteful in the common case, should anyone actually
need their jar manifest.

Change-Id: Ia06b0964956332975e5efd079d96aa76ba605f48
til/jar/Attributes.java
til/jar/InitManifest.java
til/jar/JarVerifier.java
til/jar/Manifest.java
12f61daa38a472fafa15b71f70b4ffafa8591968 02-Aug-2013 Elliott Hughes <enh@google.com> am 0c9024de: Merge "Minor cleanup from investigating UnixSelectorTest failures."

* commit '0c9024de8e594f6daa16217d339cb39cac0ea7e2':
Minor cleanup from investigating UnixSelectorTest failures.
318d6de23bec3024a85eb211f5843d925774622a 01-Aug-2013 Elliott Hughes <enh@google.com> Minor cleanup from investigating UnixSelectorTest failures.

This doesn't address the failures, but I'm moving on to look at the
other failures first.

Bug: 10127357
Change-Id: I6382e843bcb0d3e4b8726500beba2b5e123e9e01
io/SelectorImpl.java
e6aca39ed1c8279ceada88e272f5debeeb54087e 01-Aug-2013 Elliott Hughes <enh@google.com> am 0e42c47b: Merge "Fix a Selector bug and a test bug."

* commit '0e42c47b4bd2d59930f2caf54cadb016ddcfcbc7':
Fix a Selector bug and a test bug.
067e5d68f30887f1d53bf6afde6007beb749e2c5 01-Aug-2013 Elliott Hughes <enh@google.com> Fix a Selector bug and a test bug.

Bug: 10127357
Change-Id: I6d80586b243d6bd45fda5a36c043600d7528e891
io/SelectionKeyImpl.java
2993ed36295270cc6746d7bf88583ee7d9a4af4c 31-Jul-2013 Elliott Hughes <enh@google.com> am 5d3163e4: Merge "Improve Map documentation."

* commit '5d3163e446f35f6cbb25259efc253d070c8c1142':
Improve Map documentation.
8e3102e7940bb0817b0b2fc92d5f9fdcffc12ebf 31-Jul-2013 Elliott Hughes <enh@google.com> Improve Map documentation.

Bug: https://code.google.com/p/android/issues/detail?id=58255
Change-Id: Ibfc76628fc548d7f205d76603b6b1b72ceb3e66e
til/NavigableMap.java
til/SortedMap.java
2da1bf57a6631f1cbd47cdd7692ba8743c993ad9 21-Jul-2013 Elliott Hughes <enh@google.com> Fix ZipFile local file entry parsing.

The file name length is given in both the central directory entry
and the local file entry, with no consistency check. ZipInputStream
and the VM's native code both use the local file entry's value but
ZipFile was using the value from the central directory.

This patch makes ZipFile behave like the other two. (Even though,
unlike the others, ZipFile actually has enough information to detect the
inconsistency and reject the file.)

Bug: https://code.google.com/p/android/issues/detail?id=57851
Bug: 9950697
Change-Id: I1d58ac523ad2024baff1644d7bf822dae412495d
(cherry picked from commit 257d72c1b3a69e0af0abe44801b53966dbf7d214)
til/zip/ZipFile.java
8bb7bbad12d79f01c00cab515ecd290d560bd7f9 23-Jul-2013 Elliott Hughes <enh@google.com> am e5110fd4: am 320b233c: Merge "Remove HistoricalCharsetNames."

* commit 'e5110fd4c21fcf6dfe3253d989d40b747d8e7ef7':
Remove HistoricalCharsetNames.
e5110fd4c21fcf6dfe3253d989d40b747d8e7ef7 23-Jul-2013 Elliott Hughes <enh@google.com> am 320b233c: Merge "Remove HistoricalCharsetNames."

* commit '320b233c17ee4c743176e6ae2ace4825d1c0e1d8':
Remove HistoricalCharsetNames.
869c70395f50f75c4358fd47961af412db941405 23-Jul-2013 Elliott Hughes <enh@google.com> Update Locale documentation after icu4c 51 upgrade.

Change-Id: Id924fd12cbf6e1c5494a9f6d3b0d2a2daf72ef90
til/Locale.java
817b74b58acb99b2e161228e329a6e6ae2d9d62b 23-Jul-2013 Elliott Hughes <enh@google.com> Remove HistoricalCharsetNames.

Bug: 3032697
Change-Id: Idbf92cded4a7c55b97ee558b0fa844237d262206
o/HistoricalCharsetNames.java
o/InputStreamReader.java
o/OutputStreamWriter.java
io/charset/Charset.java
53296749ee56c64d566ed99b8d85ecbfeee86196 10-Jul-2013 Elliott Hughes <enh@google.com> am 131dcd13: Merge "Fix Selector to allow read and write at the same time."

* commit '131dcd13038e931d75cd3a63d14df0527670f7f3':
Fix Selector to allow read and write at the same time.
57656d21f772aacbe0d05e54b1274f4c58993a52 10-Jul-2013 Elliott Hughes <enh@google.com> Fix Selector to allow read and write at the same time.

Bug: https://code.google.com/p/android/issues/detail?id=57456
Change-Id: I29e6688aafce886803bbbd12793df3ab952459c8
io/SelectorImpl.java
029b00d62b71747b2a700788066f92a7dd8579e2 10-Jul-2013 Elliott Hughes <enh@google.com> am ec618403: Merge "Switch libcore from statfs to statvfs."

* commit 'ec618403efee992f232f017fbff1afff6cfa0de3':
Switch libcore from statfs to statvfs.
721ceca2a52a3c27aa751476c8562e1e68088e15 09-Jul-2013 Elliott Hughes <enh@google.com> Switch libcore from statfs to statvfs.

Change-Id: I5115b9203ce6b11c37c0eb41fbc84fa5962ce196
o/File.java
5288ef70edc3c2b12794a9d018c0aaa953ccebf4 08-Jul-2013 Alex Klyubin <klyubin@google.com> resolved conflicts for merge of 1cec2593 to jb-mr1-dev-plus-aosp

Change-Id: I4a8efbdeff28e5fba4a7a25002ab6a2856b34fd5
bcb7b42086b570995493ebee955a1fc46d52736d 08-Jul-2013 Elliott Hughes <enh@google.com> am d987149f: am 3802bbcf: am fe39951e: Values in ZIP files are unsigned.

* commit 'd987149f51ee632735cf359ec25cb6092d73aca0':
Values in ZIP files are unsigned.
d987149f51ee632735cf359ec25cb6092d73aca0 08-Jul-2013 Elliott Hughes <enh@google.com> am 3802bbcf: am fe39951e: Values in ZIP files are unsigned.

* commit '3802bbcf4c26ec7bf134ec1c7f98a40f55995413':
Values in ZIP files are unsigned.
3802bbcf4c26ec7bf134ec1c7f98a40f55995413 08-Jul-2013 Elliott Hughes <enh@google.com> am fe39951e: Values in ZIP files are unsigned.

* commit 'fe39951ed36353002263aefef7963a8c8b9c6441':
Values in ZIP files are unsigned.
9b0e19a42edab9f0426cff86d6ba41721d46750d 08-Jul-2013 Elliott Hughes <enh@google.com> am 1e1804d8: Merge "Permit content lengths greater than 2 GiB"

* commit '1e1804d82a82200f77edbf704cad825fea80527b':
Permit content lengths greater than 2 GiB
1e1804d82a82200f77edbf704cad825fea80527b 08-Jul-2013 Elliott Hughes <enh@google.com> Merge "Permit content lengths greater than 2 GiB"
f649e9972264cbe48f0be90c25e5661c50963f82 06-Jul-2013 jwilson <jwilson@squareup.com> Permit content lengths greater than 2 GiB

Change-Id: Id14de316d1eff3443ff9c91f098fe7ae4b6561cd
et/HttpURLConnection.java
fe39951ed36353002263aefef7963a8c8b9c6441 04-Jul-2013 Elliott Hughes <enh@google.com> Values in ZIP files are unsigned.

Bug: 9695860
Change-Id: I5c12dc5f3c70a9fe081adf5bf5b6b4b3a115e7e1
(cherry picked from commit 9edf43dfcc35c761d97eb9156ac4254152ddbc55)
til/zip/ZipEntry.java
til/zip/ZipFile.java
7f649edc647081ac299742607d7c497486ff41a7 04-Jul-2013 Elliott Hughes <enh@google.com> Values in ZIP files are unsigned.

Bug: 9695860

(cherry picked from commit 9edf43dfcc35c761d97eb9156ac4254152ddbc55)

Change-Id: Ic14eac58fdcfc343a9e23df8c26ba0dd24c9e189
til/zip/ZipEntry.java
til/zip/ZipFile.java
79ea6206d6c3bcbbd8ad199f69f5c989ad846c1c 04-Jul-2013 Elliott Hughes <enh@google.com> am 995537af: Merge "Values in ZIP files are unsigned."

* commit '995537af19719bf8c62f19b6df28d35ab52a5c4b':
Values in ZIP files are unsigned.
9edf43dfcc35c761d97eb9156ac4254152ddbc55 04-Jul-2013 Elliott Hughes <enh@google.com> Values in ZIP files are unsigned.

Bug: 9695860
Change-Id: I5c12dc5f3c70a9fe081adf5bf5b6b4b3a115e7e1
til/zip/ZipEntry.java
til/zip/ZipFile.java
263e4e7325f9f4d16936cd82be41385a212a59bd 03-Jul-2013 Elliott Hughes <enh@google.com> am 10d1f630: Merge "Fix Character.isWhitespace and Character.isSpaceChar."

* commit '10d1f630d8df0064ed966193fa8c9d10a96a8321':
Fix Character.isWhitespace and Character.isSpaceChar.
a7752f4d22097346dd7849b92b9f36d0a0a7a8f3 03-Jul-2013 Elliott Hughes <enh@google.com> Fix Character.isWhitespace and Character.isSpaceChar.

Also add tests so we can't drift again in future.

Bug: 9690863
Change-Id: If9d43a67a4879cb5c6b8e6cab5f7ffd7a93035ac
ang/Character.java
4cd0c93509d1b357fd658d122fcbfdcba8118aa5 03-Jul-2013 Elliott Hughes <enh@google.com> am 1962abb0: Merge "Retire the java.nio.charset.Charsets Charset constants."

* commit '1962abb0885d9750635f25d3eb2aa2c75ef00680':
Retire the java.nio.charset.Charsets Charset constants.
29377d58c8ffc0b54134f588084b8c1ab7c8c994 03-Jul-2013 Elliott Hughes <enh@google.com> Retire the java.nio.charset.Charsets Charset constants.

Change-Id: Icf339230e1f2789ccb5f7dbff99c760aba7b2456
io/charset/Charsets.java
9cb861facc2f70d7876de79a8ef83a82133c25d9 02-Jul-2013 Elliott Hughes <enh@google.com> am b6e8336a: Merge "Implement Character.isAlphabetic and Character.isIdeographic."

* commit 'b6e8336a21b18213c4729658d25f4735c514eb17':
Implement Character.isAlphabetic and Character.isIdeographic.
2d99feb311425dda5e5e2223626d30eb5a0ae95a 02-Jul-2013 Elliott Hughes <enh@google.com> Implement Character.isAlphabetic and Character.isIdeographic.

Bug: 3484927
Change-Id: I0360fca2adf366009a5c2ae0e6a18f4e975c481a
ang/Character.java
c611bca666f83409db0f274dcd7abf8c2d9d433a 02-Jul-2013 Elliott Hughes <enh@google.com> am 9642a650: Merge "Bring Character.UnicodeBlock up to Unicode 6.0."

* commit '9642a65009f5f986a341b5c265bae174d945aefb':
Bring Character.UnicodeBlock up to Unicode 6.0.
35edbd5fca5f4180fe7a57101a38ea01a2d9cc62 01-Jul-2013 Elliott Hughes <enh@google.com> Bring Character.UnicodeBlock up to Unicode 6.0.

Bug: 3484927
Bug: 9656330
Change-Id: I34dbf3398ed955a6c621e154a7c0e4c0b51b9ebd
ang/Character.java
til/regex/Pattern.java
3daf45b4f36523a826c2ed7714a1dc8f87c70371 29-Jun-2013 Elliott Hughes <enh@google.com> am b36484da: Merge "Simplify Character.UnicodeBlock."

* commit 'b36484da340c327e492b170d2e3cd64f948c1255':
Simplify Character.UnicodeBlock.
fed2ee9e249b952c76f11110c41b33c4829aa56f 29-Jun-2013 Elliott Hughes <enh@google.com> Simplify Character.UnicodeBlock.

Bug: 3484927
Change-Id: I6d2417e04fd65ee95160a54b08d7cd5210973354
ang/Character.java
dc36678d3ba7d256a79caf6c401e5fcee8b7d30d 29-Jun-2013 Elliott Hughes <enh@google.com> am c5cd81d1: Merge "Implement ZipFile.getComment."

* commit 'c5cd81d198a2c8196077af6d544bbe6daf02b421':
Implement ZipFile.getComment.
820c09bae53d20c5954d544ebc8a6ee8e54abbae 29-Jun-2013 Elliott Hughes <enh@google.com> Implement ZipFile.getComment.

Bug: 3484927
Change-Id: I30c30799aed1b3bbd1b2c90825685cea457600d1
til/zip/ZipFile.java
til/zip/ZipOutputStream.java
85fe9d70ed5939686ebb29034807f95d793198f7 29-Jun-2013 Elliott Hughes <enh@google.com> am 02127781: Merge "Add java.nio.charsets.StandardCharsets."

* commit '02127781afeb957f182d57f588053ee06ed3a6ab':
Add java.nio.charsets.StandardCharsets.
2a6f23ff8690ac2f025588a360547ce96cde0943 29-Jun-2013 Elliott Hughes <enh@google.com> Add java.nio.charsets.StandardCharsets.

Bug: 3484927
Change-Id: I5820267491b850b8fcc696fa48962710de123009
et/InetUnixAddress.java
et/Socks4Message.java
et/URLClassLoader.java
et/URLEncoder.java
io/charset/StandardCharsets.java
til/ResourceBundle.java
til/jar/InitManifest.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/prefs/AbstractPreferences.java
til/zip/ZipEntry.java
til/zip/ZipOutputStream.java
d5ff78bee6dcc6428bdbd44f04146f1987e7fb46 29-Jun-2013 Elliott Hughes <enh@google.com> am 52ac4053: Merge "Add syncFlush support to GZIPOutputStream."

* commit '52ac40530506afe4c5a85d370e04ee77e523b1fa':
Add syncFlush support to GZIPOutputStream.
35f9da25ee063a0d0c32f7246b466cff8e57c9ee 29-Jun-2013 Elliott Hughes <enh@google.com> Add syncFlush support to GZIPOutputStream.

Bug: 3484927
Change-Id: I9a2702970fe746b1f6bbbb438e4ce830e916bad4
til/zip/DeflaterOutputStream.java
til/zip/GZIPOutputStream.java
5e4829482fe61480088a30dd26e9229ab75f1f7b 28-Jun-2013 Elliott Hughes <enh@google.com> am d1d7384d: Merge "Implement java.util.Objects."

* commit 'd1d7384d00c53ea7cb0fe334654d5bcc7daced79':
Implement java.util.Objects.
4daf167bcaae54986cd4d9ad9b604700fde8f2fe 28-Jun-2013 Elliott Hughes <enh@google.com> Implement java.util.Objects.

Bug: 3484927
Change-Id: I759b10ff42ebbc5849b174241fa3d9b004e10959
til/Objects.java
f3a3cb4a17e11854a71bcf3c30aaa1a7e07b610b 28-Jun-2013 Elliott Hughes <enh@google.com> am e858ac84: Merge "Improve Scanner performance."

* commit 'e858ac84568552273ae47391ac9be139cf0fc608':
Improve Scanner performance.
5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7 27-Jun-2013 Elliott Hughes <enh@google.com> Improve Scanner performance.

We really don't want to compute a new regular expression and compile
it into a new Pattern every time we call nextInt (and friends). Adding
a single-element cache (flushed if the Scanner's locale changes) makes
this 100x faster. There still exists a pathological case where you
switch back and forth between bases.

Also improve the documentation to make it clearer that you really don't
want to use this awful class anyway.

Also bring back a few more of the tests we lost in the gingerbread timeframe.

Bug: https://code.google.com/p/android/issues/detail?id=57050
Change-Id: Id6095682fb44abae2887dda29dd3d32ac777c68f
til/Scanner.java
ee3299722d1df30e7250cbb8430427a65416eec6 25-Jun-2013 Elliott Hughes <enh@google.com> am ca4d71b0: Merge "Clean up the #read javadoc."

* commit 'ca4d71b0e4578698ee95d98c1e9402a34f40e035':
Clean up the #read javadoc.
325ff8c68ed5e530e9e1d487b9e2e6d8f8e2bd37 25-Jun-2013 Elliott Hughes <enh@google.com> Clean up the #read javadoc.

By being more consistent in parameter naming, we can inherit more javadoc.

Also fix a couple of javadoc warnings in KnownFailure and DataInputStream.

Change-Id: I778f40469404fb50c51cdb1068970974f923180c
o/BufferedInputStream.java
o/BufferedReader.java
o/ByteArrayInputStream.java
o/CharArrayReader.java
o/DataInputStream.java
o/FilterInputStream.java
o/FilterReader.java
o/InputStream.java
o/InputStreamReader.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/ObjectInput.java
o/ObjectInputStream.java
o/PipedInputStream.java
o/PipedReader.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/StringBufferInputStream.java
o/StringReader.java
et/PlainSocketImpl.java
io/SocketChannelImpl.java
io/channels/Channels.java
ecurity/DigestInputStream.java
til/jar/JarFile.java
til/jar/JarInputStream.java
til/zip/CheckedInputStream.java
til/zip/DeflaterInputStream.java
til/zip/GZIPInputStream.java
til/zip/InflaterInputStream.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
58a4696a387ba1bec629ebefcaa24fbf2bc0d9e5 22-Jun-2013 Elliott Hughes <enh@google.com> am cfc22029: Merge "Fix the SocketChannel accept locking behavior."

* commit 'cfc2202995730d853a0b2f77e4fa956158e64c3f':
Fix the SocketChannel accept locking behavior.
c43083ece7c4479fbe38001983a0d28893d0812a 22-Jun-2013 Elliott Hughes <enh@google.com> Fix the SocketChannel accept locking behavior.

Fixes a harmony-tests/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/ServerSocketChannelTest
test that had been failing since we turned it back on.

Change-Id: I76cbc5edc1ab9edc4d2818bd23649f4b906d662c
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
c886758ac4e49e91bb9f1a1db5db89bae6caf804 22-Jun-2013 Elliott Hughes <enh@google.com> am 29b4c788: Merge "Fix non-blocking SocketChannel connects."

* commit '29b4c7889ba10c41da5d2ed0e9c7057eb051ccbd':
Fix non-blocking SocketChannel connects.
c6ad01d286af243fd300dd105eb2e4437e0b6b16 21-Jun-2013 Elliott Hughes <enh@google.com> Fix non-blocking SocketChannel connects.

There are many reasons why the initial connect(2) may have resulted
in a ConnectException, only one of which (EINPROGRESS) means we haven't
yet failed.

Bug: https://code.google.com/p/android/issues/detail?id=56684
Change-Id: I2115998bce9043f076418fb0d1c22a26e04ee2e1
io/SocketChannelImpl.java
18a8b91a5ee97b7a6e8c0849b542ea765dc738a5 21-Jun-2013 Elliott Hughes <enh@google.com> am 61abfba7: Merge "Revert "Use CLOCK_MONOTONIC_RAW for System.nanoTime.""

* commit '61abfba7767a4ceb09ba69b03f42ef3bc3828e37':
Revert "Use CLOCK_MONOTONIC_RAW for System.nanoTime."
61abfba7767a4ceb09ba69b03f42ef3bc3828e37 21-Jun-2013 Elliott Hughes <enh@google.com> Merge "Revert "Use CLOCK_MONOTONIC_RAW for System.nanoTime.""
508bf13ba75610c75c4f40811dde0ec7e401f4c1 21-Jun-2013 Elliott Hughes <enh@google.com> Revert "Use CLOCK_MONOTONIC_RAW for System.nanoTime."

This reverts commit 7757924895a28a43ab9f7c3931cc9f972e870ddc.

Further investigation suggests this is a worse clock for our purposes, not the better one it would appear to be from the man page. It looks more like it should have been called CLOCK_TSC.

Change-Id: I6bf7fe4dac19272f145d240917129b4d5ab5ade1
ang/System.java
7ce2f38cb64f5a5ef3bf31f7ce539b74c9c1b10e 21-Jun-2013 Elliott Hughes <enh@google.com> am 7bd5cc7f: Merge "Use CLOCK_MONOTONIC_RAW for System.nanoTime."

* commit '7bd5cc7f252dc16ab434cb1440abe5152e28f9c1':
Use CLOCK_MONOTONIC_RAW for System.nanoTime.
7bd5cc7f252dc16ab434cb1440abe5152e28f9c1 21-Jun-2013 Elliott Hughes <enh@google.com> Merge "Use CLOCK_MONOTONIC_RAW for System.nanoTime."
c82a2127689a9e8f8661f7fafae1346f399dbaa5 21-Jun-2013 Elliott Hughes <enh@google.com> am 20bbe6cc: Merge "Sync java.util.concurrent library up to 12.06.2013."

* commit '20bbe6cc4f3974bb038aa035bcebd205fc9171e8':
Sync java.util.concurrent library up to 12.06.2013.
20bbe6cc4f3974bb038aa035bcebd205fc9171e8 21-Jun-2013 Elliott Hughes <enh@google.com> Merge "Sync java.util.concurrent library up to 12.06.2013."
7757924895a28a43ab9f7c3931cc9f972e870ddc 21-Jun-2013 Elliott Hughes <enh@google.com> Use CLOCK_MONOTONIC_RAW for System.nanoTime.

We still need to use CLOCK_MONOTONIC on Darwin.

Bug: 9511688
Change-Id: Ieb1091e24ad5cd3bab79a4de1b1494cc64eef3d4
ang/System.java
91770798d8b9280d48d30df2ed7f63b3ed9b036f 14-Jun-2013 Calin Juravle <calin@google.com> Sync java.util.concurrent library up to 12.06.2013.

CouncurrentHashMap was skipped from this sync.

Change-Id: I29c67698a2e706b22e3cb5920c5fe91f1f15461c
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/BrokenBarrierException.java
til/concurrent/Callable.java
til/concurrent/CancellationException.java
til/concurrent/CompletionService.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentMap.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CountedCompleter.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Delayed.java
til/concurrent/Exchanger.java
til/concurrent/ExecutionException.java
til/concurrent/Executor.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
til/concurrent/Future.java
til/concurrent/FutureTask.java
til/concurrent/LinkedBlockingDeque.java
til/concurrent/LinkedBlockingQueue.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/RecursiveAction.java
til/concurrent/RecursiveTask.java
til/concurrent/RejectedExecutionException.java
til/concurrent/RunnableFuture.java
til/concurrent/RunnableScheduledFuture.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/TimeoutException.java
til/concurrent/atomic/AtomicBoolean.java
til/concurrent/atomic/AtomicInteger.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReference.java
til/concurrent/atomic/AtomicReferenceArray.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/atomic/package-info.java
til/concurrent/locks/AbstractOwnableSynchronizer.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/Lock.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReadWriteLock.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/package-info.java
c75ada154be90edff2277b5b2217494050479694 13-Jun-2013 Elliott Hughes <enh@google.com> am cf353b74: Merge "Fix CharBuffer.subSequence return type."

* commit 'cf353b74ba45a796fdc0d0e334dc40968d57066e':
Fix CharBuffer.subSequence return type.
cf353b74ba45a796fdc0d0e334dc40968d57066e 13-Jun-2013 Elliott Hughes <enh@google.com> Merge "Fix CharBuffer.subSequence return type."
8a48ae9737cf7b78c3cfd304b8c975fe644cc310 08-Jun-2013 Brian Carlstrom <bdc@google.com> am f47f0bdf: Merge "Offer default implementations of various dalvik intrinsics in the library."

* commit 'f47f0bdff8807ff419fb3553e510abaa36a3f98b':
Offer default implementations of various dalvik intrinsics in the library.
3443a5e4e7ea9fa3fdc3495a1f2c44bea97ac100 07-Jul-2011 Elliott Hughes <enh@google.com> Offer default implementations of various dalvik intrinsics in the library.

(cherry-picked from commit 2f95766aac3df74c6c641232eec4791b2330c9df)

Change-Id: I1005ee22ed8a017bb536bfd76df2173c7e8dcf64
ang/Math.java
c286ebcb2be9bd7f2dd1c14b132dbf85ee7ca314 07-Jun-2013 Elliott Hughes <enh@google.com> am b5ba804a: Merge "Fix @deprecated javadoc orthography."

* commit 'b5ba804a3b6d00c63a59902b782c11a0af9ed205':
Fix @deprecated javadoc orthography.
99b4489d0555c6e0e5df941cbfad4cf250c8f0b8 07-Jun-2013 Elliott Hughes <enh@google.com> Fix @deprecated javadoc orthography.

Change-Id: I6db6d91e21b8e1aca5b5338534196fd5bdef8a06
o/ByteArrayOutputStream.java
o/File.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
ang/Character.java
ang/Runtime.java
ang/SecurityManager.java
ang/System.java
et/DatagramSocketImpl.java
et/HttpURLConnection.java
et/MulticastSocket.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
ecurity/Certificate.java
ecurity/Identity.java
ecurity/IdentityScope.java
ecurity/Security.java
ecurity/Signature.java
ecurity/Signer.java
ql/CallableStatement.java
ql/Date.java
ql/DriverManager.java
ql/ResultSet.java
ql/Time.java
ql/Timestamp.java
til/Date.java
til/Properties.java
til/logging/Logger.java
37fdaa7ea0ce20e0e97f8b65aab9aaada1af7178 06-Jun-2013 Elliott Hughes <enh@google.com> am 04d92ec6: Merge "Add ReflectiveOperationException."

* commit '04d92ec6fd445613801688f45fa934cf39190605':
Add ReflectiveOperationException.
04d92ec6fd445613801688f45fa934cf39190605 06-Jun-2013 Elliott Hughes <enh@google.com> Merge "Add ReflectiveOperationException."
66811020aec0b284bb95e3e43e751062927e62fc 06-Jun-2013 Brian Carlstrom <bdc@google.com> am 28d0eab7: Merge "Moving java.lang.String to libdvm"

* commit '28d0eab796d6f9e990c8d8393e1769ac27892d7c':
Moving java.lang.String to libdvm
eabeb4b870bf7eefecf2fd3853551bc918fff897 06-Jun-2013 Brian Carlstrom <bdc@google.com> Moving java.lang.String to libdvm

Change-Id: Ia03630612b6d4e116b9c737cdf7a93c8eacee910
ang/String.java
e91d1c4ef333b6b65cf1c902e683b2f8cd699d3f 11-May-2013 Elliott Hughes <enh@google.com> Add ReflectiveOperationException.

Bug: 3484927
Change-Id: I6ef7b71aba70bab7664ea29ef73ba8a542550e27
ang/ClassNotFoundException.java
ang/IllegalAccessException.java
ang/InstantiationException.java
ang/NoSuchFieldException.java
ang/NoSuchMethodException.java
ang/ReflectiveOperationException.java
ang/reflect/InvocationTargetException.java
c9d1392c2c5509519f46bf0c856bfbf7a217bca7 05-Jun-2013 Brian Carlstrom <bdc@google.com> am a65d5826: Merge "Move additional files to libdvm"

* commit 'a65d5826d30d42f59283e24047810a4b940335b4':
Move additional files to libdvm
53764ee20bd97afcc5c96c79ccb2cbfcab3a4c1a 05-Jun-2013 Brian Carlstrom <bdc@google.com> Move additional files to libdvm

Change-Id: Idc1caee3a0afb61d159cd046348ecb11db3d9e10
ang/Enum.java
f080c9f3644514ba5335108e337216a719f6014f 05-Jun-2013 Brian Carlstrom <bdc@google.com> am 86baf720: Merge "Change the VMStack interface used by serialization."

* commit '86baf7201d3bfd1bac6af95c6aec35def603bcfa':
Change the VMStack interface used by serialization.
552f220a1c5f481293bf47b21726635a0e5df601 20-Sep-2011 Elliott Hughes <enh@google.com> Change the VMStack interface used by serialization.

(cherry picked from commit 8b44bdb6063816eeb90da6b4f8aa3ed9f38fe140)

Change-Id: I5da041caa3037a4093f05dec4e03aed4f466a21d
o/ObjectInputStream.java
5f5a8b87a7457dc41bcf3e3bf8eb52f09e98d031 05-Jun-2013 Brian Carlstrom <bdc@google.com> am 324021dc: Merge "Add hidden Modifiers for SYNTHETIC and MIRANDA"

* commit '324021dc37781b90bad85b83c29f9f6dc298b6d8':
Add hidden Modifiers for SYNTHETIC and MIRANDA
90b84e0ea31dad48496ff4ce34bf5fee5ed9482e 10-Oct-2012 Ian Rogers <irogers@google.com> Add hidden Modifiers for SYNTHETIC and MIRANDA

(cherry picked from commit e976fbc396bdc5863ce289c38a44d296ea84f159)

Change-Id: Ia2289bff0bb0ef49af84306f9fa22cbf3c76a674
ang/reflect/Modifier.java
9d4ac657d46e277d94fea23f54197c2a62467d0f 29-May-2013 Kenny Root <kroot@google.com> am 5a77ade7: Merge "Use the jarjar names of security providers"

* commit '5a77ade75d48732b5c46a08223f3538dc899be47':
Use the jarjar names of security providers
a2805c5e3a29414dc9d600a5322d0bc4491fddd6 28-May-2013 Kenny Root <kroot@google.com> Use the jarjar names of security providers

The platform was using the security.properties file, but running the
tests outside of the platform was using the registerDefaultProviders()
call. Those won't work with a jarjar'd library.

Change-Id: If0472d99b45c274a63003c53bf91a37bfb23fda4
ecurity/Security.java
40b4f1db4031eff92cb0b31740b6e644b8e4c733 17-May-2013 Elliott Hughes <enh@google.com> Fix CharBuffer.subSequence return type.

Bug: 3484927
Change-Id: I06dae03b0803d1373e268e854e9e0e4b6c59e13a
io/ByteBufferAsCharBuffer.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
5dcdb633b75960699d62401619085abd7190ee85 15-May-2013 Elliott Hughes <enh@google.com> am c07655a8: Merge "Simplify defaulting for system properties, and trust the environment less."

* commit 'c07655a84cd02dea400d882dd783b420e59d2465':
Simplify defaulting for system properties, and trust the environment less.
41d00b744b7772f9302fdb94dddadb165b951220 15-May-2013 Elliott Hughes <enh@google.com> Simplify defaulting for system properties, and trust the environment less.

The originally-reported bug (https://android-review.googlesource.com/58258)
was that dalvik would fail to start if LD_LIBRARY_PATH was unset.

This changes things so we no longer have multiple default values for
java.library.path, cope better with that not being set, and don't set
it if LD_LIBRARY_PATH isn't set.

Change-Id: I55d48a35b1b42df872e6dcd0a38fc7bc4b8cad5a
ang/Runtime.java
ang/System.java
7c4ed1c62c2da5aaad8885ae5d435e84c1072a14 14-May-2013 Elliott Hughes <enh@google.com> am e95612e1: Merge "Expose Throwable changes."

* commit 'e95612e19f51b0fbcc9196e7a07737388010a4ea':
Expose Throwable changes.
fc3dd1f9e2424e6c75e13b576a4a6906148fc6d6 14-May-2013 Elliott Hughes <enh@google.com> am c86b6a1a: Merge "Fix java.lang.Throwable\'s protected constructor."

* commit 'c86b6a1addc08cfc3a3a6587ca46ad1be363d408':
Fix java.lang.Throwable's protected constructor.
e03c9c042a4624c181c59d0f48a2e0e569fe303e 14-May-2013 Elliott Hughes <enh@google.com> Expose Throwable changes.

Bug: 3484927
Change-Id: If4d39c9af3a7b0bd60f31ad7e969baa6b27e3d86
ang/Throwable.java
c2f2aaaae219c69d50eee6549d507c91e9a08519 14-May-2013 Elliott Hughes <enh@google.com> Fix java.lang.Throwable's protected constructor.

Bug: 3484927
Change-Id: Ib8088ec50a767390b6416b73a0e66887ece5c719
ang/Throwable.java
8b607ee513a5a9e53421497c88b75615584793ec 13-May-2013 Conley Owens <cco3@android.com> am 0230da36: Merge "Un-@hide various APIs."

* commit '0230da3614fd012851bd42898dcd1f4db1c57223':
Un-@hide various APIs.
20829f207ecc73b8007e2df2e90a7b62dde43343 13-May-2013 Elliott Hughes <enh@google.com> am b4e8996c: Merge "Fix build."

* commit 'b4e8996c0dae2a8531fa81980bde20747fefad4d':
Fix build.
8ffa0b68c9fd3f722bee2bcd94b1d38151a0791d 13-May-2013 Elliott Hughes <enh@google.com> Un-@hide various APIs.

Bug: 3484927
Change-Id: I4cda326a31240135d883528d9cb976a9db084234
ang/AssertionError.java
ang/Boolean.java
ang/Byte.java
ang/Character.java
ang/Integer.java
ang/LinkageError.java
ang/Long.java
ang/Short.java
ang/System.java
ang/Throwable.java
ang/reflect/Modifier.java
et/InetAddress.java
et/InetSocketAddress.java
et/NetworkInterface.java
til/BitSet.java
til/Collections.java
til/ConcurrentModificationException.java
til/Currency.java
til/Formatter.java
til/logging/Logger.java
til/zip/Deflater.java
til/zip/DeflaterOutputStream.java
7f23e215f96ba2a21ad22e88f1e2b7bbbf3f9643 13-May-2013 Elliott Hughes <enh@google.com> Fix build.

Change-Id: Ibfbba9fdb1d5ca00aad55cc1c62766821175f384
ang/reflect/Modifier.java
81f9e919b8cd238e4729e9108400a9af75a32826 13-May-2013 Elliott Hughes <enh@google.com> am a3d0410f: Merge "Fix Short.compare."

* commit 'a3d0410f59f48cfe5f42b798f00e15a33e87120f':
Fix Short.compare.
b4932764b5a6d637ca40bd2165eeaa7424e20b95 13-May-2013 Elliott Hughes <enh@google.com> am 52f836e8: Merge "Improve java.lang.reflect.Modifier documentation."

* commit '52f836e8bf94a6e73373a3cb2c3fcc66d1122da6':
Improve java.lang.reflect.Modifier documentation.
ac1232b5fe9b3f254829b6ca5ecf3c0f988ba0cf 13-May-2013 Brian Carlstrom <bdc@google.com> am 71dbee01: Merge "Move some files with dalvik dependencies to libdvm"

* commit '71dbee010b14541de3d3a6e3843881547a006f91':
Move some files with dalvik dependencies to libdvm
cbd61d6846af5d48fbb1c34b60a5c74a94f71901 13-May-2013 Elliott Hughes <enh@google.com> Fix Short.compare.

Bug: 3484927
Change-Id: I53fbed8d7060556ade960174d567e975ebc70928
ang/Short.java
52f836e8bf94a6e73373a3cb2c3fcc66d1122da6 13-May-2013 Elliott Hughes <enh@google.com> Merge "Improve java.lang.reflect.Modifier documentation."
71dbee010b14541de3d3a6e3843881547a006f91 13-May-2013 Brian Carlstrom <bdc@google.com> Merge "Move some files with dalvik dependencies to libdvm"
82a47dc51eba87fe901e675f050ab591c663e0be 13-May-2013 Elliott Hughes <enh@google.com> Improve java.lang.reflect.Modifier documentation.

Change-Id: I514ab7668a933f7ce724408d95464ef25d76b53b
ang/reflect/Modifier.java
895bba44ff59d2225532a1fe9842c8b9a70a9f9a 13-May-2013 Brian Carlstrom <bdc@google.com> Move some files with dalvik dependencies to libdvm

Change-Id: I04498d8d8c4b065dbda8d7b30b8b77ce53e63a77
ang/Class.java
ang/ClassLoader.java
ang/Daemons.java
ang/Object.java
ang/Thread.java
ang/ThreadGroup.java
ang/VMClassLoader.java
ang/VMThread.java
ang/reflect/AccessibleObject.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
ang/reflect/Proxy.java
1ca5f863614dae88fcdeadf823035275812e9465 13-May-2013 Elliott Hughes <enh@google.com> am de6c6eeb: Merge "Fix String.replace("", x) for strings with non-0 offsets."

* commit 'de6c6eebbace906077e6de87b7d99dd5350b6037':
Fix String.replace("", x) for strings with non-0 offsets.
5fb22c375c55a9575cfb2e0b651c744e98fb6aa6 13-May-2013 Elliott Hughes <enh@google.com> Fix String.replace("", x) for strings with non-0 offsets.

Also fix the sizing of the StringBuilder.

Bug: https://code.google.com/p/android/issues/detail?id=55129
Change-Id: Ic56763ef90451a25a0adfbe649b0a766e9b930f9
ang/String.java
002f88ca942331ecb2ff48e8a68e21d50842bc04 11-May-2013 Elliott Hughes <enh@google.com> am 8245506e: Merge "Clean up two unnecessary \'implements\' clauses."

* commit '8245506ebe0cbeba47c99e1e109c8da31c1626bc':
Clean up two unnecessary 'implements' clauses.
8245506ebe0cbeba47c99e1e109c8da31c1626bc 11-May-2013 Elliott Hughes <enh@google.com> Merge "Clean up two unnecessary 'implements' clauses."
cc2915b8b2e3ea92e10aa73ef748e845d4443db3 11-May-2013 Elliott Hughes <enh@google.com> am b1635d52: Merge "Add @SafeVarargs."

* commit 'b1635d52c96e2906485bfe4439d402365d5a025b':
Add @SafeVarargs.
bce3d7cfe03fcb70bd374ad2e8b16ba64a45e993 11-May-2013 Elliott Hughes <enh@google.com> Add @SafeVarargs.

Bug: 3484927
Change-Id: I3c235502d6542767a2f5818b203ff7520073a053
ang/SafeVarargs.java
til/Arrays.java
til/Collections.java
til/EnumSet.java
d45b1db47a0258ecb532671e87ebd5ec3df28498 11-May-2013 Elliott Hughes <enh@google.com> Clean up two unnecessary 'implements' clauses.

Bug: 3484927
Change-Id: I29ce16d47f880399894c84940dbe9f091831fa06
o/FileInputStream.java
o/FileOutputStream.java
634c2fa67705abe32f258297ed43bed9210d0dbd 11-May-2013 Conley Owens <cco3@android.com> am 0fbcc277: Merge "Finish off AutoCloseable."

* commit '0fbcc27768d69281b4bced043fa25c9addb9f9b4':
Finish off AutoCloseable.
9902f3494c6d983879d8b9cfe6b1f771cfefe703 10-May-2013 Elliott Hughes <enh@google.com> Finish off AutoCloseable.

Bug: 3484927
Change-Id: Ia0f5ad3db9807459ce6cda05bc2f53564b63b375
ang/AutoCloseable.java
et/DatagramSocket.java
et/ServerSocket.java
et/Socket.java
io/channels/FileLock.java
io/channels/Selector.java
til/Scanner.java
til/zip/ZipFile.java
d4f2f951b5c72dd26c2f65ba446e3ef256d27b08 10-May-2013 Brian Carlstrom <bdc@google.com> am d9f9db27: Merge changes Ie07e5901,I8a154f8b

* commit 'd9f9db273afab35baee1db4d22a65ae819e72b74':
resolved conflicts for merge of f78109f6 to dalvik-dev
Some of our helpers have moved into libnativehelpers.
7cad2d4e4e00bb152b726541b62840708d1cbcb1 20-Jul-2011 Elliott Hughes <enh@google.com> Some of our helpers have moved into libnativehelpers.

(cherry picked from commit 4b5012a6cd5f7f32f33a776c9e2c94ca3f3eb1d5)

Change-Id: I8a154f8b6e39b8ed0a633fab9ba31d557b545bb5
ang/ClassLoader.java
ang/VMClassLoader.java
cf9829d5c35749192096b5d96653875a0a33fbb0 04-May-2013 Elliott Hughes <enh@google.com> am f7e1ba48: Merge "Various regex test fixes."

* commit 'f7e1ba4804f7365e6ab47a34e019532b428b1546':
Various regex test fixes.
5700a9718eef20f4228ed97d54a59cc70bf40753 04-May-2013 Elliott Hughes <enh@google.com> Various regex test fixes.

Mostly test changes and some duplication removal, but I did turn up a couple of
small bugs.

Change-Id: I46f99cdf0cdb8a67d358c0acc03079360fe5c333
til/regex/Matcher.java
til/regex/Pattern.java
48269d2a5b97d55b8d86e3936bbdc2bdca61a2cf 02-May-2013 Elliott Hughes <enh@google.com> am e2aa9af9: Merge "Fix BufferedReader.readLine to not read ahead after \'\r\'."

* commit 'e2aa9af94aeeab0e245c3f423f90c76b8cbe0229':
Fix BufferedReader.readLine to not read ahead after '\r'.
0409fa8fe9b1b3cd501931a8c25e109e6ff71be0 02-May-2013 Elliott Hughes <enh@google.com> Fix BufferedReader.readLine to not read ahead after '\r'.

Bug: 8778372
Change-Id: I789d0ff5498cca48b16bb7b3b363014f7b6bcf95
o/BufferedReader.java
af8bffb1e33737ede93acded30496b0b13254ab6 01-May-2013 Elliott Hughes <enh@google.com> Improve System.nanoTime documentation.

Bug: 8733179

(cherry picked from commit 37f79a6eb5d4f378ff6b0b56e21d5d5d1f4cc9a2)

Change-Id: I8e4a860909e3f21e45e13cf9937d851a8add38c7
ang/System.java
667623f62fcac691065337e55cde90f19aa8319b 01-May-2013 Elliott Hughes <enh@google.com> am e2c689ab: Merge "Improve System.nanoTime documentation."

* commit 'e2c689ab581762cab6fdb70951b50458a30be1ee':
Improve System.nanoTime documentation.
e2c689ab581762cab6fdb70951b50458a30be1ee 01-May-2013 Elliott Hughes <enh@google.com> Merge "Improve System.nanoTime documentation."
37f79a6eb5d4f378ff6b0b56e21d5d5d1f4cc9a2 01-May-2013 Elliott Hughes <enh@google.com> Improve System.nanoTime documentation.

Bug: 8733179
Change-Id: I12cf7fba00736ff1e9b2d8b2a1f5e50cf1070353
ang/System.java
b49e8eb63f768e195869a98076dc96514f357a14 01-May-2013 Brian Carlstrom <bdc@google.com> am 9b040f6a: Merge "Add missing @Override annotations"

* commit '9b040f6a4e6865ee72db707d27381d4886229eaa':
Add missing @Override annotations
04b2ff92ae27b3acd82148d9252253573638ccc6 30-Jan-2012 Ian Rogers <irogers@google.com> Add missing @Override annotations

Change-Id: I4c5772c9549375beeb0e4f269bd61d623fca7e35
(cherry picked from commit 49992f5003aac55e1b1cf54769abc93630ccde93)
io/ByteBuffer.java
51377dcfd7cb06cb25d55ec818a941304eb0a11e 30-Apr-2013 Elliott Hughes <enh@google.com> am 87b4b0f8: Merge "Implement getDateFormatOrder."

* commit '87b4b0f88fe0b5fa5c271593e483fb5bd306a6a4':
Implement getDateFormatOrder.
87b4b0f88fe0b5fa5c271593e483fb5bd306a6a4 30-Apr-2013 Elliott Hughes <enh@google.com> Merge "Implement getDateFormatOrder."
0604cf761b8717c025a5e78031fde1edf71c7757 30-Apr-2013 Elliott Hughes <enh@google.com> Implement getDateFormatOrder.

I do wonder if we shouldn't generalize this, rather than hard-code yMd,
but YAGNI.

Bug: 7207103
Change-Id: Ib59191eee97c08913f9a0a4ea52fb6eb8c677918
ext/SimpleDateFormat.java
033c85712e2d91657e2f5df8743d2fd0ddbf5a2d 30-Apr-2013 Kenny Root <kroot@google.com> am 0800e47a: Merge "Move JSSE to new package"

* commit '0800e47a2e19f185b7a62f1d26a74748db0cc047':
Move JSSE to new package
0800e47a2e19f185b7a62f1d26a74748db0cc047 30-Apr-2013 Kenny Root <kroot@google.com> Merge "Move JSSE to new package"
e3cfd0d894d8b3b4bf54367d3631334d85760bcc 29-Apr-2013 Elliott Hughes <enh@google.com> am 6cc37941: Merge "Fix various of the harmony nio tests."

* commit '6cc37941a936a9f054bdeed83b7ea3321c844182':
Fix various of the harmony nio tests.
38375a4d0b3d34e2babbd2f6a013976c7c439696 24-Apr-2013 Kenny Root <kroot@google.com> Move JSSE to new package

To help with shipping the JSSE with apps that want to bundle it, move
it to a new package so that the tangles in other parts of the library
can be untangled.

Change-Id: I810b6861388635301e28aee5b9b47b8e6b35b430
ecurity/Security.java
ecurity/security.properties
105a9405b2e059352185f9ca1138cc8480ccb9bc 27-Apr-2013 Elliott Hughes <enh@google.com> Fix various of the harmony nio tests.

Plus one real bug, in FileChannelImpl. The expectation I've removed was for a
test that doesn't seem to exist in either our tests or the harmony tests.

Change-Id: I1ea99042f3f8897f07ba8b4ad8e9a15f30ace79b
io/FileChannelImpl.java
19f10924b4f45023862b7caa2be0e180e3b9d977 26-Apr-2013 Elliott Hughes <enh@google.com> am 783feda9: Merge "Fix vogar --mode device\'s fallback time zone."

* commit '783feda93e8645aaf4d5a3b9cbbcd5eeb88b29d8':
Fix vogar --mode device's fallback time zone.
1b5e1ff243e0f7f017e891020693cf371cd72964 26-Apr-2013 Elliott Hughes <enh@google.com> Fix vogar --mode device's fallback time zone.

Change-Id: Icf7a5ecb5aa7e1b4e6effe26e7a4a63807d18b1c
til/TimeZone.java
ff72988b2ff791afc4d101984c9348451f49091c 26-Apr-2013 Elliott Hughes <enh@google.com> am 971709da: Merge "Cope with a corrupt tzdata update."

* commit '971709da542bbaf163c89fce916fc943f0e1101a':
Cope with a corrupt tzdata update.
995caee51334a4f1a1429e29680ea079c900c37a 25-Apr-2013 Elliott Hughes <enh@google.com> Cope with a corrupt tzdata update.

We need to fall back to the next choice on error. Rewrite the code
to be testable and add some tests. Add an internal GMT-only
fallback in case all our sources of tzdata are bad. Also make
time zone detection on the host more useful.

Bug: 8373554
Change-Id: I9f91b844a61f07f34b268535e6d24aa0c301bf8d
o/File.java
til/TimeZone.java
25681be69e19a834b00cfbf54cd99ac13f12b9ff 17-Apr-2013 William Luh <williamluh@google.com> Only enforce the encrypted bit in the GPBF, and ignore other unsupported bits.

(cherry-pick of 7a302a49a7c8b99e2f34fff660e199fb7c776bc1.)

Bug: 8617715
Change-Id: Ibfe919d67fd17cee050d23811faa5aa64116dfb4
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
a49bf5d1cfa9a7c7fe69479ce848ccb353796361 25-Apr-2013 Elliott Hughes <enh@google.com> am 2797d28f: Merge "Fix a bug in DatagramChannel.send."

* commit '2797d28f58449627ad883543edd43f3edc45e9a3':
Fix a bug in DatagramChannel.send.
ee257d971aa3376a7ae6e7c471107dc5692b8e3b 25-Apr-2013 Elliott Hughes <enh@google.com> am cf2377ac: Merge "Fix getLocalAddress on closed sockets."

* commit 'cf2377ac3d8953131d1416e955ebbb7ef042a0ab':
Fix getLocalAddress on closed sockets.
8658a3f1236f1801f00b9416c9294486a125faae 25-Apr-2013 Elliott Hughes <enh@google.com> Fix a bug in DatagramChannel.send.

Calling sendto(2) binds your socket as a side-effect, but we'd still
report false from isBound.

Also bring in the harmony tests that would have caught this earlier.

Change-Id: I26baa15c8178edab9136a37742faddd11f381c7b
io/DatagramChannelImpl.java
255a6f4ab321614ed1ca26849d1df7fa9c0610f5 25-Apr-2013 Elliott Hughes <enh@google.com> Fix getLocalAddress on closed sockets.

Bug: https://code.google.com/p/android/issues/detail?id=54072
Change-Id: Ie32708054f584885ec85dd7847c128d48ff6c7d5
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/Socket.java
io/DatagramChannelImpl.java
9e138bfa136407f00ad181c25e23c9d4166ab40b 24-Apr-2013 Elliott Hughes <enh@google.com> am 62669dfa: Merge "Simplify NativeBN error handling."

* commit '62669dfa390239adb1534cccf05a3917be3837dd':
Simplify NativeBN error handling.
66e740b765384686ce87003608412e940ab5d489 24-Apr-2013 Elliott Hughes <enh@google.com> Simplify NativeBN error handling.

Change-Id: I150459cf71da6a3232c281d82c1ef7cbf1b2a2bc
ath/BigInt.java
ath/NativeBN.java
2816fa8e97ea75eb325da451e9b6c1771298a970 24-Apr-2013 Elliott Hughes <enh@google.com> am 8a69ec61: Merge "Fix BigDecimal.abs to preserve immutability."

* commit '8a69ec6121b99683f396b12dd88395772bb516ae':
Fix BigDecimal.abs to preserve immutability.
8c85a8865fc40a3453b858428a9670a53e339ff4 24-Apr-2013 Elliott Hughes <enh@google.com> Fix BigDecimal.abs to preserve immutability.

Bug: https://code.google.com/p/android/issues/detail?id=54580
Change-Id: Ib41f9fe06b34761f2be59622cbe8a05858551e5b
ath/BigDecimal.java
d4a4f0dc5f5645316428e7f1cfde2efb2c8b7db0 23-Apr-2013 Elliott Hughes <enh@google.com> am 60d77a52: Merge "64-bit fixes for BigInteger."

* commit '60d77a525c05c0d0a5d70d2a903ab3a9029dd58d':
64-bit fixes for BigInteger.
a125dded8ab0490d05e2fa9ec2e821ef1ae6facd 23-Apr-2013 Elliott Hughes <enh@google.com> 64-bit fixes for BigInteger.

I fear this is just the start for this code. There seem to be a lot
of assumptions about the types used by OpenSSL that may not hold for
a 64-bit build.

Change-Id: I05c276ff06adc66c1e7878196ce1afd5fba290d9
ath/BigInt.java
ath/NativeBN.java
de9502e249e57cad332283564e4da164d0b553fa 17-Apr-2013 William Luh <williamluh@google.com> am 862a382a: Merge "Only enforce the encrypted bit in the GPBF, and ignore other unsupported bits." into jb-mr2-dev

* commit '862a382a298367069e536aef28c4303dc035e8ee':
Only enforce the encrypted bit in the GPBF, and ignore other unsupported bits.
7a302a49a7c8b99e2f34fff660e199fb7c776bc1 17-Apr-2013 William Luh <williamluh@google.com> Only enforce the encrypted bit in the GPBF, and ignore other unsupported bits.

Bug: 8617715
Change-Id: I2f906ae6107d2bdf990a7991f56d4a0873bca634
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
938d8af590bfc3e8c465527613cce0facb0bcb76 16-Apr-2013 Elliott Hughes <enh@google.com> am 69426638: Merge "Fix BigInteger small prime generation."

* commit '69426638ccc097d640727e876a65fca540019b67':
Fix BigInteger small prime generation.
69426638ccc097d640727e876a65fca540019b67 16-Apr-2013 Elliott Hughes <enh@google.com> Merge "Fix BigInteger small prime generation."
a0150a87e2a74399c8144e18efbcaf707606c80e 16-Apr-2013 Elliott Hughes <enh@google.com> am 0ca50a3d: resolved conflicts for merge of 4b27762c to jb-mr1-dev-plus-aosp

* commit '0ca50a3db89bdf99240f583a96b93c24290d5c93':
Fix a z/Z mixup in the SimpleDateFormat documentation.
0ca50a3db89bdf99240f583a96b93c24290d5c93 16-Apr-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of 4b27762c to jb-mr1-dev-plus-aosp

Change-Id: Ie3e622667fb2300cfb8b1927767dc6402970bf9e
eec1345b3ce5becef2dff8954b58c9458a613dca 16-Apr-2013 Elliott Hughes <enh@google.com> Fix a z/Z mixup in the SimpleDateFormat documentation.

(cherry picked from commit be17058cc173df7df7665c107ca1793e6f9b51fe)

Bug: 8605629
Change-Id: I936b3fb858cba39903b5b7d7dfa26fe35699d356
ext/SimpleDateFormat.java
d89afc283f9d7f0cf7a7bd8dc4f1398d27b4db34 16-Apr-2013 Elliott Hughes <enh@google.com> am 38b23ff5: Merge "Fix a z/Z mixup in the SimpleDateFormat documentation."

* commit '38b23ff5efbba5a97bc35902c7cbb664e02eae9c':
Fix a z/Z mixup in the SimpleDateFormat documentation.
be17058cc173df7df7665c107ca1793e6f9b51fe 16-Apr-2013 Elliott Hughes <enh@google.com> Fix a z/Z mixup in the SimpleDateFormat documentation.

Bug: 8605629
Change-Id: I45a5db6a9a216e5be13e122b0fd0bcde25f121d8
ext/SimpleDateFormat.java
dd9d07889d37fd2d8d5052b517150ca31ac9d95a 13-Apr-2013 Elliott Hughes <enh@google.com> Fix BigInteger small prime generation.

OpenSSL won't generate primes smaller than 16 bits, so do it ourselves
roughly the same way they would.

Also remove pure duplicate tests from OldBigIntegerTest, and add some
new tests to the modern BigIntegerTest.

Change-Id: I3000942a7a4f2359d5cbe28795b4f8dd96715ef8
ath/BigInteger.java
d54e116d0de783d6f4d527fe24a2ad7df920c081 11-Apr-2013 Elliott Hughes <enh@google.com> am 4ec69e8d: am a20919ef: am ec786a87: Fix Formatter documentation.

* commit '4ec69e8d26a1149a5844f6ca4721aea73edd8346':
Fix Formatter documentation.
29c5d7e2dadeab52604872da1ab7bf74c62b2e48 11-Apr-2013 Elliott Hughes <enh@google.com> am 486b3de5: am 6cb5da25: am ce7dd45a: Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.

* commit '486b3de5271cbaf0b6d674a2a7945f3222f7cf53':
Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.
617b44a8701bbacc33773346f97189ac2a6ac1b0 11-Apr-2013 Elliott Hughes <enh@google.com> am 2b98d8bf: resolved conflicts for merge of 01ec8332 to jb-mr1-dev-plus-aosp

* commit '2b98d8bf680a66ad90b5131d2662a21455f289b6':
Fix the SimpleDateFormat L/M E/c documentation.
4ec69e8d26a1149a5844f6ca4721aea73edd8346 11-Apr-2013 Elliott Hughes <enh@google.com> am a20919ef: am ec786a87: Fix Formatter documentation.

* commit 'a20919ef5f964c4cee232e79347f02518fc15cf4':
Fix Formatter documentation.
486b3de5271cbaf0b6d674a2a7945f3222f7cf53 11-Apr-2013 Elliott Hughes <enh@google.com> am 6cb5da25: am ce7dd45a: Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.

* commit '6cb5da25729fe849700e962782811ee6166ed7a6':
Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.
2b98d8bf680a66ad90b5131d2662a21455f289b6 11-Apr-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of 01ec8332 to jb-mr1-dev-plus-aosp

Change-Id: Ia83e62f734f8a587abce8850300f1a735a7020a7
ec786a87f84aa91029346b9c551f62da9e8d8e3b 11-Apr-2013 Elliott Hughes <enh@google.com> Fix Formatter documentation.

The code samples for the various "hour of day" format specifiers
were wrong.

(cherry-pick of 68e6dc9cf2691e77d8fa0543ad670098bea68163.)

Bug: https://code.google.com/p/android/issues/detail?id=53983
Change-Id: I8db792dbf8a44ca951692620d15d243a7b033273
til/Formatter.java
ce7dd45a54788328249d11ec9b6fb6e454ca28bd 11-Apr-2013 Elliott Hughes <enh@google.com> Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.

Also do some other documentation clean-up. In particular, it's confusing
to use ^ to mean exponentiation when the language uses it to mean
exclusive-or.

(cherry-pick of 995e3c8d0f5dc43bc8ba5f305d1525210caaf796.)

Bug: https://code.google.com/p/android/issues/detail?id=54103
Change-Id: I704bb4d29ea27664adcba6579eabbccd3782b6b1
ath/BigDecimal.java
ath/BigInteger.java
a7e616b1fad7029059985004edbd2f015f0534a6 11-Apr-2013 Elliott Hughes <enh@google.com> Fix the SimpleDateFormat L/M E/c documentation.

(cherry-pick of 498df39c4379fad055b947c3e97455189275f6f7.)

Change-Id: I04c1957955fc8cf9af9374264a0266ad61334795
ext/SimpleDateFormat.java
b6e7f16b4ce07636b04f8164c6ae980080b6bb3a 11-Apr-2013 Elliott Hughes <enh@google.com> am 8ce8f437: Merge "Fix Formatter documentation."

* commit '8ce8f43778da295855bb1718b545f0b382d5ba12':
Fix Formatter documentation.
a488cda1696365c41fa6d25f0fba1eabf619784c 11-Apr-2013 Elliott Hughes <enh@google.com> am ded62ed3: Merge "Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation."

* commit 'ded62ed3f2cd05a75a6140d7e6eb4d86745acb17':
Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.
68e6dc9cf2691e77d8fa0543ad670098bea68163 11-Apr-2013 Elliott Hughes <enh@google.com> Fix Formatter documentation.

The code samples for the various "hour of day" format specifiers
were wrong.

Bug: https://code.google.com/p/android/issues/detail?id=53983
Change-Id: Idc9cab93fbba62cd6dce874cc1d0f5908a351c8b
til/Formatter.java
995e3c8d0f5dc43bc8ba5f305d1525210caaf796 11-Apr-2013 Elliott Hughes <enh@google.com> Fix the BigDecimal documentation to not be a copy & paste of the BigInteger documentation.

Also do some other documentation clean-up. In particular, it's confusing
to use ^ to mean exponentiation when the language uses it to mean
exclusive-or.

Bug: https://code.google.com/p/android/issues/detail?id=54103
Change-Id: I34871b05a986e97c814dc0a060872bda6c68d031
ath/BigDecimal.java
ath/BigInteger.java
b4300128ed47feab255cbf97c70b01657ccfc1af 11-Apr-2013 Elliott Hughes <enh@google.com> am 1b17ae18: Merge "Fix the SimpleDateFormat L/M E/c documentation."

* commit '1b17ae18942833549372e2b5ee3de2e2b9c2cb5d':
Fix the SimpleDateFormat L/M E/c documentation.
498df39c4379fad055b947c3e97455189275f6f7 11-Apr-2013 Elliott Hughes <enh@google.com> Fix the SimpleDateFormat L/M E/c documentation.

Change-Id: I04c1957955fc8cf9af9374264a0266ad61334795
ext/SimpleDateFormat.java
d935ae850f75e7748426006f77665646f18ed6ab 10-Apr-2013 Elliott Hughes <enh@google.com> am b776f6df: Merge "Fix BigInteger test failures."

* commit 'b776f6df74219eee7fb7c4158cc27a206647f389':
Fix BigInteger test failures.
b5ccf74bdea2d417d9e4820945fe3ba1f636a0d2 09-Apr-2013 Elliott Hughes <enh@google.com> Fix BigInteger test failures.

We were hitting a couple of OpenSSL bugs. I've reported them upstream, and
work around them in the meantime.

Bug: 2943474
Change-Id: Ia06bcf3025f525a954d9b918669d09531631a266
ath/BigInteger.java
477d475459a3555d0205d3471d056df9b2e2e73a 05-Apr-2013 Elliott Hughes <enh@google.com> am 21f09462: Improve the Locale.getISO3Country/getISO3Language documentation and behavior.

* commit '21f09462b23338161c3d3d777200e229f6f152dd':
Improve the Locale.getISO3Country/getISO3Language documentation and behavior.
21f09462b23338161c3d3d777200e229f6f152dd 05-Apr-2013 Elliott Hughes <enh@google.com> Improve the Locale.getISO3Country/getISO3Language documentation and behavior.

(cherry-pick of a85d3a86fea97e270568aec746831e07ed972f5e.)

Bug: 8541850
Change-Id: I766f106b9165932de17de84bdd422d0fc0ae27f1
til/Locale.java
817471f25732c46e640111b7c5ddb07a0b769d53 05-Apr-2013 Elliott Hughes <enh@google.com> Merge "Improve the Locale.getISO3Country/getISO3Language documentation and behavior."
a85d3a86fea97e270568aec746831e07ed972f5e 05-Apr-2013 Elliott Hughes <enh@google.com> Improve the Locale.getISO3Country/getISO3Language documentation and behavior.

Bug: 8541850
Change-Id: I8843aeee25eeefe0f6d5e16dd359ba78ef5a01cc
til/Locale.java
6aed748da1deaa820d574446037401893d73be9b 02-Apr-2013 William Luh <williamluh@google.com> Don't install APK files with unsupported General Purpose Bit Flag bits.

Bug: 8476102

(cherry picked from commit d0bd4c19678429b19ac4b9c7477b28241d5dd1db)

Change-Id: I03f19095ac4e6f8abcb61ba6c120227c2df1f2d1
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
50bccad67cef5cebdd87d8fecb129b74d349ba53 03-Apr-2013 Brian Carlstrom <bdc@google.com> am 9dfbc2ec: Merge "Switch to OkHttp as URL\'s preferred HTTP implementation."

* commit '9dfbc2ec351f07b3e0215286d85541f4cd6d1b63':
Switch to OkHttp as URL's preferred HTTP implementation.
9dfbc2ec351f07b3e0215286d85541f4cd6d1b63 03-Apr-2013 Brian Carlstrom <bdc@google.com> Merge "Switch to OkHttp as URL's preferred HTTP implementation."
565537c647d694128e41c44c086d0df09d36a50e 03-Apr-2013 Nick Kralevich <nnk@google.com> am f86e565c: Merge "Don\'t install APK files with unsupported General Purpose Bit Flag bits."

* commit 'f86e565c9d1f86be08d66651d0028cf01d1e084a':
Don't install APK files with unsupported General Purpose Bit Flag bits.
d0bd4c19678429b19ac4b9c7477b28241d5dd1db 02-Apr-2013 William Luh <williamluh@google.com> Don't install APK files with unsupported General Purpose Bit Flag bits.

Bug: 8476102
Change-Id: I764c2aec944558129c8ac04ee0593fb3de82870e
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
2503556d17b28c7b4e6e514540a77df1627857d0 30-Mar-2013 jwilson <jwilson@squareup.com> Switch to OkHttp as URL's preferred HTTP implementation.

Change-Id: Id724b75dd78b68ed00f5db4989c4070896996ec0
et/ExtendedResponseCache.java
et/HttpURLConnection.java
et/ResponseSource.java
et/URL.java
757601b65771fa4ca73f380c8837d52c31118135 03-Apr-2013 Elliott Hughes <enh@google.com> Merge "Document UTS#35 5-count support." into jb-mr2-dev
9dac149d411714e376138fc4415811f03b1cac8a 02-Apr-2013 Elliott Hughes <enh@google.com> Document the icu4c upgrade.

Change-Id: I9e822e8f9ecbad83b8915b087d645334fe26b0a6
til/Locale.java
09e29cf8903af739223e76bd81cdd1cc99847aa1 02-Apr-2013 Elliott Hughes <enh@google.com> Document UTS#35 5-count support.

Bug: 8351278
Change-Id: I2bc3371ed1271b79bfec769a89b755b2cf74cc9f
ext/SimpleDateFormat.java
8b5c41a65f58bd35d514bf92be63dff0fa809a55 02-Apr-2013 Elliott Hughes <enh@google.com> Link to android.text.format.DateFormat.getBestDateTimePattern.

Bug: 8283323
Change-Id: I8aaa91df899de157cbbfc1f8b1f38fdfd1f4c46c
ext/SimpleDateFormat.java
c375a9cfd6ca0f557a4343a14f6c4115a1f20207 29-Mar-2013 Joel Dice <joel.dice@gmail.com> Use long instead of int for address in DirectByteBuffer constructor

This allows the code to be used on 64-bit platforms.

(cherry picked from commit 9ce6a2533b50ffcd24b8b10bae7f234042768819)

Change-Id: Icc5248d8ea276a451b32ecc91b47aeb977e8f21c
io/DirectByteBuffer.java
9ce6a2533b50ffcd24b8b10bae7f234042768819 29-Mar-2013 Joel Dice <joel.dice@gmail.com> Use long instead of int for address in DirectByteBuffer constructor

This allows the code to be used on 64-bit platforms.

Change-Id: I1c42d48696296f74135cd209b3042b8973779e40
io/DirectByteBuffer.java
0fa4d2c52c874ac710e5195978ec0b833c5050ae 29-Mar-2013 Elliott Hughes <enh@google.com> am 236ab1f1: am 589d6f45: Merge "Use longs instead of ints to store pointers in NIO buffers."

* commit '236ab1f11ae3beaa9fee4c01e8f541429cd0bf62':
Use longs instead of ints to store pointers in NIO buffers.
236ab1f11ae3beaa9fee4c01e8f541429cd0bf62 29-Mar-2013 Elliott Hughes <enh@google.com> am 589d6f45: Merge "Use longs instead of ints to store pointers in NIO buffers."

* commit '589d6f45d4c38c1d74ea970284c32ed013422eef':
Use longs instead of ints to store pointers in NIO buffers.
0121106d9dc1ba713b53822886355e4d9339e852 28-Feb-2013 Joel Dice <joel.dice@gmail.com> Use longs instead of ints to store pointers in NIO buffers.

This allows the code to be used on 64-bit VMs.

Change-Id: I4d01bfcd0ffea528c6179687771d047fdcb4d18a
io/Buffer.java
io/DirectByteBuffer.java
io/MappedByteBuffer.java
io/MemoryBlock.java
io/NIOAccess.java
9f12fd197b3e2ee58cd8aa60395255e38588b068 29-Mar-2013 Elliott Hughes <enh@google.com> am 66ea3e6c: am 6ebe24c3: Merge "Remove dead NioUtils.getDirectBufferAddress."

* commit '66ea3e6c08d40ba656d06996d946502f94008312':
Remove dead NioUtils.getDirectBufferAddress.
66ea3e6c08d40ba656d06996d946502f94008312 29-Mar-2013 Elliott Hughes <enh@google.com> am 6ebe24c3: Merge "Remove dead NioUtils.getDirectBufferAddress."

* commit '6ebe24c3dccddf8d00e50f587364797ee21eb4dd':
Remove dead NioUtils.getDirectBufferAddress.
db23ba7b94acccfad73456c06a507295a7896a90 29-Mar-2013 Elliott Hughes <enh@google.com> Remove dead NioUtils.getDirectBufferAddress.

Change-Id: I764d86db1d74c5daf54cc925a9fc76db15a1107a
io/NioUtils.java
5e65ffb5f6d747146ba09c86ae9ba161acfb7f8c 28-Mar-2013 Elliott Hughes <enh@google.com> am 6cf77a7e: am 303d1c92: Merge "Simplify the nio Buffer implementations, and fix MappedByteBuffer."

* commit '6cf77a7e2b8ccacfee646f1a8abbb2e19a962081':
Simplify the nio Buffer implementations, and fix MappedByteBuffer.
6cf77a7e2b8ccacfee646f1a8abbb2e19a962081 28-Mar-2013 Elliott Hughes <enh@google.com> am 303d1c92: Merge "Simplify the nio Buffer implementations, and fix MappedByteBuffer."

* commit '303d1c92020f2f8ba663af19d4bd0cf2f445fd33':
Simplify the nio Buffer implementations, and fix MappedByteBuffer.
fe5da19e0e366286cd4d95f7628fe9442b9062c8 27-Mar-2013 Elliott Hughes <enh@google.com> Simplify the nio Buffer implementations, and fix MappedByteBuffer.

* Fix the reported bug caused by delegation in the MappedByteBuffer
implementation.

* Collapse the three classes (ReadOnly*, ReadWrite*, and *) used
to implement most buffer types into one class each.

* Rename HeapByteBuffer to ByteArrayBuffer to match its companions.

* Remove BaseByteBuffer.

* Give the classes used to implement asXBuffer sane names (their
existing names were backwards).

Bug: https://code.google.com/p/android/issues/detail?id=53637
Change-Id: I2a7ff4f1d502564389615384324afadabccb04f9
io/BaseByteBuffer.java
io/Buffer.java
io/ByteArrayBuffer.java
io/ByteBuffer.java
io/ByteBufferAsCharBuffer.java
io/ByteBufferAsDoubleBuffer.java
io/ByteBufferAsFloatBuffer.java
io/ByteBufferAsIntBuffer.java
io/ByteBufferAsLongBuffer.java
io/ByteBufferAsShortBuffer.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/DoubleToByteBufferAdapter.java
io/FileChannelImpl.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/IntToByteBufferAdapter.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/NioUtils.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDirectByteBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
io/ShortToByteBufferAdapter.java
18192c25f575342597e5f497c69cbd38cd0637d6 27-Mar-2013 Elliott Hughes <enh@google.com> am e64e371e: am 95e6c6a5: Merge "Improve java.nio.Buffer.toString."

* commit 'e64e371e23f59a434fe7584cbfd7aba81a41bd6d':
Improve java.nio.Buffer.toString.
e64e371e23f59a434fe7584cbfd7aba81a41bd6d 27-Mar-2013 Elliott Hughes <enh@google.com> am 95e6c6a5: Merge "Improve java.nio.Buffer.toString."

* commit '95e6c6a5a1765eea924a7e0fb3234cd0f72362e5':
Improve java.nio.Buffer.toString.
3b5eb93b0dc1d1a0109451cca56a618635485a67 27-Mar-2013 Elliott Hughes <enh@google.com> Improve java.nio.Buffer.toString.

Bug: https://code.google.com/p/android/issues/detail?id=53637
Change-Id: I823662b39cb48b5f4456f4c58269324dfcdc2fd1
io/Buffer.java
dc90f9ba66cf93d99c8357b8e76145bfaf07f84d 22-Mar-2013 Elliott Hughes <enh@google.com> am 97d59c2d: am 48caff24: Merge "Revert "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version."""

* commit '97d59c2df3418b1ff6733bb3fd2dc69567cead3b':
Revert "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version.""
97d59c2df3418b1ff6733bb3fd2dc69567cead3b 22-Mar-2013 Elliott Hughes <enh@google.com> am 48caff24: Merge "Revert "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version."""

* commit '48caff24e226480232f4ace7f9f8fbd7705946dd':
Revert "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version.""
3f52fe84a434dace741ba77de7322ca4d1d12fa7 22-Mar-2013 Elliott Hughes <enh@google.com> Revert "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version.""

This reverts commit 713a61f90f3e9c9ac74713784d23da45d205a0f8

Change-Id: Ib021fdf15b646ab60b0170094ebd2057c405167c
til/jar/InitManifest.java
til/jar/JarVerifier.java
til/jar/Manifest.java
48394b6e85c73211974ef3acad27b85aad22dc8d 22-Mar-2013 Elliott Hughes <enh@google.com> am 9ec78ca6: am ad5dc53f: Merge "Remove EWOULDBLOCK from libcore."

* commit '9ec78ca6374af9e405c0545683f0d2a644e0f7bf':
Remove EWOULDBLOCK from libcore.
9ec78ca6374af9e405c0545683f0d2a644e0f7bf 22-Mar-2013 Elliott Hughes <enh@google.com> am ad5dc53f: Merge "Remove EWOULDBLOCK from libcore."

* commit 'ad5dc53fbec2ad25132fb2307c381df1377dc160':
Remove EWOULDBLOCK from libcore.
ad5dc53fbec2ad25132fb2307c381df1377dc160 22-Mar-2013 Elliott Hughes <enh@google.com> Merge "Remove EWOULDBLOCK from libcore."
16e6c1e19b7b092b63e14bf5903a4323dffe425b 22-Mar-2013 Elliott Hughes <enh@google.com> am deacff1b: am 27f9b5dd: Merge "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version.""

* commit 'deacff1b5c84d38431df836bf00b316e554fb96e':
Revert "Fix Manifest behavior with Manifest-Version/Signature-Version."
deacff1b5c84d38431df836bf00b316e554fb96e 22-Mar-2013 Elliott Hughes <enh@google.com> am 27f9b5dd: Merge "Revert "Fix Manifest behavior with Manifest-Version/Signature-Version.""

* commit '27f9b5dde6f2211003be3925d63deed638d45360':
Revert "Fix Manifest behavior with Manifest-Version/Signature-Version."
f4a4259d8a548ab172ca98b702feafcd0ceb1411 22-Mar-2013 Elliott Hughes <enh@google.com> Remove EWOULDBLOCK from libcore.

On Linux, EWOULDBLOCK == EAGAIN, and having a synonym is just confusing.

Change-Id: If53c4ba6d82eed2236dec12003c4c9512c4ecbee
et/PlainSocketImpl.java
713a61f90f3e9c9ac74713784d23da45d205a0f8 22-Mar-2013 Elliott Hughes <enh@google.com> Revert "Fix Manifest behavior with Manifest-Version/Signature-Version."

This reverts commit 32690f22c0bbfa2b72972d45088e6663ce56174f

Change-Id: I381a6cac42363355cf89bb751ca17d34f3ab1238
til/jar/InitManifest.java
til/jar/JarVerifier.java
til/jar/Manifest.java
17d1a9afa97c7e91524f28fcdd6c956b6459f22e 21-Mar-2013 Elliott Hughes <enh@google.com> am ae05942d: am 0c89977b: Merge "Fix Manifest behavior with Manifest-Version/Signature-Version."

* commit 'ae05942dd8d8bd001ef6b73b398b1d96ee34bc29':
Fix Manifest behavior with Manifest-Version/Signature-Version.
ae05942dd8d8bd001ef6b73b398b1d96ee34bc29 21-Mar-2013 Elliott Hughes <enh@google.com> am 0c89977b: Merge "Fix Manifest behavior with Manifest-Version/Signature-Version."

* commit '0c89977b802a4f43ca3a4d0007d0f22ab5d1057e':
Fix Manifest behavior with Manifest-Version/Signature-Version.
32690f22c0bbfa2b72972d45088e6663ce56174f 21-Mar-2013 Elliott Hughes <enh@google.com> Fix Manifest behavior with Manifest-Version/Signature-Version.

Bug: 8444077
Change-Id: Ic78afc36f94fccc6a473893b0c218cd07b441dc7
til/jar/InitManifest.java
til/jar/JarVerifier.java
til/jar/Manifest.java
0fde03fc4507c6e17cf511c8a1c5a4f96a9cf958 21-Mar-2013 Elliott Hughes <enh@google.com> am 933cb9ea: am 0f7e3bb4: Merge "Add support for Unix domain sockets."

* commit '933cb9eaab75744547d55f57045a685b76c69bd0':
Add support for Unix domain sockets.
933cb9eaab75744547d55f57045a685b76c69bd0 21-Mar-2013 Elliott Hughes <enh@google.com> am 0f7e3bb4: Merge "Add support for Unix domain sockets."

* commit '0f7e3bb45f03a1b54cc1d6c0b9df608d9607f24d':
Add support for Unix domain sockets.
482a3fc5635ac431b8a7476d7fe3397af4c2e8ec 21-Mar-2013 Elliott Hughes <enh@google.com> Add support for Unix domain sockets.

Bug: 6513075
Change-Id: I0b0166f59745ac8175b39d7796c093041b2df4fd
et/InetSocketAddress.java
et/InetUnixAddress.java
f89f8cb1a4e9dba7387a2ba663d86bcd61895cea 20-Mar-2013 Elliott Hughes <enh@google.com> am 556b78eb: am 557719c1: Merge "Make String\'s fast-path UTF-8 decoder more like icu4c."

* commit '556b78ebae0369ea2a326a25999f253eb559c3fb':
Make String's fast-path UTF-8 decoder more like icu4c.
556b78ebae0369ea2a326a25999f253eb559c3fb 20-Mar-2013 Elliott Hughes <enh@google.com> am 557719c1: Merge "Make String\'s fast-path UTF-8 decoder more like icu4c."

* commit '557719c1b4278690e02b21e8ad507776b6238e5e':
Make String's fast-path UTF-8 decoder more like icu4c.
a47599f6fc631436407e01ae94cc6dc3fc99e16e 20-Mar-2013 Elliott Hughes <enh@google.com> Make String's fast-path UTF-8 decoder more like icu4c.

Bug: https://code.google.com/p/android/issues/detail?id=23831
Change-Id: I0b2af4a3691727735154f1b9f03dba62600dbc31
ang/String.java
029a6d9dd5492555997c6aea67270a75c85ed1dc 19-Mar-2013 Ian Rogers <irogers@google.com> am 2780f6d4: am 21342d1a: Merge "Add missing finals, small doc tidying."

* commit '2780f6d460964fd99ab2bb4d6645b27c7d83d5a5':
Add missing finals, small doc tidying.
2780f6d460964fd99ab2bb4d6645b27c7d83d5a5 19-Mar-2013 Ian Rogers <irogers@google.com> am 21342d1a: Merge "Add missing finals, small doc tidying."

* commit '21342d1aa69b37f1a51a5a0ead0676051ee926f1':
Add missing finals, small doc tidying.
21342d1aa69b37f1a51a5a0ead0676051ee926f1 19-Mar-2013 Ian Rogers <irogers@google.com> Merge "Add missing finals, small doc tidying."
e77562d9df5f4f1bb6c29093d49802ff411f137d 19-Mar-2013 Elliott Hughes <enh@google.com> am 68cb533e: am 40d1aa50: Merge "Clarify Calendar.clear documentation."

* commit '68cb533e44664db0206d6d2568195dd87e9a132d':
Clarify Calendar.clear documentation.
68cb533e44664db0206d6d2568195dd87e9a132d 19-Mar-2013 Elliott Hughes <enh@google.com> am 40d1aa50: Merge "Clarify Calendar.clear documentation."

* commit '40d1aa50b6b59f7f74ff83202174feb7bd73e41b':
Clarify Calendar.clear documentation.
5d2bc7c4f5c69e783307936cfdbe7b4748946d87 19-Mar-2013 Ian Rogers <irogers@google.com> Add missing finals, small doc tidying.

Change-Id: I403a6e3c123f25da23a31d540a6b59060e297f63
til/Collections.java
afc18db553293a12f7a04bd04c7d028dbb3de2f6 19-Mar-2013 Elliott Hughes <enh@google.com> Clarify Calendar.clear documentation.

Bug: https://code.google.com/p/android/issues/detail?id=45877
Change-Id: I49c82916a25388864f4acd12e09de984f72e8653
til/Calendar.java
57d3fe288a569539ababcb2588c1027d4cf29ab9 19-Mar-2013 Elliott Hughes <enh@google.com> am e0e3db14: am 0eeaa394: Merge "Improve java.util.zip compression level documentation."

* commit 'e0e3db14becf70c147ecc0135938cea58e825091':
Improve java.util.zip compression level documentation.
e0e3db14becf70c147ecc0135938cea58e825091 18-Mar-2013 Elliott Hughes <enh@google.com> am 0eeaa394: Merge "Improve java.util.zip compression level documentation."

* commit '0eeaa394c9f734678077430ce331c7691377c479':
Improve java.util.zip compression level documentation.
d38edfcfac60602940080a521800c0f5227d47d7 18-Mar-2013 Jorrit Jongma <jorrit@jongma.org> Improve java.util.zip compression level documentation.

The level parameter (constructors, setLevel, etc)
can be [-1..9], but the docs incorrectly stated [-1..8]
and [0..9].

Explain fully what compression level means in the Deflater
class documentation and point everything else to that
canonical source.

Change-Id: I4b76965d88f0fd0f383bb15a5259a5fa5d81f2b1
Signed-off-by: Jorrit Jongma <jorrit@jongma.org>
til/zip/Deflater.java
til/zip/ZipOutputStream.java
5c6017a385c66cfbdea972ec3b996498a13eecad 17-Mar-2013 Brian Carlstrom <bdc@google.com> am 4d9ab503: am 6b948b63: Merge "Assorted socket fixes related to test_SSLSocket_setSoWriteTimeout failure investigation"

* commit '4d9ab503876e497c645a9cdfbacfef9a7c7b6d4d':
Assorted socket fixes related to test_SSLSocket_setSoWriteTimeout failure investigation
4d9ab503876e497c645a9cdfbacfef9a7c7b6d4d 17-Mar-2013 Brian Carlstrom <bdc@google.com> am 6b948b63: Merge "Assorted socket fixes related to test_SSLSocket_setSoWriteTimeout failure investigation"

* commit '6b948b63a91693101dc8f727fbf92e599ead0d8b':
Assorted socket fixes related to test_SSLSocket_setSoWriteTimeout failure investigation
51cf1b49bca54ec0229a51df400ad1bee580b1bb 16-Mar-2013 Brian Carlstrom <bdc@google.com> Assorted socket fixes related to test_SSLSocket_setSoWriteTimeout failure investigation

1.) Fixed the failure of libcore.javax.net.ssl.SSLSocketTest's
test_SSLSocket_setSoWriteTimeout by setting send/recv buffer sizes earlier (b/8272932)
2.) Fixed javadoc bug in java.net.Socket
3.) Fixed implementation bug in IoBridge affecting reading SO_RCVBUF
4.) Fixed bug where we would leave unsent bytes in OpenSSL write buffer after SSLSocket write
possible cause of b/6693087

Bug: 8272932
Bug: 6693087
Change-Id: I54e084e58e8b10583a6ac3051d5e05e519139d64
et/Socket.java
3dc7ff56501d411c19701e15e0ff1972d3a53753 13-Mar-2013 Kenny Root <kroot@google.com> am 66774f6a: am bc7222da: Merge "Revert "Put DRLCertFactory as first provider""

* commit '66774f6ae126379a66e84ef39e69ba020065dbce':
Revert "Put DRLCertFactory as first provider"
66774f6ae126379a66e84ef39e69ba020065dbce 13-Mar-2013 Kenny Root <kroot@google.com> am bc7222da: Merge "Revert "Put DRLCertFactory as first provider""

* commit 'bc7222da0f3e6bba1ecfd6a355ec89f4e5e9b21f':
Revert "Put DRLCertFactory as first provider"
7d0ed36dc9b07dc16f309360373833f86a418c3e 08-Mar-2013 Kenny Root <kroot@google.com> Revert "Put DRLCertFactory as first provider"

OpenSSL provider now passes all the tests.

This reverts commit b01f3e895e3ae81bdf9c054ada18c503a2f01086.
ecurity/Security.java
ecurity/security.properties
6926a9fe315b61097494b32f7e98edc8a8a58525 09-Mar-2013 Kenny Root <kroot@google.com> am dc7a4e1f: am 3f81fefb: Merge "Switch Provider changedProperties to LinkedHashMap"

* commit 'dc7a4e1f10c19ad7ddd92fac0485664dad5aaa0d':
Switch Provider changedProperties to LinkedHashMap
dc7a4e1f10c19ad7ddd92fac0485664dad5aaa0d 09-Mar-2013 Kenny Root <kroot@google.com> am 3f81fefb: Merge "Switch Provider changedProperties to LinkedHashMap"

* commit '3f81fefbe971294f092532813257f6e8891b36d4':
Switch Provider changedProperties to LinkedHashMap
adb4135674a4de82cabbff3b0e24f6e944ba33e3 09-Mar-2013 Kenny Root <kroot@google.com> Switch Provider changedProperties to LinkedHashMap

Change-Id: I0b7a9b2a683b6db14e95cf0bf4d9552c67bb7ebc
ecurity/Provider.java
e252aee906d89139c3e5fa61609767bfcb363d70 07-Mar-2013 Kenny Root <kroot@google.com> am ac392317: am 2afdf69b: Merge "CertPathSpi: fix encoding arg name"

* commit 'ac392317cdda5d0682f8df83c9b233224cbb46cc':
CertPathSpi: fix encoding arg name
ac392317cdda5d0682f8df83c9b233224cbb46cc 07-Mar-2013 Kenny Root <kroot@google.com> am 2afdf69b: Merge "CertPathSpi: fix encoding arg name"

* commit '2afdf69ba7a7a622b4b7b8db66553273eb7f0d36':
CertPathSpi: fix encoding arg name
8f4a284a73b1da82eefb5d53b0e84312d560924e 21-Feb-2013 Kenny Root <kroot@google.com> CertPathSpi: fix encoding arg name

It appears an automated change has made "encoding" to "charsetName"
which doesn't make sense for the CertPath API since it's really an
encoding of the certificates that's being referenced.

Goes along with changes to CertPath made in change
228d2e19565a39e01849edd2f2b4d03e19d1ee3d

Change-Id: I05ea4adffa2100d4dcf78f8739bff13d40effebf
ecurity/cert/CertificateFactorySpi.java
6e3b11ae38a836ff170f366915fb1e357e1b2c5a 07-Mar-2013 Kenny Root <kroot@google.com> am e0cbfff8: am 7cbe871a: Merge "Put DRLCertFactory as first provider"

* commit 'e0cbfff88056ff0123bf3364d15904b0c2966cc6':
Put DRLCertFactory as first provider
e0cbfff88056ff0123bf3364d15904b0c2966cc6 07-Mar-2013 Kenny Root <kroot@google.com> am 7cbe871a: Merge "Put DRLCertFactory as first provider"

* commit '7cbe871aa361a173e3ede19d522314adc2e5d81b':
Put DRLCertFactory as first provider
b01f3e895e3ae81bdf9c054ada18c503a2f01086 06-Mar-2013 Kenny Root <kroot@google.com> Put DRLCertFactory as first provider

In order to safely check-in the OpenSSL X.509 certificate provider, move
DRLCertFactory to the top so it is selected while the OpenSSL-backed one
is finished up.

Change-Id: I16ce61b47027d5b369dca84ac9ea69b9391c9e88
ecurity/Security.java
ecurity/security.properties
6067958aa1febfb34b392f0b902b90b4e95539d0 05-Mar-2013 Elliott Hughes <enh@google.com> am 689e3317: am 3655d9f5: Merge "use longs instead of ints to store pointers in regex classes"

* commit '689e33177f4e874478339c85614dcf73f3bd296f':
use longs instead of ints to store pointers in regex classes
689e33177f4e874478339c85614dcf73f3bd296f 05-Mar-2013 Elliott Hughes <enh@google.com> am 3655d9f5: Merge "use longs instead of ints to store pointers in regex classes"

* commit '3655d9f527b3c84f1d5abe949b5d7075735b7c7d':
use longs instead of ints to store pointers in regex classes
3655d9f527b3c84f1d5abe949b5d7075735b7c7d 05-Mar-2013 Elliott Hughes <enh@google.com> Merge "use longs instead of ints to store pointers in regex classes"
546d3cdd7bdb8ed40c04c28074c35a8cea767265 05-Mar-2013 Geremy Condra <gcondra@google.com> Convert mEntries -> entries, fixing the build.

Change-Id: Ica2cd26f12423f37707ab6f96225d3a994fbb9db
til/zip/ZipFile.java
51d669984f4a4c721ed1519cca838f0dc29258c6 04-Mar-2013 Geremy Condra <gcondra@google.com> Merge commit '6425eaad' into manualmerge

Change-Id: Iad87f3a194f585618a74338914c8a228e50fa72f
9799c2a0b7e1042aaf634189215be1ac8325b0e7 02-Mar-2013 Geremy Condra <gcondra@google.com> am e68c13c0: am 300cde36: Merge "Remove support for duplicate file entries." into jb-dev

* commit 'e68c13c0f249e2d4907ab447e136b48864ccc74b':
Remove support for duplicate file entries.
e68c13c0f249e2d4907ab447e136b48864ccc74b 02-Mar-2013 Geremy Condra <gcondra@google.com> am 300cde36: Merge "Remove support for duplicate file entries." into jb-dev

* commit '300cde36be292a5cda68cb2a1d652dfc3a135cd7':
Remove support for duplicate file entries.
4aaa292a38a4201146c37d04fa3d566ce1e17e54 02-Mar-2013 Geremy Condra <gcondra@google.com> am 160dd055: am 4beeee87: Revert "Remove support for duplicate file entries."

* commit '160dd0552b2df159dec511715ed48c4420305fdb':
Revert "Remove support for duplicate file entries."
160dd0552b2df159dec511715ed48c4420305fdb 02-Mar-2013 Geremy Condra <gcondra@google.com> am 4beeee87: Revert "Remove support for duplicate file entries."

* commit '4beeee879af7581d6b3c28246a7cebe608f8e3a0':
Revert "Remove support for duplicate file entries."
c7bcde8fbc5cff6de0b2581ebf7398c83e999410 19-Feb-2013 Geremy Condra <gcondra@google.com> Remove support for duplicate file entries.

Bug: 8219321
Change-Id: Ibc56bea753917c38e1bb20df48aa45fdff39d364
til/zip/ZipFile.java
4beeee879af7581d6b3c28246a7cebe608f8e3a0 01-Mar-2013 Geremy Condra <gcondra@google.com> Revert "Remove support for duplicate file entries."

This reverts commit 5360af4aa1d23fd910680b09fa06f0820db03a9a

Ugh, forgot that make wouldn't make the tests anymore. We're missing the ZipException, I'll reupload in a second.

Change-Id: I8b4d7300cffa1f9f23235e2e33a1cf2b522ba3f3
til/zip/ZipFile.java
843b12a808a7d1a03efdad1e9057f0d6fa0d3a52 01-Mar-2013 Geremy Condra <gcondra@google.com> am 6b26de17: am 5360af4a: Remove support for duplicate file entries.

* commit '6b26de17a296dff8b992cce1932663ec4f1d74cd':
Remove support for duplicate file entries.
6b26de17a296dff8b992cce1932663ec4f1d74cd 01-Mar-2013 Geremy Condra <gcondra@google.com> am 5360af4a: Remove support for duplicate file entries.

* commit '5360af4aa1d23fd910680b09fa06f0820db03a9a':
Remove support for duplicate file entries.
5360af4aa1d23fd910680b09fa06f0820db03a9a 19-Feb-2013 Geremy Condra <gcondra@google.com> Remove support for duplicate file entries.

Bug: 8219321
Change-Id: I4ac47f8facf13afa45799a0d5e20202a0ef5f0c6
til/zip/ZipFile.java
0021dabab0b6c3fdcb1d456a5c8d89df4d05ab35 01-Mar-2013 Elliott Hughes <enh@google.com> am c703df81: am ff66631f: Merge "Fix the HashMap performance regression."

* commit 'c703df8116e92a98f33f6baf4eb4c7bf78584fd1':
Fix the HashMap performance regression.
e2f220961759e31c94bfa770b6a6ddbf019c16d9 01-Mar-2013 Elliott Hughes <enh@google.com> Fix the HashMap performance regression.

Go back to the original cheap (and inline) secondary hash.
LinkedHashMap is a subclass of HashMap, so that has to change too.

Bug: 8290590
Change-Id: I7959a8ce8b8fc96e7f1d2c8a2a13fe83ef4c0dd5
til/HashMap.java
til/LinkedHashMap.java
ad616f2163d1986f095fc0910f2c94a2c564497c 28-Feb-2013 Joel Dice <joel.dice@gmail.com> use longs instead of ints to store pointers in regex classes

This allows the code to be used on 64-bit VMs.

Change-Id: I27be2026e4eea6ea9063aa669e1c41d0e2f0cb04
til/regex/Matcher.java
til/regex/Pattern.java
aa7ad88384be510ce2ed475adf81babe6271877c 28-Feb-2013 Elliott Hughes <enh@google.com> am be3b1f15: am 2970474c: Merge "use longs instead of ints to store pointers in ObjectStreamClass"

* commit 'be3b1f15c829acf118e8c53c312ff735fa1c5511':
use longs instead of ints to store pointers in ObjectStreamClass
a40dc9f768eb02dcfd7b1a659333757b148f7bec 27-Feb-2013 Joel Dice <joel.dice@gmail.com> use longs instead of ints to store pointers in ObjectStreamClass

This allows the class to be used on 64-bit VMs.

Change-Id: Ie8dc3a7b3849c94e5cf37cf5c5e0c3231f5af26f
o/ObjectStreamClass.java
c6fced37ea387772bd9544a3b4e6cd29cc636a30 27-Feb-2013 Elliott Hughes <enh@google.com> am ff98e5ef: am e2394cf7: Merge "Make the CLDR version available."

* commit 'ff98e5ef5f519a8ed2986e4254c8c4489b1180ea':
Make the CLDR version available.
15d82808bab24f399a034d086f587d5fab32522e 27-Feb-2013 Elliott Hughes <enh@google.com> Make the CLDR version available.

Change-Id: I745b0153ae1dd9eb24dc02b19ac5ab34638a07e3
ang/System.java
f3bcc67d3bda1efb13a69836b311a62ece757a66 27-Feb-2013 Elliott Hughes <enh@google.com> am 48072838: am c009c409: Merge "Switch to using icu4c 50\'s TimeZoneNames API."

* commit '48072838cc9af581538987a225c86debdd3d617c':
Switch to using icu4c 50's TimeZoneNames API.
ac7cf58962995825464af08ae6fa5e006c94f3fa 27-Feb-2013 Elliott Hughes <enh@google.com> Switch to using icu4c 50's TimeZoneNames API.

This takes us down from ~330ms/locale on prime to ~70ms/locale.

This also fixes a bug in DateFormatSymbols.getZoneStrings and adds a test
so we don't regress.

Change-Id: I13663a659666c0a7d87a299235b75fa4e9fef69d
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
til/TimeZone.java
1c0486673ff2a1972064664ca56f61160942828e 26-Feb-2013 Elliott Hughes <enh@google.com> Update Locale documentation for jb-mr2.

Bug: 7625281
Change-Id: Iac26756752c75d6d44a036c6edd0e5ac62d06b61
til/Locale.java
70bded29007593a49df3d018cc8d1fc81200b230 25-Feb-2013 Elliott Hughes <enh@google.com> am 29ffa384: Merge "Remove duplication in EvilMapTest."

* commit '29ffa384d8f4492cd0a9a3962c6a3caaba453fab':
Remove duplication in EvilMapTest.
ce51dc95f134145f4fa3d30d3a2bd69d5deaca31 25-Feb-2013 Elliott Hughes <enh@google.com> Remove duplication in EvilMapTest.

Change-Id: I99998f74d4211e3bf74174ebf4b3df7da2388c1e
til/AbstractMap.java
e660c54e94b53fdcde035c75dca7e2cdc5de5d8e 23-Feb-2013 Elliott Hughes <enh@google.com> am 3f898842: Merge "Fix HashMap/Hashtable/LinkedHashMap to not allow corruption of the shared table."

* commit '3f898842384eb337b09d0bddbb818fd80007b306':
Fix HashMap/Hashtable/LinkedHashMap to not allow corruption of the shared table.
3f898842384eb337b09d0bddbb818fd80007b306 23-Feb-2013 Elliott Hughes <enh@google.com> Merge "Fix HashMap/Hashtable/LinkedHashMap to not allow corruption of the shared table."
9084e968a10ed230e76940eef60b8f6229cc7b8b 23-Feb-2013 Elliott Hughes <enh@google.com> Fix HashMap/Hashtable/LinkedHashMap to not allow corruption of the shared table.

See the bug for an excellent description of the problem.

The test also tests ConcurrentHashMap, IdentityHashMap, and WeakHashMap,
even though they never had this bug.

Bug: https://code.google.com/p/android/issues/detail?id=48055
Change-Id: Id12880b1a40945c1a7a4c6bc3656b842aad78bf7
til/HashMap.java
til/Hashtable.java
82213d67817f306d27a5f3726be9ad328d1b781b 23-Feb-2013 Geremy Condra <gcondra@google.com> Merge "Remove support for duplicate file entries."
38cad1eb5cc0c30e034063c14c210912d97acb92 19-Feb-2013 Geremy Condra <gcondra@google.com> Remove support for duplicate file entries.

Bug: 8219321
Change-Id: I4ac47f8facf13afa45799a0d5e20202a0ef5f0c6
til/zip/ZipFile.java
37a65db1857f76998846e13a5c1eca371d5a7a0d 22-Feb-2013 Ian Rogers <irogers@google.com> Tidy up runtime memory query documentation.

Change-Id: I6c006cabef98bcbb4e1cf1f7dfee86839e04d0d7
ang/Runtime.java
c498f38c65457c271f8bb0afa0b903fab91a1303 22-Feb-2013 Elliott Hughes <enh@google.com> Fix Method.equals.

The old Method.equals implementation was ridiculously slow, and
incorrect too if you have the same-named class loaded by different
ClassLoaders.

Bug: https://code.google.com/p/android/issues/detail?id=37380
Change-Id: Ife93f61b55391d9a7bcbe6492864776df88bbfd5
ang/reflect/Method.java
1424a2a1a9fc53dc8b859a77c02c924d3dc2334d 06-Feb-2013 Ian Rogers <irogers@google.com> Secondary hash for IdentityHashMap and WeakHashMap.

Dalvik's identity hash code is a multiple of 8 meaning that it can cause
frequent collisions if a secondary hash isn't applied. This change adds
a secondary hash function to IdentityHashMap and WeakHashMap, as is done
in HashMap, HashTable and ConcurrentHashMap. There is some other minor clean-up
including updating the secondary hash function to match that in
ConcurrentHashMap.

Change-Id: Id2115b2622ff759bf2f67bd7572c2ecd8f0f0d67
til/Collections.java
til/HashMap.java
til/Hashtable.java
til/IdentityHashMap.java
til/LinkedHashMap.java
til/WeakHashMap.java
b955bb73a639d3e4eaed90cb9ea74b56e49b65d2 21-Feb-2013 Kenny Root <kroot@google.com> Merge "CertPath: fix some arg names"
228d2e19565a39e01849edd2f2b4d03e19d1ee3d 21-Feb-2013 Kenny Root <kroot@google.com> CertPath: fix some arg names

It appears an automated change has made "encoding" to "charsetName"
which doesn't make sense for the CertPath API since it's really an
encoding of the certificates that's being referenced.

Change-Id: I6894a053fc9cdb27396446983adfca0634645f1a
ecurity/cert/CertPath.java
ecurity/cert/CertificateFactory.java
968c52b509328dcc9fda4e62e4e7a6b4e279dd65 20-Feb-2013 Elliott Hughes <enh@google.com> Implement Package.getAnnotations.

This doesn't require modifications to the dex file format after all.

Bug: https://code.google.com/p/android/issues/detail?id=16149
Change-Id: Iebde55f175a23c5c7e644067148a73d3b1018398
ang/Package.java
e728d7cc9835669fcf5870b107cc95f52ee58070 13-Feb-2013 Kenny Root <kroot@google.com> Add explicit null check in ArrayList

This will help developers debug their code when passing in null as the
collection they wish to copy from.

Change-Id: I6406880d3450037102911ae54ef44e8a03a79420
til/ArrayList.java
5f7d3373caf9ca613fafc9825ee8ac68e03b324e 09-Feb-2013 Elliott Hughes <enh@google.com> Explain Formatter's %tc better.

Bug reported via email by Roy Yokoyama.

Change-Id: I13617d640df8f4e1000114cbe6b3b738e8405568
til/Formatter.java
92fc63ea7bdfcca72203ba0d183a43df0765cf79 08-Feb-2013 Elliott Hughes <enh@google.com> Implement UTS #35 5-count date format patterns.

Bug: https://code.google.com/p/android/issues/detail?id=39616
Change-Id: I8143f75abc25b2f839a3e44ab800ad90ff9b9029
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
a812f61dc1102c8089c1acd48c24b36829ce2482 06-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: fix more DSA/ECDSA key generation

* Add hidden API to pass along the EC curve name in ECParameterSpec.
The lack of name passing made KeyFactory2Test fail because the
reconstructed ECDSA key had explicit curve parameters instead of an
OID naming the curve.

* Fix some mixing of PKCS8/X509EncodedKeySpec in DSA/ECDSA KeyFactory
implementations.

* Fix the KeyFactory2Test to output more useful error messages.

* Remove known failure which is no longer happening.

* Change EC_GROUP_get_curve_name to return the "shortName" string
which matches the EC_GROUP_new_by_curve_name

Bug: 3483365
Change-Id: I0a80be88bef728b2177f3593cc3421fa47b79470
ecurity/spec/ECParameterSpec.java
20fa09fdf5076af628a42907230acec35214e7cf 05-Feb-2013 Elliott Hughes <enh@google.com> Fix BigDecimal precision when constructed from String.

Bug: https://code.google.com/p/android/issues/detail?id=43480
Change-Id: Id42e4458323d7ab3dafb2dec84909096988e4365
ath/BigDecimal.java
cf101d4099424a8e1ea603da5ddefd067f154b57 04-Feb-2013 Elliott Hughes <enh@google.com> Fix date parsing for time zones without names.

Bug: 8128460
Change-Id: I41a6baee6e22b8af9170e3e569e0599c38b5e707
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
til/TimeZone.java
744681303401b72671c33425a72676a053733a06 02-Feb-2013 Elliott Hughes <enh@google.com> Fix the documentation for Math/StrictMath ceil/floor.

Bug: https://code.google.com/p/android/issues/detail?id=44080
Change-Id: I426b723a7aa36a16aed7baf36fd907786799c91a
ang/Math.java
ang/StrictMath.java
57ff19856a9486babe99270a690950aa1652f903 22-Jan-2013 Elliott Hughes <enh@google.com> icu4c 4.9 can localize "fil".

Bug: 8023288
Change-Id: I40d26622e135c5ab06c90b1744a87bcf8cb320de
til/Locale.java
f20e96718a936499da309766da7f36f123b43d93 18-Jan-2013 Elliott Hughes <enh@google.com> Improve our time zone name collection.

A variety of bugs here. We weren't using dates in the current year,
we were assuming that icu4c has correct time zone transition data (it
usually doesn't), and in the fallback code (which we'd previously
never hit) we weren't honoring the caller's request for standard/daylight
time.

This patch fixes:

Africa/Tripoli: long='Eastern European Standard Time' short='Eastern European Standard Time'!
America/Araguaina: long='Brasilia Standard Time' short='Brasilia Standard Time'!
America/Campo_Grande: long='Amazon Standard Time' short='Amazon Standard Time'!
America/Cuiaba: long='Amazon Standard Time' short='Amazon Standard Time'!
America/Havana: long='Cuba Standard Time' short='Cuba Standard Time'!
America/Santiago: long='Chile Standard Time' short='Chile Standard Time'!
America/Sao_Paulo: long='Brasilia Standard Time' short='Brasilia Standard Time'!
Antarctica/Palmer: long='Chile Standard Time' short='Chile Standard Time'!
Asia/Jerusalem: long='Israel Standard Time' short='Israel Standard Time'!
Asia/Tehran: long='Iran Standard Time' short='Iran Standard Time'!
Asia/Tel_Aviv: long='Israel Standard Time' short='Israel Standard Time'!
Brazil/East: long='Brasilia Standard Time' short='Brasilia Standard Time'!
Chile/Continental: long='Chile Standard Time' short='Chile Standard Time'!
Chile/EasterIsland: long='Easter Island Standard Time' short='Easter Island Standard Time'!
Cuba: long='Cuba Standard Time' short='Cuba Standard Time'!
Iran: long='Iran Standard Time' short='Iran Standard Time'!
Israel: long='Israel Standard Time' short='Israel Standard Time'!
Libya: long='Eastern European Standard Time' short='Eastern European Standard Time'!
Pacific/Apia: long='Samoa Standard Time' short='Samoa Standard Time'!
Pacific/Easter: long='Easter Island Standard Time' short='Easter Island Standard Time'!
Pacific/Fiji: long='Fiji Standard Time' short='Fiji Standard Time'!

It also fixes Pacific/Fakaofo, which was confused between GMT+14:00 and
GMT+13:00.

We need a special case for Pacific/Apia because icu4c 4.9 doesn't believe
Samoa has ever used daylight time.

I've also added a test to keep us out of mischief in the face of future
upgrades to the Olson tzdata and/or icu4c.

Bug: 7955614
Bug: 8026776
Change-Id: I7ed551a691f29e26dd71456d492493d2a4fce945
til/TimeZone.java
76932ea58323be0b875914396f83aa12bf3229f2 07-Jan-2013 Vladimir Marko <vmarko@google.com> Use EmptyArray.STRING in Splitter.fastSplit().

This is a minor cleanup after
https://android-review.googlesource.com/47964

Change-Id: Id8de6c09f3397b044082c275095ff7a7a43185f9
til/regex/Splitter.java
e72aa7d62d00092074814371dcb9d14ff41992e3 03-Jan-2013 Elliott Hughes <enh@google.com> Improve the Class documentation.

There were a few other instances of the same error reported in the bug,
plus bits that didn't make much sense, so I gave the whole file a quick
scrub.

Bug: http://code.google.com/p/android/issues/detail?id=42100
Change-Id: I40669a614c92a80038253a4adf89f8c7f7f8e95c
ang/Class.java
e040b50765cafb84783245ed959b1f5b6ded8de4 03-Jan-2013 Elliott Hughes <enh@google.com> Improve the Calendar documentation.

Bug: http://code.google.com/p/android/issues/detail?id=42059
Change-Id: I08112426fcd8a2389e4068d2c6f9c3a583ec95d5
til/Calendar.java
e026f397cdc2f235cfc94d14d3925b16f257d17d 22-Dec-2012 Elliott Hughes <enh@google.com> Merge "Performance improvement in DiskLruCache.readJournalLine()."
ae415949fbe29351da9ca97d3bb3678fd0fd8bb9 22-Dec-2012 Elliott Hughes <enh@google.com> Merge "Support System.loadLibrary for libraries with transitive dependencies."
652abda3efa231d431375677363f4a36327eeda7 20-Dec-2012 Elliott Hughes <enh@google.com> Support System.loadLibrary for libraries with transitive dependencies.

Bug: 7896159
Bug: http://code.google.com/p/android/issues/detail?id=34416
Change-Id: Id1225a353b52c50bb3eedfd48e92ec85dd60134b
ang/Runtime.java
beee0a569bf1077f0d3be516fed63661fcedde5c 21-Dec-2012 Brian Carlstrom <bdc@google.com> Fix X509Certificate.getBasicConstraints implementation for DRLCertFactory

Change-Id: I5d1ba078b0f8f9ec8e2950e0da02481e8162a5e6
ecurity/cert/X509Certificate.java
385c6f4303341beb9b091b6d252811b7ca3b9f42 20-Dec-2012 Nick Kralevich <nnk@google.com> FileChannelImpl: Ignore ftruncate failures on non-regular files

Truncate only works on regular files. On other files, such as
UNIX character devices, truncate returns EINVAL, which
causes an IOException to be thrown.

With this change, we now have support for creating a MappedByteBuffer
on UNIX character devices such as /dev/zero, if the underlying
device node supports mmap().

Change-Id: I094371d821b187abe3da32edc411ff76a81b047e
io/FileChannelImpl.java
fc28f29b0b7e6e295c8680a7e1b89e2d26fe61a7 13-Dec-2012 Vladimir Marko <vmarko@google.com> Performance improvement in DiskLruCache.readJournalLine().

Speed up DiskLruCache.readJournalLine() by avoiding memory
allocations from String.split(). For non-CLEAN lines, we
avoid using String.split() altogether and find separators
explicitly, for CLEAN lines we defer to String.split() and
we optimize the underlying Splitter.fastSplit() overload to
avoid unnecessary allocations itself.

On a test journal with 7347 entries (1099 CLEAN) this saves
about 45-50% from ~250ms. On a test journal with 272 entries
(86 CLEAN) this saves about 35-40% from ~10ms. Measured
loadJournal on GN in a tight loop (file contents cached).

If used without the other DiskLruCache.readJournalLine()
improvements, the Splitter.fastSplit() optimization alone
would provide about 60% of the savings. It should also
speed up other code outside the DiskLruCache.

Change-Id: I1d6c6b13d54d8fcba3081f2bb9df701b58f5e143
til/regex/Splitter.java
63694641ecf9f473d0a3b34b8377a94440990857 10-Dec-2012 Elliott Hughes <enh@google.com> Fix formatting of a doc comment for ZipEntry.setComment.

Change-Id: I577c960ea0f486d1b1d55a0d31ce2c71e3776426
til/zip/ZipEntry.java
eb9689bf8aee71f16fbe22a2c90d25628dd431ec 10-Dec-2012 Elliott Hughes <enh@google.com> Protect broken code against native crashes.

It doesn't make any sense to access Matcher or BreakIterator concurrently from
multiple threads, but we shouldn't crash in native code.

Bug: http://code.google.com/p/android/issues/detail?id=41143
Change-Id: I5d0ed97be50ffb7c6cc281ac6293cf82f17e7b80
til/regex/Matcher.java
f05aeedc00c8e7ab7650067ce1dc301547a3914b 10-Dec-2012 Elliott Hughes <enh@google.com> More java.util.zip documentation improvements.

Change-Id: I8ebc23b8a7a7affee0fd3756c3861cf5b6c07ee4
til/zip/Deflater.java
til/zip/ZipEntry.java
til/zip/ZipError.java
til/zip/ZipException.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
13f30b9167639ad63da1707102db6320e8f76474 08-Dec-2012 Elliott Hughes <enh@google.com> Clean up ZipFile a little, fix a few bugs, and improve the documentation.

The main bug fixed is fixing support for .zip files larger than 2GiB (where
the central directory offset's top bit is set).

We were checking character counts rather than byte counts in several places
too, which could lead to corrupt zip files.

I've also added a comment to readCentralDirectory because I keep coming back
to this code, wanting to make it lazy, and never remember (until I've done
half the work) why that's not possible.

I've also clarified a lot of the documentation.

Bug: http://code.google.com/p/android/issues/detail?id=36187
Change-Id: Iaa8eadc501ead7c70528bd9063d5893a325dcea1
til/zip/InflaterInputStream.java
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
61e99b166906954cf2686381968a37a3ab32bde7 05-Dec-2012 Elliott Hughes <enh@google.com> Fix AbstractCollection.toArray.

ConcurrentHashMap.values().toArray() could throw if the map was being modified.
WeakHashMap had a workaround, but AbstractCollection is supposed to just do the
right thing.

Bug: http://code.google.com/p/android/issues/detail?id=36519
Bug: https://issues.apache.org/jira/browse/HARMONY-6681
Change-Id: I749fe615edbea6f8285bfe6804c972e8bdcf2530
til/AbstractCollection.java
til/WeakHashMap.java
cff1616012dc0d56c2da9af2b9b1183e76c7e044 04-Dec-2012 Elliott Hughes <enh@google.com> Add detail messages to all the easy IllegalArgumentException cases.

Noticed during my recent Matcher change.

Change-Id: I415d911b26d0ee548ca04d56bba7fc3d4e6b3f88
o/BufferedReader.java
o/StringReader.java
o/StringWriter.java
ang/System.java
ang/Thread.java
et/DatagramSocket.java
et/HttpCookie.java
et/Socket.java
et/URISyntaxException.java
io/DatagramChannelImpl.java
io/channels/spi/AbstractSelectableChannel.java
ecurity/AlgorithmParameterGenerator.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/SecureRandom.java
ecurity/Signature.java
ecurity/cert/CertPathValidator.java
ql/Date.java
ql/Time.java
ql/Timestamp.java
ext/AttributedString.java
ext/ChoiceFormat.java
ext/Collator.java
ext/DateFormat.java
ext/NumberFormat.java
ext/SimpleDateFormat.java
til/ArrayList.java
til/Collections.java
til/Date.java
til/EnumMap.java
til/EnumSet.java
til/EventObject.java
til/IdentityHashMap.java
til/PriorityQueue.java
til/Random.java
til/SimpleTimeZone.java
til/TimeZone.java
til/Timer.java
til/Vector.java
til/WeakHashMap.java
til/regex/Matcher.java
til/zip/Deflater.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/InflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipOutputStream.java
2c7adc8670dfc1c395d7d99bd95b9d14b129d0f9 04-Dec-2012 Elliott Hughes <enh@google.com> Synchronize calls to Matcher.closeImpl.

Bug: 7603088
Change-Id: I4ed42342438e4e74eecd2e4013be0c85e9b2ef29
til/regex/Matcher.java
c2d0a1f1bd2c6414c29dd44fe240dcf1f45e59b9 04-Dec-2012 Elliott Hughes <enh@google.com> Add detail messages to all remaining NullPointerExceptions.

I've left java.util.concurrent alone, since that's upstream code.

Change-Id: I349960aaddb78e55d4c336b58b637009db69ff98
io/channels/spi/AbstractSelectableChannel.java
til/ListResourceBundle.java
til/Locale.java
492a4616bd20a181e65d6caefc5bf6ff6360ca7f 03-Dec-2012 Elliott Hughes <enh@google.com> Document that SimpleDateFormat L and c weren't available until Gingerbread.

Bug: http://code.google.com/p/android/issues/detail?id=40268
Change-Id: I07f8f4cbd97dfd5b56ed4a1e1338027eb472fa95
ext/SimpleDateFormat.java
161590f779371e5a8b39c0ebaba2bc04d7d288b0 28-Nov-2012 Elliott Hughes <enh@google.com> Note the icu4c 49 upgrade.

(Yes, their version numbering changed. For CLDR too.)

(cherry-pick of dcb358b1be404d56462165e52ee944df9de03839.)

Bug: 7625281
Change-Id: Icfbbcd5382b315e47c2d06555a1475fadd97f62d
til/Locale.java
56fc18dce274c5d5ba56f7b50c5467320b7af807 26-Nov-2012 Elliott Hughes <enh@google.com> Further clarification of System.currentTimeMillis/Date/SimpleDateFormat.

Change-Id: I91c5bc888e5ae2d368e4c063cd5741e840a21dec
ang/System.java
ext/SimpleDateFormat.java
til/Date.java
bcf0a81a927992883f0cb49c1c945141d1261b8b 09-Nov-2012 Elliott Hughes <enh@google.com> am 44d48b2d: Merge "Improve the System.currentTimeMillis/Date/DateFormat/SimpleDateFormat documentation."

* commit '44d48b2df506de9077e91b3e4f3356e41d961323':
Improve the System.currentTimeMillis/Date/DateFormat/SimpleDateFormat documentation.
b98632738dfc72ba32ae0160eada03a97a303288 08-Nov-2012 Elliott Hughes <enh@google.com> Improve the System.currentTimeMillis/Date/DateFormat/SimpleDateFormat documentation.

15 years later, this stuff is still causing confusion.

Change-Id: Id68d43014b72de2cf620cf1798517106fd68d229
ang/System.java
ext/DateFormat.java
ext/SimpleDateFormat.java
til/Date.java
62343774e506f08d97a080486a14472c02d9af89 08-Nov-2012 Elliott Hughes <enh@google.com> am 8e501b90: Merge "Remove dead code."

* commit '8e501b90006e3d01c4641d5fc024c96448a2695c':
Remove dead code.
6f9a604de20786839e20a87e05203e54b0c0efa7 08-Nov-2012 Elliott Hughes <enh@google.com> Remove dead code.

Change-Id: I389bf967ed9a11de8ecb194bf06f69164ac4da4c
ang/System.java
028ad9ba399b09050866e6b369f6e72879b45b3a 05-Nov-2012 Elliott Hughes <enh@google.com> am df0d0295: Merge "Make System.loadLibrary use open(2) rather than stat(2)."

* commit 'df0d029524bc6f4aa6212e8d0e337b590731c7a4':
Make System.loadLibrary use open(2) rather than stat(2).
6d17baa25d349e2659eb16fe5eef3088d48e5e22 05-Nov-2012 Elliott Hughes <enh@google.com> Make System.loadLibrary use open(2) rather than stat(2).

This will let us remove read permission from directories containing .so files.

Bug: 6485312
Change-Id: I72daa265ce54747fc91cdb9d915a05a2464041bb
ang/Runtime.java
750dc634e56c58d1d04f6a138734ac2b772900b5 02-Nov-2012 Elliott Hughes <enh@google.com> am fbc035d7: Merge "Make Runtime.availableProcessors report configured rather than on-line processors."

* commit 'fbc035d73583ae9d5c54214989756ceec743b8d9':
Make Runtime.availableProcessors report configured rather than on-line processors.
6bc129571d5879c464f2bd4771265885df399008 02-Nov-2012 Elliott Hughes <enh@google.com> Make Runtime.availableProcessors report configured rather than on-line processors.

Also improve some of the Runtime documentation a little.

Change-Id: I49d28aceeb0da47a94378e1052a70704600d3417
ang/Runtime.java
990a41d3a24cdf47f62de67d791be36f042185af 30-Oct-2012 Ian Rogers <irogers@google.com> am 372334da: Merge "Make private static field final."

* commit '372334da225b4265897d193df1ea692e601fa213':
Make private static field final.
d0760064f9c4d0fdb04cb4cd348d415603700f11 30-Oct-2012 Ian Rogers <irogers@google.com> Make private static field final.

Change-Id: I3f2862e19b4a35c47e52be2158bfb45ffa30ae35
til/Date.java
00ac85fcdd54ae0b4304a662bc22f321b46bd4f5 30-Oct-2012 Elliott Hughes <enh@google.com> am 93ee28de: Merge "Fix misuses of assert in OldClassTest and comment out other libcore asserts."

* commit '93ee28de077e32036a2cab2ba8e8b4e3f8abab5f':
Fix misuses of assert in OldClassTest and comment out other libcore asserts.
93ee28de077e32036a2cab2ba8e8b4e3f8abab5f 30-Oct-2012 Elliott Hughes <enh@google.com> Merge "Fix misuses of assert in OldClassTest and comment out other libcore asserts."
9fb84f4bee364d44b1d0d425109c98e964b23ae4 30-Oct-2012 Brian Carlstrom <bdc@google.com> am adcea0bf: Merge "Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory"

* commit 'adcea0bf53b5b932013d8290619f17715b33f139':
Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory
b5563f7923913abc0acfaa76332dce0943e0465d 30-Oct-2012 Brian Carlstrom <bdc@google.com> am 595ea24b: Merge "Restore some java.security package documentation"

* commit '595ea24b8669d38c8d9fe05319fd889654da9b21':
Restore some java.security package documentation
67a368573213811c0037cb1b972a0d5fdb3eaf48 30-Oct-2012 Elliott Hughes <enh@google.com> Fix misuses of assert in OldClassTest and comment out other libcore asserts.

Change-Id: Ie9e5b785b3e87c91df02ffd93f7973fd7c99af0e
til/ArrayDeque.java
til/Arrays.java
til/TreeMap.java
til/UUID.java
til/Vector.java
c934a095e1f863f00bf6f7c0b37fbd05ebeaaff5 29-Oct-2012 Brian Carlstrom <bdc@google.com> Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory

Change-Id: I3da5bdf6739c6aee5ec0174e93cd6c06d6dfeeb3
ecurity/KeyStore.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/security.properties
d972b758ae5a47834e666e47002f73b4a17b5da9 27-Oct-2012 Brian Carlstrom <bdc@google.com> Restore some java.security package documentation

Change-Id: I78267712c10e8561b78058a9df62067dcccb0e25
ecurity/package.html
3c473504c37c2f91053a1099f207ad8b7cc551f4 17-Oct-2012 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 019ddbbe to jb-mr1-dev-plus-aosp

Change-Id: I0fe3967132ae298c2abe9523884c0205851e732e
9726be51ed6f9695357bc8f11a547d9beaa79fce 16-Oct-2012 Brian Carlstrom <bdc@google.com> Fix Thread.interrupt and PipedInputStream/PipedReader issues found by InterruptedStreamTest

Bug: 6951157
Change-Id: I558f8eb5c435f01c98c080ac38cc7c165e7aee25
o/PipedInputStream.java
o/PipedReader.java
ang/Thread.java
ed23021e0292c42d6471b57cdee3af2e6ad04db7 16-Oct-2012 Elliott Hughes <enh@google.com> am 815d8932: Merge "More "charsetName" consistency."

* commit '815d8932cb41e62d1ee47d4975e9812e2ef72b9c':
More "charsetName" consistency.
be4a7d686edf15a7fbdd00b40cf78cb26d105d0e 16-Oct-2012 Elliott Hughes <enh@google.com> More "charsetName" consistency.

A follow-on to 9b9e9145bc55a47be42a9d3f7ecc9f6b533739b2, after URLDecoder
caused some confusion.

Change-Id: I727dc375593596272d06e177c5dd8002d3e7321c
et/URLDecoder.java
ecurity/cert/CertPath.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
til/logging/Handler.java
til/logging/StreamHandler.java
b495e792e2de10136d797bc5e5047112b6326f11 13-Oct-2012 Brian Carlstrom <bdc@google.com> am 75404c04: Merge "Fix a typo where BufferedReader refers to chars as bytes."

* commit '75404c04e0bab09999a393cc6521d08d3996c17e':
Fix a typo where BufferedReader refers to chars as bytes.
75404c04e0bab09999a393cc6521d08d3996c17e 13-Oct-2012 Brian Carlstrom <bdc@google.com> Merge "Fix a typo where BufferedReader refers to chars as bytes."
fd1bbd5cb70830aaf6639dafc240c4d17181ef75 13-Oct-2012 Jesse Wilson <jwilson@squareup.com> Fix a typo where BufferedReader refers to chars as bytes.

Change-Id: I4be1fe88f97c10bc5142df05e2ffc9a3b4094d81
o/BufferedReader.java
o/BufferedWriter.java
9dbe25c174d4f7e5099db1ea278513971e058ff8 12-Oct-2012 Kenny Root <kroot@google.com> am 0bf8e7a3: Merge "Add support for ECDSA signatures on jar files"

* commit '0bf8e7a3145bbc6a32f5b88364a923af40434b61':
Add support for ECDSA signatures on jar files
52c906b82c75e811284a1788e5ca0b4330a55a36 10-Oct-2012 Kenny Root <kroot@google.com> Add support for ECDSA signatures on jar files

Change-Id: If928f2244b3a0809255d6619c25268beb84f76d3
til/jar/JarFile.java
til/jar/JarVerifier.java
3bee60c76bc2801be1cc412829480c2b40ebcd41 11-Oct-2012 Elliott Hughes <enh@google.com> am bf983d54: Merge "Move the useful parts of the java.sql package.html into the relevant classes."

* commit 'bf983d5487ebff679a00b60d82ed548437955bad':
Move the useful parts of the java.sql package.html into the relevant classes.
bfd37b22b094c1dcab9d9253daa350f16f0b1e32 11-Oct-2012 Elliott Hughes <enh@google.com> Move the useful parts of the java.sql package.html into the relevant classes.

Change-Id: I1b7183af72ed45fcba2d9c668ae99c2854c21dfb
ql/Driver.java
ql/DriverManager.java
ql/package.html
aca7f86d4e289d960ebc2364e0f6350cfbb51890 11-Oct-2012 Elliott Hughes <enh@google.com> am 0dc144dd: Merge "Move java.lang.ref documentation into Reference."

* commit '0dc144dd6bb715bf6454e89a4ad7b43250b05e77':
Move java.lang.ref documentation into Reference.
8f09b07e6c83cd76d0d6c6faa697e0a3e77361ba 11-Oct-2012 Elliott Hughes <enh@google.com> Move java.lang.ref documentation into Reference.

It's more likely to be read there than in package.html.

Change-Id: I6ce327cab66660fcf3fa37cacd3e85c95d433a74
ang/ref/Reference.java
ang/ref/package.html
33cd780ed7ef61d32f4f768d4d236e37fe101188 11-Oct-2012 Elliott Hughes <enh@google.com> am 099ded13: Merge "Explain that System.arraycopy is like memmove(3), not memcpy(3)."

* commit '099ded13eb5a74afd69658d2b3cb7acbc91546ec':
Explain that System.arraycopy is like memmove(3), not memcpy(3).
0883232ea56c06c9c530ec924fdaf21f19f3f14c 11-Oct-2012 Elliott Hughes <enh@google.com> Explain that System.arraycopy is like memmove(3), not memcpy(3).

Change-Id: I1e581cfbddf861fdcd918833dcd85306b96ef1ac
ang/System.java
a56d9c6247415d7cd99d8a3edfd3f97dfbab8a42 10-Oct-2012 Kenny Root <kroot@google.com> am 6508bcc2: Merge "Add stronger digest support to JarVerifier"

* commit '6508bcc268f74b04dfcd04b1cafb5f293ad0f690':
Add stronger digest support to JarVerifier
bff099b1b39940301bc7dd4be52dbe303c5e6fdf 10-Oct-2012 Kenny Root <kroot@google.com> Add stronger digest support to JarVerifier

Adds support for SHA-256, SHA-384, and SHA-512.

Bug: http://code.google.com/p/android/issues/detail?id=38321
Change-Id: I9bf3f9cb2fa53b9f980e6c1cffcba81aa289a762
til/jar/JarVerifier.java
32c042582b6fc5da2b86db1ca8920c5420edd2be 09-Oct-2012 Elliott Hughes <enh@google.com> am 23719174: Merge "Rewrite NativeBreakIterator to use refreshInputText."

* commit '2371917431e4571c6e6c2ca719f2c00682a566d4':
Rewrite NativeBreakIterator to use refreshInputText.
015843683630bd8e8f060c052ecd2e5a804a8396 08-Oct-2012 Elliott Hughes <enh@google.com> Rewrite NativeBreakIterator to use refreshInputText.

Requires icu4c >= 4.9, or a backport of the fix to icu4c bug
http://bugs.icu-project.org/trac/ticket/8490.

(cherry-pick of db1a2e3641d679faf34ce6532c487ab0236550a1.)

Bug: 7288264
Bug: 7307154
Change-Id: Ic8e5be2d345e2b2aa2873ab9bf35b1273199d227
ext/BreakIterator.java
ext/RuleBasedBreakIterator.java
f6c5119f0a841aa9cd4dbbd1d964dad15c0ceb8b 05-Oct-2012 Brian Carlstrom <bdc@google.com> am e51202d9: Merge "Ensure we give "tl" the display name "Filipino"." into jb-mr1-dev

* commit 'e51202d94f55e6659dd39a7976ded526297276ee':
Ensure we give "tl" the display name "Filipino".
e51202d94f55e6659dd39a7976ded526297276ee 05-Oct-2012 Brian Carlstrom <bdc@google.com> Merge "Ensure we give "tl" the display name "Filipino"." into jb-mr1-dev
35b0b4c66d192ee6a060ef58cf5d0cd0e442bd38 05-Oct-2012 Elliott Hughes <enh@google.com> am 2bc9eec8: am e80885fe: Merge "Slim down ZoneInfo.toString."

* commit '2bc9eec85951cf503ba18166ce56bf8a84368a18':
Slim down ZoneInfo.toString.
de3df0418aff29b06ea022b200fbcc687de63a7c 05-Oct-2012 Elliott Hughes <enh@google.com> Slim down ZoneInfo.toString.

Dalvik Explorer can now do a better job of helping examine transition data,
and regular developers don't need to see it. For America/Los_Angeles, for
example, toString used to output 186 lines. Now it just returns:

libcore.util.ZoneInfo[id="America/Los_Angeles",mRawOffset=-28800000,mEarliestRawOffset=-28800000,mUseDst=true,mDstSavings=3600000,transitions=185]

Also fix an incorrect comment from the TimeZone documentation.

Change-Id: I5748845a7b4f911e99a0e1c2e1a0786742288518
til/TimeZone.java
50e50d57783060196a1f8e367616f2109c9edb4e 05-Oct-2012 Elliott Hughes <enh@google.com> Ensure we give "tl" the display name "Filipino".

This isn't right for all locales, but it's right for "tl" in "tl" itself,
which is how we render language names in Settings.

(Yes, I know that "tl" is for "Tagalog" and "fil" is for "Filipino", but
Google policy is to use the latter name. If our resource system weren't
limited to two-letter language codes, we'd be using the modern three-letter
"fil" instead of the obsolete "tl", but we can't fix that right now. Bukas.)

Bug: 7291355
Change-Id: I7d9021dc55d9f1d3f8a75b10c890a2d5f91982d6
til/Locale.java
b2e6be1cc1d375ca2fc28ee1fdfc10c0adc2554d 29-Sep-2012 Elliott Hughes <enh@google.com> Rewrite NIO Pipe to use socketpair(2).

Our Pipe originally used socket(2) to create AF_INET/AF_INET6
sockets. This was clearly a bad idea.

I rewrote it to use socketpair(2) and AF_UNIX, but this was
before the big "expose POSIX" rewrite, so it required a bunch
of hacks in the native code, so I went with pipe(2) instead.

The trouble with pipe(2) is that we end up using FileChannel
to implement the Pipe.SinkChannel and Pipe.SourceChannel, but
the kernel won't wake a read(2) on a pipe if another thread
calls close(2) on it, so we started failing interrupt tests.

This (final?) rewrite is hopefully the best of all worlds:
we don't have any INTERNET permission needs, the code is as
simple as the pipe(2) code, and interruption works.

Bug: 7084342
Bug: 2735373
Bug: http://code.google.com/p/android/issues/detail?id=9431

(cherry picked from commit 3218082325b6b8713a8ac15731482e3da86a7df9)

Change-Id: Ib92cdf8c818f6bba1f00e191f1b624ce9e693754
io/PipeImpl.java
io/SelectorProviderImpl.java
io/SocketChannelImpl.java
43e28aa028d6e06ea74237bef2758d0108a2d174 02-Oct-2012 Kenny Root <kroot@google.com> am 56d378a8: am a1848749: Merge "Update docs on SecureRandom about determinism"

* commit '56d378a82fa1565517d2a46ee0d918df557a3662':
Update docs on SecureRandom about determinism
a1848749e8a2514ac8d16709b05bd39443980fc2 02-Oct-2012 Kenny Root <kroot@google.com> Merge "Update docs on SecureRandom about determinism"
1c27d48ddfaf595d06899c020d2ad037b40c27d2 24-Aug-2012 Kenny Root <kroot@google.com> Update docs on SecureRandom about determinism

The docs for SecureRandom mentioned very specific operational semantics
of the behavior of one provider. This makes it more general while
maintaining the cautioning tone givent to developers about the setSeed
semantics.

Change-Id: I234478dfe05a20357f16a2ae7eb9535889101832
ecurity/SecureRandom.java
9d5e6833b58652f0061a09852dc8802c4c9ed67b 02-Oct-2012 Elliott Hughes <enh@google.com> am 74b3b18c: am 7ca6ef25: Merge "Make Timestamp.valueOf locale safe"

* commit '74b3b18c2723991a2d237bf038486a4d52d9bcea':
Make Timestamp.valueOf locale safe
7ca6ef25d8dff972e6c40523be464dbbf338013a 02-Oct-2012 Elliott Hughes <enh@google.com> Merge "Make Timestamp.valueOf locale safe"
f58ca9d9ff8540a146a0031d5557881f8b66f348 02-Oct-2012 Johan Redestig <johan.redestig@sonymobile.com> Make Timestamp.valueOf locale safe

Timestamp.valueOf was producing results that varied
depending on the current default locale.

Change-Id: I464be9c1553dfc4886be7bfbdbf0ac4eb50929b3
ql/Timestamp.java
bc049016ee71735211cf0d3e4ac34a531e8fe5ba 29-Sep-2012 Elliott Hughes <enh@google.com> am 05d71b4b: am 1235166d: Merge "Rewrite NIO Pipe to use socketpair(2)."

* commit '05d71b4bb57bd741214b15ea838770adb5ff688b':
Rewrite NIO Pipe to use socketpair(2).
3218082325b6b8713a8ac15731482e3da86a7df9 29-Sep-2012 Elliott Hughes <enh@google.com> Rewrite NIO Pipe to use socketpair(2).

Our Pipe originally used socket(2) to create AF_INET/AF_INET6
sockets. This was clearly a bad idea.

I rewrote it to use socketpair(2) and AF_UNIX, but this was
before the big "expose POSIX" rewrite, so it required a bunch
of hacks in the native code, so I went with pipe(2) instead.

The trouble with pipe(2) is that we end up using FileChannel
to implement the Pipe.SinkChannel and Pipe.SourceChannel, but
the kernel won't wake a read(2) on a pipe if another thread
calls close(2) on it, so we started failing interrupt tests.

This (final?) rewrite is hopefully the best of all worlds:
we don't have any INTERNET permission needs, the code is as
simple as the pipe(2) code, and interruption works.

Bug: 7084342
Bug: 2735373
Bug: http://code.google.com/p/android/issues/detail?id=9431
Change-Id: If3f052c9d3f5aa1c099f5a069ace9a8d6ce3ca3a
io/PipeImpl.java
io/SelectorProviderImpl.java
io/SocketChannelImpl.java
0292a23dc535fcaeba0c1a65c6068e8423a5e326 25-Sep-2012 Elliott Hughes <enh@google.com> am 83a7efd5: am 107c45f4: Merge "Improve java.lang.Thread documentation."

* commit '83a7efd5f636c015ad0a91f05f5a25370033a15e':
Improve java.lang.Thread documentation.
a6ea031761707e674703bef04519ddf0c6a81a4d 25-Sep-2012 Elliott Hughes <enh@google.com> Improve java.lang.Thread documentation.

Change-Id: Id722186291bd9be94b64616397a979f07766c34f
ang/Thread.java
0ab0d54b1615fa0b074978f0b5a669b5327294c8 21-Sep-2012 Elliott Hughes <enh@google.com> am 63529068: am 82d74983: Merge "Fix a native memory leak in SimpleDateFormat cloning."

* commit '63529068e9655252a46b372fa8919c59177fb453':
Fix a native memory leak in SimpleDateFormat cloning.
34a3a0501220dd62b88ddb4a355bad46b15c25a2 21-Sep-2012 Elliott Hughes <enh@google.com> Fix a native memory leak in SimpleDateFormat cloning.

We didn't use the regular finalization idiom in NativeDecimalFormat because
Formatter used to create a lot of these objects, and we wanted to be able to
close them manually rather than clogging up the GC. We've since rewritten
the Formatter code so this is no longer relevant, but we left the finalization
in the wrong class.

Tested with a "while (true) sdf.clone();" loop and ps(1).

Bug: http://code.google.com/p/android/issues/detail?id=37607
Change-Id: I0c435edf8c1bced00ebf04bd7187883344e971e7
ext/DateFormat.java
ext/DecimalFormat.java
ext/NumberFormat.java
ext/SimpleDateFormat.java
719abfb38ff2db32b373d7dec6e254d2026dfd6d 15-Sep-2012 Elliott Hughes <enh@google.com> am d23dd0d4: am 90450038: Merge "Consistently use "charsetName" for charset names."

* commit 'd23dd0d42acab1c9b5b2cd4421b196120369d72e':
Consistently use "charsetName" for charset names.
9b9e9145bc55a47be42a9d3f7ecc9f6b533739b2 14-Sep-2012 Elliott Hughes <enh@google.com> Consistently use "charsetName" for charset names.

Change-Id: I147217077790c1ddfb815e870409abade31839c6
o/ByteArrayOutputStream.java
o/InputStreamReader.java
o/OutputStreamWriter.java
o/PrintStream.java
d43b9ef11a1095967a3396b246639b563e1a4128 12-Sep-2012 Kenny Root <kroot@google.com> Add consistent reasons for NullPointerException

Semi-automated replacement of empty and non-conforming
NullPointerException reason messages.

(cherry-pick of 86acc043d3334651ee26c65467d78d6cefedd397.)

Change-Id: I6d893979f5c20a50e841e32af9fd7b2d8bc9d54d
eans/PropertyChangeSupport.java
o/BufferedWriter.java
o/File.java
o/InputStreamReader.java
o/ObjectInputStream.java
o/ObjectStreamField.java
o/OutputStreamWriter.java
o/PipedOutputStream.java
o/PipedWriter.java
o/PrintStream.java
o/Reader.java
o/SequenceInputStream.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/Character.java
ang/ClassLoader.java
ang/Enum.java
ang/ProcessBuilder.java
ang/ProcessManager.java
ang/Runtime.java
ang/StackTraceElement.java
ang/String.java
ang/StringBuilder.java
ang/System.java
ang/Thread.java
ang/Throwable.java
ang/reflect/GenericArrayType.java
ang/reflect/Proxy.java
ath/BigDecimal.java
ath/BigInt.java
et/CookieStore.java
et/DatagramSocket.java
et/URISyntaxException.java
et/URLClassLoader.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
io/channels/Channels.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/Provider.java
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/Signature.java
ecurity/Signer.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/X509CRL.java
ecurity/spec/ECGenParameterSpec.java
ql/DriverManager.java
ext/AttributedString.java
ext/Collator.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/MessageFormat.java
ext/NumberFormat.java
ext/RuleBasedCollator.java
ext/SimpleDateFormat.java
til/AbstractQueue.java
til/ArrayDeque.java
til/Arrays.java
til/Calendar.java
til/Collections.java
til/DuplicateFormatFlagsException.java
til/EnumMap.java
til/FormatFlagsConversionMismatchException.java
til/Formatter.java
til/Hashtable.java
til/IllegalFormatConversionException.java
til/IllegalFormatFlagsException.java
til/ListResourceBundle.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/Observable.java
til/PriorityQueue.java
til/Properties.java
til/PropertyResourceBundle.java
til/ResourceBundle.java
til/Scanner.java
til/ServiceLoader.java
til/StringTokenizer.java
til/TimeZone.java
til/Timer.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/jar/JarOutputStream.java
til/logging/FileHandler.java
til/logging/Handler.java
til/logging/LogManager.java
til/logging/StreamHandler.java
til/prefs/AbstractPreferences.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/InflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
16edf9b0421592489932a81f29528eb532aeb441 14-Sep-2012 Kenny Root <kroot@google.com> Merge "Add consistent reasons for NullPointerException" into jb-mr1-dev
8d6c578f1d484482b644f5b77f3f2a5ea9f52977 14-Sep-2012 Elliott Hughes <enh@google.com> am dad6b628: am 480d35bc: Merge "Manually inline StrictMath.min(JJ) and StrictMath.max(JJ)."

* commit 'dad6b62846eb2d3e9aa51c1eb16c17fce8363da0':
Manually inline StrictMath.min(JJ) and StrictMath.max(JJ).
2827b1f103ac753cb5a16d459b6e017c80643ed7 14-Sep-2012 Elliott Hughes <enh@google.com> am c9411f30: am 3f905a73: Merge "Document that Random.nextGaussian should use StrictMath."

* commit 'c9411f301ca8336e2d1edff2977e3f246373c1ea':
Document that Random.nextGaussian should use StrictMath.
480d35bc9afbf59539ddb9e9b8c6a0765ac4f219 14-Sep-2012 Elliott Hughes <enh@google.com> Merge "Manually inline StrictMath.min(JJ) and StrictMath.max(JJ)."
bf9c47975631cda6ead2eda00d3db3c93444eeba 14-Sep-2012 Elliott Hughes <enh@google.com> Manually inline StrictMath.min(JJ) and StrictMath.max(JJ).

Also add new intrinsic tests.

Bug: 7146208
Change-Id: Ic454c8c5b218c51ce1c21f0c11163455392b4e72
ang/Math.java
ang/StrictMath.java
86acc043d3334651ee26c65467d78d6cefedd397 12-Sep-2012 Kenny Root <kroot@google.com> Add consistent reasons for NullPointerException

Semi-automated replacement of empty and non-conforming
NullPointerException reason messages.

Change-Id: Iedeb4b21949e973c4042ce5982dda315f2e785e1
eans/PropertyChangeSupport.java
o/BufferedWriter.java
o/File.java
o/InputStreamReader.java
o/ObjectInputStream.java
o/ObjectStreamField.java
o/OutputStreamWriter.java
o/PipedOutputStream.java
o/PipedWriter.java
o/PrintStream.java
o/Reader.java
o/SequenceInputStream.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/Character.java
ang/ClassLoader.java
ang/Enum.java
ang/ProcessBuilder.java
ang/ProcessManager.java
ang/Runtime.java
ang/StackTraceElement.java
ang/String.java
ang/StringBuilder.java
ang/System.java
ang/Thread.java
ang/Throwable.java
ang/reflect/GenericArrayType.java
ang/reflect/Proxy.java
ath/BigDecimal.java
ath/BigInt.java
et/CookieStore.java
et/DatagramSocket.java
et/URISyntaxException.java
et/URLClassLoader.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
io/channels/Channels.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/Provider.java
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/Signature.java
ecurity/Signer.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/X509CRL.java
ecurity/spec/ECGenParameterSpec.java
ql/DriverManager.java
ext/AttributedString.java
ext/Collator.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/MessageFormat.java
ext/NumberFormat.java
ext/RuleBasedCollator.java
ext/SimpleDateFormat.java
til/AbstractQueue.java
til/ArrayDeque.java
til/Arrays.java
til/Calendar.java
til/Collections.java
til/DuplicateFormatFlagsException.java
til/EnumMap.java
til/FormatFlagsConversionMismatchException.java
til/Formatter.java
til/Hashtable.java
til/IllegalFormatConversionException.java
til/IllegalFormatFlagsException.java
til/ListResourceBundle.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/Observable.java
til/PriorityQueue.java
til/Properties.java
til/PropertyResourceBundle.java
til/ResourceBundle.java
til/Scanner.java
til/ServiceLoader.java
til/StringTokenizer.java
til/TimeZone.java
til/Timer.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/jar/JarOutputStream.java
til/logging/FileHandler.java
til/logging/Handler.java
til/logging/LogManager.java
til/logging/StreamHandler.java
til/prefs/AbstractPreferences.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/InflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
b37323027a3fb66b07a2c70eb48e9dd1c4c0f466 12-Sep-2012 Elliott Hughes <enh@google.com> Document that Random.nextGaussian should use StrictMath.

Bug: 7146208
Change-Id: Ife58d868e9310de3f378500fdbf53b2f3a690f04
til/Random.java
e25cfef797c4428bb7a3b9b64a5a09591ed1a55a 05-Sep-2012 Elliott Hughes <enh@google.com> am ab991b57: am 43211dce: Merge "Make FileDescriptor.sync() work on ttys"

* commit 'ab991b570d8cd3b1c36fe6dfc8af883eaad9a74f':
Make FileDescriptor.sync() work on ttys
bb5816aa1626eb2f6263bd21479600b114c8a1bd 10-Jan-2012 Johan Redestig <johan.redestig@sonymobile.com> Make FileDescriptor.sync() work on ttys

fsync on Linux fails on tty file descriptors. This change
adds the capability to make sure all data was written to the
terminal device descriptor to java.io.FileDescriptor.sync()
implementation.

Also fixed the return value from Posix_isatty. isatty
returns 1 if an fd is a tty and 0 otherwise.

Change-Id: I6cc65db83f523b4c31b67b48d7534e18af0989e8
o/FileDescriptor.java
c455ce42ebb3742c888fcd0fc7db94a6dfc36fe3 05-Sep-2012 Elliott Hughes <enh@google.com> am 2c417207: am f26e2ed8: Merge "Fix date parsing for RTL languages such as Arabic."

* commit '2c4172071923e0d6066a84874517d702c9d3d261':
Fix date parsing for RTL languages such as Arabic.
9596d75ebf937d47a2de195b09584e88c91eb6f6 30-Aug-2012 Elliott Hughes <enh@google.com> Fix date parsing for RTL languages such as Arabic.

(The cleanup of the native code is an irrelevant target of opportunity.)

Bug: http://code.google.com/p/android/issues/detail?id=36689
Change-Id: I6d9f0bbbd6e8f99421072102e0d785bc3429cc14
ext/SimpleDateFormat.java
d0c2c3bdc19066142cad2a4ed567bfc4378f38e2 29-Aug-2012 Elliott Hughes <enh@google.com> am 0a1346b9: am d2852870: Merge "Improve nio IllegalArgumentException detail messages."

* commit '0a1346b9d785a595898845294770efe073741a9b':
Improve nio IllegalArgumentException detail messages.
126ab1b546c71137a97cef68cc89267e7f7be634 28-Aug-2012 Elliott Hughes <enh@google.com> Improve nio IllegalArgumentException detail messages.

Bug: 7005326
Change-Id: Ibab8b776865dbed5da062cc683f834a79f068b32
io/Buffer.java
io/ByteBuffer.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FileChannelImpl.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/MappedByteBuffer.java
io/SelectorImpl.java
io/ShortBuffer.java
io/SocketChannelImpl.java
io/channels/FileLock.java
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
io/charset/CoderResult.java
e9648a47e80bf150da4f23c6cded726da55374a5 18-Aug-2012 Brian Carlstrom <bdc@google.com> am c7044013: am 5fb9cb9c: Merge "KeyStoreSpi.engineSetEntry should allow null ProtectionParameter"

* commit 'c704401332c808551a20bf8e4dc97920d458ac6c':
KeyStoreSpi.engineSetEntry should allow null ProtectionParameter
d951031b428eb2885dca51e0484d5d29e0caad44 18-Aug-2012 Brian Carlstrom <bdc@google.com> KeyStoreSpi.engineSetEntry should allow null ProtectionParameter

Change-Id: Ibf5be502a70a63abccb6e45dc6b6ff18b2c63ca9
ecurity/KeyStoreSpi.java
d7d4cf700dbb7f46d5bbaccfe38f2e555b1942e8 09-Aug-2012 Elliott Hughes <enh@google.com> am b37b2884: am 3cb4f017: Merge "Fix the java.util.concurrent package documentation."

* commit 'b37b288468d936d231e934e11820d2c11b6e0c4d':
Fix the java.util.concurrent package documentation.
a7d984ae8902f65664de50ca5faed1f9d52689ec 09-Aug-2012 Elliott Hughes <enh@google.com> am 13966371: am c27b2e39: Merge "Make Charsets final."

* commit '13966371f65f211e9d8cc152a029cfb419149ee1':
Make Charsets final.
3cb4f017922d81d7d8c44a6bd2cb9fd5f876f69b 09-Aug-2012 Elliott Hughes <enh@google.com> Merge "Fix the java.util.concurrent package documentation."
2d7d4072dbfe90e9da20106deb0c7ed6e8ed614b 09-Aug-2012 Elliott Hughes <enh@google.com> Fix the java.util.concurrent package documentation.

Android doesn't yet include Phaser.

Bug: http://code.google.com/p/android/issues/detail?id=36142
Change-Id: I237d8a2616550f809a34bab196de374b28e9273c
til/concurrent/package-info.java
5de66adb390e0885195b4f5caa3856a790abd087 09-Aug-2012 Elliott Hughes <enh@google.com> Make Charsets final.

Change-Id: I4a16ba53eda539059738f92a07b5563370ae2693
io/charset/Charsets.java
28c2f0868cdf16b446df806efb63ae54b4426ba0 06-Aug-2012 Elliott Hughes <enh@google.com> am 68e025f3: am 1af7fe99: Merge "Improve the URLConnection timeout documentation slightly."

* commit '68e025f328af63c0bbab9a8698833ca9e5e66818':
Improve the URLConnection timeout documentation slightly.
1af7fe9969b57f551e6a97e8e87c6559ae31c254 06-Aug-2012 Elliott Hughes <enh@google.com> Merge "Improve the URLConnection timeout documentation slightly."
699f565e8773f3aab263e7b33f6d089355814f19 06-Aug-2012 Elliott Hughes <enh@google.com> Improve the URLConnection timeout documentation slightly.

Change-Id: Ia4fbe6466f6db3f1186e6a007988d59140fc9f40
et/URLConnection.java
363b9599d1f3bb8a27fd1443d32eb7c7f8a9ab9c 03-Aug-2012 Brian Carlstrom <bdc@google.com> am d9a268ef: am 29c19bec: Merge "Use default UncaughtExceptionHandler to report finalizer timeouts when defined."

* commit 'd9a268ef73af475c1f97c400cf76f4d3daf2eb3a':
Use default UncaughtExceptionHandler to report finalizer timeouts when defined.
474a846981ea98054f221a10f994b7dcbfee985c 02-Aug-2012 Brian Carlstrom <bdc@google.com> Use default UncaughtExceptionHandler to report finalizer timeouts when defined.

In a previous release dalvik would abort on finalizer timeouts which
would be noticed by various tools such as the monkey. However, more
recently when the handling of this was moved to managed code, we
simply logged and exited, which went unnoticed by the monkeys. By
reporting via the default UncaughtExceptionHandler, finalizer timeouts
will once again be noticed by the monkeys, this time via the
application crash reporting.

Bug: 6894375
Change-Id: I94664f8bb54dc7647b4d3666484d88b1c8428c4b
ang/Daemons.java
8af8c050290c7a3d7886574644fcd1208ce95c89 03-Aug-2012 Brian Carlstrom <bdc@google.com> am f27d4dab: am 21d09848: Merge "Avoid ConcurrentModificationException on providers"

* commit 'f27d4dab850d09b660556c649788a7ffa13db4b5':
Avoid ConcurrentModificationException on providers
c7a56c94bdea0e20123ae6fba5eca5b8d984c670 01-Aug-2012 Brian Carlstrom <bdc@google.com> Avoid ConcurrentModificationException on providers

Previously concurrently adding/removing providers in one thread and
doing algorithm lookups on another thread would cause
ConcurrentModificationExceptions such as:

java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:569)
at org.apache.harmony.security.fortress.Services.updateServiceInfo(Services.java:186)
at org.apache.harmony.security.fortress.Services.refresh(Services.java:234)
at org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:137)
at java.security.KeyFactory.getInstance(KeyFactory.java:81)

Also do some general cleanup and add similar protection on services.

Change-Id: I706c45655924dfccc3383fca57653d0c5b461721
ecurity/SecureRandom.java
5fbdac52bd724b6c43b38e13e8dcfbc1dd158363 02-Aug-2012 Brian Carlstrom <bdc@google.com> am 5a47c405: am a74ca833: Merge "Remove more cruft."

* commit '5a47c405c99b1832d64f9f607f738e4d82a870ed':
Remove more cruft.
6372c77f7c07b8bfacf08f3435f03a03c24eaff1 02-Aug-2012 Brian Carlstrom <bdc@google.com> am 1d8227be: am e7f6b286: Merge "Don\'t call overrideable methods from a constructor."

* commit '1d8227beef85e0529dd64acabfd674244987368b':
Don't call overrideable methods from a constructor.
20484654bc7c2407da40226d5188acfc37ee1c2b 09-Aug-2011 Elliott Hughes <enh@google.com> Remove more cruft.

Unused imports and bogus comments.

(cherry-pick of 9af8c0318fac8bf03ee145da01b0c38a503791fc.)

Change-Id: I2bddb32028b71964407e86c4dbef5516673c27eb
o/ObjectInputStream.java
9b69e9466df96b62c6a689184d6ea50f52e4447b 02-Aug-2012 Brian Carlstrom <bdc@google.com> am 8dc08bcc: am 549a5544: Merge "Include the failed key when a Hashtable put fails."

* commit '8dc08bcc359d3fe7a6b2a9921df92b5d3173cd0f':
Include the failed key when a Hashtable put fails.
92f41b722d1f1c0ca943ad3959558c2073f1de7a 02-Aug-2012 Elliott Hughes <enh@google.com> am 05823bc3: am 0449fee2: Merge "Avoid the implicit NaN test in {float,double}To{Int,Long}Bits."

* commit '05823bc335b033a8ce2d1e4d03df4748822bceea':
Avoid the implicit NaN test in {float,double}To{Int,Long}Bits.
e05231e0050e27c49c64a37fec70e0576d9b2687 02-Aug-2012 Brian Carlstrom <bdc@google.com> am 5f4469c7: am cfd0f992: Merge "Don\'t cache partial sets of date fields in Calendar."

* commit '5f4469c7a0a815c74dd6148638c6cfbaa70b5cb8':
Don't cache partial sets of date fields in Calendar.
687409006d21cb01c56b3a3acc180952bb4d7e3e 22-Jun-2011 Jesse Wilson <jessewilson@google.com> Don't call overrideable methods from a constructor.

Conflicts:

luni/src/test/java/libcore/java/util/TimeZoneTest.java

(cherry-pick of 7dbf334facc7f43c18244150d2052ae4ec8c5e16.)

Change-Id: I0aa0f3c8776538076bdfed070da08e65aa959486
til/SimpleTimeZone.java
421f0b0e439b5baeb6d2888cf61c7acc0516e2ec 07-Dec-2011 Jesse Wilson <jessewilson@google.com> Include the failed key when a Hashtable put fails.

This helped debugging a problem I was running into when
getting vogar to work when System.getenv() was returning
null; it might help other developers in similar situations.

(cherry-pick of e9f1bc2eb660107ef925b3424f472e38b74b92ac.)

Change-Id: If58c16397b70ef747736df8d5491da15fa3a450c
til/Hashtable.java
bbffd0389666ee4c3a44c9f111bc87cb8781c30e 16-Jul-2011 Carl Shapiro <cshapiro@google.com> Avoid the implicit NaN test in {float,double}To{Int,Long}Bits.

The possibility of ak being a NaN is eliminated by the preceding
compare to 0.0. As such, a raw conversion will produce identical
results.

(cherry-pick of c9f45b2e4dd6c5f0bd96d8419370cdbbc7031ffa.)

Change-Id: Ic87cc137030d9d9e2f3c725ed15982b313323b5d
til/DualPivotQuicksort.java
2aafe038571c2ec47e1d72ea7b9fdb8ea1c0043a 02-Aug-2012 Brian Carlstrom <bdc@google.com> am bf98261b: am 1e97b40a: Merge "Don\'t serialize a Throwable\'s stackState field."

* commit 'bf98261b88799ac856076b84287ed9cf787d35bf':
Don't serialize a Throwable's stackState field.
1baa4fcbfe3c22e5f06a4fee48f520162d23270f 22-Jun-2011 Jesse Wilson <jessewilson@google.com> Don't cache partial sets of date fields in Calendar.

This was only useful when modifying calendars within a single day.
Not worth the complexity, and possibly a source of bugs.

(cherry-pick of 0170a5c2cd87d90e11513a45f29ebafee6a1701c.)

Bug: 2435103
Change-Id: Ib6d68aed29f424ac464fc389e7ae26909667b9b9
til/Calendar.java
til/GregorianCalendar.java
56444c0884abdbd0946d4e601d534edda0bb2aac 22-Nov-2011 Jesse Wilson <jessewilson@google.com> Don't serialize a Throwable's stackState field.

In some situations this field may reference a non-serializable value.

(cherry-pick of 6c15570a27c2b7aad18ae2064db2eae921be27e0.)

Change-Id: I78607bbcb707fc1ab43cfbaba4647d91b9d90ad4
ang/Throwable.java
a913776e4119be88d51f53f8800e388bdf4a25bc 02-Aug-2012 Brian Carlstrom <bdc@google.com> am c12b0ee5: am 5bfdc3aa: Merge "Update java.util.concurrent to 2011-nov-1."

* commit 'c12b0ee5e53380f24999454b0a68e66d920f8e70':
Update java.util.concurrent to 2011-nov-1.
a807b4d808d2591894daf13aab179b2e9c46a2f5 01-Nov-2011 Jesse Wilson <jessewilson@google.com> Update java.util.concurrent to 2011-nov-1.

The most recent change to the upstream CVS tree was on Tue Oct 25 20:29:12 2011 UTC.

This removes references to security managers.

(cherry-pick of d206d1f85f051ec85bc1b00d576a67fa9be13228.)

Bug: 3289698
Change-Id: Id89c909407f268fdc828ebe2bebcb1c12dbb93aa
til/AbstractQueue.java
til/ArrayDeque.java
til/Deque.java
til/NavigableMap.java
til/NavigableSet.java
til/Queue.java
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/BrokenBarrierException.java
til/concurrent/Callable.java
til/concurrent/CancellationException.java
til/concurrent/CompletionService.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentMap.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Delayed.java
til/concurrent/Exchanger.java
til/concurrent/ExecutionException.java
til/concurrent/Executor.java
til/concurrent/ExecutorCompletionService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/ForkJoinPool.java
til/concurrent/ForkJoinTask.java
til/concurrent/ForkJoinWorkerThread.java
til/concurrent/Future.java
til/concurrent/FutureTask.java
til/concurrent/LinkedBlockingDeque.java
til/concurrent/LinkedBlockingQueue.java
til/concurrent/LinkedTransferQueue.java
til/concurrent/Phaser.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/RecursiveAction.java
til/concurrent/RecursiveTask.java
til/concurrent/RejectedExecutionException.java
til/concurrent/RejectedExecutionHandler.java
til/concurrent/RunnableFuture.java
til/concurrent/RunnableScheduledFuture.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledFuture.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadFactory.java
til/concurrent/ThreadLocalRandom.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/TimeoutException.java
til/concurrent/TransferQueue.java
til/concurrent/atomic/AtomicBoolean.java
til/concurrent/atomic/AtomicInteger.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReference.java
til/concurrent/atomic/AtomicReferenceArray.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/atomic/Fences.java
til/concurrent/atomic/UnsafeAccess.java
til/concurrent/atomic/package-info.java
til/concurrent/locks/AbstractOwnableSynchronizer.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/Lock.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReadWriteLock.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/locks/UnsafeAccess.java
til/concurrent/locks/package-info.java
til/concurrent/package-info.java
f033103ae4405bb2104d9292abd02fb0afbed0d9 01-Aug-2012 Elliott Hughes <enh@google.com> am 164c53dd: am ad9c4690: Merge "Avoid creating suppressedExceptions ArrayList for all Throwables"

* commit '164c53dda8b41dd35177340358e3b227454b01ca':
Avoid creating suppressedExceptions ArrayList for all Throwables
3554ea977fed3444b73d4489c08832d6dda4984c 01-Aug-2012 Brian Carlstrom <bdc@google.com> am 0b545fe3: am c4b50b65: Merge "Include library path information in BaseDexClassLoader for better error reporting in Runtime.loadLibrary"

* commit '0b545fe338b2e2cf1052d1e678a34f538c1ae0e6':
Include library path information in BaseDexClassLoader for better error reporting in Runtime.loadLibrary
0bc7e41e9aec6ec0d4aed987ae4b1debcdf3c4d2 01-Aug-2012 Brian Carlstrom <bdc@google.com> am 5e8b403d: am 8438df1f: Merge "Clean up lint in java.lang.ref."

* commit '5e8b403df2bab1965b0409e986320f165a73fcde':
Clean up lint in java.lang.ref.
c903b283cdcdb6d3eebb7879097a297450d87dec 01-Aug-2012 Brian Carlstrom <bdc@google.com> am b7970886: am 47404489: Merge "Amortize the cost of Class.isEnum in Enum.valueOf."

* commit 'b7970886395c827b0ece6c3eafe76131589451ce':
Amortize the cost of Class.isEnum in Enum.valueOf.
d7dbb7c5627d11d09852b36340cb67316ed0cc6a 01-Aug-2012 Brian Carlstrom <bdc@google.com> am f7e243b3: am 17380a3a: Merge "Improve detail messages for throwers of NegativeArraySizeException."

* commit 'f7e243b3f437953241c5113d023cfc5caec413e4':
Improve detail messages for throwers of NegativeArraySizeException.
254fed99854bd8ce9d5d9f6f9e16d746af3f8f7c 12-Jun-2012 Romain Guy <romainguy@google.com> Take the Buffer's position into account when accessing the array

Prior to this patch, our APIs would take into account a Buffer's position
if it was backed by native memory. The position would not be taken into
account for buffers backed by a Dalvik array.

(cherry-pick of 177714f960fc0c586930e23b4c98341b9b4eef56.)

Bug: http://code.google.com/p/android/issues/detail?id=32588
Change-Id: Id27bc73e4cf44caa4e304fc17a52c4732d2cd97c
io/NIOAccess.java
a8b15bcac1bd17987118da06f4c63afd8799910d 31-Jan-2012 Ian Rogers <irogers@google.com> Avoid creating suppressedExceptions ArrayList for all Throwables

Suppressed exceptions are a Java 7 feature and therefore unlikely to be
being used. Throwable is the parent of all exceptions, so allocating
memory here is expensive. Make Throwable use Collections empty list when
no suppressed exceptions are present and then create a list when asked
to add a suppressed exception.

(cherry-pick of 24d2b0060b13d953cb5a9f10d7d2198ec3385f85.)

Change-Id: I66e4a755be66493b33c9562a8275c006b601b28e
ang/Throwable.java
75245fcfe3555e4dd06939b9bae366fd3e43b658 02-Apr-2012 Brian Carlstrom <bdc@google.com> Include library path information in BaseDexClassLoader for better error reporting in Runtime.loadLibrary

(cherry-pick of b6a576f43f1c23bb92493590a04bf9c72f092438.)

Change-Id: I6f34862327cf99d8c6f9a7e9aa3aeab47985969b
ang/Runtime.java
2680db46e43b69cc1c49429d371cd1c7512d6f2c 01-Aug-2012 Elliott Hughes <enh@google.com> Clean up lint in java.lang.ref.

Change-Id: Ie54af5965f07e8f0261eaeb5803d718658da2a23
ang/ref/FinalizerReference.java
ang/ref/Reference.java
ang/ref/ReferenceQueue.java
695b2a12fb5420680ab7da33c5ebd683853f4050 17-Dec-2011 Elliott Hughes <enh@google.com> Amortize the cost of Class.isEnum in Enum.valueOf.

(cherry-pick of 1f6a7be67187fa6553f6466c0ec311294149f754.)

Conflicts:

luni/src/main/java/java/lang/Enum.java

Change-Id: Ic4905650dfd8c2b8359ab723955d228771ea27c7
ang/Enum.java
834ce234b54466ba230b3c7199d4363a837c5628 07-Sep-2011 Elliott Hughes <enh@google.com> Improve detail messages for throwers of NegativeArraySizeException.

(cherry-pick of e1766a71541cbc592c6ceb6fe703258bebd9c15e.)

Change-Id: Ib208ac64d26f2969299667d3312eb0fd1fdda3d1
ang/AbstractStringBuilder.java
til/Arrays.java
til/BitSet.java
71e3131a59aeb1c30f6db7bc77e0cfb23e265133 01-Aug-2012 Elliott Hughes <enh@google.com> am ca204483: am 88d8d171: Merge "Fix problem with Runtime.runFinalization()"

* commit 'ca204483669eaf824c19decb05db1d0de31db5f4':
Fix problem with Runtime.runFinalization()
3edd28a92fc86a1260347d0995e65a815d73bbbe 16-Apr-2012 Mattias Petersson <mattias.petersson@sonymobile.com> Fix problem with Runtime.runFinalization()

This is a fix for a problem with runFinalization(). The
problem was that all FinalizerReferences to objects that had
not yet been garbage collected were lost when calling this
function. When a FinalizerReference was lost, it is was not
possible to call the finalize() method when the object
was garbage collected.

The result was that finalizers was sometimes never
called, which typically lead to memory leaks.

Also stop synchronizing on the class itself; use a private
lock instead.

Bug: 6907299
Bug: 5462944 # Synchronization on FinalizerReference.class
Change-Id: Ief515edbb5a1823c06d7371415d131165baef7f2
ang/ref/FinalizerReference.java
7601b88a8c4dcd91f7a3eb622f806bee12d29eb3 31-Jul-2012 Elliott Hughes <enh@google.com> am 95ca54d1: am 25e65a52: Merge "Fix TimeZone\'s handling of Australia/Lord_Howe."

* commit '95ca54d1ae12653915882f3a3bf16746c676883b':
Fix TimeZone's handling of Australia/Lord_Howe.
78c3de051d68b703af480778c100ca335690b250 30-Jul-2012 Elliott Hughes <enh@google.com> Fix TimeZone's handling of Australia/Lord_Howe.

Australia/Lord_Howe has a half hour difference between standard and daylight
time, rather than the usual hour. Our ZoneInfo implementation ignored this.
Fix that oversight, make SimpleDateFormat actually use this information, and
prevent TimeZone.getTimeZone("GMT") and TimeZone.getTimeZone("UTC") from
being quite as expensive as they accidentally were.

Longer term I think we should probably remove all uses of getDSTSavings from
libcore in favor of TimeZone.getOffset, but this is probably a useful step
forwards anyway. It fixes Australia/Lord_Howe in the meantime and it means
that anyone else who's using getDSTSavings won't be bitten (even if they too
really ought to be using TimeZone.getOffset).

Bug: 4723412
Bug: http://code.google.com/p/android/issues/detail?id=24684
Change-Id: I5d50afecbe1453157e9c8f0b88305a258a3ba2e0
ext/SimpleDateFormat.java
til/GregorianCalendar.java
til/TimeZone.java
ca8061f40b6c390eabd7be8f7004e099c33eec7a 30-Jul-2012 Elliott Hughes <enh@google.com> am 1a45a21f: am 0b8dc2e1: Merge "De-pessimize the String(byte[], int, int) constructor."

* commit '1a45a21fa89c42f499bb765c29dea7a85ba157f5':
De-pessimize the String(byte[], int, int) constructor.
bbe3e7f1f8c312fcfbd7af2ecbfa98c48f502c61 30-Jul-2012 Elliott Hughes <enh@google.com> De-pessimize the String(byte[], int, int) constructor.

Also add a few tests.

Before:
0% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=1, name=UTF-8} 155838.96 ns; σ=1179.42 ns @ 3 trials
10% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10, name=UTF-8} 170741.68 ns; σ=10178.36 ns @ 10 trials
40% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10000, name=UTF-8} 3867968.18 ns; σ=347173.32 ns @ 10 trials

Change-Id: Ic1a8a46a81faf1afc807cfff132565e87944994b
After:
0% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=1, name=UTF-8} 4563.80 ns; σ=7.13 ns @ 3 trials
10% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10, name=UTF-8} 6667.55 ns; σ=862.26 ns @ 10 trials
40% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10000, name=UTF-8} 1836705.08 ns; σ=71293.06 ns @ 10 trials
ang/String.java
ed56457ed970d29101bd4cc7d7e5305a8962928f 30-Jul-2012 Elliott Hughes <enh@google.com> am 8962582b: am b7dd9ee6: Merge "Repair the damage I did removing "useless" checkIndex calls from the asXBuffer adapter classes."

* commit '8962582befb42ab2cfe642ab107d0694f844f84c':
Repair the damage I did removing "useless" checkIndex calls from the asXBuffer adapter classes.
86f5f3e0e2bd808e4c85b0563ae50f17b7d48309 30-Jul-2012 Elliott Hughes <enh@google.com> Repair the damage I did removing "useless" checkIndex calls from the asXBuffer adapter classes.

The checkIndex calls were unnecessary as far as throwing the right Exception
subclass goes, but they're necessary if you want the detail message to use
the units of the wrapping buffer rather than the wrapped buffer. And we want
that. An IndexOutOfBoundsException that says "offset=0, limit=1" is only
going to confuse developers.

(Fixes bug introduced by 26841c0bb838d54fea2e1a06390e413fab561e27.)

Bug: 6085292
Change-Id: I9a1a5991ad383b7712642e40bced9af91440bed2
io/CharToByteBufferAdapter.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ShortToByteBufferAdapter.java
6029e96024538f206e65b2961292ccb7567233bb 28-Jul-2012 Brian Carlstrom <bdc@google.com> am f8dd25db: am 044b0dc0: Merge "NullPointerException invoking Field.getModifiers"

* commit 'f8dd25dbf9b9073c8e834652dfcfaebc95c1da49':
NullPointerException invoking Field.getModifiers
bd8dfd99b523583c3b5e662975638643e17874ea 28-Jul-2012 Brian Carlstrom <bdc@google.com> NullPointerException invoking Field.getModifiers

Change-Id: I56c5908d16458d36098ffa7e2dc8c3518280f2e3
o/ObjectInputStream.java
0a59916879540867cc144399b902f9a31375e72b 27-Jul-2012 Elliott Hughes <enh@google.com> am fcf37613: am 88a5c75f: Merge "Fix deserialization of transient fields."

* commit 'fcf376132b8f23ca240951c565ec29e7d64e7a11':
Fix deserialization of transient fields.
05895faacf43e6fd2bcd57baed31832f6888cb31 27-Jul-2012 Elliott Hughes <enh@google.com> Fix deserialization of transient fields.

We need to read field data in the stream, but if the field is (now)
transient, we should just ignore the request to set it.

Bug: 4471249
Change-Id: I5336fdeaaef73e912a48be53af75fd9d1b29fccf
o/ObjectInputStream.java
o/ObjectStreamClass.java
226398eed2ffec9663df2600a9c93cd932ac5099 27-Jul-2012 Elliott Hughes <enh@google.com> am 7a593cd7: am f9b430c6: Merge "Remove useless checkIndex calls from the asXBuffer adapter classes."

* commit '7a593cd77d71a19f3d003a75582b9808d9f3b207':
Remove useless checkIndex calls from the asXBuffer adapter classes.
26841c0bb838d54fea2e1a06390e413fab561e27 26-Jul-2012 Elliott Hughes <enh@google.com> Remove useless checkIndex calls from the asXBuffer adapter classes.

Also add tests that we throw the expected exceptions.

Bug: 6085292
Change-Id: Ibcc44bdb546cba5365cdf557847e068fea77e1ca
io/CharToByteBufferAdapter.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ShortToByteBufferAdapter.java
0aee35eef7ebf89173489838ac2e4faef295b85f 26-Jul-2012 Elliott Hughes <enh@google.com> am 1efb060f: am b862a116: Merge "Make ZipFileTest#testHugeZipFile faster, and reduce ZipFile memory usage."

* commit '1efb060ff85ba54ca4f4538a3f687b4c47d0f479':
Make ZipFileTest#testHugeZipFile faster, and reduce ZipFile memory usage.
02e0e9bce2706f0024e6f51275e2834dfacdb570 26-Jul-2012 Elliott Hughes <enh@google.com> Make ZipFileTest#testHugeZipFile faster, and reduce ZipFile memory usage.

This test was timing out because of unbuffered I/O.

ZipFile was creating an unnecessary byte[] when writing out the central
directory. In the case of these tests, that was an extra 3MiB of heap!

(cherry-picked from a57c521b9d250f909508af771b96c0011676a968.)

Bug: 6481730
Change-Id: I923e563421056c9c0e73246357ccf54d8fb60cdb
til/zip/ZipOutputStream.java
a57c521b9d250f909508af771b96c0011676a968 26-Jul-2012 Elliott Hughes <enh@google.com> Make ZipFileTest#testHugeZipFile faster, and reduce ZipFile memory usage.

This test was timing out because of unbuffered I/O.

ZipFile was creating an unnecessary byte[] when writing out the central
directory. In the case of these tests, that was an extra 3MiB of heap!

Bug: 6481730
Change-Id: I75acac35c556ad5fdc8b06bc616c11244d6b6c55
til/zip/ZipOutputStream.java
1c355ebd98ccac05a4daf4d8116e41a0c12971ea 25-Jul-2012 Elliott Hughes <enh@google.com> am a3e83895: am 41b15b85: Merge "Fix URLConnectionTest#test_getAllowUserInteraction."

* commit 'a3e838950bb02074c777fc36493b6ca4c84631e7':
Fix URLConnectionTest#test_getAllowUserInteraction.
d3298cd1b4bc69183e96e3cf8fd247e1596b7e07 24-Jul-2012 Elliott Hughes <enh@google.com> Fix URLConnectionTest#test_getAllowUserInteraction.

Also improve the documentation, make it possible to run these tests
individually outside of CTS with vogar, and remove a few more URLs of
external web servers.

We should clean up all tests to remove all reliance on external web servers.

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

(cherry-picked from 3827b65b1937acfbf3abbc449f8ba0ffc60f3cf3.)

Conflicts:

luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java

Change-Id: I4959fefa130290236533be72cce7c57b9ea1e296
et/URLConnection.java
3827b65b1937acfbf3abbc449f8ba0ffc60f3cf3 24-Jul-2012 Elliott Hughes <enh@google.com> Fix URLConnectionTest#test_getAllowUserInteraction.

Also improve the documentation, make it possible to run these tests
individually outside of CTS with vogar, and remove a few more URLs of
external web servers.

We should clean up all tests to remove all reliance on external web servers.

Bug: http://code.google.com/p/android/issues/detail?id=35400
Change-Id: I28e78b7375ee554b3afe98e5249676e8bbbbec0e
et/URLConnection.java
d532227f413c3c6ec193b78ff8f77c72220eb1e3 24-Jul-2012 Elliott Hughes <enh@google.com> am e71b65f4: am 80cfc0df: Merge "Declare that various Posix methods can throw SocketException."

* commit 'e71b65f47d67b85cd687c361e29a9cf37e47e2e1':
Declare that various Posix methods can throw SocketException.
80cfc0dfe417f58499fadf1dee99e5cfc69f4286 24-Jul-2012 Elliott Hughes <enh@google.com> Merge "Declare that various Posix methods can throw SocketException."
8f5562a222150d4a7d4763052a7ce0a9bdc6c70d 24-Jul-2012 Brian Carlstrom <bdc@google.com> am e4c50ddd: am e25c9d72: Merge "Provider should enumerate services in the order they are added"

* commit 'e4c50ddd2c245091f0bbe2eb3ab01e7aba7ec808':
Provider should enumerate services in the order they are added
f35af87005578cd704a4912c381e731b64dfa560 24-Jul-2012 Elliott Hughes <enh@google.com> am 65c7df1b: am d44e8b8b: Merge "Clean up ICU error reporting."

* commit '65c7df1be540e232ebf3038664bc1587331adb72':
Clean up ICU error reporting.
e25c9d72b136f274c67207698bcc2c8508a59957 24-Jul-2012 Brian Carlstrom <bdc@google.com> Merge "Provider should enumerate services in the order they are added"
26010ab930a2cee3bf10b9612cf070183c21228b 24-Jul-2012 Elliott Hughes <enh@google.com> Declare that various Posix methods can throw SocketException.

Bug: 5177516
Change-Id: Icf2f06c7df6686dd1f54a930bc3fa50b1ce4e1d4
et/PlainDatagramSocketImpl.java
fc7d051b4a8a79687a13228184f03a82270b262b 24-Jul-2012 Brian Carlstrom <bdc@google.com> Provider should enumerate services in the order they are added

Bug: http://code.google.com/p/android/issues/detail?id=21449
Change-Id: Ie520a8b47adab0583ed1c5cb0da7f43c2eb452ee
ecurity/Provider.java
5ec69b20ab9b3e2dcbe225d548168b09afbbbac2 24-Jul-2012 Elliott Hughes <enh@google.com> Clean up ICU error reporting.

Throw all ICU exceptions from the native side, and include the name of the
function that failed.

Bug: 5037042
Change-Id: I49b5493a7e7365226d612479294b5b8f47ec4e8c
io/charset/CharsetDecoderICU.java
io/charset/CharsetEncoderICU.java
ql/DataTruncation.java
9ef8a3b401d67c685c0021a320452677834c97ce 13-Jul-2012 Elliott Hughes <enh@google.com> am 9bedf857: Merge "Rewrite File.mkdirs, improve the documentation, and add tests."

* commit '9bedf8572e9f1d007fbe31e09fd76d1f5989bdcf':
Rewrite File.mkdirs, improve the documentation, and add tests.
9bedf8572e9f1d007fbe31e09fd76d1f5989bdcf 13-Jul-2012 Elliott Hughes <enh@google.com> Merge "Rewrite File.mkdirs, improve the documentation, and add tests."
0b508ebd9f6f3c366c72db3375570c31519b2ece 13-Jul-2012 Elliott Hughes <enh@google.com> am 372d8baa: Merge "Fix Matcher.find(int) to ignore the region."

* commit '372d8baa55fd8b6b67adee3e27bd7aa0058f9851':
Fix Matcher.find(int) to ignore the region.
91cd2eae0c1fd2e04d46876856b33b8324aa8b5f 13-Jul-2012 Elliott Hughes <enh@google.com> Fix Matcher.find(int) to ignore the region.

Also fix the tests, which were wrong.

Bug: 6404568
Change-Id: I8718aab754bdbc87c37d573d19c4999cc3c447ac
til/regex/Matcher.java
fec51846c02116a6ac02fac8ecf8ffb705a74b36 12-Jul-2012 Elliott Hughes <enh@google.com> Rewrite File.mkdirs, improve the documentation, and add tests.

Every time anyone stumbles across the File.mkdirs implementation,
usually because of some other problem, it takes us a few minutes
of head-scratching to convince ourselves that the recusive case
is correct. So let's rewrite it to be a little less unclear.

Also improve the documentation and add some tests. Turns out the
only mkdirs tests were implicit (where it's used for test setup)
or for special cases (like the empty path). Duh.

Change-Id: I78376fb1aaa72223c63c581d18c6682a50c84e23
o/File.java
e322913333b2035f692bff31aa7ea04bbb972d8c 12-Jul-2012 Elliott Hughes <enh@google.com> am fac398fc: Merge "Fix NetworkInterface.getNetworkInterfaces /proc/net/if_inet6 parsing."

* commit 'fac398fc546cfba3392a53055ee016a7b0b9c18d':
Fix NetworkInterface.getNetworkInterfaces /proc/net/if_inet6 parsing.
b0e6dc5464f959b3d42f37b32f4b01767f6fe506 12-Jul-2012 Elliott Hughes <enh@google.com> Fix NetworkInterface.getNetworkInterfaces /proc/net/if_inet6 parsing.

It turns out that some devices can have very large interface indexes,
and my code was incorrectly assuming they'd always fit in 8 bits.

Bug: http://code.google.com/p/android/issues/detail?id=34022
Change-Id: I388a46ffe45f9706a4e28fb3b2975c991a74d419
et/NetworkInterface.java
a69960a1f10dac214b8bec3140d20827cbca6c8e 03-Jul-2012 Elliott Hughes <enh@google.com> am 08256ad2: am 3516b603: Merge "Clarify the documentation of the Pattern character classes."

* commit '08256ad205bcbde119f8f7749cdadf7f490f676d':
Clarify the documentation of the Pattern character classes.
08256ad205bcbde119f8f7749cdadf7f490f676d 03-Jul-2012 Elliott Hughes <enh@google.com> am 3516b603: Merge "Clarify the documentation of the Pattern character classes."

* commit '3516b6031a4d2fb8901b2378c7287545741e1cab':
Clarify the documentation of the Pattern character classes.
2ec25b742f52a02c393fd6b71a6979557104aaff 03-Jul-2012 Jean-Baptiste Queru <jbq@google.com> am eeddfe47: Merge 55b4312b

* commit 'eeddfe47f90ce73199e57c10d6caa3c1a05dbed3':
Be more careful when parsing custom zone ids.
eeddfe47f90ce73199e57c10d6caa3c1a05dbed3 03-Jul-2012 Jean-Baptiste Queru <jbq@google.com> Merge 55b4312b

Change-Id: I6d8f507514a48396f506bc01cc55c9d3e04c4848
ccbb356138d38f38ffc9cb839bef24fb9088c615 02-Jul-2012 Elliott Hughes <enh@google.com> am 13894501: am 2d289627: Merge "Bring Random.nextGaussian in line with the specification."

* commit '13894501f107e66d6b1b78f0165108d94e9018bb':
Bring Random.nextGaussian in line with the specification.
13894501f107e66d6b1b78f0165108d94e9018bb 02-Jul-2012 Elliott Hughes <enh@google.com> am 2d289627: Merge "Bring Random.nextGaussian in line with the specification."

* commit '2d289627ab856e89795d9e947ffeebe10b34f610':
Bring Random.nextGaussian in line with the specification.
953dfe37db00b2610807c3f895c72183c7ce5b14 30-Jun-2012 Elliott Hughes <enh@google.com> Clarify the documentation of the Pattern character classes.

Android (via icu4c) supports the full Unicode TR-18 definitions
rather than the traditional ASCII-only ones. Document this fact.

Bug: http://code.google.com/p/android/issues/detail?id=21176
Change-Id: If9b94d4e7769ec1ef7c443a7db47bc7586f49b44
til/regex/Pattern.java
55b4312b3ae9f694ee90b9709f8b2acec3b34f6d 25-Jun-2012 Elliott Hughes <enh@google.com> Merge "Be more careful when parsing custom zone ids."
91348f798cddae22b59ee1a17bd24315c0897f6f 23-Jun-2012 Elliott Hughes <enh@google.com> Be more careful when parsing custom zone ids.

The old code was allowing invalid ids.

Bug: 6556561
Change-Id: I691d33fa133527a76bbffa4e3b56a023c389ca8f
til/TimeZone.java
68618152969be1144d460add7349f0b89ae8f499 23-Jun-2012 Elliott Hughes <enh@google.com> Bring Random.nextGaussian in line with the specification.

Bug: 6126164
Change-Id: I36d5ccc776b15f7f4085da23c189f91507d57224
til/Random.java
177714f960fc0c586930e23b4c98341b9b4eef56 12-Jun-2012 Romain Guy <romainguy@google.com> Take the Buffer's position into account when accessing the array
External bug: http://code.google.com/p/android/issues/detail?id=32588

Prior to this patch, our APIs would take into account a Buffer's position
if it was backed by native memory. The position would not be taken into
account for buffers backed by a Dalvik array.

Change-Id: Ibf0bfc14055742ec6ca9f40ab7082f8ae9bca7b6
io/NIOAccess.java
6c63ef96266d27454bec32abc6607c644c79cba5 07-Jun-2012 Elliott Hughes <enh@google.com> am e89d4a16: am f6574a23: am 63c73584: Merge "Buffer System.in."

* commit 'e89d4a16572937e63068511a7f060d91660d2238':
Buffer System.in.
e89d4a16572937e63068511a7f060d91660d2238 07-Jun-2012 Elliott Hughes <enh@google.com> am f6574a23: am 63c73584: Merge "Buffer System.in."

* commit 'f6574a23180e415abd6acbca74af46b87136eb5c':
Buffer System.in.
f0e583ce305f656c05aa2f7dc2878c2e314d418c 07-Jun-2012 Elliott Hughes <enh@google.com> Buffer System.in.

Android apps won't notice this, but command-line tools will. Console was
already doing this.

Bug: 6603218
Change-Id: I0f65f3154f5e3ec5c49a6a2c4c87f30a846bb008
ang/System.java
8ecba5fd3f3ab30aa57caf917963bed50087ea9c 08-Feb-2012 Elliott Hughes <enh@google.com> Fix an ICS DatagramPacket bug.

(cherry-picked from e50d82455c813210a2d452070f45fd38d9903159.)

Bug: http://code.google.com/p/android/issues/detail?id=24748
Change-Id: Id7772c3f27961c99d3e5e3856e79edb84483dd46
et/DatagramPacket.java
et/DatagramSocket.java
3b47d62bc3926a021b34bddea279b375ebd71e99 17-May-2012 Elliott Hughes <enh@google.com> Merge "AssertionError(Object) should only initCause if the object is a Throwable." into jb-dev
89b01dfbae113b1165520fe676ed03df2ddf0207 15-May-2012 Elliott Hughes <enh@google.com> AssertionError(Object) should only initCause if the object is a Throwable.

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

(cherry picked from commit f3d07392d4fbeb7b6762b08a523431c34fef750a)

Change-Id: I43bd0adad010348004376606335f947d0b8cb912
ang/AssertionError.java
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
til/BitSet.java
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
til/BitSet.java
974094b04c9a11e2cab02b6268de78c9b65a1014 15-May-2012 Elliott Hughes <enh@google.com> Merge "AssertionError(Object) should only initCause if the object is a Throwable."
f3d07392d4fbeb7b6762b08a523431c34fef750a 15-May-2012 Elliott Hughes <enh@google.com> AssertionError(Object) should only initCause if the object is a Throwable.

Bug: http://code.google.com/p/android/issues/detail?id=29378
Change-Id: I608901eed848ab496b8f54b784216b1362b561d2
ang/AssertionError.java
b5947b2362df0c96e6a054f91f4622dc50a290ce 14-May-2012 Elliott Hughes <enh@google.com> am 2f0a3cdc: am f7bd2a99: Work around poll(2) failing with EINTR.

* commit '2f0a3cdc6776f1ff8d31c2180e1d55093185705d':
Work around poll(2) failing with EINTR.
811320db23eb8fa68b0ee8659b4448157a0680a5 12-May-2012 Elliott Hughes <enh@google.com> Add more tests for Object.wait.

Change-Id: Ifd8d80650a2714ead99c6d3426c902728d43b457
ang/Object.java
f7bd2a99f6f4024e9034300b30a13a2ea871aa97 12-May-2012 Elliott Hughes <enh@google.com> Work around poll(2) failing with EINTR.

This restores the gingerbread behavior, which is arguably pretty annoying too,
but it's what we've always done so less likely to be disruptive.

Bug: 6453247
Change-Id: I22635e36a37cb36cf2b22d1739ab6a28662c9188
io/SelectorImpl.java
0c224360a4deec32eaf66e5420fbf01790ee2d13 27-Mar-2012 Elliott Hughes <enh@google.com> Merge "Use the release name in Locale's table of releases."
271af435d3f0fd0135aeec7e48d5cd7d5611829d 27-Mar-2012 Elliott Hughes <enh@google.com> Use the release name in Locale's table of releases.

Bug: 5905761
Change-Id: If0fc5fd19bddefd72f216e8c230893b0387fa03d
til/Locale.java
92f87a4de2f7c360a44f0195ef748874a1f4378e 16-Mar-2012 Jeff Brown <jeffbrown@google.com> Remove unnecessary last parameter to nativeExit.

Change-Id: I4c46e643647440fb3606179f773cd202a38a36ce
ang/Runtime.java
02a01a6ce390976b7c5cea95fe87c3020c797dff 12-Mar-2012 Jesse Wilson <jessewilson@google.com> Fix incorrect documentation for non proxy hosts.

Bug: http://b/6152698
Change-Id: I5b0bd61aeaf8d27c0087210859de1fd2cbcf88d7
et/ProxySelector.java
2e86dac8a4a2c2bbffb143cfcf9c0fb0ebc045b0 02-Mar-2012 Nick Kralevich <nnk@google.com> System: incorporate comments from previous review.

Change-Id: Ieb6a4c75389dbafe832db0c3a2efdd133a062e73
ang/System.java
e401d6274863e8e59c5cdfd26b82ec1cdda39c09 02-Mar-2012 Nick Kralevich <nnk@google.com> System: improve setSecurityManager documentation.

Make it clearer that setSecurityManager method always throws
a SecurityException. It's easy to miss the current
"@throws SecurityManager always" line when you're reading the
docs.

Change-Id: Id5475bd952bd4e4a27a0058034c1b508b28a4f0f
ang/System.java
75cf14944d476670f6f915e5efd849e238a16250 16-Feb-2012 Elliott Hughes <enh@google.com> Throw SecurityException for DNS without INTERNET permission.

When GoogleTV had to work around this for glibc, I realized that maybe I was
the problem, not the C library...

Bug: http://code.google.com/p/android/issues/detail?id=15722
Change-Id: Ia3fbf2f4578ad60d84e538819660c181248f1e1c
et/InetAddress.java
e636ca4d6bd101324bd95fbc817401e6e0b80a2c 15-Feb-2012 Jesse Wilson <jessewilson@google.com> Introduce an ExtendedResponseCache interface.

We had an ugly bug where HttpEngine was inspecting its response
cache's implementation type, and calling stats tracking methods
if that type permitted it.

This worked for all the libcore tests, but not in practice since
the public HttpResponseCache class WRAPS the libcore HttpResponseCache.
The new interface makes the new APIs called by HttpEngine on its
cache explicit, and permits the public android.net.HttpResponseCache
to implement the API.

Bug: http://code.google.com/p/android/issues/detail?id=25418
Change-Id: Ic9697af96635256e7ffc24f86628a85fbe2defd4
et/ExtendedResponseCache.java
et/ResponseSource.java
bdd17cde8cf675f5d5703aad4dfb565932fb4c50 08-Feb-2012 Elliott Hughes <enh@google.com> Fix an ICS regression with hasArray on a JNI-allocated DirectByteBuffer.

Bug: http://code.google.com/p/android/issues/detail?id=24327
Change-Id: Ib31b60fe01e3d0b5a1ed7125ddf047e09fd64056
io/CharSequenceAdapter.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBufferAdapter.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortToByteBufferAdapter.java
e50d82455c813210a2d452070f45fd38d9903159 08-Feb-2012 Elliott Hughes <enh@google.com> Fix an ICS DatagramPacket bug.

Bug: http://code.google.com/p/android/issues/detail?id=24748
Change-Id: Iafab3a6c55007a47b68af5581148f5556f2fc808
et/DatagramPacket.java
et/DatagramSocket.java
deae54f894698453552073c9fb760df6db988f24 07-Feb-2012 Elliott Hughes <enh@google.com> Merge "Rely more on the C library level DNS caching."
de2ae30023028e82e4f5ae0c9e88b05649a4c1be 07-Feb-2012 Elliott Hughes <enh@google.com> Fix some list javadoc.

Bug: http://code.google.com/p/android/issues/detail?id=25124
Change-Id: I31ed6818f6828cc0da53aa0c3ca867d88c5f66d3
til/AbstractList.java
til/ArrayList.java
til/LinkedList.java
til/List.java
afd70b773bd938c845a3bb0d9a3e21ec64d4db1a 07-Feb-2012 Elliott Hughes <enh@google.com> Rely more on the C library level DNS caching.

This change:

1. decreases the size of the libcore cache (to 16 hostnames).
2. brings the positive and negative TTLs way down (to 2s).
3. removes the dead code for the broken TTL-setting system properties.

Bug: 5841178
Bug: http://code.google.com/p/android/issues/detail?id=23878
Change-Id: Ib989c72bf3046300b4d59fa5ae49b8fe3ae6c2dc
et/AddressCache.java
et/InetAddress.java
ad369fb678d4f6148fcb635449f8852906b2a6a7 02-Feb-2012 Elliott Hughes <enh@google.com> Move Array's privates together.

Change-Id: I024d31be92c8b393a546b8cb92bdac051dd8cede
ang/reflect/Array.java
f449df0090c25793242f3ecc1653b6b0c331be92 02-Feb-2012 Elliott Hughes <enh@google.com> Rewrite java.lang.reflect.Array (now with tests!).

This is the fix for the current failures of dalvik's test 045.

Change-Id: I8e7045f460b4eec0797f921c2337043ad10bd514
ang/reflect/Array.java
5dcab07aff722be0a065851c462fe9a1cd259674 27-Jan-2012 Andy McFadden <fadden@android.com> Put daemons in the "system" thread group

With this change, the debugger won't show FinalizerDaemon,
FinalizerWatchdogDaemon, and ReferenceQueueDaemon in the lst of
threads when debugging an app. (This is already done for
"internal" threads: Compiler, Signal Catcher, and GC.)

Change-Id: I929b2ce28400a9969e6a389d8972c24a42ee3aa9
ang/Daemons.java
db40744613d500958c8b053b95b032c46540edce 25-Jan-2012 Jesse Wilson <jessewilson@google.com> Fix spelling of ambiguous.

Change-Id: I5948a7bf1e9c485b336d6d498dfcd28bd26248b8
til/TreeMap.java
5cef08f71b7fd1282ce3b338f420ae754744925d 23-Jan-2012 Elliott Hughes <enh@google.com> Mention the ICU upgrade and the new CLDR/Unicode versions.

I'll need to come back when "master" becomes an actual release.

Bug: 5905761
Change-Id: Ia4d45ba028c9de0f167cc566c0275ddc955de9ee
til/Locale.java
5b7b7fe6a817fdf058eefd9a716cc58a3283eb05 12-Jan-2012 claireho <chinglanho@gmail.com> Libcore changes for ICU4.8.1.1 upgrade.

This CL includes:
1. Change libcore_icu_ICU.cpp and LocaleData.java to support locale data structures in ICU4.8.1.1.
The new libcore_icu_ICU instantiates ICU objects instead of reading the ICU resource files
directly. This could avoid the code change for future ICU upgrade.
2. Change the libcore tests data caused the test failures from ICU locale data change.

Change-Id: Ia3dfb0a8e5c4ccc2ad110a1ff4211ff97fe5b2ad
til/Currency.java
9f050bd1d16b822532430c897991e27a58605ff5 11-Jan-2012 Elliott Hughes <enh@google.com> Fix an ICS regression with zip files containing >= 32768 entries.

The usual signed/unsigned 16-bit field problem with zip files. In adding a unit
test I also found two other long-standing bugs:

1. We had O(N^2) behavior when adding files. Someone used an List where they
wanted a Set. Fixed by switching that code over to a Set.

2. We were allowing people to create .zip files with > 64Ki entries but
generating a file that would claim to have (entryCount & 0xffff) entries.
Fixed to throw ZipException until we have proper Zip64 support.

Bug: http://code.google.com/p/android/issues/detail?id=23207
Change-Id: Ice9c9790782639ba50e1ca057bc2cf21a945e147
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
6fb123c8681a795c65cbd67ffcc0ef641c473288 10-Jan-2012 Elliott Hughes <enh@google.com> Make it clearer that TimeZone.getTimeZone(null) throws NPE on purpose.

Bug: http://code.google.com/p/android/issues/detail?id=24036
Change-Id: I3464dc5094274931d67e3ca4a5bc553fa1a6dc96
til/TimeZone.java
4bbc5de89764a9bcdb62c65be31e0f110578d427 07-Jan-2012 Elliott Hughes <enh@google.com> Cope with network interfaces disappearing while we're enumerating them.

Bug: 5833739
Change-Id: I2af2c3cd9dde66422786345cc22c9297b4b218ae
et/NetworkInterface.java
1f50103c9dfdbc3554b9a4c476668de7514c2a39 07-Jan-2012 Elliott Hughes <enh@google.com> Don't send SIGKILL to a Process that's already exited.

The reporter was complaining about the logging, but I'm more concerned that
we're sending signals to potentially-reused pids.

Bug: 5831831
Change-Id: Ie164cc8cfa27da2b32f0a3ee40b7d3e34974a066
ang/ProcessManager.java
3167109e2aa1f9d2b02515bf7a2277ec94e821a2 04-Jan-2012 Jesse Wilson <jessewilson@google.com> Merge "Discourage Serializable."
47f29998eae296ad812d697c8da12e84e394fee2 28-Dec-2011 Jesse Wilson <jessewilson@google.com> Discourage Serializable.

Change-Id: Ic24edcc126ba0e9f580e49cd2a2ba52c96b01744
o/Serializable.java
19388c1ccaff3ac404956e2d13a69748c17eee72 20-Dec-2011 Jesse Wilson <jessewilson@google.com> Test enum serialization and deserialization.

We had a tiny bug where we were throwing IllegalArgumentException
instead of InvalidObjectException when an enum constant didn't
match.

Bug: http://b/5364970
Change-Id: I6bff3c63379d74f7a062a4a2096d359d2bc45403
o/ObjectInputStream.java
5757cb35ad2e58d7accb7f5d3db6f2d5e72f097d 16-Dec-2011 Jesse Wilson <jessewilson@google.com> Support multiple challenges for HTTP authentication.

This fixes the problem reported in the bug, but we still need
to give attention to the digest scheme. Currently we can't do
Basic auth if the HTTP response contains both a Digest challenge
and a Basic challenge!

Bug: http://code.google.com/p/android/issues/detail?id=19081
Change-Id: Ifffb307678c2afa0db1d50c1ef5fc49ec7769306
et/Authenticator.java
ab7ae56666faffd5ad7aecfc07500ad5f4983ff2 15-Dec-2011 Jesse Wilson <jessewilson@google.com> Document pre-Froyo bugs in HttpURLConnection

Bug: http://b/5419660
Change-Id: I2742711092593ff70c38eba68f37343bb0eb4aee
et/HttpURLConnection.java
49bd35072553aaadfabbc3a09761632897169783 15-Dec-2011 Jesse Wilson <jessewilson@google.com> Document connect attempts by address count, not address family count.

Change-Id: Ie769d0d94909f39501337f516dc44b16c601dc22
et/URLConnection.java
2d9fa917aae6a6da38e9d1eda05841ffdf8855bb 15-Dec-2011 Jesse Wilson <jessewilson@google.com> Document the effect on timeouts of having both IPv4 and IPv6 addresses

Bug: http://b/3441111

Change-Id: Ib4c2e3e0d8d86eb5eb77cf92a0814c7444fd153f
et/HttpURLConnection.java
et/URLConnection.java
1ce4f4b41b4b52e50bee1f4c4912ccede16877cf 14-Dec-2011 Jesse Wilson <jessewilson@google.com> Improve the text on disabling connection reuse.

Change-Id: I4e91d38e14e293fd2e6ea7fb77a4df72a697da6a
et/HttpURLConnection.java
0613de89655e481fa610bfd4f1bcaeeae3272205 14-Dec-2011 Jesse Wilson <jessewilson@google.com> Document that disconnect() doesn't release sockets.

We could make disconnect() work, but it's a lot of complexity for
little gain. The core problem is that by the time the user calls
disconnect(), the connection has already been pooled. On the RI,
disconnect() will close a socket connection if it hasn't yet been
removed from the pool. Our pooling always-on or always-off behavior
is simpler and more predictable.

Bug: http://b/4148042
Change-Id: I61ef2ccb898f3ffaa08cedc70ee9e728fc1889b9
et/HttpURLConnection.java
a3ddec113793ba6511ad0daade4dabb0a0928857 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Merge "Migrate some reflection tests from frameworks/base/tests/CoreTests"
b73a329097a974c7b3599fba2ed1abb22f02b541 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix serialization of reverse-ordered TreeSets."
a0ee76b0850774edeb0c67204070b89d117573bc 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Migrate some reflection tests from frameworks/base/tests/CoreTests

This found a problem where Method.toString() was returning "[C" for
char arrays rather than "char[]". Sadly the RI doesn't use either
getName() or getCanonicalName(). That problem was introduced with the
fix for http://b/3073292

Bug: http://b/3073226
Change-Id: I7c2b0ebfc1718f7f0e8da55bdefd13a8e4032a45
ang/reflect/AccessibleObject.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
94fab96cd4c1bd4363ba1d70b59475132ddd441e 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Fix serialization of reverse-ordered TreeSets.

Bug: http://b/5552608
Change-Id: I949c2ab11fea391987217dfd5f8dad0cd3fe3fbf
til/TreeMap.java
996586703c232bd6afcae5e641c4fb6a9190013b 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Merge "Refer to Android ICS by its version in URL docs."
64785533018893463bbab2e34959879bac446c8d 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Refer to Android ICS by its version in URL docs.

Bug: http://b/3408201
Change-Id: I03940a60af4650181dc6e5ceae712c06f8e61f84
et/URL.java
31a63ef0abc2e23fcf7a3b762c513505f8ceeda9 12-Dec-2011 Jesse Wilson <jessewilson@google.com> Don't wake up the watchdog unless there's something to finalize.

Bug: http://code.google.com/p/android/issues/detail?id=22778
Change-Id: Ib157268dccc32c86af91589a851e90ae67fd74d7
ang/Daemons.java
32c000e63448fd4f349f211e04c34fc2b3a98559 29-Nov-2011 Jesse Wilson <jessewilson@google.com> Address code review comments on new SoftReference documentation.

Change-Id: I8802ad2738c90971e2f5e38c5376305597178700
ang/ref/SoftReference.java
132829c52b75a39c05b5ab06199aeb39b28abc40 25-Nov-2011 Jesse Wilson <jessewilson@google.com> Document the perils of SoftReferences.

Bug: http://code.google.com/p/android/issues/detail?id=20015
Change-Id: I4fada388ff2d1bdeff8f1ffca09024739df4f58e
ang/ref/SoftReference.java
9e79136b626db72b0d80705a9417f5e81d38b400 29-Oct-2011 Elliott Hughes <enh@google.com> Merge "Improve the documentation of toString methods in the java.net package."
10914811ea02b4acc7ab1dc5a0ada1b54cdf2203 29-Oct-2011 Elliott Hughes <enh@google.com> Improve the documentation of toString methods in the java.net package.

A developer wanted to know why their InterfaceAddress string began with a "/",
which wasn't obvious from our crappy documentation. This kind of thing should
always include examples, so let's include some examples...

Change-Id: Ic0a555c880e7f2dd31e4801926523f1aa96461c8
et/InetAddress.java
et/InetSocketAddress.java
et/InterfaceAddress.java
et/NetworkInterface.java
783631d82682027beaf80540ab08912fd56fea0c 29-Oct-2011 Jesse Wilson <jessewilson@google.com> Add a mode to UriCodec to handle invalid URLs without throwing.

Bug: http://code.google.com/p/android/issues/detail?id=21064
Change-Id: I0c0003bbacc5b9680d9f699134c02648e0d6dbea
et/URLDecoder.java
09947fcafbd3cccda9ad25e75af173b24f1c10be 14-Oct-2011 Jesse Wilson <jessewilson@google.com> Fix Arrays Javadoc to be consistent with parameter names.

Change-Id: I1b1d9013f99fe32b496696a4e1cbb5afcc73be6c
til/Arrays.java
c8ed4009f3ade95e6cf9ade8cfd1b08f90a8690f 14-Oct-2011 Jesse Wilson <jessewilson@google.com> Clean up exception throwing in Arrays.

Change-Id: Ie002ba1cd1c681b83c7a8d4e8d4f96b7c0350eef
til/Arrays.java
8f0e611282bccb0a96b716c40cda4d1ba31545b2 30-Sep-2011 Elliott Hughes <enh@google.com> Merge "Fix a couple of isReachable bugs."
9b4a8ec37805be3eabf3a4b443bbdb692ffa2608 30-Sep-2011 Elliott Hughes <enh@google.com> Fix a couple of isReachable bugs.

We shouldn't throw NPE if you call isReachable on a deserialized InetAddress.
Fixed by removing the "globals", which also fixes the unreported bug that
calling isReachable on the same InetAddress was not thread-safe.

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

Also, the arguments to isReachableByTCP in isReachable(NetworkInterface, int, int)
were the wrong way round, which meant we'd always return false (unless you were
asking if localhost was reachable).

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

Bug: 2497441
Bug: 3213503

Change-Id: Ic808e774c28be6487e30e6acb8bc06f766f5c71d
et/InetAddress.java
75467999615eb61949feecf0bcb205d7dc9e2f35 30-Sep-2011 Elliott Hughes <enh@google.com> Set the ZIP central directory UTF-8 bit.

I still don't see anything in the specification, but I can confirm
that real-world tools like unzip(1) don't like not having this bit
set. (Interestingly, "unzip -l" doesn't complain, but "unzip" does.
I usually test filename stuff with the former, so I never noticed
this gingerbread regression.)

Bug: http://code.google.com/p/android/issues/detail?id=20214
Bug: 4964868
Change-Id: I42d340d8b71a309285cf2bec3e938d07e05e9201
til/zip/ZipOutputStream.java
92cb29d71ca8fadc9b738a33e63ca39807647463 30-Sep-2011 Elliott Hughes <enh@google.com> s/Ipv6/IPv6/

Change-Id: I59cacdbde1fe65b849d542f8faa8c0c2c0f5cddf
et/InetAddress.java
a7428d68453f6a74633221e8714f8d3d9597b2b4 29-Sep-2011 Elliott Hughes <enh@google.com> Fix the InetAddress/Inet4Address/Inet6Address documentation.

Also simplify a few of the implementations, and add a few tests.

Bug: http://code.google.com/p/android/issues/detail?id=19165
Change-Id: If33d5a830068114edf722711333bf0e00098d91a
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
ed79eabe3c220b66c07743ba6495c342a4b3eaf7 14-Sep-2011 Jesse Wilson <jessewilson@google.com> Give InputStream/OutputStream decent documentation.

The previous docs made it much too easy to miss the critical 'requirement'
that read(byte[],int,int) should be overridden.
http://code.google.com/p/android/issues/detail?id=7933#c36

Change-Id: I2c4e0e18026a93b8e994d4448be35114bd5f20bc
o/InputStream.java
o/OutputStream.java
36c0b8ec5c0bb78e5cbd4196ef24f3ad2a06e714 13-Sep-2011 Jesse Wilson <jessewilson@google.com> Merge "Discourage developers from catching subclasses of SocketException."
2ca11d6eae460f94bc42bc2e453fac93f4b94eb0 13-Sep-2011 Jesse Wilson <jessewilson@google.com> Discourage developers from catching subclasses of SocketException.

We recently had a bug in Apache HTTP client where catching a
specific exception subclass caused incorrect behavior. Apache HTTP
expects a ConnectException but we're throwing its superclass,
SocketException. Unfortunately I don't think fixing this to throw
ConnectException is any better; the best I can tell from the spec
this should be throwing a NoRouteToHostException which would still
fail on Apache HTTP client. I'm going to fix that code to catch the
appropriate type.

Bug: http://b/5293809
Bug: http://b/4411922
Change-Id: I189408f6e2355475510fb817c97017e7bae1739e
et/BindException.java
et/ConnectException.java
et/NoRouteToHostException.java
et/PortUnreachableException.java
be0b5bd592bed1edaed2447e7ab1764b93eceaab 13-Sep-2011 Jesse Wilson <jessewilson@google.com> Make socket channel address available after bind().

This regression was found by a harmony test:
org.apache.harmony.nio.tests.java.nio.channels.SocketChannelTest#testSocket_bind

Change-Id: Idb1089fb96b17673cf78903d935cb729722fda33
io/SocketChannelImpl.java
3267a46b52d848e1e9e20c226512688f0c50d4c3 25-Aug-2011 Jeff Sharkey <jsharkey@android.com> Return real FileDescriptor in Socket wrappers.

In classes that wrap another Socket, return the real FileDescriptor
from the wrapped Socket.

Bug: 5189186
Change-Id: I157feb6991def9110eaf0ea82365b6f5b95b9372
et/Socket.java
io/SocketChannelImpl.java
df84cec32f3c1f71ea781e5f851724d84c35e620 18-Aug-2011 Jesse Wilson <jessewilson@google.com> Fix JarInputStream Manifest parsing.

I recently broke JarInputStream by changing Streams.readFully()
to unconditionally close the input stream when it was exhausted.
Although most streams won't return data after read() returns -1,
both JAR and ZIP streams can return data after a call to get the
next entry.

Change-Id: I2fcef44aaeae0ac27c9fa5a7a4996c5b1b794964
til/jar/Manifest.java
560d3756e9a8e95ed3aba6043118e89f87966522 14-Aug-2011 Jesse Wilson <jessewilson@google.com> Don't use getClassContext() to get the calling classes.

This weird, surprising behavior used the entire call stack as
context to lookup resources. This is the wrong solution to the
problem; context class loader is the right solution. And the
code is already using context class loader.

This change prevents some tests from failing with an NPE when
iterating the null class context.

Change-Id: Ic2419dc22f66a4fa8cceaee4746ef1a6d7d4680c
til/logging/Logger.java
cf216b0bb538b3e555af205f4fad8064331b9265 12-Aug-2011 Jesse Wilson <jessewilson@google.com> Use the application's class loader for URL stream handlers.

We had a test URLStreamHandlerFactoryTest.testInstallCustomProtocolHandler
that was failing when run in an APK without this fix. The new behavior
is definitely what Android applications will want!

Change-Id: I2266a8aea6da833022b538c1f424a3099684d992
et/URL.java
41a123f449a44e4e1aff15770165731332a7d1dc 10-Aug-2011 Elliott Hughes <enh@google.com> Fix Character's javadoc table of Unicode categories.

The Format, Private Use, and Surrogate categories were all claimed to be
Cf. The error was only in the summary table. The javadoc for the individual
categories was correct.

Bug: http://code.google.com/p/android/issues/detail?id=18942
Change-Id: Ifde47a85fbc84dbec05408f6581331ab4a8d275a
ang/Character.java
892c36b1c1eee25ad46bac6fffdf129219a5e98d 29-Jun-2011 Philip Milne <pmilne@google.com> Remove the contentEquals() method that was added to java.lang.String.

The public (though hidden) method contentEquals(char[], int, int)
was added to java.lang.String to avoid creating large numbers
of Strings during XML parsing.

That objective is preserved with this change, which uses a private
static method with a similar implementation that goes through the
regular String API.

Change-Id: I808e1ebc4ef6812dd651682628167b4c078af334
ang/String.java
1886a753937276e626acc42b44d878a5e0a50284 29-Jul-2011 Jesse Wilson <jessewilson@google.com> Restore the 'final' bit on DataInputStream.read() (libcore)

This was lost in a recent refactoring.

Change-Id: I6f625060192350636de7998a980a5c0f6cdc16c3
o/DataInputStream.java
0631922690f57fc2d7ae14f26fc6d721a08ae6b4 29-Jul-2011 Jesse Wilson <jessewilson@google.com> Merge "Only permit square brackets on IPv6 addresses."
98c564c72480313ae2954a7f0b666ff94345a2f1 25-Jul-2011 Jesse Wilson <jessewilson@google.com> Only permit square brackets on IPv6 addresses.

We were failing two tests in URLTest because we were accepting
IPv4 addresses and host names.

Note that in the RI, URL is extremely lenient on validating the
characters in the parts of a URL. It permits any character in any
part except for the delimiter characters like '/' or ':'. The
lax IPv6 check 'does it contain a colon?' is consistent with the
RI.

Change-Id: I957f2ee610b72cf68a7773b4c02a4b6d5fcbb9de
et/URLStreamHandler.java
250e0d89cc3f5d2fc03ed23961c774c02f825ffd 20-Jul-2011 Jesse Wilson <jessewilson@google.com> Use nanoTime rather than currentTimeMillis in ReferenceQueue.remove()

Some other side effects of this change:
- we no longer make a time lookup when we don't need to
- we time out after 'n' milliseconds, not 'n+1' milliseconds
- we duplicate code from Thread.join(). I opened http://b/5053948 to dedup this.

Bug: http://b/5050245
Change-Id: I20375119cfa06be559b6aa5c209375b3d3a541f9
ang/ref/ReferenceQueue.java
b1f55cb6f95928be969a8fe5c7447e13f14d0a68 19-Jul-2011 Elliott Hughes <enh@google.com> Fix FileInputStream/FileOutputStream on unowned FileDescriptors.

We were relying on the fd being invalid to prevent us from performing
activity on a closed stream. Unfortunately, this didn't work with our
clever scheme to avoid having to treat the two cases separately.

Go back to a simple scheme with one FileDescriptor and a boolean that
tells us whether or not we should close it. If we don't close it, we
switch it out for an invalid FileDescriptor so we won't continue to
act on the unowned FileDescriptor.

Bug: 4361076
Change-Id: I1851926fd2847ea63d91a8e0680a7430ecb16453
o/FileInputStream.java
o/FileOutputStream.java
fa28df0d3ecd45625ae816f07303eca0821bea46 13-Jul-2011 Elliott Hughes <enh@google.com> Fix BigInteger.hashCode.

Only the first 'numberLength' ints in 'digits' should be considered part
of the BigInteger. All other 'digits' accessors appear to be correct.

Bug: http://code.google.com/p/android/issues/detail?id=18452
Change-Id: Icb0ffeedc92b15a2ef9dacedf79ec6a1584f60f3
ath/BigInteger.java
79341fd989340e04df255ffbe71d80f5f38cb3e2 06-Jul-2011 Brian Carlstrom <bdc@google.com> Adding IntegralToString.appendByteAsHex

Change-Id: I84cf9043edb7b11c31987abac35c20c5c8f7b842
ang/IntegralToString.java
87201ff38d682b55f456c50da3e742459a56d258 30-Jun-2011 Brian Carlstrom <bdc@google.com> Have Arrays.asList.get() use ArrayList.throwIndexOutOfBoundsException for better error reporting

Change-Id: I649cf22d2782f3cecd02b3a4a0c3df0bd2b08ffb
til/ArrayList.java
til/Arrays.java
344461e2fa9fad6db14c6fd9a5b9b724deeb7111 28-Jun-2011 Jesse Wilson <jessewilson@google.com> Merge "Make the Timer docs consistent with the implementation."
723f75d03dd4a6c51e9e1ff67847b10fe0cb16e6 28-Jun-2011 Jesse Wilson <jessewilson@google.com> Make the Timer docs consistent with the implementation.

Change-Id: I6fb5979a65b5232f75425d50f9163b0a38355654
http://code.google.com/p/android/issues/detail?id=18031
til/Timer.java
0432d7db07f16409d05ba4095a0c3a442a9c77b9 25-Jun-2011 Jesse Wilson <jessewilson@google.com> Fix getPackage so it may be used by bootclasspath classes.

The test doesn't really exercise what I want it to exercise
unless it's run on the bootclasspath itself. It's a sizeable
amount of work to permit certain tests to run on the boot
class path, so I'm punting on the full regression test. I did
test this manually.

Bug: 4676726
Change-Id: I8f82041b93a59c7747655e5685a390c10004ff84
ang/Package.java
a5e416020f1202079c60345b159c2921014d3117 21-Jun-2011 Jesse Wilson <jessewilson@google.com> am 9429d06c: Fix System.runFinalization() to avoid running indefinitely.

* commit '9429d06c5427a6cac499ba90f138afac006135a2':
Fix System.runFinalization() to avoid running indefinitely.
9429d06c5427a6cac499ba90f138afac006135a2 21-Jun-2011 Jesse Wilson <jessewilson@google.com> Fix System.runFinalization() to avoid running indefinitely.

This also avoids problems where System.runFinalization() calls
Thread.interrupt() and interrupts a finalizer that is doing
some I/O.

Change-Id: I8de88d7382f684798737ecd19b90d306d9590f1c
http://b/4193517
ang/Daemons.java
ang/Runtime.java
ang/ref/FinalizerReference.java
6230d5d28024440d42adc57c25fb018f2519a51d 21-Jun-2011 Jesse Wilson <jessewilson@google.com> am 64c6c367: Implement the finalizer watchdog.

* commit '64c6c367497c7fcf88e7527022234043e4460758':
Implement the finalizer watchdog.
64c6c367497c7fcf88e7527022234043e4460758 21-Jun-2011 Jesse Wilson <jessewilson@google.com> Implement the finalizer watchdog.

Change-Id: Ia4aaf5f0ef5a2f5f7e6ec3e8b4c4e300c9e1b2ee
http://b/4144865
ang/Daemons.java
ang/FinalizerThread.java
ang/Runtime.java
ang/Thread.java
ang/ref/FinalizerReference.java
ang/ref/Reference.java
ang/ref/ReferenceQueue.java
ang/ref/ReferenceQueueThread.java
25e769d476ae139ed576f20fe27fd7e38ab034bb 17-Jun-2011 Jesse Wilson <jessewilson@google.com> Add tests for Calendar/SimpleDateFormat bugs

Change-Id: Ib9142a6926c9eb30b021977db9eec7b4f47dae38
http://b/4723412
ext/SimpleDateFormat.java
c5ffd171c861ea2ecae026fe228c8ca8c96c9394 15-Jun-2011 Elliott Hughes <enh@google.com> Merge "Remove the LocaleData.digit field." into dalvik-dev
e2377cdd707b830d07a5708216834f7ac76ee3e1 15-Jun-2011 Elliott Hughes <enh@google.com> Remove the LocaleData.digit field.

ICU 4.6 no longer supports this, which always had the constant value '#'.

Also ensure that we cache all the locale data (not just the zone strings)
for the root locale, en_US, and the user's locale when the Zygote starts
up.

Also improve the ICU JNI code's local reference usage somewhat.

Change-Id: I28692d9484aecc29820c201b08b8bedd3f26df83
ext/DecimalFormatSymbols.java
49ba8401a597940d8d192f6788c28dd0b9e1608e 15-Jun-2011 Jesse Wilson <jessewilson@google.com> Merge "Kill another use of TimeZone.useDaylightTime()." into dalvik-dev
d8d3329347af700beed67172c77046b5c2ecece2 15-Jun-2011 Jesse Wilson <jessewilson@google.com> Kill another use of TimeZone.useDaylightTime().

I wrote another test to prove the use was incorrect.

Change-Id: I86c5e53c735e7948b96c0d2a87abe21eb9aed876
http://b/2435103
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
til/TimeZone.java
5cd66f07b3e6c6029a2b72369ab556520b9676e1 15-Jun-2011 Elliott Hughes <enh@google.com> Update the Locale documentation to mention ICU 4.6.

Change-Id: I9a90a930bb4bc8e45a8a38c1eacba708eb087e40
til/Locale.java
b434689d9f54081c903aab94fe8f2ab11973de23 15-Jun-2011 Jesse Wilson <jessewilson@google.com> Don't interpret useDaylightTime as 'ever used daylight time'.

Change-Id: If0935b3725b3c91a74291b8f51d2263a5e33f1d4
http://code.google.com/p/android/issues/detail?id=15629
http://b/2435103
til/GregorianCalendar.java
71ad1ba183f0cad222cb80a11b2f8afc03362416 14-Jun-2011 Elliott Hughes <enh@google.com> Simplify & optimize DatagramSocket's implementation.

In particular, recv on a connected socket now costs no more than it should.

Bug: 1974286
Change-Id: I72c16ec82d1537753a9da146c2672515b2ed6990
et/DatagramSocket.java
et/MulticastSocket.java
1c6a607c2bdbde97c1bbb152517f2cd082828818 11-Jun-2011 Jeff Brown <jeffbrown@google.com> am bf046972: Merge "Fix ReferenceQueue linked list manipulations."

* commit 'bf04697200be0048459238026e93970139ede268':
Fix ReferenceQueue linked list manipulations.
7796ec1e199a9d4f791ae206a60e35fd82d2b462 11-Jun-2011 Jeff Brown <jeffbrown@google.com> Fix ReferenceQueue linked list manipulations.

This change fixes a bug where the linked list would be truncated
whenever the head element was removed.

Change-Id: I81dbc963794feb40215ae287449c97acf3fe7050
ang/ref/FinalizerReference.java
031e60e821dea3ae92e70cf6f9df5e97f477ef90 10-Jun-2011 Elliott Hughes <enh@google.com> Merge "Tidy transferFrom a little." into dalvik-dev
e3d7539b3cb1e763f1ed5832120684468e635d94 10-Jun-2011 Elliott Hughes <enh@google.com> Tidy transferFrom a little.

Other than documentation, the only real change here is to stop using direct
buffers, which doesn't gain us anything (and does have a cost).

Bug: 4109660
Change-Id: Iebf3eb9cee6038af68443cd061718d584040010e
io/FileChannelImpl.java
996083c82dd18f09ac014d8ad2d40eeec85f6b24 10-Jun-2011 Jesse Wilson <jessewilson@google.com> Fix GregorianCalendar DST adjustment bug.

We were always adjusting from DST. In some situations this
lead to us adjusting the delta too much, and we'd double
compensate.

Change-Id: I777eef5b545010dfd18f5b771d37bcd728a69885
http://code.google.com/p/android/issues/detail?id=17502
til/GregorianCalendar.java
e3b6fa2bf357f2712ab2ee9e8487f157595ea0c7 10-Jun-2011 Elliott Hughes <enh@google.com> Expose pread and pwrite.

And fix FileChannel to use them.

Bug: 4183719
Bug: 3107501
Change-Id: I51114a16522b93bf959b5953bec658e6889054c6
io/Buffer.java
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/IoVec.java
io/SocketChannelImpl.java
fa65e4a9364363eff71335dfa3520f0c1d788b0d 09-Jun-2011 Elliott Hughes <enh@google.com> Fix the ServiceLoader callers to use the appropriate ClassLoader.

Bug: http://code.google.com/p/android/issues/detail?id=17450
Change-Id: I6939a3a1b47d9c98d3778b84a0d16e67303bbd19
io/channels/spi/SelectorProvider.java
io/charset/Charset.java
til/prefs/Preferences.java
555c25e506a6a07e546e88ed2d2059a47549c432 09-Jun-2011 Elliott Hughes <enh@google.com> Remove more dead code and tests.

Change-Id: Ie129e5487e4f5bfc9c9ff62854c89e4a6a662555
ecurity/AuthProvider.java
4f54203252733229489e6d09c7d3e0aaa82754d6 06-Jun-2011 Elliott Hughes <enh@google.com> Merge "Remove more dead "security theater" cruft." into dalvik-dev
e26b27faf689c17b7894c78caee32432176349ec 04-Jun-2011 Elliott Hughes <enh@google.com> Remove more dead "security theater" cruft.

There's probably still more stuff lying around that isn't useful,
but this was all I had time for on this particular Friday afternoon...

Change-Id: I69593f6c9ab5534d581c703cc85a9766ba8e40e5
o/FilePermission.java
o/FilePermissionCollection.java
o/SerializablePermission.java
ang/RuntimePermission.java
ang/SecurityManager.java
ang/reflect/ReflectPermission.java
et/NetPermission.java
et/SocketPermission.java
et/SocketPermissionCollection.java
ecurity/AccessControlContext.java
ecurity/AccessController.java
ecurity/AllPermission.java
ecurity/AllPermissionCollection.java
ecurity/BasicPermission.java
ecurity/BasicPermissionCollection.java
ecurity/CodeSource.java
ecurity/DomainCombiner.java
ecurity/Permission.java
ecurity/PermissionCollection.java
ecurity/Permissions.java
ecurity/Policy.java
ecurity/PrivilegedAction.java
ecurity/PrivilegedActionException.java
ecurity/PrivilegedExceptionAction.java
ecurity/ProtectionDomain.java
ecurity/SecurityPermission.java
ecurity/UnresolvedPermission.java
ecurity/UnresolvedPermissionCollection.java
ecurity/acl/Permission.java
ecurity/security.properties
ql/SQLPermission.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/logging/LoggingPermission.java
fc041ff241f9a7556e72236f130de0215ecd17db 03-Jun-2011 Elliott Hughes <enh@google.com> Remove support for deprecated IPv4 address formats.

Bug: 4539262
Change-Id: Ic42173b7b06e8536e8c4331087720d7df1e1681a
et/InetAddress.java
4596cf129099ade7ec2ec17543d68db03d2f45bd 28-May-2011 Elliott Hughes <enh@google.com> am ee100f24: Merge "Make ErrnoException a checked exception."

* commit 'ee100f24d3b9d538dfc0ec9c9e74b6670e0a2a1f':
Make ErrnoException a checked exception.
ee100f24d3b9d538dfc0ec9c9e74b6670e0a2a1f 28-May-2011 Elliott Hughes <enh@google.com> Merge "Make ErrnoException a checked exception."
83b734febd08784905d257d533df1b201937ecfd 28-May-2011 Elliott Hughes <enh@google.com> am 5722fb8a: Fix the FileOutputStream documentation.

* commit '5722fb8a3c56310ad3e9394e7bd9bb0fd17917a9':
Fix the FileOutputStream documentation.
9b510df35b57946d843ffc34cf23fdcfc84c5220 28-May-2011 Elliott Hughes <enh@google.com> Make ErrnoException a checked exception.

Bug: 4486011
Change-Id: I1877ce593d441653f75ab14884aa2d85f52652ad
ang/ProcessManager.java
et/InetAddress.java
et/PlainDatagramSocketImpl.java
io/FileChannelImpl.java
io/SelectorImpl.java
io/SocketChannelImpl.java
5722fb8a3c56310ad3e9394e7bd9bb0fd17917a9 28-May-2011 Elliott Hughes <enh@google.com> Fix the FileOutputStream documentation.

The O_CREAT|O_TRUNC behavior was not fully documented.

Change-Id: I0ea16ec3ea032c4f0572e8900316469f448edb75
o/FileOutputStream.java
ecf950e56b55f95a960f151268286576159c6530 27-May-2011 Jesse Wilson <jessewilson@google.com> Relative/absolute and opaque/hierarchical docs for java.net.URI.

Change-Id: I5ec2e1dd10a3c676441caf56838433fffa316a59
http://b/2753295
et/URI.java
c68609e723a5daa20888abdb640799d4353fd590 27-May-2011 Jesse Wilson <jessewilson@google.com> Document java.net.URI.

Change-Id: I941ba9cb4a2d48b052c25b7799ac466549df8d53
http://b/2753295
et/URI.java
et/URL.java
73d0c8232b23ad74af5cc198143603ff6ee5236b 27-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Clean Up URI's parsing code." into dalvik-dev
ce257b03a1e5ff6075967e6a84cdb439cb2b01c8 27-May-2011 Jesse Wilson <jessewilson@google.com> Clean Up URI's parsing code.

http://b/2753295

Change-Id: I190ee12c14d1b3b17e2c8cb5ef3868618f1ee124
et/URI.java
et/URLStreamHandler.java
fefa79414d785f556bd887e4e035f49b2be5e38f 27-May-2011 Elliott Hughes <enh@google.com> Merge "Match the RI's exact exception type." into dalvik-dev
c61ad82613eb264cbf93e91519b0c061d11b3c2d 27-May-2011 Elliott Hughes <enh@google.com> Match the RI's exact exception type.

Change-Id: Id64b8ff87198e31a93a92d19d542948bcbb74db0
et/Socket.java
2d99ef561304174b8ae01a0a68d5b96d5edb9f10 26-May-2011 Jesse Wilson <jessewilson@google.com> Fix URI to behave more like the spec and browsers and less like the RI.

When computing relative paths from URLs like foo.com/a to foo.com/a/b,
this now uses "a/b" as the relative path and not just "b". That was an
RI bug that we were foolishly compatible with.

Change-Id: I6e3f10d84602c08bbf6bd7c7e43c2ba3387e4c3b
http://b/2753295
et/URI.java
et/URLStreamHandler.java
c5727263001f1eae068f7821063d7bfb2da8e24c 26-May-2011 Jesse Wilson <jessewilson@google.com> Use canonicalizePath in URI.

This needs to add another mode to canonicalizePath to not
discard ".." prefixes from relative paths.

Change-Id: I9e0b86bd1e7ab8e5e71c46f1efcf4aeb218e66b2
http://b/2753295
et/URI.java
et/URLStreamHandler.java
159dd6646fc204b3accbb598f190b3f8e0fbfce0 25-May-2011 Elliott Hughes <enh@google.com> Merge "Make it possible to test java.io.Console." into dalvik-dev
5292410e4ebf7fb5149eefd2f52fcb94c46690a6 24-May-2011 Jesse Wilson <jessewilson@google.com> Rewrite parsing for java.net.URL.

This fixes many broken cases on handling relative URLs.

We normalize all URLs by default. This will result
in more URL equality than before. Previously the URLs
http://android.com/a/../ and http://android.com/ were not
equal; now they are equal.

Change-Id: I8cf7be2e42eeb1386520be2698d8f14e0a55decb
http://b/4361656
et/URL.java
et/URLStreamHandler.java
dd3297417120e11cfafd502f008b4719f6974bd8 25-May-2011 Elliott Hughes <enh@google.com> Make it possible to test java.io.Console.

Change-Id: I9389c6625ba0837dbe1cc62c785fc2091ecbf24e
o/Console.java
c03e4ba8cd93513aabda061b00d516b54717c5fb 25-May-2011 Elliott Hughes <enh@google.com> Fix a bug in FileChannel.map.

Found by a Harmony test.

Change-Id: I1f2ba191242dd6236549e6ed4ef77021ad7ae628
io/FileChannelImpl.java
f1a10948c7e4caf5a6d9d53b4b3ad99580fc1cea 25-May-2011 Elliott Hughes <enh@google.com> Fix a couple of FileChannel bugs.

FileChannel.read's non-readv(2) overload shares java.io's weird
non-Unix "-1 at EOF" behavior. The readv(2) overloads already had
that, but they had a bug where they'd claim to have copied more
into a buffer than they actually had.

No new tests because these were found by existing Harmony unit tests.

Change-Id: Ia267e5834fd360d71becdd7d1bdd838d03ea6532
io/FileChannelImpl.java
io/IoVec.java
548d2e6ef6d2f4334a488cac591d11e60675111a 24-May-2011 Elliott Hughes <enh@google.com> Remove two tests that are duplicated in the Harmony suite.

(And a spurious blank line from ThreadGroup.)

Change-Id: I3cb1ccb94a8352937d221a141a598ffe4696b06e
ang/ThreadGroup.java
8bc9296d071a77994b6418df2edb120d6a9f70ac 24-May-2011 Elliott Hughes <enh@google.com> Fix the deprected overload of String.getBytes.

Previously, this would unconditionally throw ;-)

Change-Id: Ia62eb6febcfca2a1a9f546935b092141e698d0b2
ang/String.java
78b020b8412d212fa052b7ddf630ca6058c846be 24-May-2011 Elliott Hughes <enh@google.com> Fix a minor serialization bug found by a Harmony test.

Change-Id: I1f7b149deddb167ff5c644513c48e6439679f108
o/ObjectStreamClass.java
99c5c63d6b8261991ac3b3af09a5cb96761e1173 24-May-2011 Elliott Hughes <enh@google.com> Update a useless system property.

Change-Id: I30424eba04a9c1eef976eac02a7d139e7c6c5af1
ang/System.java
a28bc96d63595a77fa918da8ccdda50e9eaae95e 21-May-2011 Elliott Hughes <enh@google.com> Fix read/write bugs in DatagramChannel and SocketChannel.

Also improve some exception detail messages for ease of debugging.

These bugs were found by external/apache-harmony tests.

Change-Id: I37a58c1d1f1c2150eb9171967f47ef9644e8ae15
io/Buffer.java
io/DatagramChannelImpl.java
io/InvalidMarkException.java
io/SocketChannelImpl.java
2cff86c0c10588a35036fe5bbca83b07f53e1b1d 21-May-2011 Elliott Hughes <enh@google.com> Add a missing parameter check to FileChannel.

If we were rewriting this from scratch, we might want to leave these kinds of
checks to the kernel and just rethrow an appropriate exception when the kernel
complains. But for now, let's at least be consistent.

Change-Id: I31c4d13d033c8f46a632622f1a2ce3f44a6c5701
io/FileChannelImpl.java
5c3bf9578b9f6c49da8b72e2e7fb9e33a27c124f 21-May-2011 Elliott Hughes <enh@google.com> Merge "Suppress some FindBugs warnings." into dalvik-dev
8f99aa098c6a06b8be788abbca1c1d1060342709 21-May-2011 Jesse Wilson <jessewilson@google.com> Cosmetic cleanup of java.net.URL.

Update the documentation to be closer to reality.

Change-Id: Ic187efde5d83c6bfcdc80428429a2d0f186d9d0a
http://b/2753295
et/URL.java
et/URLStreamHandler.java
0d4daefcf389b6433a0af481ef44a84a2546541a 21-May-2011 Elliott Hughes <enh@google.com> Suppress some FindBugs warnings.

Also globally replace "for(" with "for (".

Change-Id: I27fe17460e6745b9ca823f42e57c86fe8af31979
ang/Boolean.java
ang/Byte.java
ang/Character.java
ang/ClassLoader.java
ang/Double.java
ang/FinalizerThread.java
ang/Float.java
ang/Integer.java
ang/Long.java
ang/Object.java
ang/ProcessManager.java
ang/Short.java
ang/String.java
ang/UnsafeByteSequence.java
ang/reflect/Constructor.java
ang/reflect/Method.java
ath/BitLevel.java
ath/Conversion.java
ath/Logical.java
et/InetAddress.java
et/NetworkInterface.java
et/URLClassLoader.java
ecurity/KeyStore.java
ql/Date.java
til/TreeSet.java
til/prefs/XMLParser.java
c3d80a43de12b7b012d44dc2bea82f0b624e408e 20-May-2011 Brian Carlstrom <bdc@google.com> am c77290ea: Remove IndexedPKIXParameters

* commit 'c77290eaef032e5e8952d65e0456b091b6b50804':
Remove IndexedPKIXParameters
dc915c69ba2495dd2cf965d16058d0b13762142c 20-May-2011 Elliott Hughes <enh@google.com> Move the floating-point parsing code, and tidy up some documentation.

Change-Id: Ibdc1716847f4c6a85a7c24766feffc8768819cef
ang/Double.java
ang/Float.java
ang/HexStringParser.java
ang/StringToReal.java
ath/MathContext.java
c77290eaef032e5e8952d65e0456b091b6b50804 20-May-2011 Brian Carlstrom <bdc@google.com> Remove IndexedPKIXParameters

Change-Id: Idaaa1952d1b6148c51b3da5d1771105e8bde8a03
ecurity/cert/PKIXParameters.java
dbde5bd893290c02bb289460fc61e48eda63daa2 20-May-2011 Elliott Hughes <enh@google.com> FileChannelImpl doesn't need to special-case O_APPEND.

...we have an OS kernel for such things.

Bug: 4455730
Change-Id: I23efc0ceaa534bffdc0da9a5ff1426ff9d56547f
io/FileChannelImpl.java
0b736ebc4efef64f2db1999aea90297ad8196146 20-May-2011 Elliott Hughes <enh@google.com> Move the stuff to bridge between io/net/nio semantics and POSIX semantics.

IoUtils should be more generally useful.

Change-Id: I5665f2a94d226ada3077a30045549a53cc741cf0
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
et/DatagramSocketImpl.java
et/InetAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
et/Socket.java
io/DatagramChannelImpl.java
io/SelectorImpl.java
io/SocketChannelImpl.java
9e67ca71d3d4a489a157abadc5ba519ced7a0b50 20-May-2011 Elliott Hughes <enh@google.com> Expose waitpid(2).

This lets us move the process reaper up into Java. I've rearranged the code a
bit for the benefit of those looking at stack traces: it's now much clearer
when we're idle because there are no children to wait on, which previously
looked like we were blocked trying trying to report the exit of a child.

Bug: 3107501
Change-Id: I8c5c2952cbdbf9b5a6d8954b4964011d052a90a3
ang/ProcessManager.java
553d98af897f7202de5e5a776287de0b5ca8fe39 19-May-2011 Elliott Hughes <enh@google.com> Expose accept(2).

The implementation of PlainSocketImpl.accept is made ugly by the fact that the
SocketImpl we mutate may share its FileDescriptor with a SocketChannel, so we
need to mutate the FileDescriptor itself, and can't simply swap in a new one.
I've raised http://b/4452981 to see if we can integrate the nio and io socket
classes more closely, to avoid this kind of mess.

Bug: 3107501
Change-Id: I4964b64c25e936a44d1e4c22504ca29bba247ab6
et/PlainSocketImpl.java
et/SocketTimeoutException.java
ae01ebf69d7d2e38eb66c40e0ebacd3b118acfc7 19-May-2011 Elliott Hughes <enh@google.com> Merge "More IPv6 sin6_scope_id fixes." into dalvik-dev
4728a015bcd3f432e000d1547c668e804015dc04 19-May-2011 Elliott Hughes <enh@google.com> More IPv6 sin6_scope_id fixes.

My earlier patch fixed the Java-to-native direction. This fixes the
native-to-Java direction, which didn't occur to us at the time.

I've also fixed the documentation so that public methods don't
define themselves in terms of a private method (that ought to
exist in the public API, but doesn't).

Change-Id: Ib16a5952bb69b0b96a66775304947f2a120a1dcf
et/InetAddress.java
c7655ddf0ea272d7992805f451b350dfb7b01c4a 19-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Suppress our first FindBugs warning." into dalvik-dev
bad51d783a94c137c3775bbbb95e2eefa87bd0b3 19-May-2011 Jesse Wilson <jessewilson@google.com> Suppress our first FindBugs warning.

Change-Id: Ic95d9699e3ea58b2536786c432aa166aa4507030
http://b/3467076
ang/FindBugsSuppressWarnings.java
til/EventObject.java
til/ResourceBundle.java
til/TreeMap.java
23ec09188303a874b3b391f96ae0a29af002bff9 19-May-2011 Elliott Hughes <enh@google.com> Implement recvfrom(2).

This one's a little bit hairy because of multiple return values.

Bug: 3107501
Change-Id: I3bd35647d94bb6bc2192d6f31a39ecca07a3926e
et/InetAddress.java
et/InetSocketAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
59e5a4761c267d31ba5d6e0573a0473647c3b56e 18-May-2011 Elliott Hughes <enh@google.com> Merge "Fix Inet6Address (de)serialization." into dalvik-dev
f02f9397fd5984f476e056ddb8c04db9af9a15a0 18-May-2011 Elliott Hughes <enh@google.com> Fix Inet6Address (de)serialization.

Looks like it's valid to have scope_ifname_set == true, but ifname == null.

Change-Id: Ic37cf40ae91ff0edaf1e66ccd09819fee9c41d99
et/Inet6Address.java
42bc73a06b73f35e20fd175e864928ad33a57bee 17-May-2011 Elliott Hughes <enh@google.com> Merge "Fix InetAddress.isReachable." into dalvik-dev
ad5d31103472d57f5744ff5a03c3bc38dcb34740 17-May-2011 Elliott Hughes <enh@google.com> Fix InetAddress.isReachable.

Change-Id: I4b90b711642515a3abda54d176337738bdda1312
et/BindException.java
et/ConnectException.java
et/InetAddress.java
17da3dfaf359de021b753570e25a033ae8927432 17-May-2011 Brian Carlstrom <bdc@google.com> am 3041d84e: Merge "Make CertInstaller installed CA certs trusted by applications via default TrustManager (2 of 6)"

* commit '3041d84e3c0ac7711868bdd7556047a3422e3052':
Make CertInstaller installed CA certs trusted by applications via default TrustManager (2 of 6)
6fe7b33322a6a7d1e5cc0061335e120aa15c4e40 17-May-2011 Elliott Hughes <enh@google.com> Fix a comment typo.

Change-Id: I3d401b7e943897847b1abd4029458e4537bd3533
io/IoVec.java
0eca2939f501873bd86f176540d2c072a1a83780 17-May-2011 Elliott Hughes <enh@google.com> Merge "Add sendto(2) and reimplement all network writes in terms of it." into dalvik-dev
1b3c5388d0fffde4392007eb1b0be011a5dfae82 12-May-2011 Brian Carlstrom <bdc@google.com> Make CertInstaller installed CA certs trusted by applications via default TrustManager (2 of 6)

frameworks/base

Adding IKeyChainService APIs for CertInstaller and Settings use
keystore/java/android/security/IKeyChainService.aidl

libcore

Improve exceptions to include more information
luni/src/main/java/javax/security/auth/x500/X500Principal.java

Move guts of RootKeyStoreSpi to TrustedCertificateStore, leaving only KeyStoreSpi methods.
Added support for adding user CAs in a separate directory for system.
Added support for removing system CAs by placing a copy in a sytem directory
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStore.java

Formerly static methods on RootKeyStoreSpi are now instance methods on TrustedCertificateStore
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Added test for NativeCrypto.X509_NAME_hash_old and X509_NAME_hash
to make sure the implementing algorithms doe not change since
TrustedCertificateStore depend on X509_NAME_hash_old (OpenSSL
changed the algorithm from MD5 to SHA1 when moving from 0.9.8 to
1.0.0)

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Extensive test of new TrustedCertificateStore behavior
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStoreTest.java

TestKeyStore improvements
- Refactored TestKeyStore to provide simpler createCA method (and
internal createCertificate)
- Cleaned up to remove use of BouncyCastle specific X509Principal
in the TestKeyStore API when the public X500Principal would do.
- Cleaned up TestKeyStore support methods to not throw Exception
to remove need for static blocks for catch clauses in tests.

support/src/test/java/libcore/java/security/TestKeyStore.java
luni/src/test/java/libcore/java/security/KeyStoreTest.java
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Added private PKIXParameters contructor for use by
IndexedPKIXParameters to avoid wart of having to lookup and pass
a TrustAnchor to satisfy the super-class sanity check.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
luni/src/main/java/java/security/cert/PKIXParameters.java

packages/apps/CertInstaller

Change CertInstaller to call IKeyChainService.installCertificate
for CA certs to pass them to the KeyChainServiceTest which will
make them available to all apps through the
TrustedCertificateStore. Change PKCS12 extraction to use AsyncTask.

src/com/android/certinstaller/CertInstaller.java

Added installCaCertsToKeyChain and hasCaCerts accessor for use by
CertInstaller. Use hasUserCertificate() internally. Cleanup coding
style.

src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

Added MANAGE_ACCOUNTS so that IKeyChainService.reset
implementation can remove KeyChain accounts.

AndroidManifest.xml

Implement new IKeyChainService methods:
- Added IKeyChainService.installCaCertificate to install certs
provided by CertInstaller using the TrustedCertificateStore.
- Added IKeyChainService.reset to allow Settings to remove the
KeyChain accounts so that any app granted access to keystore
credentials are revoked when the keystore is reset.

src/com/android/keychain/KeyChainService.java

packages/apps/Settings

Changed com.android.credentials.RESET credential reset action to
also call IKeyChainService.reset to remove any installed user CAs
and remove KeyChain accounts to have AccountManager revoke
credential granted to private keys removed during the RESET.

src/com/android/settings/CredentialStorage.java

Added toast text value for failure case

res/values/strings.xml

system/core

Have init create world readable /data/misc/keychain to allow apps
to access user added CA certificates installed by the CertInstaller.

rootdir/init.rc

Change-Id: Ief57672eea38b3eece23b14c94dedb9ea4713744
ecurity/cert/PKIXParameters.java
90d96a4f168b7e56cff54dc94dca2f3cde60ebcd 17-May-2011 Elliott Hughes <enh@google.com> Add sendto(2) and reimplement all network writes in terms of it.

Note that this doesn't fix http://b/4182806.

Bug: 3107501
Change-Id: I9b56eae226389a63a12b4c0499d40d5a54a462e2
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
ae3dad3194393a6800590284e3632f44fac1ddfb 16-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Move APIs from internal HttpResponseCache to external one." into dalvik-dev
e27d02044ec399884bfd4343d513bf270b9b9b11 16-May-2011 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.close.

For now I'm keeping AsynchronousCloseMonitor as a special case in native code.
We can see about doing something more general-purpose in a later pass.

Bug: 3107501
Change-Id: Ib79b9fc0bebfafc2d14896d957bd8591ae8e6e97
et/InetAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
fb4a6392a04b1f3a1124b3db6bae51d8cbfa53f8 14-May-2011 Jesse Wilson <jessewilson@google.com> Move APIs from internal HttpResponseCache to external one.

Change-Id: Ia6c88f292088bfd3ed546c067376fcb36b435b48
http://b/3180373
ang/IntegralToString.java
aaa0003924a16a06eb871456c33364461c25a834 14-May-2011 Elliott Hughes <enh@google.com> am c10e07c3: Add @hide accessors for FileDescriptor\'s int.

* commit 'c10e07c3af6485825d9c18de56c6c06f9a26f985':
Add @hide accessors for FileDescriptor's int.
c10e07c3af6485825d9c18de56c6c06f9a26f985 14-May-2011 Elliott Hughes <enh@google.com> Add @hide accessors for FileDescriptor's int.

Change-Id: I947c4898f37a294f255d098ef48078b613c56501
o/FileDescriptor.java
29965ad146fe99ef4bbe70701f3d4413750506e4 13-May-2011 Chia-chi Yeh <chiachi@android.com> am c1c180ba: Add a method to get FileDescriptor from DatagramSocket for internal use.

* commit 'c1c180bace58e44b4e555fdb994deedc011ad882':
Add a method to get FileDescriptor from DatagramSocket for internal use.
c1c180bace58e44b4e555fdb994deedc011ad882 13-May-2011 Chia-chi Yeh <chiachi@android.com> Add a method to get FileDescriptor from DatagramSocket for internal use.

Change-Id: I437530d8c8cc840310dea38bcc9973c4973806c8
et/DatagramSocket.java
2bad9bff258de6275bd3847e5e9f3169b0a93c61 12-May-2011 Elliott Hughes <enh@google.com> Reimplement OSNetworkSystem.isConnected in Java.

We can do this in Java now we've exposed poll(2).

Change-Id: I9f2700d09134198c1cd2681e3814fb482e8e271c
o/InterruptedIOException.java
et/MalformedURLException.java
et/NoRouteToHostException.java
et/PortUnreachableException.java
et/ProtocolException.java
et/SocketException.java
et/SocketTimeoutException.java
et/UnknownServiceException.java
io/SocketChannelImpl.java
70c820401677ca251ad09ac64cc23c760764e75d 12-May-2011 Elliott Hughes <enh@google.com> Expose poll(2) and reimplement java.nio.channels.Selector.

This also adds UnsafeArrayList<T>, which is like ArrayList but lets you access
the underlying array (as opposed to ArrayList.toArray which creates a copy).

Bug: 3107501
Change-Id: I8dc570a9fd7951b1435047017ea7aa19f8f8fc53
io/SelectorImpl.java
til/AbstractList.java
til/UnsafeArrayList.java
6716a68492cbad8cf71e4941beb1fece7858a3cd 11-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Address code review comments to Adopt DiskLruCache change." into dalvik-dev
0038bf3674d6fedd4c1e884c7903f2fdcecb9127 11-May-2011 Elliott Hughes <enh@google.com> Merge "Clean up the select(2) implementation." into dalvik-dev
f589846f86761ffea3c06ab9d105d3f19328d121 11-May-2011 Jesse Wilson <jessewilson@google.com> Address code review comments to Adopt DiskLruCache change.

That change was submitted too early. This is the missing
follow-up.

Change-Id: I521455a7d249f8841c989561775c91d4368a8966
http://b/3180373
et/URLClassLoader.java
til/jar/JarFile.java
2005fa732c2f13cb3405d31f3d45ea10afdff46f 11-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Adopt DiskLruCache in HttpResponseCache." into dalvik-dev
a7bb29434692e01aed843b88cd042628bab74a23 11-May-2011 Elliott Hughes <enh@google.com> Clean up the select(2) implementation.

I wasn't planning on touching this code (since I want to replace it), but the
purported "fix" for http://code.google.com/p/android/issues/detail?id=6309 was
actually a regression. The supplied test fails on the RI. This patch replaces
the bogus test with new tests, and reverts the old "fix".

This was found while trying to work out what "true" and "false" return values
from OSNetworkSystem.select are supposed to mean. This patch also switches to
a more traditional int return value.

Bug: 3107501
Change-Id: Iddce55e081d440b7eb3ddcf94db7d0739dc89c70
io/SelectorImpl.java
433e3fac172d0c4449051b0c61c0c63b298a0903 11-May-2011 Jesse Wilson <jessewilson@google.com> Adopt DiskLruCache in HttpResponseCache.

http://b/3180373

Change-Id: I55ed45c5d0b8fc72cf50e8912416367ac802dc7a
ang/IntegralToString.java
32b0fa4d1a31ef07bc4297c615f0fe50e9aa7c21 11-May-2011 Elliott Hughes <enh@google.com> DatagramSocket.disconnect is really a connect(2) of an AF_UNSPEC sockaddr.

Bug: 3107501
Change-Id: Ib04369b9ca63ff3fe7eb87dcbf2926fe704813e3
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/PlainDatagramSocketImpl.java
io/DatagramChannelImpl.java
8e0bdcf8bb815078e28679b8111d590d2da83328 11-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Dont line wrap Base64." into dalvik-dev
32b2c95c350002f67c8b3e65777161feda766b72 10-May-2011 Jesse Wilson <jessewilson@google.com> Dont line wrap Base64.

Change-Id: I9a16a09dad9ff170921591455b17a3b738e70655
til/jar/JarVerifier.java
til/prefs/AbstractPreferences.java
996bf79565ac88402920bd826d6f85952c83be20 10-May-2011 Elliott Hughes <enh@google.com> Expose connect(2).

The new NET_FAILURE_RETRY in Posix.cpp is intended to replace the legacy one
in NetFd.h, but during the transition we need both. The new one also takes care
of the asynchronous Socket.close semantics, and changes the behavior when the
FileDescriptor is invalid on entry: that is now reported as EBADF; it's only
reported as "Socket closed" when we've been round the loop at least once,
giving us reason to believe the socket was ever open. Having had to debug this
distinction, I think the new semantics are less confusing.

Bug: 3107501
Change-Id: I243dc4fa2eddde7ba40e9b66ec8fc555bc4e80f9
et/ConnectException.java
et/PlainSocketImpl.java
da15009528cc8300a6251f1d0931ac8657c9fc31 09-May-2011 Elliott Hughes <enh@google.com> Expose bind(2).

I've renamed the java.net.InetAddress to struct sockaddr conversion functions
too, after initially screwing up this patch by copy & pasting a usage of the
one that only one caller actually wants. Now the name's so ugly no-one will
be likely to use it by accident.

Bug: 3107501
Change-Id: I869a8d27fc40e462505e02bf25a67e771a403e92
et/BindException.java
et/InetAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
49ff8b8582bca20a1adbda1d957220526332a8ca 06-May-2011 Elliott Hughes <enh@google.com> More networking cleanup.

Move a bit more work into Java.

Change-Id: I656ec6e3c792ce9baed32662d65c45d75af1d371
et/PlainSocketImpl.java
io/SocketChannelImpl.java
42d75577588240e7d79fe52e635f0c1df070672e 06-May-2011 Elliott Hughes <enh@google.com> Add a test for a publicly-reported bug I already fixed.

Another casualty of the honeycomb asXBuffer byte order bug.

Bug: http://code.google.com/p/android/issues/detail?id=16598
Change-Id: I885d9f1651238a5d2aadf3fef7d119775f742fdf
io/CharBuffer.java
a3b57e9cb41fb00ac607cd330fa73270b564b66c 06-May-2011 Elliott Hughes <enh@google.com> Fix non-blocking DatagramChannel.receive and ServerSocketChannel.accept.

The former problem was the reported bug, but the latter was another instance of
the same mistake, and much harder to fix.

The interesting change here is that we now create the SocketImpl (and thus the
underlying OS socket) for a ServerSocket much sooner than we used to: if the
constructor doesn't throw, you've got yourself a usable socket.

Bug: http://code.google.com/p/android/issues/detail?id=16579
Change-Id: Iac8b707e74cd1367ee0fdc22fc3969677cfa566c
et/DatagramSocket.java
et/PlainServerSocketImpl.java
et/ServerSocket.java
et/SocketImpl.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/spi/AbstractSelectableChannel.java
d742d7fc7f0593eb8c6e4ac9dd4c0f6a80374e46 05-May-2011 Jesse Wilson <jessewilson@google.com> Use GET after a POST is redirected.

Also dropping support for response code 305 Use Proxy, which
is seldom used, and whose behavior is quite different from
Chrome and Firefox. This is an intentional delta from the RI.

Also testing disconnect().

Change-Id: I80433f4776a2cfc5e228179421a787a44a4ded69
http://b/3180373
et/HttpURLConnection.java
et/URLConnection.java
ce1150d9897bd5baf66de4a8db132afce18be15a 05-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Refactor HttpURLConnection implementation." into dalvik-dev
953df613522e12a418cb7cb73248594d6c9f53d4 03-May-2011 Jesse Wilson <jessewilson@google.com> Refactor HttpURLConnection implementation.

Break HttpURLConnectionImpl into two parts: the part that
implements the Java API (that follows redirects etc.) and
the part that speaks HTTP. The HTTP part is called HttpEngine,
and it can only be used for a single HTTP request. This makes
it easier to set request properties that only apply to a
single socket request.

Tests for 'Vary', 'Content-Location' and warnings.

For simplicity of implementation I've chosen not to support
'Vary' at this time.

The 'Content-Location' header doesn't require any work from
the cache.

Warnings are ugly but allow the caller to identify when the
cache results may be problematic.

Also breaking HttpResponseCache's dependency on HttpURLConnectionImpl
so it can be tested on the RI.

Change-Id: Idbabb51251f479c2cdea4e0fceb029bfd07182be
http://b/3180373
et/HttpURLConnection.java
et/URLConnection.java
1c039d71d3879f39e3a75b8788e656f7b4f88f08 05-May-2011 Elliott Hughes <enh@google.com> Add getaddrinfo(2).

This only supports the "node" side of getaddrinfo(2), not the "service" side.
There's also no support for AI_CANONNAME, so we currently return InetAddress[]
rather than anything equivalent to C's linked list of struct addrinfo.

Bug: 3107501
Change-Id: I8cf6baa3027a0fa05ac6e2f8fcc1dd8b576ff8c4
et/InetAddress.java
et/URI.java
d6ecf9222ec65a08e99f15fcc4ec024f0fffd13a 04-May-2011 Elliott Hughes <enh@google.com> Fix non-blocking connects.

The key change here is reintroducing the boolean return value, which we need
as long as the native code treats EINPROGRESS as a special case which doesn't
throw.

The rest is just drive-by incremental cleanup of the code.

Change-Id: I761b052adbb14e912c3853a35327f8a589cd4023
io/SocketChannelImpl.java
4bccd48c4bab2c92a34caf3401d379895d2947b6 02-May-2011 Elliott Hughes <enh@google.com> Merge "Rewrite blocking connects in terms of the non-blocking primitives." into dalvik-dev
220c0af1763283b75617226efe3919c3e3b044c8 30-Apr-2011 Elliott Hughes <enh@google.com> Rewrite blocking connects in terms of the non-blocking primitives.

This simplifies OSNetworkSystem, getting us closer to replacing the
connect(2)-related bits with our new POSIX interface. It also lets
us remove cruft on the Java side that was resetting the socket's
blocking/non-blocking state (which should never have been touched),
which in turn fixes bug 4193212.

Detail messages for socket timeouts get better too, now we're throwing
on the Java side.

The only thing that's worse is that we used to get away with throwing
a checked exception from native code, which simplified our "throws"
clauses. Now we actually have to jump through a few hoops to make javac
happy. (Especially awkward because SocketTimeoutException isn't a
SocketException.) Stupid checked exceptions.

Bug: 4193212
Bug: 3107501
Change-Id: I00695d22094e6d785458dfbb7050fbaecf2db89f
et/InetAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
et/SocketException.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
io/channels/spi/AbstractSelectableChannel.java
0c814baa7aff1b0845b2ad36c62dc791700732e1 30-Apr-2011 Brian Carlstrom <bdc@google.com> am 347b2a60: Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3)

* commit '347b2a604114602da9bc4ae040278f74d11c2f51':
Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3)
347b2a604114602da9bc4ae040278f74d11c2f51 26-Apr-2011 Brian Carlstrom <bdc@google.com> Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3)

Previously the CA certs stored in the BKS KeyStore at
/system/etc/security/cacerts.bks was loaded in the Zygote. As the the
number of CAs are started to increase, this is causing more and more
memory to be used for rarely used CAs. The new AndroidCAStore KeyStore
implementation reads the CAs as needed out of individual PEM
certificate files. The files can be efficiently found because they are
named based on a hash CA's subject name, similar to OpenSSL.

Bug: 1109242

Details:

build

Removing old cacerts.bks from GRANDFATHERED_ALL_PREBUILT and
adding new cacerts directory to core PRODUCT_PACKAGES

core/legacy_prebuilts.mk
target/product/core.mk

libcore

cacerts build changes. Move cacerts prebuilt logic to new
CaCerts.mk from NativeCode.mk where it didn't make sense. Updated
Android.mk's dalvik-host target to install new cacerts files.

Android.mk
CaCerts.mk
NativeCode.mk

Remove old cacerts.bks and add remove certimport.sh script used to
generate it. Preserved the useful comments from certimport.sh in
the new README.cacerts

luni/src/main/files/cacerts.bks
luni/src/main/files/certimport.sh
luni/src/main/files/README.cacerts

Recanonicalize cacerts files using updated vendor/google/tools/cacerts/certimport.py
(See below discussion of certimport.py changes for details)

luni/src/main/files/cacerts/00673b5b.0
luni/src/main/files/cacerts/03e16f6c.0
luni/src/main/files/cacerts/08aef7bb.0
luni/src/main/files/cacerts/0d188d89.0
luni/src/main/files/cacerts/10531352.0
luni/src/main/files/cacerts/111e6273.0
luni/src/main/files/cacerts/1155c94b.0
luni/src/main/files/cacerts/119afc2e.0
luni/src/main/files/cacerts/11a09b38.0
luni/src/main/files/cacerts/12d55845.0
luni/src/main/files/cacerts/17b51fe6.0
luni/src/main/files/cacerts/1920cacb.0
luni/src/main/files/cacerts/1dac3003.0
luni/src/main/files/cacerts/1dbdda5b.0
luni/src/main/files/cacerts/1dcd6f4c.0
luni/src/main/files/cacerts/1df5ec47.0
luni/src/main/files/cacerts/1e8e7201.0
luni/src/main/files/cacerts/1eb37bdf.0
luni/src/main/files/cacerts/219d9499.0
luni/src/main/files/cacerts/23f4c490.0
luni/src/main/files/cacerts/27af790d.0
luni/src/main/files/cacerts/2afc57aa.0
luni/src/main/files/cacerts/2e8714cb.0
luni/src/main/files/cacerts/2fa87019.0
luni/src/main/files/cacerts/2fb1850a.0
luni/src/main/files/cacerts/33815e15.0
luni/src/main/files/cacerts/343eb6cb.0
luni/src/main/files/cacerts/399e7759.0
luni/src/main/files/cacerts/3a3b02ce.0
luni/src/main/files/cacerts/3ad48a91.0
luni/src/main/files/cacerts/3c58f906.0
luni/src/main/files/cacerts/3c860d51.0
luni/src/main/files/cacerts/3d441de8.0
luni/src/main/files/cacerts/3e7271e8.0
luni/src/main/files/cacerts/418595b9.0
luni/src/main/files/cacerts/455f1b52.0
luni/src/main/files/cacerts/46b2fd3b.0
luni/src/main/files/cacerts/48478734.0
luni/src/main/files/cacerts/4d654d1d.0
luni/src/main/files/cacerts/4e18c148.0
luni/src/main/files/cacerts/4fbd6bfa.0
luni/src/main/files/cacerts/5021a0a2.0
luni/src/main/files/cacerts/5046c355.0
luni/src/main/files/cacerts/524d9b43.0
luni/src/main/files/cacerts/56b8a0b6.0
luni/src/main/files/cacerts/57692373.0
luni/src/main/files/cacerts/58a44af1.0
luni/src/main/files/cacerts/594f1775.0
luni/src/main/files/cacerts/5a3f0ff8.0
luni/src/main/files/cacerts/5a5372fc.0
luni/src/main/files/cacerts/5cf9d536.0
luni/src/main/files/cacerts/5e4e69e7.0
luni/src/main/files/cacerts/60afe812.0
luni/src/main/files/cacerts/635ccfd5.0
luni/src/main/files/cacerts/67495436.0
luni/src/main/files/cacerts/69105f4f.0
luni/src/main/files/cacerts/6adf0799.0
luni/src/main/files/cacerts/6e8bf996.0
luni/src/main/files/cacerts/6fcc125d.0
luni/src/main/files/cacerts/72f369af.0
luni/src/main/files/cacerts/72fa7371.0
luni/src/main/files/cacerts/74c26bd0.0
luni/src/main/files/cacerts/75680d2e.0
luni/src/main/files/cacerts/7651b327.0
luni/src/main/files/cacerts/76579174.0
luni/src/main/files/cacerts/7999be0d.0
luni/src/main/files/cacerts/7a481e66.0
luni/src/main/files/cacerts/7a819ef2.0
luni/src/main/files/cacerts/7d3cd826.0
luni/src/main/files/cacerts/7d453d8f.0
luni/src/main/files/cacerts/81b9768f.0
luni/src/main/files/cacerts/8470719d.0
luni/src/main/files/cacerts/84cba82f.0
luni/src/main/files/cacerts/85cde254.0
luni/src/main/files/cacerts/86212b19.0
luni/src/main/files/cacerts/87753b0d.0
luni/src/main/files/cacerts/882de061.0
luni/src/main/files/cacerts/895cad1a.0
luni/src/main/files/cacerts/89c02a45.0
luni/src/main/files/cacerts/8f7b96c4.0
luni/src/main/files/cacerts/9339512a.0
luni/src/main/files/cacerts/9685a493.0
luni/src/main/files/cacerts/9772ca32.0
luni/src/main/files/cacerts/9d6523ce.0
luni/src/main/files/cacerts/9dbefe7b.0
luni/src/main/files/cacerts/9f533518.0
luni/src/main/files/cacerts/a0bc6fbb.0
luni/src/main/files/cacerts/a15b3b6b.0
luni/src/main/files/cacerts/a3896b44.0
luni/src/main/files/cacerts/a7605362.0
luni/src/main/files/cacerts/a7d2cf64.0
luni/src/main/files/cacerts/ab5346f4.0
luni/src/main/files/cacerts/add67345.0
luni/src/main/files/cacerts/b0f3e76e.0
luni/src/main/files/cacerts/bc3f2570.0
luni/src/main/files/cacerts/bcdd5959.0
luni/src/main/files/cacerts/bda4cc84.0
luni/src/main/files/cacerts/bdacca6f.0
luni/src/main/files/cacerts/bf64f35b.0
luni/src/main/files/cacerts/c0cafbd2.0
luni/src/main/files/cacerts/c215bc69.0
luni/src/main/files/cacerts/c33a80d4.0
luni/src/main/files/cacerts/c527e4ab.0
luni/src/main/files/cacerts/c7e2a638.0
luni/src/main/files/cacerts/c8763593.0
luni/src/main/files/cacerts/ccc52f49.0
luni/src/main/files/cacerts/cdaebb72.0
luni/src/main/files/cacerts/cf701eeb.0
luni/src/main/files/cacerts/d16a5865.0
luni/src/main/files/cacerts/d537fba6.0
luni/src/main/files/cacerts/d64f06f3.0
luni/src/main/files/cacerts/d777342d.0
luni/src/main/files/cacerts/d8274e24.0
luni/src/main/files/cacerts/dbc54cab.0
luni/src/main/files/cacerts/ddc328ff.0
luni/src/main/files/cacerts/e48193cf.0
luni/src/main/files/cacerts/e60bf0c0.0
luni/src/main/files/cacerts/e775ed2d.0
luni/src/main/files/cacerts/e7b8d656.0
luni/src/main/files/cacerts/e8651083.0
luni/src/main/files/cacerts/ea169617.0
luni/src/main/files/cacerts/eb375c3e.0
luni/src/main/files/cacerts/ed049835.0
luni/src/main/files/cacerts/ed524cf5.0
luni/src/main/files/cacerts/ee7cd6fb.0
luni/src/main/files/cacerts/f4996e82.0
luni/src/main/files/cacerts/f58a60fe.0
luni/src/main/files/cacerts/f61bff45.0
luni/src/main/files/cacerts/f80cc7f6.0
luni/src/main/files/cacerts/fac084d7.0
luni/src/main/files/cacerts/facacbc6.0
luni/src/main/files/cacerts/fde84897.0
luni/src/main/files/cacerts/ff783690.0

Change IntegralToString.intToHexString to take width argument to
allow for leading zero padding. Updated existing callers to
specify 0 padding desired. Add testing of new padding
functionality.

luni/src/main/java/java/lang/Character.java
luni/src/main/java/java/lang/Integer.java
luni/src/main/java/java/lang/IntegralToString.java
luni/src/test/java/libcore/java/lang/IntegralToStringTest.java

Improved to throw Exceptions with proper causes

luni/src/main/java/java/security/KeyStore.java
luni/src/main/java/java/security/Policy.java
luni/src/main/java/java/security/cert/CertificateFactory.java
luni/src/main/java/javax/crypto/Cipher.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java

Indentation fixes

luni/src/main/java/java/security/SecureRandom.java

Fix X509CRLSelector.getIssuerNames to clone result and added test to cover this.

luni/src/main/java/java/security/cert/X509CRLSelector.java
luni/src/test/java/libcore/java/security/cert/X509CRLSelectorTest.java

Fixed bug where we created an X500Principal via a String
representation instead of from its original encoded bytes. This
led to a difficult to track down bug where CA 418595b9.0 where the
NativeCode.X509_NAME_hash of a Harmony (but not BouncyCastle)
X509Certificate would not hash to the expected value because the
encoded form used an ASN.1 PrintableString instead of the
UTF8String form found in the original certificate.

luni/src/main/java/org/apache/harmony/security/x501/Name.java

Add a new RootKeyStoreSpi and register it as the
AndroidCAStore. This new read-only KeyStore implementation that
looks for certificates in $ANDROID_ROOT/etc/security/cacerts/
directory, which is /system/etc/security/cacerts/ on devices. The
files are stored in the directory based on the older md5 based
OpenSSL X509_NAME_hash function (now referred to as
X509_NAME_hash_old in OpenSSL 1.0)

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java

Added OpenSSL compatible X509_NAME_hash and X509_NAME_hash_old
functions for producting an int hash value from an X500Principal.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

Changed TrustManagerFactoryImpl to use AndroidCAStore for its default KeyStore

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java

Changed TrustManagerImpl to be AndroidCAStore aware. If it detects
an AndroidCAStore, it avoids generating the acceptedIssuers array
at constructions, since doing so would force us to parse all
certificates in the store and the value is only typically used by
SSLServerSockets when requesting a client certifcate. Because we
don't load all the trusted CAs into the IndexedPKIXParameters at
startup in the case of AndroidCAStore, we now check for new CAs
when examining the cert chain for unnecessary TrustAnchors and for
a newly discovered issuer at the end of the chain before
validation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Updated KeyStoreTest to cope with read only KeyStore. Update
test_cacerts_bks (now renamed test_cacerts) to use the
AndroidCAStore for validating system CA certificate
validity. Register AndroidCAStore as an expected KeyStore type
with StandardNames.

luni/src/test/java/libcore/java/security/KeyStoreTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Added test of X500Principal serialization while investigating Name
encoding issue. However, the actual Name bug was found and
verified by the new test_cacerts test.

luni/src/test/java/libcore/javax/security/auth/x500/X500PrincipalTest.java

vendor/google

Change canonical format for checked in cacerts to have PEM
certificate at the top, as required by Harmony's X.509
CertificateFactory.

tools/cacerts/certimport.py

Change-Id: If0c9de430f13babb07f96a1177897c536f3db08d
ang/Character.java
ang/Integer.java
ang/IntegralToString.java
ecurity/KeyStore.java
ecurity/Policy.java
ecurity/SecureRandom.java
ecurity/cert/CertificateFactory.java
ecurity/cert/X509CRLSelector.java
92e33d7e684469ef294d5517e65a631b369c8e28 29-Apr-2011 Elliott Hughes <enh@google.com> Better regular expression exception detail messages.

Before:
Caused by: java.util.regex.PatternSyntaxException: Syntax error U_REGEX_MISSING_CLOSE_BRACKET near index 6:
hello[
^
at java.util.regex.Pattern.compileImpl(Native Method)
at java.util.regex.Pattern.compile(Pattern.java:400)
at java.util.regex.Pattern.<init>(Pattern.java:383)
at java.util.regex.Pattern.compile(Pattern.java:374)

After:
Caused by: java.util.regex.PatternSyntaxException: Missing closing bracket in character class near index 6:
hello[
^
at java.util.regex.Pattern.compileImpl(Native Method)
at java.util.regex.Pattern.compile(Pattern.java:400)
at java.util.regex.Pattern.<init>(Pattern.java:383)
at java.util.regex.Pattern.compile(Pattern.java:374)

Some of the messages might still want some tuning, but we can improve them
over time.

Bug: 2974820
Change-Id: I4f41582030168847d22c5323125fde6928d0fc40
til/regex/PatternSyntaxException.java
00bb52d949cf48eb46658ec48e2c52790b8a1bba 29-Apr-2011 Jesse Wilson <jessewilson@google.com> Merge "Support conditional gets in HttpURLConnection." into dalvik-dev
0c59055dd24e1659f85d9ff7e2148883f663bd62 27-Apr-2011 Jesse Wilson <jessewilson@google.com> Support conditional gets in HttpURLConnection.

This is the first step towards adding an HTTP response cache.
There's still much to do; details are listed on the bug.

Change-Id: Ie693fe424d1d90e90576fc959595e4d96a31f767
http://b/3180373
et/HttpCookie.java
et/URLConnection.java
87c354d8d6faa77dee1820df2f0ad2666b9f0331 29-Apr-2011 Elliott Hughes <enh@google.com> Fix the byte order of non-ByteBuffer duplicate and slice results.

ByteBuffer.duplicate and ByteBuffer.slice always return big-endian buffers.
Any other kind of buffer returns a buffer with the same endian as itself.

We didn't have tests for the latter, and broke this in Honeycomb.

Bug: http://code.google.com/p/android/issues/detail?id=16434
Change-Id: I08e98c4817f6340a0c396de060431185240d3ca3
io/CharToByteBufferAdapter.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ShortToByteBufferAdapter.java
a5fb706fe4a6dbeaaf4cb1f8bbc2c68b0a2a3f3c 29-Apr-2011 Elliott Hughes <enh@google.com> Add kill(2) to Libcore.os.

Also kick the tires of ProcessManager, since we'll probably have to do some
unrelated work in here soon.

Bug: 3107501
Change-Id: I132c1e09d21ffcf0d5ea4aab93f04a36c1b30eaf
ang/ProcessManager.java
be8ca33555781ab14b4e7f0f9c2716646f2249b0 28-Apr-2011 Elliott Hughes <enh@google.com> Log uncaught exceptions thrown by finalizers.

Bug: 4353365
Change-Id: I2de1aaa0ed4beb4c31ac6f990ce418a1e0512c59
ang/FinalizerThread.java
0568a63ba1086a78ffb4cff68dd2eac4f9908e13 26-Apr-2011 Elliott Hughes <enh@google.com> Fix ByteBuffer.put(ByteBuffer).

To do this tastefully required some cunning in the native code. The new
ScopedBytesRO/ScopedBytesRW classes let us paper over the differences
between byte[] and DirectByteBuffer, which in turn lets us paper over the
differences between the various kinds of ByteBuffer.

I've also rewritten Posix.read/Posix.readDirectBuffer and
Posix.write/Posix.writeDirectBuffer to use the same idea. I haven't rewritten
readv and writev, but can do and probably should.

Bug: http://code.google.com/p/android/issues/detail?id=16184
Change-Id: Ia30d2f2fe1b1716a8f068187df2218b407a55aae
io/ByteBuffer.java
io/HeapByteBuffer.java
io/ReadWriteDirectByteBuffer.java
464e162688553b8b6c71499ba28a7967f81092ad 25-Apr-2011 Jesse Wilson <jessewilson@google.com> Add 'implements AutoCloseable'.

Change-Id: Iadb7d4c30f93efcbc7dc3f512d2b908edf16a9e3
http://b/3484927
o/ObjectInput.java
o/ObjectOutput.java
ql/Connection.java
ql/ResultSet.java
ql/Statement.java
a6a4b2128841da32c9b380ac649c5bef9495772c 25-Apr-2011 Jesse Wilson <jessewilson@google.com> Merge "AutoCloseable." into dalvik-dev
8033ba2bd4b8eab11e67738ba4d1390e1fb72111 23-Apr-2011 Jesse Wilson <jessewilson@google.com> AutoCloseable.

Change-Id: I5604ad7f96c824e4df78a5ebd78845d012aedc13
http://b/3484927
o/Closeable.java
ang/AutoCloseable.java
ang/Throwable.java
fe711d61cafbb878d1d6a5e223fcd2201f2e829a 23-Apr-2011 Elliott Hughes <enh@google.com> Don't use ScopedJavaUnicodeString where ScopedStringChars will do.

Plus a few other random bits of tidying. (This is the detritus from a more
significant change that will need to be cherry-picked. I'm keeping this
separate from the active ingredients of the change.)

Change-Id: I0ae90e8835cba888596efd33b540eb31c784682f
ang/System.java
ext/BreakIterator.java
ext/StringCharacterIterator.java
6ab70f360e76509de958d6e7ea26b6ca3150c071 22-Apr-2011 Elliott Hughes <enh@google.com> Remove a work-around for a problem we don't think can occur.

We should always have a fully-qualified name at this point, so this
shouldn't be possible.

Change-Id: Icc7d6c16f51080c36ef4687744d7a42206a140a0
et/InetAddress.java
a37e971343883bb582a93ffbd9f0ba84f10e55ba 21-Apr-2011 Elliott Hughes <enh@google.com> Rewrite NetworkInterface.

This is part of the POSIX work, but also fixes a bug that asked for down
interfaces to be returned. Additionally, I found a few bugs while rewriting
this code. Most notably, we used to return a bogus broadcast address for
the loopback interface. The only difference I notice between us and the RI
when running on the host is that the RI claims that 127.0.0.1 has a prefix
length of 0 rather than 8. I believe that we are correct on this issue.

Bug: 4082343, 3107501
Change-Id: I677e0698e3a86676b4332b5d56fe514a99c3ddc0
et/BindException.java
et/Inet6Address.java
et/InterfaceAddress.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PortUnreachableException.java
et/ProtocolException.java
et/SocketException.java
et/SocketTimeoutException.java
et/UnknownServiceException.java
ae394a866dd86df8819b652dfe00b3d2c7ee204c 20-Apr-2011 Elliott Hughes <enh@google.com> Remove "java.net.preferIPv6Addresses", which has been true since Eclair.

Also ensure all javadoc references to RFCs are links.

Change-Id: I58b08a8ead08d6eab018e19ec2cff7d60f2b06e6
ang/System.java
et/CookieManager.java
et/CookiePolicy.java
et/HttpCookie.java
et/IDN.java
et/Inet4Address.java
et/InetAddress.java
et/MulticastSocket.java
et/Socket.java
et/URI.java
et/URL.java
et/URLConnection.java
775095bf6a763e6a9b4e858011a812425d949af5 20-Apr-2011 Elliott Hughes <enh@google.com> Remove an unnecessary special case in InetAddress.getAllByName.

(And add a test to ensure it remains unnecessary.)

Change-Id: Ia1b4f0721308a36d972da36c06869ce4740b1cda
et/InetAddress.java
4f11ebea266eada830d507b8f011e811a8e5d7bc 20-Apr-2011 Elliott Hughes <enh@google.com> Add getnameinfo(3) (and gai_strerror(3)).

There's quite a large corresponding change to InetAddress, plus I've changed
the documentation for all the Permission classes to match the handful that
we'd already documented as legacy cruft.

Bug: http://b/3107501
Change-Id: Ia67aba79f0ab13e64085bd4a2df20ad0776bcc5b
o/FilePermission.java
o/SerializablePermission.java
ang/reflect/ReflectPermission.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/MulticastSocket.java
et/NetPermission.java
et/SocketPermission.java
et/SocketPermissionCollection.java
ecurity/AllPermission.java
ecurity/SecurityPermission.java
ecurity/UnresolvedPermission.java
ecurity/acl/Permission.java
ql/SQLPermission.java
til/PropertyPermission.java
172232d3d82076fbee6f04a5f4b7b4672029e2ed 14-Apr-2011 Elliott Hughes <enh@google.com> Don't crash in Package.getAnnotations.

We never implemented the native method.

W(32205) No implementation found for native Ljava/lang/Package;.getDeclaredAnnotations (Ljava/lang/Package;Z)[Ljava/lang/annotation/Annotation; (dalvikvm)

Bug: http://code.google.com/p/android/issues/detail?id=16135
Change-Id: I75452271051dd6009495405baa1b420d1bdeaf7a
ang/Package.java
8bccf8cdf7a3b8a6e90bb1b411a957b6368e4a1a 12-Apr-2011 Brian Carlstrom <bdc@google.com> Improve HttpsURLConnection documentation with examples

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

Change-Id: I2e596ef36306b70cdb071b91d8707f015d9b251b
et/HttpURLConnection.java
54e9c590e67f0a01a3e146648c3247654049c1a4 08-Apr-2011 Gilles Debunne <debunne@google.com> am c3f29820: Merge "BreakIterator offset check modified."

* commit 'c3f29820dd998dbc8a3283163e3dde2a0d657a78':
BreakIterator offset check modified.
c3f29820dd998dbc8a3283163e3dde2a0d657a78 08-Apr-2011 Gilles Debunne <debunne@google.com> Merge "BreakIterator offset check modified."
b78750f753a3496a694753127c3cc3d2cd80566f 07-Apr-2011 Gilles Debunne <debunne@google.com> BreakIterator offset check modified.

This may be related to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4177479

An offset equal to the length of the text (cursor located AFTER the last character)
is a valid CharIterator index per the specifications.

Renamed OldBreakIterator and added tests to exercise the changes.
Same behavior as the Reference Implementation.

Change-Id: I7e339bcff0049bde7d04b750c72d45e3f4393186
ext/RuleBasedBreakIterator.java
900556c6db04ff7f7ca6c31587368d73588c972a 07-Apr-2011 Elliott Hughes <enh@google.com> am 73298fc8: Fix a typo in FileOutputStream.

* commit '73298fc8f21a2440b4848912e95a072713b93a1a':
Fix a typo in FileOutputStream.
73298fc8f21a2440b4848912e95a072713b93a1a 07-Apr-2011 Elliott Hughes <enh@google.com> Fix a typo in FileOutputStream.

The matching code in FileInputStream was correct, but I've added tests for
both. Note that the RI does not pass these tests; this was always an Android
extension, one which we'd apparently never written a test for.

Change-Id: I04d0f63839f07e8ff4ad7b3d54a31b0c0955f8d1
o/FileOutputStream.java
54298028777ffe4d5ec02e7908b333400d4f23a6 07-Apr-2011 Elliott Hughes <enh@google.com> Fix asReadOnlyBuffer to conserve the byte order (on everything except ByteBuffer).

And add tests to exercise another wart of non-uniformity on this heinous API.

Bug: http://code.google.com/p/android/issues/detail?id=15994
Change-Id: I49d2488a68a626e798f9bb39b47e710445b23fab
io/CharToByteBufferAdapter.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ReadOnlyHeapByteBuffer.java
io/ShortToByteBufferAdapter.java
b974666d79ebc392b37ec1ae83aae57ae6331c08 06-Apr-2011 Elliott Hughes <enh@google.com> Finish setsockopt(2).

Bug: 3107501
Change-Id: I8f026dcba78acb555834bdcc594e114238f3cc52
et/DatagramSocket.java
et/SocketOptions.java
1208f030332b3e1eae3d55d416f1af1d68f7e33d 05-Apr-2011 Elliott Hughes <enh@google.com> More MulticastSocket cleanup.

Only getInterface still has any hackery left.

Change-Id: Ica1a3263db6d073e0ec42896591ff4c2e17452ff
et/HttpURLConnection.java
et/MulticastSocket.java
et/SocketOptions.java
5d3f5200f3511c9a7107bcc0a996c7afa1b39aaf 01-Apr-2011 Elliott Hughes <enh@google.com> Don't cache the underlying Socket's underlying SocketImpl's underlying FileDescriptor in OpenSSLSocketImpl.

(OpenSSLSocketImpl, of course, being a Socket, not a SocketImpl.)

Bug: 4192414

git cherry-pick dc33f53f38600943c84146320c748e3c46fd2e7b

Change-Id: I8f481e0fe217aac782ad9d9e9053681ad69e62ef
et/Socket.java
c3d19477189eafcdfec5735f9e5e13ffdeaf963d 05-Apr-2011 Elliott Hughes <enh@google.com> Slightly simplify MulticastSocket.

Part of the code is actually a new public method in Java 7, and another part
is just compatibility cruft for IPv4-only stacks.

(I think there's plenty more to clean up in here, but I'm being cautious and
breaking it into separate changes, each of which have no effect on the tests.
My hope is to remove the use of SocketOptions.IP_MULTICAST_IF entirely, but
I'll settle for being able to justify why we still need it, if we do.)

Bug: 3107501
Bug: 3484927
Change-Id: Icb4b3c1180dcd8b5666a4a969353a881ca97888e
et/MulticastSocket.java
et/NetworkInterface.java
438cb9e440d250c8aa5daf4fae0c400dce8b1499 02-Apr-2011 Elliott Hughes <enh@google.com> Add MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP setsockopt(2).

Bug: 3107501
Change-Id: I576f45f8c67b6172888bc0541e3d3a462bfa311a
et/MulticastGroupRequest.java
et/PlainDatagramSocketImpl.java
c63f0d4e80a9fd3bdf99cd438d108b750226736a 02-Apr-2011 Elliott Hughes <enh@google.com> Add more of setsockopt(2).

This covers all the easy cases. I'll do the awkward ones separately.

Bug: 3107501
Change-Id: Ie424290e0bef76516d0c57e9c077cb1c202381ad
et/DatagramSocket.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
dc33f53f38600943c84146320c748e3c46fd2e7b 01-Apr-2011 Elliott Hughes <enh@google.com> Don't cache the underlying Socket's underlying SocketImpl's underlying FileDescriptor in OpenSSLSocketImpl.

(OpenSSLSocketImpl, of course, being a Socket, not a SocketImpl.)

Bug: 4192414

Change-Id: I3c7d0fed70b1b98dc8fcc73f35b3feb0e1eeb2f9
et/Socket.java
8aab98366191126ed1ba36bb4937e41beeb05606 31-Mar-2011 Carl Shapiro <cshapiro@google.com> Merge "Implement reference queuing in managed code." into dalvik-dev
64ce5d1c72204de8e58da45ddf1a57ba8b70cec6 31-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Reduce chance of naming collision for Thread @hide methods." into dalvik-dev
50ddd34d1e1228c37ac45b43934cc114376f3667 31-Mar-2011 Jesse Wilson <jessewilson@google.com> Reduce chance of naming collision for Thread @hide methods.

Change-Id: I80bdf4ede72b112eb1cae89c6e53f6fcf65b2acb
http://code.google.com/p/android/issues/detail?id=15388
ang/Thread.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelector.java
482e8943b4b81534b545260e6da25bb35b93dc5a 31-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix a performance regression in Enum.valueOf()

Change-Id: If10e30d1f528dfaaeca9ce0eb2932f4ca22a6ec8
http://b/4087759
ang/Class.java
ang/Enum.java
til/EnumMap.java
til/EnumSet.java
55d86d85b3cd11461ba793cdc8ed74c87311a447 31-Mar-2011 Carl Shapiro <cshapiro@google.com> Implement reference queuing in managed code.

This change adds a thread to the core library which receives a list of
references after a garbage collection and enqueues each element. This
list is constructed by linking together the pendingNext field of cleared
references into a circular queue.

To support this change, the pendingNext field has been replaced by the
new zombie field for the purposes of providing a strongly reachable
location within a FinalizerReference class instance.

Change-Id: Id09133e44c850797e7f14c5471123a036d027c80
ang/FinalizerThread.java
ang/ref/FinalizerReference.java
ang/ref/Reference.java
ang/ref/ReferenceQueue.java
ang/ref/ReferenceQueueThread.java
9acbfdd446646c2dcb30a77c94642aec7357deec 31-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix race conditions in finalizers." into dalvik-dev
6a22fa91a64739523c1344023f6dfde57e53110e 31-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix race conditions in finalizers.

We had several small races:
- runFinalization() could return before all objects had been
finalized
- stopFinalizer() could return before the thread was stopped

We still have one scenario where runFinalization returns
prematurely, this is due to a timing issue with the native
heap worker thread.

Change-Id: I304e4f2d744ed714a5c2069f2749df2ec1f40cc8
http://b/4192343
ang/FinalizerThread.java
ang/Runtime.java
ang/ref/FinalizerReference.java
0a9d1ee45a9884a9616624d747172e18734e8fe0 31-Mar-2011 Elliott Hughes <enh@google.com> Add getsockname(2) and getsockopt(2).

Bug: 3107501
Change-Id: Ibb0d5a576ecb46e51dbda6051776145eec9e7fe1
et/DatagramSocketImpl.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
et/Socket.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
462bdac45c10f43d88d8f07f6994e272a27c14a2 30-Mar-2011 Elliott Hughes <enh@google.com> Add close(2).

This is sufficient for non-socket fds, but may need to change to support the
asynchronous socket close monitor. (Hopefully not; I'd rather lift that into
Java.)

I've also changed the semantics of IoUtils.close to match those desired by
all callers: ignore null/invalid FileDescriptors.

Bug: 3107501
Change-Id: Iad5c31c8f0f34d2a5ab1ed4581509b46af28bd1f
o/File.java
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
ang/ProcessManager.java
6338bf7367ad6656e02f2c68887218d6ce2b168a 30-Mar-2011 Elliott Hughes <enh@google.com> FileDescriptor.descriptor can now be private.

Bug: 3107501
Change-Id: Ibd2261c82cfc85b9c169576a3716bdcf6e7572b1
o/FileDescriptor.java
d320e321d5567a4ac94b6e5874eda4b1f1189e13 30-Mar-2011 Elliott Hughes <enh@google.com> Move and rename an implementation detail.

Change-Id: I563c2fd6689dd7249049671c3c01c6434d9b5fa5
io/DatagramChannelImpl.java
io/FileDescriptorChannel.java
io/PipeImpl.java
io/SelectorImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
454a95f6a28855aa3c88d168b15a45bf315efc99 30-Mar-2011 Elliott Hughes <enh@google.com> Add socket(2) and start adding setsockopt(2).

I've added just enough setsockopt to keep the hack from our old socket
creation code. More later (but not necessarily right away).

Bug: 3107501
Change-Id: Id57bdd3c760bc58ed79d675b268c55493cbc24c8
et/InetAddress.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
8b15dcc5890963edad4dfcf558cc16027c7985e5 29-Mar-2011 Elliott Hughes <enh@google.com> Add sendfile(2).

This patch marks the end of OSFileSystem.

Having to support a Java "long*" for sendfile(2) gave me an opportunity to go
back and improve my ioctl(2) to use a corresponding "int*" equivalent, instead
of its previous special-case hack.

Bug: 3107501
Change-Id: I9fde4777700552263fab4fe9aeb556174163e3dc
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
et/SocketImpl.java
io/FileChannelImpl.java
94aa98c94b79f5c99a0e1d905c03c5423d1ce0fa 29-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add readv(2)/writev(2)." into dalvik-dev
bbac92e691de7d570928ddfba639067978e55b06 29-Mar-2011 Elliott Hughes <enh@google.com> Add readv(2)/writev(2).

The old implementation would cheat if it was given non-direct buffers, copying
them into newly-allocated direct buffers. (The network Channel implementations
are worse: they copy all the data into a single buffer, and then read/write
that. I'll get to them eventually.)

Bug: 3107501
Change-Id: I1655bacb042e7ebcde7e5bc5cf2c71e7ce5e30af
io/FileChannelImpl.java
io/IoVec.java
f16edfe125c261e7f4e5cff52c0b9c923d9f7fe6 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Follow up on enh's comments for CollectionUtils.uniqueCopy()

Change-Id: I0ceb442801160827909ff9ab3e52771754072bda
http://b/4087759
ang/Class.java
0843c022f443b5c4a8ea4d298c8b12147989ec92 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Move ClassMembers' members into Class; remove ClassMembers.

Change-Id: I74e056120b65578104ca4596401d0de0b9747114
http://b/4087759
ang/Class.java
ang/ClassMembers.java
ang/reflect/Field.java
9babc0429286668ed6ae5d8f2427d5853fc00e46 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Don't include duplicates when an interface is implemented through two paths.

Change-Id: I13beab7f83877d8eaaf90ca9195e5b379507720a
ang/ClassMembers.java
ang/reflect/Method.java
b4fc2e502dcb4ee8dca4b2eadaae03975fd470a0 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix getMethods to include superclass' interface methods.

We were failing the newly-added test testGetMethodsViaExtendsThenImplements().
This went unseen until today because it only occurs when you
call getMethods() on an abstract class.

Change-Id: I289a70df7de6f54e94b72295a40dfcfe236ec74b
ang/ClassMembers.java
ee1d5475eca8a8d42e73bbd00386f50e10250ec6 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Remove the caching from ClassMembers.

Callers who call getFields() will no longer benefit from a cache
if they call that method multiple times in a row. Similarly for
getMethods(). These caches optimized those calls, but only as a
side-effect of our intended optimization: to make looking up a
single member fast. Now that we do that directly, these caches
are less useful.

Change-Id: Ibc560710165f6f1ea081c357b8b375ae48289631
http://b/4087759
ang/Class.java
ang/ClassMembers.java
ang/Enum.java
ang/reflect/AccessibleObject.java
ang/reflect/ReflectionAccessImpl.java
til/EnumSet.java
ad7d39dd82f65d51611e55eaf3b2591d2239df0f 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Don't lookup all fields to get a single field." into dalvik-dev
461d0d860814c68154d8dd06d24f94118f33d28a 29-Mar-2011 Elliott Hughes <enh@google.com> Add ioctl(2) for int*.

I'm not adding the "struct ifreq" stuff yet because that's really hairy and I
plan on rewriting the NetworkInterface implementation anyway, so it'll mainly
be based on /proc. With any luck, we won't even need those other ioctls then.

I'm not sure _this_ ioctl is a good idea, but it does seem like a slight
improvement on the old code, and we can always move it back out if/when these
APIs become more public.

Bug: 3107501
Change-Id: Iceac15e4a107c33bfc8795976a747c2ffa59a183
o/FileInputStream.java
et/PlainSocketImpl.java
efaf3894f349e52a2d28353856fe6cef43eb5b18 28-Mar-2011 Jesse Wilson <jessewilson@google.com> Don't lookup all fields to get a single field.

Change-Id: Ia12c09b2deaa78c15edb8b5ce3638efb4a8c5246
http://b/4087759
ang/Class.java
ang/ClassMembers.java
4af0d8c99d68bcacff182699527d983a1d34fdbe 28-Mar-2011 Elliott Hughes <enh@google.com> Support read-only ByteBuffers.

Buffer.array() and Buffer.arrayOffset() throw for read-only buffers. We need
to work round this. We know that this is safe because we trust ourselves not
to write to read-only buffers and because all non-direct buffers have a
backing array.

Bug: 3107501
Change-Id: I501a5f7ddba2c66d22864bf4a41b927263493293
io/HeapByteBuffer.java
io/NioUtils.java
78c7cc547101002b9f9043cf3845970719d1bda8 26-Mar-2011 Elliott Hughes <enh@google.com> Add write(2).

Note that this is a functional change, because the old code was wrong: it
assumed that short writes don't happen. I thought we'd (I'd) cleaned this
up just recently, but it looks like I must have only gone through the network
code. Embarrassing.

This also cleans up the previous read change a bit, factoring out a bit more
duplication, and taking advantage of the fact that we now get decent
exceptions thrown from invalid FileDescriptors (meaning we can remove explicit
checks).

Bug: 3107501
Change-Id: I8bd5324836c9d151dceaef5b84ec523a67391b64
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
io/FileChannelImpl.java
io/SelectorImpl.java
da5f38a51f56f38070e6efc1bdf9176004dd828d 26-Mar-2011 Elliott Hughes <enh@google.com> Fix build (javadoc).

Change-Id: I7b109098bb367a2583d11bf41f5b9993e5009e42
o/RandomAccessFile.java
26c7025a7a919044771fb89031161bd26fe03032 26-Mar-2011 Elliott Hughes <enh@google.com> Add read(2).

For both byte[]s and ByteBuffers.

Bug: 3107501
Change-Id: I93b781069ade4507371c8fe8c5fda0163fbb2dbb
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
io/FileChannelImpl.java
io/SelectorImpl.java
d19897a2fa950f6c0dc3dcd1e2374d8a44072295 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Fast-path annotations for methods and constructors." into dalvik-dev
e62cb8ba7337b0ec19545e119246e0fc5f2c973f 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Fast-path annotations for methods and constructors.

Change-Id: I4c884b7b9141ce449eb6cd5adba4e024a1807163
http://code.google.com/p/android/issues/detail?id=7811
ang/Class.java
ang/reflect/AccessibleObject.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
0519c0de2e55eeb3566c5ee913a500eb45886f7f 25-Mar-2011 Elliott Hughes <enh@google.com> Better detail message when HttpURLConnection.setRequestMethod fails.

To wit:

java.net.ProtocolException: Unknown method 'post'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]
at java.net.HttpURLConnection.setRequestMethod(HttpURLConnection.java:639)

Bug: http://code.google.com/p/android/issues/detail?id=15721
Change-Id: Ib4c185247985628a4df7e591f87e1c2c8e58ebdb
et/HttpURLConnection.java
bfc28f55d2acf5f539862fc0d808560977058b85 25-Mar-2011 Elliott Hughes <enh@google.com> Merge "Remove dead cruft." into dalvik-dev
ac0bbf7cc5f183addacd31351d9b876e2bbf0334 25-Mar-2011 Elliott Hughes <enh@google.com> Remove dead cruft.

And warn about the inadvisability of changing built-in system properties.

Bug: 4174340
Change-Id: Ibd6258f56c608fa884cbd243223b50b12eb505ec
ang/SecurityManager.java
ang/System.java
til/Locale.java
4b928b95fe25f70e430f9bb73d7f0f7705a828e9 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix inconsistencies in HttpURLConnection docs." into dalvik-dev
151a354918ba4b62c0c761a857d4fcdee26164ce 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Optimize annotation lookups on types." into dalvik-dev
cdd3452fd52e507995afc0395b77e5b4b835374a 25-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add fcntl(2)." into dalvik-dev
0e40a5cdf59a11d5f8da318c08bcba891e39d33e 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix a doc typo in TimSort.

Change-Id: I47da49b65634bad2e12be4fedb31b0f21d16a3a9
til/TimSort.java
fc549a0b0388987b26dea524894d75a63d14783b 25-Mar-2011 Elliott Hughes <enh@google.com> Add fcntl(2).

I initially used overloading, but that actually decreases safety in practice
because which overload you need is (uniquely) determined by the specific
command you're issuing. Forcing callers to explicitly state what they're
doing works around this. As it was, I had to use strace(1) to find my bug.

Bug: 3107501
Change-Id: Ia54b72dd6453372922f01b22f382eb93ac91aaa7
io/FileChannelImpl.java
io/channels/FileLock.java
a0b862a095232703e25accfb143be800fff1cd8d 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Optimize annotation lookups on types.

I benchmarked this. Before & after results, in microseconds:
before after
GetAnnotation 716.6 122.65
IsAnnotationPresent 712.1 1.19

Benchmark source is here:
http://code.google.com/p/dalvik/source/browse/trunk/benchmarks/regression/AnnotatedElementBenchmark.java?spec=svn90&r=90

This is the first part of the change; I intend to follow up by
optimizing the corresponding methods on Field and Method.

Change-Id: I5912b526dfa87a61a95fbe7b7efc48d0dca3ad38
ang/Class.java
7341b9ed7157a1e37a3e69a0974676da358b735a 24-Mar-2011 Elliott Hughes <enh@google.com> Add uname(2).

This replaces InetAddress's use of gethostname(2), and System's hard-coded use
of uname(2) itself.

Bug: 3107501
Change-Id: I7e808177eece1e38428fea18a96c65628d51d93e
ang/System.java
et/InetAddress.java
e1502d64e937001636fca3d62b2552ef2a34d05f 24-Mar-2011 Elliott Hughes <enh@google.com> Add listen(2).

Bug: 3107501
Change-Id: I3677bb4ddb3f3d0e58a6833165504f47bb309630
et/DatagramSocket.java
et/PlainSocketImpl.java
et/SocketImpl.java
59e4744d27231f260271dbbca406e0cc39768116 24-Mar-2011 Elliott Hughes <enh@google.com> Add shutdown(2).

Bug: 3107501
Change-Id: I30354c4cc6e86a4e7b0e3f84e95719539db1d297
et/PlainSocketImpl.java
41f0605d2c809bd9bc1c0fb68d86b49a0f59b6c5 24-Mar-2011 Elliott Hughes <enh@google.com> Add pipe(2).

This lets us kill quite a bit of IoUtils.

Bug: 3107501
Change-Id: Ic8a297b29cc53a17841cc77e266cd8dc3910c521
io/PipeImpl.java
io/SelectorImpl.java
6c937923e20679d0752cea1ee5e2e969a094acdb 24-Mar-2011 Elliott Hughes <enh@google.com> Clean up File's absolute path handling.

Judging by my new test, the RI evaluates an absolute path relative
to "user.dir" at the time you call File.getAbsolutePath, and doesn't cache.

Change-Id: Ied1b47a1daa9c10249f11b6f2847073b9e37ea12
o/File.java
c7fa20701d5e9398c38f4615ed293acfce1c0cf6 24-Mar-2011 Elliott Hughes <enh@google.com> Add mkdir(2) and remove(2).

Bug: 3107501
Change-Id: Ia4ca50b957d6015fa49076806273054563d25b63
o/File.java
b7190190e0ef8de883c952efb319ce7748831faa 24-Mar-2011 Elliott Hughes <enh@google.com> Add chmod(2).

Bug: 3107501
Change-Id: If3a0639634a90f607b8c6035f25b03d23e7261e0
o/File.java
59fa7163774d6930a174bc038414a4b780581957 23-Mar-2011 Elliott Hughes <enh@google.com> Add statfs(2).

Bionic doesn't support statvfs(2), so we'll have to use statfs(2) in the
meantime. We should fix this before making this API public, though.

Bug: 3107501
Change-Id: I1af8a473261586321543dd1554e1f6079a84f384
o/File.java
a20cc6fca30d18e05db67ceeb0403b7b58ffd364 23-Mar-2011 Elliott Hughes <enh@google.com> Add rename(2) and symlink(2).

And use them too.

Bug: 3107501
Change-Id: I83b512a2553bfc2501d02c251a4649f8e670774e
o/File.java
2ffce92141c0b2a5f0543229f3ded34b0ee79ba1 23-Mar-2011 Elliott Hughes <enh@google.com> Move File.createNewFile into Java.

Also add improved tests.

Bug: 3107501
Change-Id: Ibea9bd71adf1e1230c14072fb4597ad5bd9c214b
o/File.java
0ac77ac8e915bff1a863e371f9b363033f9cf759 23-Mar-2011 Elliott Hughes <enh@google.com> Add open(2).

Bug: 3107501
Change-Id: I404030b4c678862465d04f723a6a324663e0af25
o/FileDescriptor.java
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
io/channels/SocketChannel.java
0f746ff511162add42eeabaf14ba70ace874c6f4 23-Mar-2011 Elliott Hughes <enh@google.com> Add mincore(2).

Bug: 3107501
Change-Id: Ibb288b0889ff47612f77870239f51928b35754a9
io/MappedByteBuffer.java
e6ce85b954b9dd1e3bf672aa81ae845a6533e17a 22-Mar-2011 Elliott Hughes <enh@google.com> Merge "Remove more dead SecurityManager cruft." into dalvik-dev
8647680e6a884b504a9f502e0f6a24218fdf675c 22-Mar-2011 Elliott Hughes <enh@google.com> Remove more dead SecurityManager cruft.

(Requires corresponding dalvik change.)

Change-Id: I65cd76ae056d4a1ff5f1a3e168b118a47cf09ff5
ang/Class.java
ang/ClassLoader.java
ang/VMClassLoader.java
ecurity/AccessController.java
8294b84a58c649ec6f7f498a6b55c8d6553f0725 21-Mar-2011 Carl Shapiro <cshapiro@google.com> Merge "Move finalization into the core library." into dalvik-dev
bbfadc8ae01454abba5335fccceaa1c80123ae49 21-Mar-2011 Carl Shapiro <cshapiro@google.com> Move finalization into the core library.

Change-Id: I969ecc25f2a7e655e1093855514102662846dfe1
ang/FinalizerThread.java
ang/Runtime.java
ang/ref/FinalizerReference.java
ang/ref/Reference.java
7e13c0f05ac9e7c55682d10e953dd4cbd5e6107c 19-Mar-2011 Elliott Hughes <enh@google.com> Add mlock(2) and munlock(2).

Bug: 3107501
Change-Id: I7e4cad36370196d990c709bfa33f89d7568aa453
io/MappedByteBuffer.java
e3ed211a4a56f5c7fb51500418035ede01ca5690 19-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add mmap(2), msync(2), and munmap(2)." into dalvik-dev
c49f6347f8bdb88956ce05d531b6eb719b33f726 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Prefer the user's stream handlers to the built-in ones." into dalvik-dev
7e25eff38a191d9c19e45093f4fde5102fb09d78 19-Mar-2011 Elliott Hughes <enh@google.com> Add mmap(2), msync(2), and munmap(2).

Bug: 3107501
Change-Id: I6a7c4147ec27bab9ded280476bad1157ce03fab8
io/FileChannelImpl.java
io/MappedByteBuffer.java
io/MemoryBlock.java
c2ebff3511f9df4d8cca2b82630c2d760af9d204 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Prefer the user's stream handlers to the built-in ones.

Apps may use this to install their own protocol handlers instead
of the default ones. This is used for HTTP NTLM authentication
in some libraries.

Change-Id: Icd5882e8ddd0545f897bee916150765e02929fc9
et/URL.java
029da69e13f3985215271d41e15a0d9fe23fea07 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Add a missing @hide to a non-public API.

Change-Id: I8847da1960907c0b7ca232ded0d418971a1e1f80
ang/Thread.java
eb09bc383703f0b2d6c99daf83479d5ce573a2f9 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix inconsistencies in HttpURLConnection docs.

Change-Id: I999b2cf7b904659923e02111aa62946d488e159e
http://code.google.com/p/android/issues/detail?id=14933
et/HttpURLConnection.java
10959ae7eb41e8ceecb16378c25395eb2f29106c 18-Mar-2011 Jesse Wilson <jessewilson@google.com> Don't block a selector if the current thread has been interrupted.

This changes setInterruptAction to be push/pop rather than set/unset.
During testing I found that different classes were conflicting with
the interrupt action: Channels and Selectors were setting it
simultaneously.

Change-Id: Ie1f96c2a1db9412863f4a181cfa29a239ffa5996
http://code.google.com/p/android/issues/detail?id=15388
ang/Thread.java
io/SelectorImpl.java
io/channels/Channel.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelector.java
450d9307bf6a3c6ee90ee8754e1eb6c3e0245f7a 19-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add isatty(2)." into dalvik-dev
9a3f363523000704205df288f8b6f2f48c0d8563 19-Mar-2011 Elliott Hughes <enh@google.com> Add isatty(2).

Bug: 3107501
Change-Id: I67e4a4ceeba945095419d176e7de5edb7da8a440
o/Console.java
5aafac4db69e6d087c512cdfa5c7c0e2f1611681 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Move URLConnection classes to libcore.net.

Change-Id: I14bf8373dfce50dda94e1a64419b9a8a9cf3c82e
et/HttpURLConnection.java
et/URL.java
dedaccdfa07c370a58cba08b096133ad9eec0ec3 18-Mar-2011 Elliott Hughes <enh@google.com> Add lseek(2).

Bug: 3107501
Change-Id: Ie27e2ae1c7d37de5f02b1d81ee2005182339f881
o/FileInputStream.java
o/RandomAccessFile.java
io/FileChannelImpl.java
f5333fd2094bdac4d6506177b1964b79afa64d77 18-Mar-2011 Elliott Hughes <enh@google.com> Add ftruncate(2).

The claim that "the port library" modifies the file offset appears to only ever
have been true of Harmony's Win32 implementation. Certainly, this is not the
behavior of ftruncate(2), so we can lose the cruft.

Bug: 3107501
Change-Id: I35092fd986296b78c4847c7215765f9997339f37
o/FileDescriptor.java
o/RandomAccessFile.java
io/FileChannelImpl.java
492cd0c33d104a27599d945ec8d54b0624784e43 18-Mar-2011 Elliott Hughes <enh@google.com> Minor cleanup: remove useless "return"s and dead package-private methods.

Change-Id: I8bb1531e2c0d45a7ec9c0bd4b6195cee15e29ac0
o/PushbackInputStream.java
ang/Class.java
ang/ClassLoader.java
ang/Runtime.java
ql/DriverManager.java
til/logging/MemoryHandler.java
e1ee5a2321507cbfbd4a4381b4c340b06782c58a 18-Mar-2011 Elliott Hughes <enh@google.com> Reimplement Runtime.availableProcessors.

Bug: 3107501
Change-Id: I38dd8d916f9a69da5019c9359774ac28250a78f2
ang/Runtime.java
6fc1a0e1e68dc2e0d12341548e58fa7f1c5dafc4 18-Mar-2011 Elliott Hughes <enh@google.com> Add sysconf(3).

This gives us a getpagesize(3) replacement right now, and will let us implement
Runtime.availableProcessors here rather than in the VM in a later change.

Bug: 3107501
Change-Id: I6fc1f83d36b026fbe8d37eca525550479677f2de
io/FileChannelImpl.java
2f75ad8e64570c7adfb3e95de91ef64d3e4b1806 18-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add fstat(2), lstat(2), and stat(2)." into dalvik-dev
a879e74388e30203ad94719723b455f1367303cf 18-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Use the '@hide' tag rather than reflection and initialization order tricks." into dalvik-dev
b74b0c7dabd2b9d562a1b77388052a191d1bb400 18-Mar-2011 Jesse Wilson <jessewilson@google.com> Use the '@hide' tag rather than reflection and initialization order tricks.

Change-Id: I6e72ff327673103306e788558c449927e9049883
http://code.google.com/p/android/issues/detail?id=15388
ang/Class.java
ang/ClassMembers.java
ang/LangAccessImpl.java
ang/Thread.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelector.java
til/EnumSet.java
til/SpecialAccess.java
47cb338d43f75dd998b29caaaa9446c5705217d1 18-Mar-2011 Elliott Hughes <enh@google.com> Add fstat(2), lstat(2), and stat(2).

Bug: 3107501
Change-Id: Ic36f9ffd03446d6e0189470f42abdadde57327df
o/File.java
o/RandomAccessFile.java
io/FileChannelImpl.java
bdb717ae237f4bb9b14b61a2d24150106ac8e6c7 18-Mar-2011 Elliott Hughes <enh@google.com> Simplify the constant initialization.

Bug: 3107501
Change-Id: I07b035482de00cb39c735e3acd9387fcbc22b30a
o/FileDescriptor.java
32c2297a959b72abdb18743f0519e1d8b7c7ea88 17-Mar-2011 Elliott Hughes <enh@google.com> Remove bogus "super()" calls.

I've left one in java.util.concurrent, since we have an upstream there.

Change-Id: I60945e48a41433fc7eaef6086433ec4bf434097f
o/ByteArrayOutputStream.java
o/CharArrayWriter.java
o/CharConversionException.java
o/EOFException.java
o/EmulatedFields.java
o/EmulatedFieldsForLoading.java
o/FileDescriptor.java
o/FileNotFoundException.java
o/FilePermissionCollection.java
o/FilterInputStream.java
o/IOException.java
o/InterruptedIOException.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamException.java
o/OptionalDataException.java
o/OutputStream.java
o/PipedOutputStream.java
o/PipedWriter.java
o/Reader.java
o/StreamCorruptedException.java
o/StringReader.java
o/StringWriter.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/Writer.java
ang/AbstractMethodError.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/CloneNotSupportedException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/InternalError.java
ang/InterruptedException.java
ang/LinkageError.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/ProcessBuilder.java
ang/RuntimeException.java
ang/SecurityException.java
ang/StackOverflowError.java
ang/StackTraceElement.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/Throwable.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/ref/Reference.java
ang/ref/ReferenceQueue.java
ang/reflect/AccessibleObject.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/UndeclaredThrowableException.java
et/BindException.java
et/CacheRequest.java
et/ConnectException.java
et/DatagramPacket.java
et/DatagramSocket.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NoRouteToHostException.java
et/PlainDatagramSocketImpl.java
et/PlainSocketImpl.java
et/ProtocolException.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/SocketAddress.java
et/SocketException.java
et/SocketPermissionCollection.java
et/SocketTimeoutException.java
et/Socks4Message.java
et/UnknownHostException.java
et/UnknownServiceException.java
io/BufferOverflowException.java
io/BufferUnderflowException.java
io/InvalidMarkException.java
io/ReadOnlyBufferException.java
io/channels/AlreadyConnectedException.java
io/channels/AsynchronousCloseException.java
io/channels/CancelledKeyException.java
io/channels/ClosedByInterruptException.java
io/channels/ClosedChannelException.java
io/channels/ClosedSelectorException.java
io/channels/ConnectionPendingException.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/FileLockInterruptionException.java
io/channels/IllegalBlockingModeException.java
io/channels/IllegalSelectorException.java
io/channels/NoConnectionPendingException.java
io/channels/NonReadableChannelException.java
io/channels/NonWritableChannelException.java
io/channels/NotYetBoundException.java
io/channels/NotYetConnectedException.java
io/channels/OverlappingFileLockException.java
io/channels/Pipe.java
io/channels/SelectableChannel.java
io/channels/SelectionKey.java
io/channels/Selector.java
io/channels/UnresolvedAddressException.java
io/channels/UnsupportedAddressTypeException.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelectableChannel.java
io/channels/spi/AbstractSelectionKey.java
io/channels/spi/SelectorProvider.java
io/charset/CharacterCodingException.java
io/charset/CoderResult.java
ecurity/IdentityScope.java
ecurity/KeyStore.java
ecurity/SecureClassLoader.java
ecurity/Signer.java
ql/BatchUpdateException.java
ql/DriverManager.java
ql/SQLDataException.java
ql/SQLException.java
ql/SQLFeatureNotSupportedException.java
ql/SQLIntegrityConstraintViolationException.java
ql/SQLInvalidAuthorizationSpecException.java
ql/SQLNonTransientConnectionException.java
ql/SQLNonTransientException.java
ql/SQLRecoverableException.java
ql/SQLSyntaxErrorException.java
ql/SQLTimeoutException.java
ql/SQLTransactionRollbackException.java
ql/SQLTransientConnectionException.java
ql/SQLTransientException.java
ql/SQLWarning.java
ql/Types.java
ext/BreakIterator.java
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/Collections.java
til/Dictionary.java
til/EmptyStackException.java
til/EventListenerProxy.java
til/InputMismatchException.java
til/LinkedHashMap.java
til/LinkedList.java
til/ListResourceBundle.java
til/NoSuchElementException.java
til/Observable.java
til/Properties.java
til/ResourceBundle.java
til/Stack.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/UUID.java
til/jar/JarException.java
til/jar/Manifest.java
til/logging/ErrorManager.java
til/logging/Formatter.java
til/logging/MemoryHandler.java
til/logging/SimpleFormatter.java
til/logging/XMLFormatter.java
til/prefs/FilePreferencesFactoryImpl.java
til/prefs/Preferences.java
til/zip/DataFormatException.java
til/zip/Deflater.java
til/zip/ZipException.java
52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9 17-Mar-2011 Elliott Hughes <enh@google.com> Add fsync(2) and fdatasync(2).

Interesting parts to this change:
* first BlockGuard support (and general delegation support).
* first rethrowing of ErrnoException as IOException.
* switching FileChannelImpl from int to FileDescriptor.

The special case in FileDescriptor.sync has been removed. Testing with the RI
showed that it doesn't treat syncing a FileDescriptor that corresponds to a
socket as a special case --- it throws SyncFailedException just like normal.

Bug: 3107501
Change-Id: I99faf120bd802aec0397a79772ed38c5e1542fed
o/FileDescriptor.java
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
io/FileChannelImpl.java
io/NioUtils.java
io/PipeImpl.java
ddfdbb9d172fe9b72e08e8d7deab0aa3b8acf044 17-Mar-2011 Elliott Hughes <enh@google.com> Add access(2), strerror(3) and access to environ.

Update java.io.File and java.lang.System to use the new functionality
rather than brewing their own.

Bug: 3107501
Change-Id: I5fa63190d240d638f44a911401143ffb2af9d395
o/File.java
ang/System.java
ec617e2cb4a374f0fd8fbda4a633214cf23a59a9 17-Mar-2011 Elliott Hughes <enh@google.com> Move the getenv(3) native code out of System as a demo.

This is a fairly trivial patch, just to show the general structure.

Bug: 3107501
Change-Id: I547df621ccb8b8874e5f74c4d0bcf84ccaef97c3
ang/System.java
53351277799bc3ee6d7cb7a690a81f1f8ae1642b 16-Mar-2011 Brian Carlstrom <bdc@google.com> Merge "Deflater doc and test tidying" into dalvik-dev
8601d6b5872167f20f3ab845160ae7f9e0fad94b 16-Mar-2011 Brian Carlstrom <bdc@google.com> Deflater doc and test tidying

Change-Id: If140c104d5736e41669a20af5606a54ce338d60c
til/zip/Deflater.java
til/zip/DeflaterOutputStream.java
6ab5999b58777725b4556e4d81bdec56b6d6c182 16-Mar-2011 Elliott Hughes <enh@google.com> Collapse the FileChannel implementations.

This should be an (in)correctness-preserving transformation, with the exception
of tryLock for read-only channels. Previously, that would unconditionally have
been converted to a waiting lock, which seems like a bug.

Bug: 3107501
Change-Id: Ief216c6f9f0a7dbe72f25c2fb63d983ec288f9a5
io/FileChannelImpl.java
io/NioUtils.java
io/PipeImpl.java
io/ReadOnlyFileChannel.java
io/ReadWriteFileChannel.java
io/WriteOnlyFileChannel.java
be3c14134661d099bd6f5c7edbfb1506b6a73cef 16-Mar-2011 Elliott Hughes <enh@google.com> Merge "Expose POSIX constants." into dalvik-dev
7aabd69b01e5435ff0600bf91ce33ed9942630b8 16-Mar-2011 Brian Carlstrom <bdc@google.com> am cd59f01a: am b8822b9a: am 71509f2a: DeflaterOutputStream should output all available compressed data

* commit 'cd59f01ab6edfa8e6cd0ce70adfcd87279cc6260':
DeflaterOutputStream should output all available compressed data
71509f2a9fca846292c5cde06d8fd3e60912cc4b 16-Mar-2011 Brian Carlstrom <bdc@google.com> DeflaterOutputStream should output all available compressed data

In both the write and flush we were looping writing data from the
Deflater to the OutputStream until we needsInput was true. However, we
should have simply been looping until there were no bytes returned.

Bug: 4005091
Change-Id: I855be93286fc4568c6dcc8fd9b77a60019c76564
til/zip/DeflaterOutputStream.java
cdf7a1f942469221bcfd63d9cdf71851b011eaf0 16-Mar-2011 Elliott Hughes <enh@google.com> Expose POSIX constants.

And use them, too. This patch is a little confusing because we already had
constants in Java that were using the POSIX names but that didn't actually
correspond to the constants whose names they'd stolen. Ugh.

Bug: 3107501
Change-Id: Ib64a109c9340b0ecdf80bec91074206c001f455a
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
io/FileChannelImpl.java
io/NioUtils.java
io/PipeImpl.java
io/WriteOnlyFileChannel.java
5d33c6339eac79ef7db2edb90e2207c1cab0bf63 15-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix regressions introduced by Attributes.Name cleanup." into dalvik-dev
4acd18f3adaaf8ac542f8fef20a4ef27bffa49f0 15-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix regressions introduced by Attributes.Name cleanup.

Found by Harmony tests.

Change-Id: Ib940d4204ee9dfe31bf630c4b6bf94be09cbf53a
http://b/3444287
til/jar/Attributes.java
til/jar/InitManifest.java
f934c3d2c8dd9e6bc5299cef41adace2a671637d 15-Mar-2011 Elliott Hughes <enh@google.com> Make OSMemory the semi-supported libcore.io.Memory.

Looks like we're not going to bother with a separate libcore.os package,
when libcore.io will do.

Change-Id: I2806c59349ed4b6410d768c4207c384ced973c54
o/DataInputStream.java
o/DataOutputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/RandomAccessFile.java
et/Inet4Address.java
et/InetAddress.java
et/PlainSocketImpl.java
et/Socks4Message.java
io/HeapByteBuffer.java
io/MappedByteBuffer.java
io/MemoryBlock.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteHeapByteBuffer.java
io/charset/ModifiedUtf8.java
ecurity/SecureRandom.java
til/UUID.java
til/zip/GZIPInputStream.java
til/zip/ZipInputStream.java
03dbe962bc5a38c95037646e1dfe1d65ddc9c692 15-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Drop SecuritySupport helpers from XML." into dalvik-dev
670c354edf01dcda0d9c4363a0996923bb30169b 15-Mar-2011 Jesse Wilson <jessewilson@google.com> Drop SecuritySupport helpers from XML.

We don't have a security manager; these classes don't provide
any utility.

Change-Id: I22a38820bde93286f5b840579ea2b575d6085640
ang/ClassLoader.java
85eea05a0827eef230c769f8d756179fcf7895fc 14-Mar-2011 Elliott Hughes <enh@google.com> Merge "More BitSet work." into dalvik-dev
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
til/BitSet.java
394e621e217f697866b55338f69e9f5efda6a0ad 14-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Use a String for Attributes.Name rather than a byte[]." into dalvik-dev
678e3d534e57c24e3a75a5153cc24714ebdaad8f 12-Mar-2011 Jesse Wilson <jessewilson@google.com> Use a String for Attributes.Name rather than a byte[].

Change-Id: I2ce073092bbe03fba128841258abe8e3b98f3bce
http://b/3444287
til/jar/Attributes.java
til/jar/InitManifest.java
til/jar/Manifest.java
0fddc0a4cb81d68ab2143ff86c5eb89df4a1dbae 12-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Empty enumeration, iterator, listIterator for Java 7 interoperability." into dalvik-dev
e9c5d6fc92d3289bf9278f3eb2f17e814c5ab8f0 12-Mar-2011 Carl Shapiro <cshapiro@google.com> Merge "Add a new constructor to the Reference class." into dalvik-dev
ba1e5f9b7ffe3a42f1001ece077f566de8231548 12-Mar-2011 Carl Shapiro <cshapiro@google.com> Add a new constructor to the Reference class.

This eliminates the duplicated initialization of the reference and queue
members in all subclasses of Reference.

Change-Id: I673fc9443f94e84e33c78637bc5dad9aaa97873e
ang/ref/PhantomReference.java
ang/ref/Reference.java
ang/ref/SoftReference.java
ang/ref/WeakReference.java
8b3ccf0c1b9a8979a3d450be2faf564b54ee23b7 12-Mar-2011 Dan Bornstein <danfuzz@android.com> Merge "Track a related vm change." into dalvik-dev
e3cd663de1c5fa4651500289e6df9150667e2db9 12-Mar-2011 Jesse Wilson <jessewilson@google.com> Empty enumeration, iterator, listIterator for Java 7 interoperability.

This change also fixes several missing @Overrides in Collections.

Change-Id: Ibfc4f3f0fcc0307f2401caca15cda3ee2ff01dbc
http://b/3484927
til/Collections.java
73fba5afced7560686badbc10dedf0d7211458b8 11-Mar-2011 Dan Bornstein <danfuzz@android.com> Track a related vm change.

The type constants passed in from Field are now just the usual
type descriptor characters.

Change-Id: Ie51c1d9340de468183f5380c547c8d52c502515c
ang/reflect/Field.java
b37348817bfc38a2f1efda52d29ee284952b9c3a 11-Mar-2011 Elliott Hughes <enh@google.com> Merge "Rewrite BitSet and add the new valueOf and toLongArray methods." into dalvik-dev
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
til/BitSet.java
3d93b50c1e9d8cb12d17a4331edd27ee2a1dc7a9 11-Mar-2011 Dan Bornstein <danfuzz@android.com> Remove the stopAtPrivileged argument.

It's superfluous now.

Change-Id: I5628797b1296a41bfe72e535efaf18cd17e12fd4
o/ObjectInputStream.java
ang/ClassLoader.java
ang/SecurityManager.java
da919b1f08fa713ee78aabb3e2e324630ae1b59d 09-Mar-2011 Elliott Hughes <enh@google.com> Add the new Logger.getGlobal method.

Bug: 3484927
Change-Id: I597ab4c1c85dfc1dc7acfac5fd9a142b039f2bbe
til/logging/Logger.java
2f03ccad590827233fcba84a8b6eafcd414e5fe7 08-Mar-2011 Elliott Hughes <enh@google.com> Use -fvisibility and clean up a little.

The visibility change isn't obviously useful, but it's a good excuse to clean
up some of our networking code a little.

Change-Id: I165b32b9c76a3707c512e07de07992f63673ab4f
et/PlainDatagramSocketImpl.java
3393bc90a5bd4498add5b70df1c43e54e5a2f843 08-Mar-2011 Elliott Hughes <enh@google.com> Remove an unused local and improve a comment.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I9924ecbdeafc608bcf972b29d3926de4df616975
et/PlainSocketImpl.java
ff8234c90ecab9f1db368924bf92a5b16460f9b5 08-Mar-2011 Elliott Hughes <enh@google.com> Factor out our single-byte InputStream.read/OutputStream.write implementations.

Change-Id: I00106a51a32ea84a39256d5629369170b892a039
o/FileInputStream.java
et/PlainSocketImpl.java
io/channels/Channels.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/InflaterInputStream.java
til/zip/ZipFile.java
c56d231b9b0be83029af17f2f6536939109eee03 08-Mar-2011 Elliott Hughes <enh@google.com> Merge "Fix short writes in Socket OutputStreams." into dalvik-dev
608263018762d64a07276b7c8f58102455ccecc8 08-Mar-2011 Elliott Hughes <enh@google.com> Fix short writes in Socket OutputStreams.

Also tidy some code and fix some comments.

The OpenSSL OutputStream is already correct: it handles this in the native code.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I69645543ec01f1eecdae4418f86c3a1911c0f752
et/PlainSocketImpl.java
et/SocketInputStream.java
et/SocketOutputStream.java
7183b699a030626ad5ff432dd777f68570800b74 08-Mar-2011 Dan Bornstein <danfuzz@android.com> Merge "Consistency in and testing of exception throws." into dalvik-dev
363291564f107e500e0b584baa0377757cc2ae09 08-Mar-2011 Dan Bornstein <danfuzz@android.com> Consistency in and testing of exception throws.

More of the former than the latter, but there will be follow-ups.

Bug: 3500987
Change-Id: I5fcf0dab2c018b621921958cb4076d2964030862
ang/AbstractStringBuilder.java
ang/ArrayIndexOutOfBoundsException.java
ang/String.java
ang/StringIndexOutOfBoundsException.java
til/Arrays.java
til/Vector.java
eb8027492e81d5d3a0d1cd49494c59f9a03eeaa3 07-Mar-2011 Elliott Hughes <enh@google.com> Remove useless overrides of InputStream.read(byte[]) and OutputStream.write(byte[]).

For the particular stream in the bug, the useless override assumes that the
implementation of read(byte[], int, int) or write(byte[], int, int) doesn't
do anything special. A dangerous and non-local assumption. (In the bug, we
need to change the three-argument write.)

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I915d4a2e20c98f8e7f5775b555ae77d496a535d0
o/DataInputStream.java
o/FileInputStream.java
o/FileOutputStream.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/InputStream.java
o/ObjectOutputStream.java
o/OutputStream.java
et/SocketInputStream.java
et/SocketOutputStream.java
til/logging/FileHandler.java
8de7cf6bff36093dda9e25a1ab3718720cb54906 07-Mar-2011 Elliott Hughes <enh@google.com> Move the various concrete SocketImpl classes into java.net.

Also do some trivial tidying of dead code.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: If7186dda6bf31e2c2ef00ac6f386cbc9a78847fd
et/DatagramSocket.java
et/MulticastSocket.java
et/PlainDatagramSocketImpl.java
et/PlainServerSocketImpl.java
et/PlainSocketImpl.java
et/ServerSocket.java
et/Socket.java
et/SocketImpl.java
et/SocketInputStream.java
et/SocketOutputStream.java
et/Socks4Message.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
9229d47c1288e25ead3a2dc27fac8a4a2ee932a3 07-Mar-2011 Elliott Hughes <enh@google.com> Kill many of the stl_style_names in Java.

Change-Id: I4473a6efc74a49dd3b480a48d4c697fc773e08f8
o/InputStreamReader.java
ang/reflect/Field.java
ang/reflect/Method.java
ath/NativeBN.java
io/DatagramChannelImpl.java
io/SocketChannelImpl.java
til/Formatter.java
4f9ffffd8a2835c30647f9785afb48fa96a0f045 05-Mar-2011 Elliott Hughes <enh@google.com> Add new InetSocketAddress.getHostString method.

Bug: 3484927
Change-Id: I265ed467b733b9d5842e2e0bf14af1eddc8e0de2
et/InetAddress.java
et/InetSocketAddress.java
52b310afcffe8b6aed6fa0c1e9e8b0ade6f0a672 04-Mar-2011 Elliott Hughes <enh@google.com> Git threw away my changes to a file that had been renamed.

Manually patch the ICU.cpp changes into libcore_icu_ICU.cpp. Also remove the
whole sentence from the class documentation, since it looks rather odd without
the bit that would refer to @hidden API.

Bug: 3484927
Change-Id: I1ea046e18949ad5bfa7f4512df1f481c81a94310
til/Currency.java
0b4ced108a338c38bc62c203a725415b2cb40e73 04-Mar-2011 Brian Carlstrom <bdc@google.com> Tempoarily hide javadoc reference to @hide method.

Change-Id: Ie006ff7b00c062035152855b19b3728e95ef01fd
til/Currency.java
4cddda58f9e5eaeb244ad4cef26049f9be142fd6 04-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add new java.util.Currency functionality." into dalvik-dev
0ad1c14261c4db0731503770ec6a027e90cc6e38 04-Mar-2011 Elliott Hughes <enh@google.com> Add new java.util.Currency functionality.

Also clean up the implementation a bit, fix a long-standing
serialization bug, and improve the documentation.

Bug: 3484927
Change-Id: I5e5270b1b1cdac69b6d7f51b8460896692040a12
til/Currency.java
5d3f5562c167120b5ec00e509af0f0ab9308bff5 04-Mar-2011 Elliott Hughes <enh@google.com> Add InetAddress.getLoopbackAddress.

Bug: 3484927
Change-Id: Ic5305c852ed8079d958d8ab7c46fe10cceac60d4
et/InetAddress.java
b4acb463582a510894aeb85f4fa8f35b339449c8 03-Mar-2011 Elliott Hughes <enh@google.com> Add and use System.lineSeparator.

Also remove some duplication and improve some documentation.

Bug: 3484927
Change-Id: I16d673e54ecdc79b77c3f317666519923d11ebe8
o/BufferedWriter.java
o/PrintStream.java
o/PrintWriter.java
ang/System.java
til/Formatter.java
til/Properties.java
til/logging/LogManager.java
til/logging/SimpleFormatter.java
til/logging/XMLFormatter.java
56b9c93d039e8b41f9317e15cf013c53f6d1f31f 01-Mar-2011 Elliott Hughes <enh@google.com> am 95187055: Fix a broken @link in the SecureRandom documentation.

* commit '95187055a32acbc27ff91db542bb2f55649c5101':
Fix a broken @link in the SecureRandom documentation.
08bad46e2b61b5005eb02a401e97fec25d9d3013 01-Mar-2011 Elliott Hughes <enh@google.com> Add new java.lang.reflect.Modifier functionality.

Bug: 3484927
Change-Id: Id9cc9ab6dd37b2191f9a31d4a82e1316c0eee171
ang/reflect/Modifier.java
c3adcfb1339de546aed6e7ff00a7edb020b8a85b 01-Mar-2011 Elliott Hughes <enh@google.com> Add new java.lang.*.compare methods.

Bug: 3484927
Change-Id: I1e1ddf9ea84144d737f4c419f37f9854671d267f
ang/Boolean.java
ang/Byte.java
ang/Integer.java
ang/Long.java
ang/Short.java
95187055a32acbc27ff91db542bb2f55649c5101 28-Feb-2011 Elliott Hughes <enh@google.com> Fix a broken @link in the SecureRandom documentation.

Change-Id: I5f559a4ab69e2582c1fdbbd75a8ac210bcd7c659
ecurity/SecureRandom.java
276c5cd70991e814f085bf417cb647dce9bb55e4 28-Feb-2011 Elliott Hughes <enh@google.com> Add missing @hide tag to Character.getName.

Change-Id: I24463309bae8e9e9cb23a6836ee939d45c45e57f
ang/Character.java
4f5a696869e0348cf21dad9050d59b20849aff96 26-Feb-2011 Elliott Hughes <enh@google.com> Add new java.lang.Character functionality.

Bug: 3484927
Change-Id: I561c927bbd0ef2e801d38d9c3a6250b1d3f65b0d
ang/Character.java
ang/Integer.java
ang/IntegralToString.java
e9dfb3473d9c2cceaf55c86ac9f4296e7535a175 25-Feb-2011 Elliott Hughes <enh@google.com> Add a few extra exception constructors.

Bug: 3484927
Change-Id: I167dd29da676864be1e1e670481619709a8d3a4a
ang/AssertionError.java
ang/LinkageError.java
til/ConcurrentModificationException.java
c363316bb6da97b7af82491f5951341b881401f3 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: instanceof again.

Looks like FindBugs won't show you the same warning twice in the same method...

Change-Id: I1136610fd48fd075520b7595ee8230409cd21d96
til/prefs/XMLParser.java
f5309a39506c967feda8766feeba7f7271a458cb 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: RR_NOT_CHECKED.

"This method ignores the return value of one of the variants of
java.io.InputStream.read() which can return multiple bytes. If the return
value is not checked, the caller will not be able to correctly handle the
case where fewer bytes were read than the caller requested. This is a
particularly insidious kind of bug, because in many programs, reads from input
streams usually do read the full amount of data requested, causing the
program to fail only sporadically."

Change-Id: I7d7c62836f2037f0cbb4bb0708bd4f034a22a2fc
til/zip/ZipInputStream.java
a6107fe9f3dfc6c26cbf247e9e266a6094e4df99 25-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs warnings: BC_VACUOUS_INSTANCEOF." into dalvik-dev
8f7b815b21dd8dd884b7c0e16ea798d0f8e41314 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: DM_STRING_CTOR.

These are the cases where we don't actually want to avoid memory leaks.

Change-Id: Icc6c5506e5d415ff4fb5ff1351efee572a2af3e9
ext/DateFormatSymbols.java
c0d1705423cf565f87a529a03596013c1208a920 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: BC_VACUOUS_INSTANCEOF.

"This instanceof test will always return true (unless the value being
tested is null)."

Change-Id: Ie95c71bee4198c1e343076058110ff0cfab51e0b
til/prefs/XMLParser.java
c0009b516f3341c678ef5f82cdffd6f9872bc22a 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: Charset.

Dead store.

Change-Id: Idd46fa2888b097c70a942554c9afc63cb4b61926
io/charset/Charset.java
7603ae72855411e6810719c28da82f07941654e6 24-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs warnings: Charset." into dalvik-dev
9dc1d172675422e7db8df14d325365d7724a346a 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: Charset.

FindBugs doesn't like us using known-null values, so just explicitly say
'null' to make it clear we know what we're doing.

Change-Id: I54312f19edda1bca1052b82f7d9faedb98c8a01f
io/charset/Charset.java
ae06196267319eef727892d9e13bdecea3482e34 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: dead code in Socket(Proxy).

From the SecurityManager removal.

Change-Id: Ie822bc02453b1020a8ad6d9337b2d997c475659b
et/Socket.java
93942160263480b1ffdd4030036cf6994c616b9c 24-Feb-2011 Elliott Hughes <enh@google.com> am 46bed6a4: Make InetAddress.parseNumericAddress more like InetAddress.getByName.

* commit '46bed6a47a20d8105f0e099d162d547a7964b4fe':
Make InetAddress.parseNumericAddress more like InetAddress.getByName.
6df25bda347959d57031ec0e5b5c2d991adb144f 24-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs warnings: dead store in SimpleDateFormat." into dalvik-dev
a98d1312b214d3bb49b51fba084baa6be1b573d5 24-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs warnings: dead store in SocketChannelImpl." into dalvik-dev
be58c14fd1c508a6ba1212c121d622207aa1d59b 24-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs warnings: BigDecimal static initializer order." into dalvik-dev
dc6c682bd5bb07f2d68d6108ecc690d65dd0e06b 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: dead store in SimpleDateFormat.

Change-Id: I837ddf7b4adbaada6492a124c4af1fe5e9dec997
ext/SimpleDateFormat.java
62e34a21db1cbef5d2cec186ee4f15c5ec39d187 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: dead store in SocketChannelImpl.

Change-Id: I2aa05b830dd7cac561efadf019eb48c2c933c095
io/SocketChannelImpl.java
e497649548980e13fe7b19a7705de9d246f75535 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: BigDecimal static initializer order.

We were creating instances of BigDecimal before all its other static fields
were initialized.

Change-Id: Ic415d118041253b01d0e43e4b8e71d220a660639
ath/BigDecimal.java
c3c7091284fa1879702318c7b3e3f09681030a64 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings in ObjectOutputStream.

A duplicate of the dead code in ObjectInputStream.

Change-Id: I717a31a552e4201d80df95f84f79fe04d49049bf
o/ObjectOutputStream.java
46bed6a47a20d8105f0e099d162d547a7964b4fe 24-Feb-2011 Elliott Hughes <enh@google.com> Make InetAddress.parseNumericAddress more like InetAddress.getByName.

Specifically, treat null and "" as requests for the loopback address.

Bug: 3483011
Change-Id: I656f1d2873faf4b73e1fc7621c96183a8a86992b
et/InetAddress.java
685f9f54501631ef05a9379fa865004dc33a2ae5 24-Feb-2011 Elliott Hughes <enh@google.com> More FindBugs complaints in ObjectInputStream.

I don't know why there was so much bogus (too late) null checking in this code,
but it's not obvious how fieldDesc could ever be null, so I think that removing
the checks rather than fixing them is the right resolution.

Change-Id: I72ee5c048ddebc3678c94f23e4c09dcb2790dfc7
o/ObjectInputStream.java
eba235c7faa8157de8bcfc6ce29a48e196100bfb 24-Feb-2011 Elliott Hughes <enh@google.com> Don't @see a private field.

Change-Id: I7acd9200acfa46c38b4deb61fff337f0d19fcaed
et/URLConnection.java
00118d748e062fcc908d6b9e5cb8de08106220f9 24-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge commit '217766d6' into manualmerge

Conflicts:
luni/src/main/java/java/lang/Class.java

Change-Id: I32c6b5e66f7f3b315761f8bbcc7ae4c783625686
217766d68f160dd03def5d5f983d5330c24a3ed7 23-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Optimize Class.getMethod() by loading only one method."
11229f6af89fc54e70675fcab098b1572d6e539e 23-Feb-2011 Jesse Wilson <jessewilson@google.com> Optimize Class.getMethod() by loading only one method.

Change-Id: I546fec33ff9696a829867704244a79674cf5dd2b
http://b/3431686
ang/Class.java
ang/ClassLoader.java
ang/ClassMembers.java
ang/Enum.java
a7249efe0fb2a75e0e5526dc97567911af499514 23-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs complaints (BufferedReader, File, and ObjectInputStream)." into dalvik-dev
344110141de805108972f0ad24f16de59ba2aa32 23-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs complaints (BufferedReader, File, and ObjectInputStream).

Also slightly improve the documentation of Random and SecureRandom.

Change-Id: I47b23cef33958fffb4254c9942849ae7b52136f1
o/BufferedReader.java
o/File.java
o/ObjectInputStream.java
ecurity/SecureRandom.java
til/Random.java
c3980684e1d16ba7df02df9ba1a207cf31733c48 23-Feb-2011 Scott Main <smain@google.com> am 482d294e: am 4ecd3eb7: am 0351940f: docs: fix a couple hundred broken links

* commit '482d294ebd5dff55f5397d5991f9f0e3808e5cac':
docs: fix a couple hundred broken links
f5fc66d0a21d4369e17e14d4a86d1a7b2d2678b2 23-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge commit '6dfa1ea0' into manualmerge

Conflicts:
luni/src/test/java/libcore/java/net/URLTest.java

Change-Id: Idcc92efa678d32ec1c9fa22bc6877f9582ff319e
482d294ebd5dff55f5397d5991f9f0e3808e5cac 23-Feb-2011 Scott Main <smain@google.com> am 4ecd3eb7: am 0351940f: docs: fix a couple hundred broken links

* commit '4ecd3eb70ba0ab58026f13b2a1c8e5fc51d99bad':
docs: fix a couple hundred broken links
8216dc1fd9d31867770439985c3d66570330e4c7 23-Feb-2011 Elliott Hughes <enh@google.com> Remove most of our remaining non-API StringBuffer usage.

Change-Id: Ia2c621d8a9dfe04cd55aac652d1ac9ea4398afd1
et/URLConnection.java
244449b9ccd108197d1c117edda99cd93a891d49 23-Feb-2011 Elliott Hughes <enh@google.com> Fix a comment and remove some duplication.

Change-Id: I67bb9f1c71c774e04698a3e489bd48e9b27b2b64
ang/Runtime.java
et/URLClassLoader.java
0351940f37cf93ea856c52d7e88302271ff39d2e 23-Feb-2011 Scott Main <smain@google.com> docs: fix a couple hundred broken links

Change-Id: I97656da16455f0fb97380c46c747bf23176a7abd
ang/Object.java
99e234cc3322b6c88c9d883da45116d9ec8271db 23-Feb-2011 Elliott Hughes <enh@google.com> Be more consistent about VM.

Also add more warnings about the default locale, and remove dead code.

Change-Id: I103cbf52f7aadc8e1132d7fad72ef2b0abc851f4
o/FileOutputStream.java
o/PrintStream.java
o/PrintWriter.java
ang/AbstractMethodError.java
ang/Class.java
ang/ClassCircularityError.java
ang/ClassLoader.java
ang/Compiler.java
ang/IllegalAccessError.java
ang/IllegalStateException.java
ang/InstantiationError.java
ang/InternalError.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/Object.java
ang/OutOfMemoryError.java
ang/Runtime.java
ang/RuntimeException.java
ang/SecurityManager.java
ang/StackOverflowError.java
ang/System.java
ang/Throwable.java
ang/UnknownError.java
ang/UnsupportedClassVersionError.java
ang/VerifyError.java
ang/VirtualMachineError.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/spi/SelectorProvider.java
ql/CallableStatement.java
ql/PreparedStatement.java
til/logging/LogRecord.java
16b52d1f3e66cfadf3e245de27358b590e201d72 23-Feb-2011 Elliott Hughes <enh@google.com> Better documentation for Runtime.addShutdownHook and File.deleteOnExit.

Change-Id: I1f3efad59f95fce4985aa13cfe15f7b603e5d3d5
o/File.java
ang/Runtime.java
a7ef55258ac71153487357b861c7639d627df82f 22-Feb-2011 Elliott Hughes <enh@google.com> Simplify internal libcore logging.

Expose LOGE and friends for use from Java. This is handy because it lets me use
printf debugging even when I've broken String or CharsetEncoder or something
equally critical. It also lets us remove internal use of java.util.logging,
which is slow and ugly.

I've also changed Thread.suspend/resume/stop to actually throw
UnsupportedOperationException rather than just logging one and otherwise
doing nothing.

Bug: 3477960
Change-Id: I0c3f804b1a978bf9911cb4a9bfd90b2466f8798f
ang/ProcessManager.java
ang/System.java
ang/Thread.java
ang/VMThread.java
ecurity/Security.java
6c434a1215049a76ba82fea69e8c5aa76cad955b 21-Feb-2011 Jesse Wilson <jessewilson@google.com> Fix URL.equals() to not throw on null hosts.

Change-Id: Ib89c902a10b28dc7e78600b44a3f1ff230f9b553
http://b/3474668
et/URLStreamHandler.java
2ef68714ff84d43705f57f724fbcb1a28ebd954d 18-Feb-2011 Elliott Hughes <enh@google.com> More system properties work.

This patch moves the last of dalvikvm's property setting (other than the
command-line -D stuff, which is inherently the VM's job) into libcore. It
also adds a couple of new properties giving the openssl and zlib library
versions.

Change-Id: I4569b65fad0585c3878ad5eaa0234ed95768b1f9
ang/System.java
6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c 18-Feb-2011 Elliott Hughes <enh@google.com> Fix various FindBugs warnings.

Only the ChunkHandler and ZoneInfo ones were real bugs. The former is only
called with one input value that doesn't exercise the bug, and the latter
would cause us to think that a time zone that stopped using daylight time
before 1970 was still using daylight time (which would defeat various
optimizations, but should otherwise be harmless).

The other stuff is trivia not worth individual changes.

Change-Id: Ib0752560cd16edc6538d1fc2b234451a66d48171
et/URLClassLoader.java
io/charset/ModifiedUtf8.java
ecurity/AccessControlContext.java
66e1a782c0ffafcb7c4226798d6ecc4cfc071916 18-Feb-2011 Elliott Hughes <enh@google.com> Fix a few small preferences/properties bugs.

We were incorrectly turning \ into &apos; when writing preferences as XML.

We were concatenating strings with + in a loop to work around something that's
since been fixed.

We were using an invalid Unicode escape where we could use a simple literal.

Change-Id: I8882c43ba914254155505f55c66c2480e268f034
til/Properties.java
til/prefs/XMLParser.java
88dc8b7ade1887f0926f1b6b89eea3a79353ff7d 17-Feb-2011 Elliott Hughes <enh@google.com> Tidy up MathContext (fixing a FindBugs complaint).

FindBugs didn't like the fact that "the class's static initializer creates an
instance of the class before all of the static final fields are assigned"; I
didn't like the implementation of MathContext(String).

Change-Id: I72e44d851571ec9789a6842f5814fee7a14c0e5a
ath/MathContext.java
aa1f2159554ab6f7c4201c1e8d7c549cffd79f37 17-Feb-2011 Elliott Hughes <enh@google.com> Fix FindBugs warnings in ShortBuffer.

Change-Id: I59de6a701328411aaedbf5c11ce130c5f1bf01e4
io/ShortBuffer.java
510dc6afb60f9099127c5bc9fb91d86b778d747f 17-Feb-2011 Elliott Hughes <enh@google.com> Fix FindBugs warnings in ResourceBundle.

Change-Id: Ida0b2208f8121d7f510043cdcb1fa99bbfc83103
til/ResourceBundle.java
8e9f4948e08c238998b44228ee30aea9d57a7573 17-Feb-2011 Elliott Hughes <enh@google.com> Tidy nio->io charset name conversion.

Change-Id: I60fa7540ecaff49486985f90098f7cb9157aa9cd
o/HistoricalCharsetNames.java
o/InputStreamReader.java
o/OutputStreamWriter.java
aa37e2512b13deab2e82800c71327dd74c362577 17-Feb-2011 Elliott Hughes <enh@google.com> Move SneakyThrow to libcore.util.

Change-Id: Ibd3dc18cf8352ee259b3665bcdc80a13842acb64
o/BufferedWriter.java
o/FilterOutputStream.java
bb1c04167bdff1939e9e71ed04c57337d4951008 17-Feb-2011 Elliott Hughes <enh@google.com> Tidy up the bidi code a little.

If we do ever use this, we should probably kill the run class completely; we
don't expose it to callers, and we could easily cope with a simple int[]
internally.

Change-Id: Ic03fbf7e56251a35b5db31509fbca15ab6d6f01a
ext/Bidi.java
08343a4ef77616fc420e51d1095c0d6a266041ba 16-Feb-2011 Elliott Hughes <enh@google.com> Remove our implementations of inline natives.

It turns out that our String.equals was getting used. Making dalvikvm's inline
natives be native methods ensures that doesn't happen.

I've also added a test to ensure we explicitly test both variants.

Change-Id: Ie2a4b5289092da5ffca4a4273692f1048ab3b841
ang/Math.java
ang/StrictMath.java
ang/String.java
4ffe5900ca8922ad33639f9f73cb30b8f6721363 16-Feb-2011 Elliott Hughes <enh@google.com> am f39b892d: Add InetAddress.parseNumericAddress for frameworks/base\'s benefit.

* commit 'f39b892d87e85835f021e8ad77ffdd215735604b':
Add InetAddress.parseNumericAddress for frameworks/base's benefit.
f39b892d87e85835f021e8ad77ffdd215735604b 16-Feb-2011 Elliott Hughes <enh@google.com> Add InetAddress.parseNumericAddress for frameworks/base's benefit.

Bug: 3300307
Change-Id: Ifb2207621232314046aee39fdb86b957b9e7f8fc
ang/AssertionError.java
et/InetAddress.java
7b2c603466820e493385d2af9ca6008e67873836 16-Feb-2011 Brian Carlstrom <bdc@google.com> Merge "Remove some unnecessary java.lang references" into dalvik-dev
00ccc7c466cf9f0c5b3df4d3276e1e4be0618f7f 15-Feb-2011 Elliott Hughes <enh@google.com> Improve the Properties documentation.

Bug: http://code.google.com/p/android/issues/detail?id=14752
Change-Id: I2e39e696ec6f0fa65893209ad8090becb040df10
til/Properties.java
a9e5f374e92eb769bc28333cc8110051a2f622b1 12-Feb-2011 Brian Carlstrom <bdc@google.com> Remove some unnecessary java.lang references

Change-Id: I140760f8aa52dca99ce7e15dec97e811eb087784
ang/NoSuchFieldException.java
ang/NoSuchMethodException.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/SecurityException.java
6d82ce5d35a5e84aedf08528fd98b849f3f565a6 15-Feb-2011 Elliott Hughes <enh@google.com> Move ZoneInfo and ZoneInfoDB into libcore.util.

Change-Id: I91385512ec27aa2aebdc163ae204e542efa58f21
til/TimeZone.java
6d4b1ffd4c7d665393e2d1b9197ce1ff525d1f48 15-Feb-2011 Elliott Hughes <enh@google.com> Merge "Improve TimeZone's behavior for "pre-historic" dates." into dalvik-dev
65c53ceda4279ee7c19cf42d7c265cd601340ca0 15-Feb-2011 Elliott Hughes <enh@google.com> Improve TimeZone's behavior for "pre-historic" dates.

By pre-historic I mean "before the beginning of our table of transitions". It's
not entirely obvious what the right behavior is, but it's pretty obvious that
our old behavior was unhelpful and inconsistent. This is an attempt at a
reasonable semantics, backed by tests.

Also add a test for an unrelated TimeZone bug (already fixed).

Bug: http://code.google.com/p/android/issues/detail?id=14395
Bug: http://code.google.com/p/android/issues/detail?id=11918
Change-Id: I230ab21f9a38e37d6d0a44f97d5a8ac8b01df7d9
til/SimpleTimeZone.java
035932b8f19aeb0eb5b25a0b6cbe7f0ab3567dde 14-Feb-2011 Jesse Wilson <jessewilson@google.com> Test to show that deleting prefs files is consistent with the RI.

http://b/3431233

Change-Id: Id20db6e86ef3521450b240418e7a8652be9681aa
til/prefs/XMLParser.java
566bbb1d5a0ffadfc07fa58176587d4bd0d0be13 12-Feb-2011 Elliott Hughes <enh@google.com> Various time zone strings improvements.

* Added a cache -- really a memo table -- to libcore.icu.TimeZones. I've also
made the intern table global across all locales, for the common case where one
language has many corresponding country codes (and thus locales) for which the
strings are all the same. (I.e. this gives us deduplication across locales
where before we only had it within locales.) We also eagerly populate the cache
with both the default locale *and* en_US in the zygote, which should provide
better behavior for everyone whose default locale isn't en_US.

* Switched from linear search to binary search when pulling a row out of the
zone strings table. We could hash these, but I currently have no reason to
think we'd gain much speed for the space.

* Removed the special-case hack I had to ask ICU for a single string. The new
code largely removes the need for this, though one can imagine a theoretical
app that will behave worse under the new regime, all plausible ones will
benefit.

* Switch ICU over to using an mmap(2)ed copy of its .dat file and tell it never
to look for stuff on the file system. This doesn't actually work in any current
version of ICU, though it is slightly faster by virtue of no longer looking for
individual .res files (it still keeps looking for the same .dat file over and
over). I'll work on fixing ICU later. This change takes us from about
1.1s/locale to 0.8s/locale. My current ICU hack takes that down to 0.3s/locale,
which is still obscene, but it's another step in the right direction.

* Fixed the "unambiguous abbrevations" logic in TimeZones.cpp so that all users
of (say) CET to mean "Central European Time" get it, not just first. We really
just wanted to avoid the situation where there's a "Central Excellent Time" or
whatever, whose CET would *conflict* with the first one we learned about.
Multiple references to the same time zone are not conflicts.

* Moved clone2dStringArray to the only place it's really needed.

* Slightly better documentation for Comparator.

* More tests, including the one for CET formatting that I should have added
when I fixed CET parsing, which would have shown me the error of my old ways.

Bug: 3443476
Change-Id: If1d50e6273fc98a38139f14445265ce0be5e09dd
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
til/Comparator.java
til/TimeZone.java
10b5dd613887c94718ae774bd73e6d11bea0c2ef 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Rely on string to do case mapping." into dalvik-dev
6f29fe0f1a0a42d773fb435e132d8dea9b59a11d 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge commit '7d95dd2e' into manualmerge

Conflicts:
luni/src/main/java/java/net/AddressCache.java

Change-Id: I32c78e56b5b7ac078e75bacfe7ec176962e777c5
c729e213248a11cce7a186c559cee78afff91837 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Rely on string to do case mapping.

The motivation for this is to remove the only test in our
java-internal directory.

Change-Id: Ieb138f5cb4698cf117ab4fb2d21b800af9756873
til/jar/Attributes.java
til/jar/JarFile.java
e0e567287e4392bebc5f5826b8ef3b1bd8ca166e 11-Feb-2011 Elliott Hughes <enh@google.com> Add system properties that report our ICU4C and Unicode versions.

Bug: 3413364
Change-Id: Ibbc4ab3564bc3329275a1a828f86750aa6beb200
ang/System.java
7d95dd2ed60350f90fe64c33cbde58e5c2a72c83 10-Feb-2011 Jesse Wilson <jessewilson@google.com> Adopt BasicLruCache in AddressCache.

Change-Id: I08a5e82e123920762ad9a9c87bbe3045f17e33a9
http://b/3184897
et/AddressCache.java
24923f9042b142165f7176f1aa44a797145f11a7 10-Feb-2011 Elliott Hughes <enh@google.com> Move more of the system properties handling into managed code.

Bug: 3413364
Change-Id: Ifc9b54255e11fd7df5517b88d8774dd747a7ec3d
ang/System.java
640e4a73d88b750b63d381ef52b041876df272ae 10-Feb-2011 Elliott Hughes <enh@google.com> Move more system property handling into managed code.

Bug: 3413364
Change-Id: Ia056a8037f6be88f9b146f665fe7180868e1ff69
ang/System.java
6854ec3ede823174ef7a0aecb6e5c221211d18a9 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Use the same code to encode and fix poorly encoded URLs." into dalvik-dev
32559028b14b9b321b10eede050afd554a376569 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Use the same code to encode and fix poorly encoded URLs.

Don't permit digits outside of ASCII.

Change-Id: I47b756c32e67b7415e35ae9eb55b735d1c22a36d
http://b/3436051
et/URLEncoder.java
et/URLStreamHandler.java
a1ba5d24537d985b2af05a983181842a2b13eafc 09-Feb-2011 Elliott Hughes <enh@google.com> Make Date.toString a bit faster.

I was actually investigating speeding up SimpleDateFormat, but that became
a bit ugly, so for now let's make my life harder by speeding up its competitor
instead. The nice thing about this change is that I've got rid of the
duplicate en_US weekday and month short names.

We should have some automated way of knowing when we need to revisit these
kinds of optimization. And some way of knowing how many people would benefit
from me optimizing SimpleDateFormat, so I can make an appropriate trade-off
when the optimization doesn't make the code simpler.

Change-Id: Icdeb9cbd775470fa12324e2e13cebce2cfdf3920
ext/SimpleDateFormat.java
til/Date.java
56099d23fcb002b164bff8fb7f14d6ec0453509e 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Remove redundant URL encoders and decoders.

http://b/3436051
http://b/2753295

Change-Id: I5836eab395214767efa4a3d8e8002cff72738854
et/URI.java
et/URIEncoderDecoder.java
et/URLClassLoader.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
32d2e33dabd6767913e275a62c456f8fe4e5131f 09-Feb-2011 Elliott Hughes <enh@google.com> Simplify Date.toGMTString.

There was a reason for the madness, but Android's SimpleDateFormat implements
'y' like the Unicode standard, not the RI, so we don't need the hack to get
standard behavior manually. Add explicit tests to guard against regression.

Change-Id: Iff3cf09004c76684ce7605ede888463a86d15d92
til/Calendar.java
til/Date.java
73ab73fc55e57f4936ce2f35ced41642630f6c6e 09-Feb-2011 Elliott Hughes <enh@google.com> Slightly improve String.intern and Object.finalize documentation.

Bug: 3144247

Change-Id: Ib6552d5989ab9e13341a1d9e754754d8b22ef655
ang/Object.java
ang/String.java
e26ba79900d471d02d656f686926918ef7dc751f 08-Feb-2011 Elliott Hughes <enh@google.com> Use int.class instead of Integer.TYPE (et cetera) for clarity.

I've also removed some small amount of duplication and a few unused imports.

Change-Id: Ie52477484bade74c80a348ad1261b596f9053cf6
o/EmulatedFields.java
o/EmulatedFieldsForDumping.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamField.java
ang/Boolean.java
ang/Byte.java
ang/Character.java
ang/Double.java
ang/Float.java
ang/Void.java
ang/reflect/Array.java
et/Inet6Address.java
et/InetAddress.java
ecurity/AllPermissionCollection.java
ecurity/BasicPermissionCollection.java
ext/DecimalFormatSymbols.java
ext/MessageFormat.java
ext/NumberFormat.java
ext/SimpleDateFormat.java
til/Calendar.java
til/HashMap.java
til/Hashtable.java
til/Locale.java
til/PropertyPermissionCollection.java
til/SimpleTimeZone.java
til/prefs/XMLParser.java
a7ee8ea69e1cdd0fa64c98e532b48b3c118156ea 08-Feb-2011 Elliott Hughes <enh@google.com> Fix serialization of DecimalFormatSymbols.

(This was a regression in gingerbread.)

Bug: 3430006
Change-Id: Ifb0d1fc71303f09bc48557be9157d48f5381e06f
ext/DecimalFormatSymbols.java
4fd8ac297725190c6d81e9538b1faf7cfb0f5bb8 08-Feb-2011 Elliott Hughes <enh@google.com> Fix build.

The *ICU classes shouldn't be public.

Change-Id: I1ca75c696c52f75b70d6aef29888a5a48ef7b32a
io/charset/CharsetDecoderICU.java
io/charset/CharsetEncoderICU.java
io/charset/CharsetICU.java
3664d8839f0ba794f428119ee7f7304a66861da5 08-Feb-2011 Elliott Hughes <enh@google.com> Clean up the CharsetDecoder/CharsetEncoder implementation a bit more.

Moving CharsetEncoderICU into java.nio.charset lets us use a cleaner workaround
for the constructor-calling-abstract method API bug.

Change-Id: I2312580b2c27711e9d4c88fe4dc057eec13c12e0
io/charset/CharsetDecoderICU.java
io/charset/CharsetEncoder.java
io/charset/CharsetEncoderICU.java
io/charset/CharsetICU.java
3eea06a04c2ceaf0e1a1a1d351407aec0a78c4e5 08-Feb-2011 Elliott Hughes <enh@google.com> Add missing @hide.

Change-Id: I1f9b51f581a4bc0327d90aa98bda824ecaf1e49c
io/charset/CharsetEncoder.java
0a95ca9e544a8c6fa49a9972bc173c16fdc612ce 08-Feb-2011 Elliott Hughes <enh@google.com> Merge "Clean up the CharsetDecoder/CharsetEncoder implementation a bit more." into dalvik-dev
37871fb106b08055ad56d7f04d4faccdd163e1af 08-Feb-2011 Elliott Hughes <enh@google.com> Clean up the CharsetDecoder/CharsetEncoder implementation a bit more.

This removes the duplicated error-checking in the ICU classes that started
this investigation, but also cleans up a bunch of other stuff. There shouldn't
be any other behavioral differences, just clearer code.

Bug: 3418769
Change-Id: I4da4d2a5b2fce1b152e527909b7c76a6db76c5c0
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
26ce8fbd8fe488cc969b08f64c56525662763dc4 08-Feb-2011 Jesse Wilson <jessewilson@google.com> resolved conflicts for merge of 6186821c to dalvik-dev

Change-Id: Ic6f0172767d6feedb188d3a5e7488a67702ef8c4
b0dd42c2b44ef61f116a7eea0e13237f55e07c9f 08-Feb-2011 Jesse Wilson <jessewilson@google.com> am e5720bcc: Avoid name collision in libcore.base vs android.util.LruCache.

* commit 'e5720bcc0ac6587d152f2e8525eb2fc35c46bb0c':
Avoid name collision in libcore.base vs android.util.LruCache.
6186821cb13f4ac7ff50950c813394367e021eae 08-Feb-2011 Jesse Wilson <jessewilson@google.com> Move libcore.base classes to libcore.util and libcore.io.

Change-Id: I2340a9dbad3561fa681a8ab47d4f406e72c913e3
eans/PropertyChangeSupport.java
o/DataInputStream.java
o/FilePermission.java
o/InputStream.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/RandomAccessFile.java
ang/AbstractStringBuilder.java
ang/ClassMembers.java
ang/String.java
ang/ThreadGroup.java
ang/Void.java
ang/reflect/Constructor.java
ang/reflect/Method.java
et/HttpCookie.java
et/Inet6Address.java
et/NetworkInterface.java
et/URLStreamHandler.java
io/DatagramChannelImpl.java
io/SelectorImpl.java
ecurity/Identity.java
ecurity/cert/X509CertSelector.java
ext/ChoiceFormat.java
ext/MessageFormat.java
til/ArrayList.java
til/HashMap.java
til/TreeMap.java
til/concurrent/CopyOnWriteArrayList.java
til/concurrent/SynchronousQueue.java
til/jar/JarFile.java
til/jar/Manifest.java
til/logging/Level.java
til/prefs/AbstractPreferences.java
til/prefs/XMLParser.java
til/zip/CheckedInputStream.java
til/zip/Deflater.java
til/zip/DeflaterInputStream.java
til/zip/InflaterInputStream.java
til/zip/ZipEntry.java
til/zip/ZipInputStream.java
e5720bcc0ac6587d152f2e8525eb2fc35c46bb0c 07-Feb-2011 Jesse Wilson <jessewilson@google.com> Avoid name collision in libcore.base vs android.util.LruCache.

The libcore LRU cache is only for our internal use and can be
minimal; the android.util LRU is public API.

Change-Id: Icff4b20627fe93bf82e940d6d9a43b711c34349f
http://b/3184897
ang/ClassMembers.java
b4c0d265e13c0eff12ce7c61ff5cb848e89e3bc4 07-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Avoid file locks in java.util.prefs." into dalvik-dev
dd220429d44e23aa397694c9c8d64d4ba16437c4 07-Feb-2011 Jesse Wilson <jessewilson@google.com> Avoid file locks in java.util.prefs.

File locks were causing tests to hang when run in parallel. I've filed a
separate bug to investigate that. http://b/3430640

Change-Id: I44c46957c0ffb624acdb3fd8ba156e02cbc7798b
til/prefs/FilePreferencesImpl.java
til/prefs/XMLParser.java
28eb98ecd43c27702e85b0561e040e2da10320a6 05-Feb-2011 Elliott Hughes <enh@google.com> Fix serialization of DecimalFormatSymbols.

Missing 'final' on the serialPersistentFields declaration meant we were
falling back to reflection, and 'exponential' isn't actually a field.

I've checked all the other serialPersistentFields fields, and put them
in a canonical form. There were no other errors.

I'll do two other related changes: I'll replace confusing use of Character.TYPE
with char.class (and so forth), and I'll backport the active ingredient from
this change so it's fixed in honeycomb-mr1.

Bug: http://code.google.com/p/android/issues/detail?id=14495
Change-Id: I954da649ad597450bee54957dc0e3d3aa9d151dd
eans/PropertyChangeSupport.java
o/EmulatedFields.java
ang/StringBuffer.java
et/Inet6Address.java
et/InetAddress.java
ecurity/AllPermissionCollection.java
ecurity/BasicPermissionCollection.java
ecurity/Permissions.java
ecurity/UnresolvedPermissionCollection.java
ecurity/cert/CertPath.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/MessageFormat.java
ext/NumberFormat.java
ext/SimpleDateFormat.java
til/Calendar.java
til/HashMap.java
til/Hashtable.java
til/Locale.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/SimpleTimeZone.java
f938abcc05c2de327e46b0e27e6b4896cc0cd845 04-Feb-2011 Jesse Wilson <jessewilson@google.com> am adf31bd1: Merge "Permit cache elements to have non-symmetric sizes."

* commit 'adf31bd1326e32ba299fddc531672a4dd6c73448':
Permit cache elements to have non-symmetric sizes.
b3f2b1082275ed9f95153a077a45bafde6c2a55c 03-Feb-2011 Jesse Wilson <jessewilson@google.com> Permit cache elements to have non-symmetric sizes.

Change-Id: I2545ffb00130baab5b03b39bad972e08dbeb04b5
http://b/3184897
til/LinkedHashMap.java
dbf863488607fbb16a3d28c09f772d9581bd64ad 02-Feb-2011 Elliott Hughes <enh@google.com> Bring CharsetDecoderICU more in line with CharsetEncoderICU.

There's no need for separate 'flush' native code here either.

I've also explicitly set inEnd to 0 in CharsetEncoderICU which was
an oversight before; I've added a failing test. (Existing
tests for CharsetDecoder failed without the corresponding line.)

I've also made a comment in InputStreamReader match the equivalent comment
in OutputStreamWriter.

I'll make more invasive changes (looking at the INPUT_HELD stuff) when I've
written some tests for CharsetDecoder.

Change-Id: I39a3b2c017da1f991bdff33ebc8c226fc56841ba
o/InputStreamReader.java
aee004a114565d7b1f3464507ec26829b8230d98 01-Feb-2011 Elliott Hughes <enh@google.com> Merge "Improve CharsetEncoder to handle surrogates gracefully." into dalvik-dev
33604713c5c70f9e6cad61dee6eb628db666bb22 01-Feb-2011 Elliott Hughes <enh@google.com> Improve CharsetEncoder to handle surrogates gracefully.

Behave like ICU rather than the RI, and transparently handle surrogate pairs
split across buffers. This fixes callers who were unaware of the bad design,
and shouldn't harm those callers who try to work around it (since they'll
never find themselves in the bad state).

Bug: 3408061
Change-Id: I6b5675196a14b15efdaa7084a82a483d8d2c47ad
o/OutputStreamWriter.java
705349bd8b0d649b28a587c9ecb18d39012fa4e2 01-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Don't do DNS lookups in URL.equals()" into dalvik-dev
7e00db4156e50ce5f20fefb820dca339299134d3 30-Jan-2011 Jesse Wilson <jessewilson@google.com> Don't do DNS lookups in URL.equals()

Change-Id: Iea9becdb3a16eab054f9073719c77c2215ce0208
http://b/3045867
et/URL.java
et/URLStreamHandler.java
555453327f26f4c9c610caa2851c87c3794c7764 31-Jan-2011 Elliott Hughes <enh@google.com> Tidying of OutputStreamWriter and a couple of related tests.

Change-Id: I591f573cd1e57f7bce8f47db29c8838896fa8b0b
o/OutputStreamWriter.java
a3c20957501930e222d2e1c4dec1c9099cc88f07 31-Jan-2011 Elliott Hughes <enh@google.com> Merge "Fix OutputStreamWriter's handling of surrogates." into dalvik-dev
3bdd9bb460941429ab11dfa13596768f3dc246ad 31-Jan-2011 Elliott Hughes <enh@google.com> Fix OutputStreamWriter's handling of surrogates.

CharsetEncoder doesn't behave how you'd expect. It doesn't track surrogate
pairs across calls to encode. This is true of the RI, too, not just our
ICU-based implementation. (I've included new CharsetEncoder tests to
demonstrate this. They don't all pass on Android, because we don't behave
exactly the same, but we're the same as far as is relevant for this
OutputStreamWriter bug.)

I've added new OutputStreamWriter tests too, that test the actual behavior
beyond the trivial "do we throw IllegalStateException?" tests harmony
had. Their fix for this bug didn't fix the real problem, but this patch
fixes both of the failures I found.

I think there's probably another one (marked with a TODO), but I haven't
been able to write a test to provoke it yet, and I'm unwilling to add code
I can't test.

I've also changed the behavior of OutputStreamWriter.write so that we don't
flush the underlying stream. This was a bug: only OutputStreamWriter.flush
should flush the underlying stream (as opposed to "flush" in the sense of
writing bytes from OutputStreamWriter's buffer into the underlying stream).
I've confirmed the truth of this assertion with another test.

Bug: 3403615
Change-Id: I567d49403b5498f4fb0a70fa3bfde0bd02ef430e
o/InputStreamReader.java
o/OutputStreamWriter.java
9a4a53771e642f1f323bfa5e6d9f5aa07cdd0852 30-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge commit 'e2b2e81f' into manualmerge

Conflicts:
luni/src/main/java/java/lang/Class.java
luni/src/main/java/java/lang/Enum.java

Change-Id: I191a233776965d4eb6c8c8ec67ec3596f8ddd57f
de591ee02f7615c7e5faa6c933dc08ac65055b61 28-Jan-2011 Jesse Wilson <jessewilson@google.com> Use an LRU to cache reflection objects in Class.

Change-Id: I275f5cf25c8ecc9f16555df56715ea75bc802574
http://b/3184897
ang/Class.java
ang/ClassCache.java
ang/ClassMembers.java
ang/Enum.java
ang/LangAccessImpl.java
b82e44da4ffb20b56cafa67c0d443fa9a9b8ddda 29-Jan-2011 Elliott Hughes <enh@google.com> Remove a useless layer of indirection.

Bug: 3400687

Change-Id: Ib7e9c576f5a5d4af35759e1bb939a3ff8ddcc812
ang/ThreadGroup.java
bc01e68730f04cb8dbbf7f3b7da82006c2151ebf 29-Jan-2011 Elliott Hughes <enh@google.com> Fix NoArrayTest, and fix ReadOnlyDirectByteBuffer too.

This test was bogus, but fixing the test pointed out an actual bug in my
recent DirectByteBuffer change --- our DirectByteBuffers might be backed
by arrays, but that doesn't mean that a ReadOnlyDirectByteBuffer should
expose it (because it could then be modified).

Bug: 3403619
Change-Id: Ide91d42e072b5befc819e78a29dbccd0f2db9a61
io/DirectByteBuffer.java
io/ReadOnlyDirectByteBuffer.java
79353908d770eb03a7ea683da4ce683810966d58 27-Jan-2011 Elliott Hughes <enh@google.com> Fix an unclosed tag in javadoc.

Change-Id: I95b25c04c129326d2e3d64a627b39b9071243aa2
til/Random.java
750d24b13461035a89c9af8ec7555588da1cc3d0 27-Jan-2011 Elliott Hughes <enh@google.com> Better tests for Float.parseFloat/Double.parseDouble, plus some fixes.

I'm not happy with the magic 1024s, and I had hoped to have one hack to
cover both harmony bugs. But this passes all our existing tests, all
harmony's existing tests, and the new tests I wrote while looking at
the code. (The new tests all pass on the RI too.)

I've also made a few doc comments slightly less unclear.

Change-Id: Ib72fd20bb3b157c7db5a09913247eed3cc746a2e
ang/Double.java
ang/Float.java
ang/Math.java
aac3bb7b1d831147ffae3b1dad886d2c1e75ebb8 05-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Fix @see links

(Cherry-pick from gingerbread.)

Change-Id: I94b7e6d51c2fcce39dd1d3fe70f13a0f84de571a
ang/Class.java
286b8cfd4479c464ae44099027d7f8d0f986f315 06-Jan-2011 Elliott Hughes <enh@google.com> Fix libcore javadoc errors.

Random's javadoc was pretty random, and Pattern was missing some escaping
in code samples.

Also work round droiddoc bugs that were messing up Formatter and classes
that inherited documentation from Object.

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

(Cherry-pick from gingerbread.)

Change-Id: I452414aedc04c29127dd0dc3c41e6386bbff1766
ang/Object.java
til/Formatter.java
til/Random.java
til/regex/Pattern.java
30a7ff69872ad0b8de60550a740818b645ba0f29 26-Jan-2011 Elliott Hughes <enh@google.com> Apply harmony's fix for HARMONY-6594.

Fixes a harmony test.

Bug: https://issues.apache.org/jira/browse/HARMONY-6594
Change-Id: If53c5274400fa7b57a6f4a119e4158bb39ac7681
io/charset/CharsetEncoder.java
38f919c84cc2714ae2564ea1a04e2ced9c5aad04 26-Jan-2011 Elliott Hughes <enh@google.com> Our DirectByteBuffer can implement array(), arrayOffset(), and hasArray().

An interesting side-effect of moving direct buffers onto the Java heap.
Sufficiently sophisticated code can now have the best of both worlds.

Bug: 3384431
Change-Id: I741fc457277704016bc773cc2aec22e89045f839
io/DirectByteBuffer.java
io/MemoryBlock.java
d2ce8c208cabfa40e14372a9205310c2aec267c9 25-Jan-2011 Elliott Hughes <enh@google.com> Merge "Fix new File("").length to behave like the RI." into dalvik-dev
bb9a632ee90c07035a5f02dae64d430f38810cf8 25-Jan-2011 Elliott Hughes <enh@google.com> Fix new File("").length to behave like the RI.

Ugh.

Bug: 3387758
Change-Id: Ie06d0c82e12f065b1d2ea256f8fe14eac373cfa9
o/File.java
6a87a1be5421c7dffc5fce2f898ef3515f21f0f6 25-Jan-2011 Brian Carlstrom <bdc@google.com> am fedab477: am 7be1bb6d: am 0ac85ead: Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle

* commit 'fedab4777ec28cfb36274660b57c3753acb1df18':
Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle
fedab4777ec28cfb36274660b57c3753acb1df18 25-Jan-2011 Brian Carlstrom <bdc@google.com> am 7be1bb6d: am 0ac85ead: Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle

* commit '7be1bb6d2e1bc5408d0109b297125e5522680ac3':
Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle
7be1bb6d2e1bc5408d0109b297125e5522680ac3 25-Jan-2011 Brian Carlstrom <bdc@google.com> am 0ac85ead: Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle

* commit '0ac85ead96f1ba7d35f3acadd154de4ef0a8fd87':
Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle
595db69d9b219f3d2d4598b5cb57c116cd157918 25-Jan-2011 Jesse Wilson <jessewilson@google.com> Rollback an inadvertent API change to X509CertSelector.

Change-Id: I4ae0a881502c8240b952ca4bf574997b1a610b95
ecurity/cert/X509CertSelector.java
5e8b7db626a67fa45434edd228bbf7ff247aee3f 25-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Use generics in Harmony's ASN.1, X.501 and X.509." into dalvik-dev
5c27fb80ffd335aa45dc8829ba3ecbc18c01e4e8 25-Jan-2011 Jesse Wilson <jessewilson@google.com> Use generics in Harmony's ASN.1, X.501 and X.509.

This change cleans up this code and uses modern Java idioms. It should not
change the behavior.

Change-Id: Ie869ced7c9e18634409ae194aa9a2c2a5e5ca530
ecurity/cert/X509CertSelector.java
be57694064c2271ffceb96d13875e34019e73348 25-Jan-2011 Owen Lin <owenlin@google.com> resolved conflicts for merge of 21b8960a to dalvik-dev

Change-Id: Ide01710e59fc6028f4b2443afee85204815dc775
51cb5459b4515f6c0c164a26c6244d8305bd89bb 25-Jan-2011 Elliott Hughes <enh@google.com> Fix case-insensitive comparisons for dotted 'I'/dotless 'i'.

Java uses its own case-folding scheme, distinct from any of the regular ones.

Bug: 3325799
Change-Id: Id574d82a5a2e37533dbdb6d1d42d1821c56956b2
ang/String.java
0ac85ead96f1ba7d35f3acadd154de4ef0a8fd87 25-Jan-2011 Brian Carlstrom <bdc@google.com> Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle

Bug: 3086427
Change-Id: I026f80bfa5e963a8e988ecd6f91c9732a4afc70c
ecurity/security.properties
21b8960a3603018081ec3309cc54aa8d27164454 24-Jan-2011 Owen Lin <owenlin@google.com> am ae5bfd1b: am eb05c75f: Merge "Skip bytes by reading if the file is not seekable." into honeycomb

* commit 'ae5bfd1b0d665233a1e6e2b7da7d4cf872a91d8d':
Skip bytes by reading if the file is not seekable.
ae5bfd1b0d665233a1e6e2b7da7d4cf872a91d8d 24-Jan-2011 Owen Lin <owenlin@google.com> am eb05c75f: Merge "Skip bytes by reading if the file is not seekable." into honeycomb

* commit 'eb05c75f33355d9549834d843911ba836d051d52':
Skip bytes by reading if the file is not seekable.
eb05c75f33355d9549834d843911ba836d051d52 24-Jan-2011 Owen Lin <owenlin@google.com> Merge "Skip bytes by reading if the file is not seekable." into honeycomb
e4a533f2e6b22bd6183285c96d7907a97389240b 21-Jan-2011 Elliott Hughes <enh@google.com> Just give the time zone id in Calendar.toString.

Anyone who wants to know all about the TimeZone can get it and toString it
independently.

Bug: 3329355
Change-Id: Id5dfd5f6030437b8a2608e77798e2e6da2fd53f8
til/Calendar.java
4b25199bc0b7a64a6feaa60e7d5d6b0474341234 21-Jan-2011 Elliott Hughes <enh@google.com> Add an @hidden Byte.toHexString that does the right thing, and use it.

Turns out most callers don't actually give a toss about case anyway, since
they're just for debugging output.

Bug: 3371169
Change-Id: Ib8dc079be2dcbf6f2415ecb9b71d034ee71f68eb
ang/Byte.java
ang/IntegralToString.java
et/URIEncoderDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
ecurity/cert/X509CertSelector.java
0f524004b71b732c888d10eab57008bc65d8a3e0 20-Jan-2011 Owen Lin <owenlin@google.com> Skip bytes by reading if the file is not seekable.

And also add unit test for FileInputStream.skip() for a pipe.

bug: 3298498

Change-Id: Iceecdd42654700e00f15b53759a3761e1c4da943
o/FileInputStream.java
5d0cc20dcd910199ba613d912d9dad4876152930 20-Jan-2011 Jesse Wilson <jessewilson@google.com> am d63ca955: am 0e6ef4e7: am d5d70a00: Merge "Fix URL character bugs by adding yet another encoder." into honeycomb

* commit 'd63ca955dca5eaa786666e9d4d9b4e97ceb049ad':
Fix URL character bugs by adding yet another encoder.
d63ca955dca5eaa786666e9d4d9b4e97ceb049ad 20-Jan-2011 Jesse Wilson <jessewilson@google.com> am 0e6ef4e7: am d5d70a00: Merge "Fix URL character bugs by adding yet another encoder." into honeycomb

* commit '0e6ef4e70f9521ed475f6898055ac740cef2770e':
Fix URL character bugs by adding yet another encoder.
0e6ef4e70f9521ed475f6898055ac740cef2770e 20-Jan-2011 Jesse Wilson <jessewilson@google.com> am d5d70a00: Merge "Fix URL character bugs by adding yet another encoder." into honeycomb

* commit 'd5d70a003de2b5fee0c91e0b7d892bc8d9e2e18b':
Fix URL character bugs by adding yet another encoder.
d1b5e5da828434388e486a388710d21e4306dae0 20-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix URL character bugs by adding yet another encoder.

We don't have an encoder that ignores already escaped
characters.

Change-Id: I9ff080ad1745136b7d7313d78af2b0ca1785b200
http://b/3360947
et/URL.java
et/URLStreamHandler.java
03623ca4ff118c2142e1ddc7f4715b29f5019380 11-Jan-2011 Elliott Hughes <enh@google.com> Fix Double.toString.

I accidentally changed unsigned division to signed division here in gingerbread.

(Cherry-pick from gingerbread.)

Bug: 3238333
Change-Id: I50e4415dece509bd1eb6fd3292b3060446333775
ang/RealToString.java
353a72360d08f34cd38a705118f148ccf7d85340 19-Jan-2011 Elliott Hughes <enh@google.com> am b272dc3a: Better detail messages for ParseException.

* commit 'b272dc3a96c819d5709de9de11e800d87f7a42fc':
Better detail messages for ParseException.
b272dc3a96c819d5709de9de11e800d87f7a42fc 19-Jan-2011 Elliott Hughes <enh@google.com> Better detail messages for ParseException.

Change-Id: I9214ac4ac902894f998b1f943aaaa263ca9edd90
ext/Format.java
ext/NumberFormat.java
ext/ParseException.java
14dac110fbb3aa5c026f8e51f5820319130f9971 16-Jan-2011 Elliott Hughes <enh@google.com> am 17751239: Merge "Minor tidying of SimpleDateFormat."

* commit '177512391392a1b67d0134ba8fd2a5f115e06430':
Minor tidying of SimpleDateFormat.
177512391392a1b67d0134ba8fd2a5f115e06430 16-Jan-2011 Elliott Hughes <enh@google.com> Merge "Minor tidying of SimpleDateFormat."
f06d4ed7cfa7ffe4cbdbaa0bc7a9c38bad41c84b 16-Jan-2011 Elliott Hughes <enh@google.com> Minor tidying of SimpleDateFormat.

I'm going to submit my fix for this bug to dalvik-dev, but there's no reason
a bit of preparatory cleanup can't go in master...

Bug: http://code.google.com/p/android/issues/detail?id=13420
Change-Id: Ibdc0d2e9239e482f4347a068d44d68af7a88fdd2
ext/SimpleDateFormat.java
9c63d8ea5b107c32f947d49242f41b049f227629 14-Jan-2011 Elliott Hughes <enh@google.com> Use the faster code for Integer.numberOfTrailingZeros.

(Confirmed by Caliper.)

Change-Id: I60140a784a4929f5bbe7ae3aae8054528c96af2a
ang/Integer.java
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
til/BitSet.java
07f5a667bf722eac567e426314695800677191e3 14-Jan-2011 Elliott Hughes <enh@google.com> Remove an incorrect comment.

Caliper says the current code performs best, on all combinations of VM and
hardware.

Change-Id: I8bd5f4ada45777137f78955b27f6d3d2d495cd4f
ang/Long.java
8a21f0fa473afc68562c43e53e852b89b1a29e99 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 544ebf58: am 9b0f9143: am 3827f581: Merge "Don\'t infinite loop in Field.toString()" into honeycomb

* commit '544ebf584b8479a1ac88e59b4adb0dec72bd6779':
Don't infinite loop in Field.toString()
544ebf584b8479a1ac88e59b4adb0dec72bd6779 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 9b0f9143: am 3827f581: Merge "Don\'t infinite loop in Field.toString()" into honeycomb

* commit '9b0f9143166250b4361d0f7556f725c49bdb3060':
Don't infinite loop in Field.toString()
9b0f9143166250b4361d0f7556f725c49bdb3060 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 3827f581: Merge "Don\'t infinite loop in Field.toString()" into honeycomb

* commit '3827f58177a5f6db86c015a8a1e5a5b72104a3fc':
Don't infinite loop in Field.toString()
3827f58177a5f6db86c015a8a1e5a5b72104a3fc 14-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Don't infinite loop in Field.toString()" into honeycomb
c1b72670a94bd70066706b6f0a0851867075b2d3 14-Jan-2011 Elliott Hughes <enh@google.com> Merge "Remove useless android-changed comments." into dalvik-dev
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
o/BufferedInputStream.java
o/BufferedReader.java
o/ByteArrayInputStream.java
o/CharArrayWriter.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FilterOutputStream.java
o/FilterWriter.java
o/InputStream.java
o/InputStreamReader.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamField.java
o/OutputStream.java
o/PipedOutputStream.java
o/PrintWriter.java
o/Reader.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/Character.java
ang/Class.java
ang/ClassLoader.java
ang/InheritableThreadLocal.java
ang/Runtime.java
ang/SecurityManager.java
ang/StackTraceElement.java
ang/String.java
ang/ref/ReferenceQueue.java
ang/reflect/Field.java
ang/reflect/Proxy.java
ath/BigDecimal.java
ath/BigInteger.java
ath/MathContext.java
ath/Multiplication.java
ath/Primality.java
io/FileChannelImpl.java
io/IntBuffer.java
io/LongBuffer.java
io/SocketChannelImpl.java
ecurity/AccessControlContext.java
ecurity/KeyStore.java
ecurity/Provider.java
ecurity/cert/CertPath.java
ecurity/cert/PKIXCertPathChecker.java
ecurity/cert/PKIXCertPathValidatorResult.java
ecurity/cert/PKIXParameters.java
ecurity/cert/X509CertSelector.java
ql/DriverManager.java
ext/AttributedString.java
ext/BreakIterator.java
ext/Collator.java
ext/DecimalFormat.java
ext/Format.java
ext/MessageFormat.java
ext/NumberFormat.java
ext/StringCharacterIterator.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collections.java
til/Date.java
til/EnumMap.java
til/EnumSet.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/LinkedHashMap.java
til/LinkedList.java
til/MapEntry.java
til/MiniEnumSet.java
til/Scanner.java
til/SimpleTimeZone.java
til/TreeSet.java
til/Vector.java
til/jar/Attributes.java
til/logging/Level.java
til/logging/LogManager.java
til/logging/LogRecord.java
til/logging/Logger.java
til/prefs/XMLParser.java
til/regex/PatternSyntaxException.java
til/zip/Inflater.java
til/zip/InflaterInputStream.java
til/zip/ZipFile.java
til/zip/ZipOutputStream.java
b4c181862d00d9daf29daec3befe5837d3de7690 14-Jan-2011 Jesse Wilson <jessewilson@google.com> Don't infinite loop in Field.toString()

Change-Id: Iefa5bff3ca386359ebc370a736c9942f4d010032
http://b/3351428
ang/reflect/AccessibleObject.java
3e16a1a4bc2e092cda4de2977157cff082682fd7 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 1c3170be: am 2d6d9bc3: am 65275e82: Merge "Fix HTTP cookie to do case mapping with Locale.US." into honeycomb

* commit '1c3170be4e2ec3b895027c848e6429062bb7c74d':
Fix HTTP cookie to do case mapping with Locale.US.
1c3170be4e2ec3b895027c848e6429062bb7c74d 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 2d6d9bc3: am 65275e82: Merge "Fix HTTP cookie to do case mapping with Locale.US." into honeycomb

* commit '2d6d9bc3752d52b93f55a6f7c9a52c7dd5cd7f0a':
Fix HTTP cookie to do case mapping with Locale.US.
2d6d9bc3752d52b93f55a6f7c9a52c7dd5cd7f0a 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 65275e82: Merge "Fix HTTP cookie to do case mapping with Locale.US." into honeycomb

* commit '65275e82cd8c877145376dd429a5e31f598e81a2':
Fix HTTP cookie to do case mapping with Locale.US.
f162edaa335461474b020027bb2e85eb3be2c179 14-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix HTTP cookie to do case mapping with Locale.US.

While I'm here fix a MockWebServer bug I recently introduced
that broke cookie tests that needed to know port numbers before
responses were enqueued.

Change-Id: Idb2389ac5ed66656248c10aeb68209641acc0a68
http://b/3325637
et/HttpCookie.java
2feeee4119506ed1511942f80fc2f7eb431afab7 13-Jan-2011 Elliott Hughes <enh@google.com> Remove non-API uses of Vector.

Change-Id: I27902950af0349619f4cb826d41db8926df0d34a
ql/DriverManager.java
ext/MessageFormat.java
ext/SimpleDateFormat.java
til/NoSuchElementException.java
til/Timer.java
til/jar/JarVerifier.java
til/zip/ZipOutputStream.java
118abc3050371812703e4fabf03f4399d01fb28c 13-Jan-2011 Elliott Hughes <enh@google.com> Kill most users of StringTokenizer.

I've left a handful that actually make some use of it, in classes we
don't care about anyway (XML preferences and the like).

Change-Id: I754262ee600d8a16046b537a6d6258db849db89b
et/URI.java
et/URL.java
et/URLConnection.java
til/StringTokenizer.java
78e3320540c8bdcbefba5ae1222ee18f6679ab33 13-Jan-2011 Elliott Hughes <enh@google.com> Most callers of toLowerCase/toUpperCase should pass Locale.US to avoid problems in Turkey.

Some callers should be replaced with equalsIgnoreCase instead.

The one exception is StreamTokenizer, where the RI uses the default
locale, which is arguably the right thing to do. No-one cares because
that's legacy API, but I've added a test anyway.

I've left HttpCookie and GeneralName for my co-conspirators because the
appropriate resolutions aren't as obvious there...

Bug: 3325637
Change-Id: Ia37a1caaa91b11763ae43e61e445adb45c30f793
o/FilePermission.java
o/StreamTokenizer.java
ang/Class.java
et/DefaultFileNameMap.java
et/SocketPermission.java
et/URI.java
et/URLClassLoader.java
et/URLConnection.java
til/Date.java
6d3ada10746bf4718b84963934630eb3506d8d7a 13-Jan-2011 repo sync <enh@google.com> am 3dad2dc5: am f74c8a0e: resolved conflicts for merge of 4f7abf2a to honeycomb-plus-aosp

* commit '3dad2dc5dc3b134eb05e61f66754f4d796d07a79':
Fix Double.toString.
3dad2dc5dc3b134eb05e61f66754f4d796d07a79 13-Jan-2011 repo sync <enh@google.com> am f74c8a0e: resolved conflicts for merge of 4f7abf2a to honeycomb-plus-aosp

* commit 'f74c8a0e66b6869d3b3bb4a30bf2f089e350980e':
Fix Double.toString.
f74c8a0e66b6869d3b3bb4a30bf2f089e350980e 13-Jan-2011 repo sync <enh@google.com> resolved conflicts for merge of 4f7abf2a to honeycomb-plus-aosp

Change-Id: Ieaf43d93b158ab143601b874c872570c3c3fe98b
500a8d5a4d29bc53fdea21ca022f6b360672f35d 13-Jan-2011 Elliott Hughes <enh@google.com> am 5dd36eac: am e91e39db: am dcd012af: Merge "Improve java.util.Locale documentation." into honeycomb

* commit '5dd36eacfe6d35174cbbaf3da4296c73fc2a776f':
Improve java.util.Locale documentation.
5dd36eacfe6d35174cbbaf3da4296c73fc2a776f 13-Jan-2011 Elliott Hughes <enh@google.com> am e91e39db: am dcd012af: Merge "Improve java.util.Locale documentation." into honeycomb

* commit 'e91e39dbeed2cfd9dfec1ebf7caf11d90856669a':
Improve java.util.Locale documentation.
e91e39dbeed2cfd9dfec1ebf7caf11d90856669a 13-Jan-2011 Elliott Hughes <enh@google.com> am dcd012af: Merge "Improve java.util.Locale documentation." into honeycomb

* commit 'dcd012af04d58a1dc5cb5e9d23f424035617ab58':
Improve java.util.Locale documentation.
dcd012af04d58a1dc5cb5e9d23f424035617ab58 13-Jan-2011 Elliott Hughes <enh@google.com> Merge "Improve java.util.Locale documentation." into honeycomb
618afdc12b918bd128aec6cf610a54dd4d0bacbb 13-Jan-2011 Jesse Wilson <jessewilson@google.com> am 8b652b16: am 600f780e: am a8b58362: Merge "Fix bugs in toString() in reflection classes." into honeycomb

* commit '8b652b16465e8d3e9afa681d2999febfe10a84b6':
Fix bugs in toString() in reflection classes.
8b652b16465e8d3e9afa681d2999febfe10a84b6 13-Jan-2011 Jesse Wilson <jessewilson@google.com> am 600f780e: am a8b58362: Merge "Fix bugs in toString() in reflection classes." into honeycomb

* commit '600f780e27510687d5935e0b62759f1bfdc1b8e8':
Fix bugs in toString() in reflection classes.
28fe896e582d9ab920571dad758fcdb1f80cf47f 13-Jan-2011 Elliott Hughes <enh@google.com> Improve java.util.Locale documentation.

The key change here is adding "honeycomb" to the table. The other
changes are just targets of opportunity.

I've also raised doclava bugs, because this page still looks awful
after doclava's mangled it. (javadoc does a better job.)

Change-Id: I5a8a9e7b2df8ec792f4d191729f8d30b8306cd6e
til/Locale.java
600f780e27510687d5935e0b62759f1bfdc1b8e8 13-Jan-2011 Jesse Wilson <jessewilson@google.com> am a8b58362: Merge "Fix bugs in toString() in reflection classes." into honeycomb

* commit 'a8b58362c8ee5aaca620854935a60b033b0733a1':
Fix bugs in toString() in reflection classes.
7281ea4092279f3091ffa3be91a4c66c3b63e080 13-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix bugs in toString() in reflection classes.

Change-Id: Iceba152e1825eb859b23f9eb7463c4ed2e32bac9
http://b/3073292
ang/reflect/AccessibleObject.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
ang/reflect/WildcardType.java
0562f944688e3721ee421303446a819ae36c09da 12-Jan-2011 Brian Carlstrom <bdc@google.com> Merge remote branch 'goog/dalvik-dev' into gingerbread-release-to-dalvik-dev
a5bbd9d9be7d2f234ab91ee82085a580e7055f5c 12-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 68095f6a: am 6ead9d74: am 6e35a860: Merge "Fix @see links" into gingerbread

* commit '68095f6a01a2e252413aac649d56cf6dc3c62409':
Fix @see links
68095f6a01a2e252413aac649d56cf6dc3c62409 12-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 6ead9d74: am 6e35a860: Merge "Fix @see links" into gingerbread

* commit '6ead9d748abcf4e7a0b3359ffac24bad8168f284':
Fix @see links
322f5c718531c4c4b80e6d57d1205e0668d1e2a0 12-Jan-2011 Brian Carlstrom <bdc@google.com> Merge commit '6e35a8607a94411fa1b9c92d2b5a5db40a49895b' into gingerbread-release-to-dalvik-dev

Conflicts:
luni/src/main/java/java/lang/Class.java

Change-Id: I0ff29f1697c5ff538f916f79ed65e2d22dde85a8
0d4ce4227fa818288b8db762b640dfa21e3162f5 12-Jan-2011 Elliott Hughes <enh@google.com> Change all "final static"s to "static final".

Just so we sound like native speakers.

Change-Id: I4d98ec7519af8c1578609945ca9d480484b82874
ang/StrictMath.java
ang/Thread.java
ath/MathContext.java
et/HttpURLConnection.java
ecurity/AllPermissionCollection.java
ecurity/Permissions.java
ext/DateFormat.java
ext/NumberFormat.java
til/logging/Logger.java
til/zip/GZIPInputStream.java
30ae871abe462723f78b2981178a9d5a73f5e129 11-Jan-2011 Elliott Hughes <enh@google.com> Fix Double.toString.

I accidentally changed unsigned division to signed division here in gingerbread.

Bug: 3238333
Change-Id: I72cb80adbfc12082a222310929c90f8740b568da
ang/RealToString.java
ffb5c638cb2b11a715b823550c5c28fcf54a52d2 11-Jan-2011 Elliott Hughes <enh@google.com> am 5c055cff: am e7c5643e: am a9c6c901: Documentation improvements for socket options.

* commit '5c055cfff341707ea5e5e9064580cfa7a15d480f':
Documentation improvements for socket options.
5c055cfff341707ea5e5e9064580cfa7a15d480f 11-Jan-2011 Elliott Hughes <enh@google.com> am e7c5643e: am a9c6c901: Documentation improvements for socket options.

* commit 'e7c5643e249a2f7513720c391999dac08737c109':
Documentation improvements for socket options.
e7c5643e249a2f7513720c391999dac08737c109 11-Jan-2011 Elliott Hughes <enh@google.com> am a9c6c901: Documentation improvements for socket options.

* commit 'a9c6c9013b08934867f71b69a90efce0c1b66918':
Documentation improvements for socket options.
b2097e76ab184a863838017ac442b744e7bf7c23 11-Jan-2011 Elliott Hughes <enh@google.com> am 66d9e787: am cbe26f42: am c8dde40c: Merge "Get memory for direct byte buffers from the Java heap rather than the native heap." into honeycomb

* commit '66d9e787af999d3c6b26cfd46e10e0750a5f3e6e':
Get memory for direct byte buffers from the Java heap rather than the native heap.
66d9e787af999d3c6b26cfd46e10e0750a5f3e6e 11-Jan-2011 Elliott Hughes <enh@google.com> am cbe26f42: am c8dde40c: Merge "Get memory for direct byte buffers from the Java heap rather than the native heap." into honeycomb

* commit 'cbe26f42f5b57db71402fbb1955898d3ab79e350':
Get memory for direct byte buffers from the Java heap rather than the native heap.
a9c6c9013b08934867f71b69a90efce0c1b66918 11-Jan-2011 Elliott Hughes <enh@google.com> Documentation improvements for socket options.

Bug: http://code.google.com/p/android/issues/detail?id=13898
Change-Id: I202a5404e7e828f074483a3f6365b4e3a941da7d
et/DatagramSocket.java
et/InetAddress.java
et/MulticastSocket.java
et/NetworkInterface.java
et/ServerSocket.java
et/Socket.java
et/SocketOptions.java
et/SocketPermission.java
cbe26f42f5b57db71402fbb1955898d3ab79e350 11-Jan-2011 Elliott Hughes <enh@google.com> am c8dde40c: Merge "Get memory for direct byte buffers from the Java heap rather than the native heap." into honeycomb

* commit 'c8dde40c3c62ceb79fc0b62f445d9a539fd470d3':
Get memory for direct byte buffers from the Java heap rather than the native heap.
3676bd288bce270a51b1c51f1052b76e83e71412 11-Jan-2011 Elliott Hughes <enh@google.com> Get memory for direct byte buffers from the Java heap rather than the native heap.

Since the removal of tracked external allocations, there's been no accounting
of direct byte buffers. This fixes that, and moves us to a much simpler
situation where the GC is responsible for this memory too. It also means that
we don't need finalizers: now only memory-mapped blocks need finalizers (to call
munmap(3)).

Change-Id: I6b43f74074e496eeb2a36b620af19e4926ceb8cf
io/MemoryBlock.java
6e35a8607a94411fa1b9c92d2b5a5db40a49895b 10-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Merge "Fix @see links" into gingerbread
01b4a53b856a0f988cfc40608b26774aaa5da7de 08-Jan-2011 Elliott Hughes <enh@google.com> am 19779a98: am ce54529e: am 2532ef97: am 1c76910f: Fix libcore javadoc errors.

* commit '19779a982a2da5b928c54785b87815f829312635':
Fix libcore javadoc errors.
19779a982a2da5b928c54785b87815f829312635 08-Jan-2011 Elliott Hughes <enh@google.com> am ce54529e: am 2532ef97: am 1c76910f: Fix libcore javadoc errors.

* commit 'ce54529ec7b3b9bc278e4f97f23723680a220ace':
Fix libcore javadoc errors.
ce54529ec7b3b9bc278e4f97f23723680a220ace 08-Jan-2011 Elliott Hughes <enh@google.com> am 2532ef97: am 1c76910f: Fix libcore javadoc errors.

* commit '2532ef971058b37372bc388d8d8c8bd5eed7ecf6':
Fix libcore javadoc errors.
2f2001f2f769c710ce7ee63412d3e2580388bf4d 07-Jan-2011 Elliott Hughes <enh@google.com> Remove redundant "throws SecurityException" clauses.

These were unchecked exceptions anyway, and now they can't even be thrown.

Bug: 2585285
Change-Id: Ifc8048262fe4b1699924241944beaa6a5bf09e0a
o/ObjectInputStream.java
o/ObjectOutputStream.java
ang/Class.java
ang/reflect/AccessibleObject.java
til/logging/Handler.java
til/logging/StreamHandler.java
1c4b8eb0aebfe7f99c10fb1d01716946e8e74ad7 07-Jan-2011 Elliott Hughes <enh@google.com> Remove @SuppressWarnings("nls") cruft.

Also rewrite a couple of toString methods for clarity.

Change-Id: Ic6e8c474ef87e0c0550eea2daed611ae41118229
o/File.java
ang/reflect/Modifier.java
et/SocketImpl.java
et/SocketPermission.java
et/URLConnection.java
io/channels/FileLock.java
ecurity/Identity.java
ecurity/KeyFactory.java
ecurity/Provider.java
ext/DecimalFormat.java
til/Calendar.java
til/ResourceBundle.java
til/logging/ErrorManager.java
til/logging/FileHandler.java
til/logging/Logger.java
til/logging/XMLFormatter.java
87548e8585334658c3ee89050ec917a10ca35e5a 07-Jan-2011 Elliott Hughes <enh@google.com> More SecurityManager cleanup.

Bug: 2585285
Change-Id: Ib9c5fdadc1361d67227b6f82a774b76c53840ff0
ang/Class.java
ang/ClassLoader.java
ang/SecurityManager.java
ang/reflect/AccessibleObject.java
et/Authenticator.java
et/HttpURLConnection.java
et/InetAddress.java
et/URLClassLoader.java
et/URLConnection.java
ecurity/AuthProvider.java
ecurity/SecureClassLoader.java
ecurity/Signer.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
ad41624e761bcf1af9c8008eb45187fc13983717 07-Jan-2011 Elliott Hughes <enh@google.com> Retire SecurityManager.

This change removes all the code that was calling getSecurityManager, and
removes all use of AccessController.doPrivileged. It also changes the
implementation of AccessController so it doesn't actually do anything; it's
only there for source-level compatibility.

Bug: 2585285
Change-Id: I1f0295a4f12bce0316d8073011d8593fee116f71
o/BufferedWriter.java
o/File.java
o/FileInputStream.java
o/FileOutputStream.java
o/FilePermission.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/PrintStream.java
o/PrintWriter.java
o/RandomAccessFile.java
ang/Class.java
ang/ClassLoader.java
ang/Enum.java
ang/ProcessBuilder.java
ang/ProcessManager.java
ang/Runtime.java
ang/RuntimePermission.java
ang/SecurityManager.java
ang/System.java
ang/Thread.java
ang/ThreadGroup.java
ang/reflect/AccessibleObject.java
ang/reflect/Member.java
et/AddressCache.java
et/Authenticator.java
et/CookieHandler.java
et/DatagramSocket.java
et/HttpURLConnection.java
et/InetAddress.java
et/InetSocketAddress.java
et/MulticastSocket.java
et/NetPermission.java
et/NetworkInterface.java
et/ProxySelector.java
et/ResponseCache.java
et/ServerSocket.java
et/Socket.java
et/SocketPermission.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
io/DatagramChannelImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/DatagramChannel.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/SelectorProvider.java
io/charset/Charset.java
io/charset/spi/CharsetProvider.java
ecurity/AccessControlContext.java
ecurity/AccessController.java
ecurity/BasicPermission.java
ecurity/DomainCombiner.java
ecurity/Identity.java
ecurity/IdentityScope.java
ecurity/KeyStore.java
ecurity/Permission.java
ecurity/Policy.java
ecurity/PrivilegedAction.java
ecurity/PrivilegedActionException.java
ecurity/PrivilegedExceptionAction.java
ecurity/Provider.java
ecurity/Security.java
ecurity/Signer.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/package.html
ql/DriverManager.java
til/Currency.java
til/Formatter.java
til/Locale.java
til/Properties.java
til/ResourceBundle.java
til/ServiceLoader.java
til/concurrent/ExecutorService.java
til/concurrent/ThreadPoolExecutor.java
til/jar/Pack200.java
til/logging/FileHandler.java
til/logging/Handler.java
til/logging/LogManager.java
til/logging/Logger.java
til/logging/LoggingMXBean.java
til/logging/LoggingPermission.java
til/logging/MemoryHandler.java
til/logging/SocketHandler.java
til/logging/StreamHandler.java
til/logging/XMLFormatter.java
til/prefs/FilePreferencesImpl.java
til/prefs/Preferences.java
til/prefs/XMLParser.java
til/zip/ZipFile.java
328267d484411da5399c582d93dbabd7d4220b62 07-Jan-2011 Jesse Wilson <jessewilson@google.com> am b9f4eb77: Don\'t short-circuit Inflater.inflate() on zero-length requests.

* commit 'b9f4eb77cf7c5937fcd33d839c749900112874bd':
Don't short-circuit Inflater.inflate() on zero-length requests.
b9f4eb77cf7c5937fcd33d839c749900112874bd 07-Jan-2011 Jesse Wilson <jessewilson@google.com> Don't short-circuit Inflater.inflate() on zero-length requests.

Change-Id: I2d207ee16dd432ba4211990da21a345f81375039
http://code.google.com/p/android/issues/detail?id=11755
til/zip/Inflater.java
1c76910f0a0fb0cb761a4505f3be1204d6be012b 06-Jan-2011 Elliott Hughes <enh@google.com> Fix libcore javadoc errors.

Random's javadoc was pretty random, and Pattern was missing some escaping
in code samples.

Also work round droiddoc bugs that were messing up Formatter and classes
that inherited documentation from Object.

Bug: http://code.google.com/p/android/issues/detail?id=13264
Bug: 3318601
Change-Id: Iddb0c807398840191ee003bc1644d611aef4d61d
ang/Object.java
til/Formatter.java
til/Random.java
til/regex/Pattern.java
c1501e6dd3700540c8e4ecfa6afc3d66d804c057 06-Jan-2011 Elliott Hughes <enh@google.com> am 27c11c7c: Remove the last vestiges of the external allocation cruft.

* commit '27c11c7c7b1fc023cb6464bd551aceef300e39b6':
Remove the last vestiges of the external allocation cruft.
27c11c7c7b1fc023cb6464bd551aceef300e39b6 06-Jan-2011 Elliott Hughes <enh@google.com> Remove the last vestiges of the external allocation cruft.

"Missed a bit". The underlying code has gone (though the
interface is still there for now, backed by a do-nothing implementation).

Bug: 2604080
Change-Id: Iba64d1c193819560423285334dc08015fbc105b1
io/MemoryBlock.java
io/ReadWriteDirectByteBuffer.java
90aec9a1985a9c40e5e59bebbc22b574fbbf1e4a 05-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Fix @see links

Change-Id: I432c3e402ff6a97651959891a8581be229c4b958
ang/Class.java
f53b826963e357787e6eadc80af7f22e4302e54b 05-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Just use String for upper case/lower case operations." into dalvik-dev
a695e8fafadd2591cd148e78f19bc6d7c15121bb 05-Jan-2011 Jesse Wilson <jessewilson@google.com> Just use String for upper case/lower case operations.

Change-Id: If686975f659412c555684ed0032694e854e3aa8c
http://b/2183747
ang/String.java
et/URL.java
ecurity/Provider.java
ecurity/Security.java
til/Locale.java
til/PropertyPermission.java
til/jar/JarInputStream.java
til/jar/JarVerifier.java
b87641ec071d590794d7cebefaf0e8fd7fa92d7a 05-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix serialization in CopyOnWriteArrayList."
803e7dbaa65a62ec77596d5ebb7218a21c4cbfaf 05-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix serialization in CopyOnWriteArrayList.

Previously we were double-serializing the elements field. The behavior was
correct but the serialized data was larger than necessary.

This also addresses martinrb's other comments on the new CopyOnWriteArrayList.

Change-Id: I191e84793301e81b89718330d897bdf990c8daa6
til/concurrent/CopyOnWriteArrayList.java
19a270e90b1e992c1f6639f355ae13564c2f3a6a 22-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix PropertyChangeSupport problems.

The fire methods weren't delegating as the spec requires them to.

The serialization was absolutely broken. Serialization for this class
is completely wacky.

Handling of PropertyChangeEventProxy instances was also broken. This
fixes that also. The name of an added proxy filters the events that
are received by the listener.

http://b/2224874

Change-Id: I609f7bf65492264849b511e99b98092008c505d8
eans/PropertyChangeSupport.java
4f34d272f494d5b2d30e36556f1584fcc4471a83 16-Dec-2010 Elliott Hughes <enh@google.com> Merge "MappedByteBuffer get(byte[]) and get(byte[], int, int) weren't updating 'position'."
5a1e8cc38e1cc6c3f2fc66f039ca0fc5309a0dc3 16-Dec-2010 Elliott Hughes <enh@google.com> MappedByteBuffer get(byte[]) and get(byte[], int, int) weren't updating 'position'.

The majority of this change is work to extend our tests to cover
MappedByteBuffer too, plus new tests to check that 'position' is
always updated correctly by ByteBuffer's relative get/put methods.

Bug: 3291927
Change-Id: I58217de45ba65675730f30771fba592cb2af28ff
io/MappedByteBufferAdapter.java
e0cda69a87d2d429bae6c8e30d4d8ba44d889f25 16-Dec-2010 Jesse Wilson <jessewilson@google.com> More work arounds for the droiddoc bug where @links cannot point to parameterized methods.

This catches the fixes missing in change 85477.

Change-Id: Ib1a4f851148bd675f68e0d49c23a8e8e24633d89
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/PriorityBlockingQueue.java
e270027a8e421200a6af45f066c3a6aabe03aa30 16-Dec-2010 Elliott Hughes <enh@google.com> Fix a long-standing serialization bug.

Fixes a harmony test.

This patch touches two very similar-looking methods that are sadly just
different enough that we can't factor the duplication out until we can
rely on inlining.

Change-Id: I9c47f08911fea1472c2cb36b7cf94ab6a4e630aa
o/EmulatedFieldsForDumping.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
f24bce74a497ed281de23b7e997549725557b730 16-Dec-2010 Elliott Hughes <enh@google.com> Fix a regression I introduced in serialization.

Although the serialization specification strongly implies that there
are no gaps in the allocated handles, it's not actually true of the RI
or -- presumably for bug-compatibility reasons -- of us. Serializing
anything with a field of type Class skips a handle; our EnumMapTest
found this.

By way of apology, I've thrown in a one-line fix for a long-standing
bug (no support for void).

Change-Id: I6104f8cb8e5a1476448ad65669e54f191c1a60e3
o/ObjectInputStream.java
o/ObjectOutputStream.java
0d0d74323f72410d0ddc95b632c2b2fa7373ada5 16-Dec-2010 Jesse Wilson <jessewilson@google.com> Merge "Work around droiddoc bug where @links cannot point to parameterized methods."
204a5af3784bc9a69c4ffa0b412dd751af61ca7f 16-Dec-2010 Jesse Wilson <jessewilson@google.com> Work around droiddoc bug where @links cannot point to parameterized methods.

The work around is simple but unfortunate: omit the parameters. As a
consequence, some of the links will point to the wrong overload.

Change-Id: Ib0bfb82bf8fdef79e3532012b91128f680c01b6c
til/concurrent/BlockingDeque.java
til/concurrent/LinkedBlockingDeque.java
d7806194431c008c2ae2b546b988c0e819f7b47b 16-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix java.util.concurrent to not @link to unpublished APIs.

Change-Id: I14ae9dfcf8073a86165d779fefe245c4f7fcf4e5
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
4edaaab4e1a2da9049f16d8d81b9214d589e9091 16-Dec-2010 Jesse Wilson <jessewilson@google.com> Merge "Update java.util.concurrent to the latest."
bb69cfb6798356699e34ab4fbac23938ad0fdeef 15-Dec-2010 Jesse Wilson <jessewilson@google.com> Merge "Recover from the 'null' system class loader gracefully."
59e38eb9704248b92554ce907ab7e26ddb525da2 15-Dec-2010 Elliott Hughes <enh@google.com> Use iteration rather than recursion in writeHierarchy.

There's no convincing performance difference either way in my benchmarks, but
we're using iteration in readHierarchy, and both should use the same style
unless there's a convincing reason not to.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: I857b1fa47255368ba4c5f9cc556fb9dc7f8fce6a
o/ObjectOutputStream.java
9ef23e5d7f45cf120abb0e140d657bf7c79b3721 15-Dec-2010 Jesse Wilson <jessewilson@google.com> Recover from the 'null' system class loader gracefully.

Change-Id: I879f3b2ace3e22a3add83f3e4ae7749de5394a1e
http://b/3288102
til/ResourceBundle.java
af338385e1cfb40a856bf11d8ddd682ea7602164 15-Dec-2010 Elliott Hughes <enh@google.com> Speed up serialization.

Rather than pay the boxing costs of using IdentityHashMap<Object, int>,
use our own specialization.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: I1f3dcc2f2c1c35fd8d8cd1b0572d809c27824bf0
o/ObjectOutputStream.java
o/ObjectStreamField.java
o/SerializationHandleMap.java
8eb35c835be1345d3873a82cc9e42f944d698afd 15-Dec-2010 Jesse Wilson <jessewilson@google.com> Update java.util.concurrent to the latest.

The most recent change to the upstream CVS tree was on Mon Dec 13 05:46:08 2010 UTC.

Change-Id: If863f0d501e5bb66a73e8a9a17b2853f012326e6
http://b/3090858
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Delayed.java
til/concurrent/Exchanger.java
til/concurrent/Executor.java
til/concurrent/ExecutorCompletionService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/Future.java
til/concurrent/FutureTask.java
til/concurrent/LinkedBlockingDeque.java
til/concurrent/LinkedBlockingQueue.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReferenceArray.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/package-info.java
6c9fda83af2a99ab25cf5ad0487c6d4c6f1e7cb1 15-Dec-2010 Elliott Hughes <enh@google.com> A last bit of serialization performance on the deserialization side.

There's no point converting a Class<?> to a char and then doing (effectively)
an if-else on the char when we can do it on the Class<?> directly. With this
change, the profile for deserialization is quite reasonable: mostly object
creation and ploughing through the bytes. We'll benefit from future Arrays
work, but that's for another day.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: I67aa237c4176e443f7ecdc12f0534cc2f3df5076
o/ObjectInputStream.java
08d5f1955b94e07e337c59b63a7051879fa3bbef 15-Dec-2010 Elliott Hughes <enh@google.com> More serialization performance.

Similar to caching the ObjectStreamClass hierarchy, cache the Class<?>
hierarchy.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: Idb115f2d80224ee9809461b58d0fef1abfc7ac30
o/ObjectInputStream.java
46241f2f67d7b90e20f3301861f807f330687821 14-Dec-2010 Elliott Hughes <enh@google.com> More serialization performance work.

Cache the ObjectStreamClass hierarchy. Serialization needs to traverse this
from root to leaf but we don't have links in that direction. This patch
ensures we at least only compute it once.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: Ia7e8f5cc431ddba5db72ef3cb2d24bdf8e263de2
o/ObjectInputStream.java
o/ObjectStreamClass.java
78a12feba0024bddcf229c15c108ae73f3854ada 14-Dec-2010 Elliott Hughes <enh@google.com> Merge "More serialization performance improvements."
6523532145f06d8c208ed7a9374d3ab6d8132e66 14-Dec-2010 Elliott Hughes <enh@google.com> More serialization performance improvements.

Cache more work and don't use a Map of Integers for a range of
integers that's defined to be dense, just because they don't start at 0.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: Ie73d0bb946892f86165fca78da10bbcf64322570
o/ObjectInputStream.java
o/ObjectStreamClass.java
618a6252728c65b1d4b1577b308bcc33c095325d 14-Dec-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix a couple of failing ResourceBundle tests."
2c98427a50610d4991e9b0ada6cbc7aceb194580 14-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix a couple of failing ResourceBundle tests.

We weren't clearing the cache when the default locale changed.

We were attempting to re-parse the locale string after we'd
converted it to a file extension like "_en_US". This was failing.
The new code doesn't parse the locale string. It also simplifies
("strips") the locale as a locale and not as a string.

Change-Id: I1512b105f2af1ac66e54edd82ae55630258dae31
til/ResourceBundle.java
0234a78c135aeb3f5682a16a69a19a8964dfc0c2 14-Dec-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix two {@link} problems in CopyOnWriteArrayList."
a57abd43935b5d1ee8e226ceb0c8f3c3c9da8f59 14-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix two {@link} problems in CopyOnWriteArrayList.

One @link was supposed to point to lastIndexOf; that was a typo.

DroidDoc is choking on the #indexOf(Object,int) overload; I'll drop
the method list which should make it happy.

Change-Id: I79cc3548d628ad3380b9f3d0d7c03f606a3c8801
til/concurrent/CopyOnWriteArrayList.java
32ef29bcbfdce08d58ea72bd15a12a96065bdbb6 13-Dec-2010 Elliott Hughes <enh@google.com> Make deserialization 30% faster.

Cache the constructor we need, rather than looking it up each time.

Bug: http://code.google.com/p/android/issues/detail?id=13138
Change-Id: I33f34d2e566c8a39296b7e820cab2d2c535d84e8
o/ObjectInputStream.java
o/ObjectStreamClass.java
3ce783438eccf18d0ad538d911585043b5d1b2b4 11-Dec-2010 Jesse Wilson <jessewilson@google.com> Rewrite CopyOnWriteArrayList from scratch.

The previous implementation has many structural problems motivating
this rewrite. In particular, changes to sublists behaved quite
inconsistently with the RI.

This passes the tests in the Google Collections test suite.

Change-Id: I49c4a50659ef1f35dbff4abdd596d7fda815bcfe
http://b/3270784
til/concurrent/CopyOnWriteArrayList.java
9b255360071b7e07bf5ce68010b0497ff7ce61e7 13-Dec-2010 Elliott Hughes <enh@google.com> Merge "Lots more bounds-checking/exception-throwing consistency."
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
o/BufferedInputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayWriter.java
o/FileInputStream.java
o/FileOutputStream.java
o/InputStreamReader.java
o/LineNumberReader.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/StringWriter.java
ang/AbstractStringBuilder.java
ang/Character.java
ang/StringBuffer.java
et/DatagramPacket.java
io/Buffer.java
io/ByteBuffer.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/CharToByteBufferAdapter.java
io/DatagramChannelImpl.java
io/DirectByteBuffer.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/DoubleToByteBufferAdapter.java
io/FileChannelImpl.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/IntToByteBufferAdapter.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/LongToByteBufferAdapter.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyFileChannel.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
io/ShortToByteBufferAdapter.java
io/SocketChannelImpl.java
io/WriteOnlyFileChannel.java
til/Arrays.java
til/BitSet.java
til/zip/DeflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/ZipOutputStream.java
36c57efebc58bc840d4ce8946b56b8a29e8884b5 11-Dec-2010 Stan Chesnutt <chesnutt@google.com> Export ANY and ALL as constant InetAddress objects for use by framework
classes. ALL is newly-created in this CL.

Change-Id: I7e896a8d0ce7d897643bb2b878981e8c90760419
et/Inet4Address.java
1294cc5f777bce3fbc88e65d8c67cdf9b8d433c1 10-Dec-2010 Stan Chesnutt <chesnutt@google.com> DatagramSocket.setNetworkInterface() allows a socket to be bound to a
network interface using the SO_BINDTODEVICE socket option.

Change-Id: I9598981f0d8f633de0b591db858960b1fea2e4e8
et/DatagramSocket.java
et/SocketOptions.java
77c63119661ac0aa3bda02a94e5f4a10de145d8a 10-Dec-2010 Jesse Wilson <jessewilson@google.com> am b51a2385: am fcd6cf98: Fix various issues in CopyOnWriteArrayList discovered by Google Collections\' test suite:

* commit 'b51a23852b6e974fc0029e0fbb7c74e333dcfeaa':
Fix various issues in CopyOnWriteArrayList discovered by Google Collections' test suite:
fcd6cf989712aabe2826655df490d73e2240fb21 10-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix various issues in CopyOnWriteArrayList discovered by Google Collections' test suite:

Fixed CopyOnWriteArrayList problems:
- addAll() doesn't return true if the collection is empty
- clear() fails on an empty list
- containsAll() doesn't return true if the collection is empty
- subList() fails on an empty range
- subList() doesn't implement equals(), hashCode() or toString()

Fixed CopyOnWriteArraySet problems:
- addAll() adds duplicates if the added collection contains duplicates
- equals() throws NullPointerException if this is empty

The following issues aren't fixed:
- the iterator throws UnsupportedOperationException when it should throw
IllegalStateException
- sublists don't reflect non-structural changes in the underlying list

http://b/3270784
Change-Id: I8c174e4ceda1ff964e2ad8224fa7338dac552288
til/concurrent/CopyOnWriteArrayList.java
9ae5315ae9d993fc099e98d25f42a42e6be80ee0 09-Dec-2010 Elliott Hughes <enh@google.com> am b46dab34: Rewrite all backwards comparisons.

* commit 'b46dab348e2007bc08abaf7ecae34d89a2474e50':
Rewrite all backwards comparisons.
b46dab348e2007bc08abaf7ecae34d89a2474e50 09-Dec-2010 Elliott Hughes <enh@google.com> Rewrite all backwards comparisons.

Strictly, all the ones I could find. This is everything with 0 or null on the
left-hand side.

Note that this touches several incorrect bounds checks, which I haven't fixed:
I'm going to come back and finish that independent cleanup separately.

Change-Id: Ibdb054b53df9aace47c7d2a00ff19122190053e8
o/CharArrayWriter.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/PrintStream.java
o/PrintWriter.java
o/Reader.java
o/StreamTokenizer.java
o/StringWriter.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/Character.java
ang/String.java
et/Authenticator.java
et/CookieHandler.java
et/DatagramPacket.java
et/DatagramSocket.java
et/Inet6Address.java
et/InetAddress.java
et/JarURLConnection.java
et/MulticastSocket.java
et/Proxy.java
et/Socket.java
et/SocketOptions.java
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/ReadOnlyFileChannel.java
io/SelectorImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/WriteOnlyFileChannel.java
io/channels/SocketChannel.java
io/channels/spi/AbstractSelectableChannel.java
io/channels/spi/SelectorProvider.java
io/charset/CharsetDecoder.java
io/charset/CoderResult.java
ecurity/KeyStore.java
ecurity/Provider.java
ql/DriverManager.java
ext/AttributedString.java
ext/DecimalFormat.java
til/AbstractList.java
til/Calendar.java
til/Collections.java
til/EnumMap.java
til/FormatFlagsConversionMismatchException.java
til/Formatter.java
til/LinkedList.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/PriorityQueue.java
til/ResourceBundle.java
til/Scanner.java
til/TreeSet.java
til/Vector.java
til/jar/JarEntry.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/logging/FileHandler.java
til/logging/Formatter.java
til/logging/Handler.java
til/logging/LogManager.java
til/logging/LogRecord.java
til/logging/MemoryHandler.java
til/logging/SimpleFormatter.java
til/logging/SocketHandler.java
til/logging/StreamHandler.java
til/logging/XMLFormatter.java
til/prefs/AbstractPreferences.java
til/prefs/FilePreferencesImpl.java
til/prefs/Preferences.java
daae09bafc06badb3c2d7e088cc216e511bcb8e4 09-Dec-2010 Elliott Hughes <enh@google.com> am ccedfac1: Merge "Fix a bunch of javac -Xlint warnings in our code."

* commit 'ccedfac1d04b7f9c4df4a144f80283f7af69a9d6':
Fix a bunch of javac -Xlint warnings in our code.
866e7ae17a3da81a02b0b144e0c9c2b3196d293a 09-Dec-2010 Elliott Hughes <enh@google.com> Fix a bunch of javac -Xlint warnings in our code.

I think "fallthrough" uncovered a couple of real bugs in the kxml code, but
other than that there's nothing very exciting here. This addresses all but
one of the non-xml warnings. I'm assuming that we'll move the xml cruft out
into external at some point (since we're deliberately not maintaining it).

Change-Id: Ice81253b019df7b19d6557e719663b7bdc11fb22
ang/Class.java
ang/reflect/AccessibleObject.java
ecurity/cert/PKIXParameters.java
ecurity/cert/X509CertSelector.java
ext/RuleBasedCollator.java
til/Properties.java
til/concurrent/atomic/AtomicReferenceArray.java
til/zip/InflaterInputStream.java
3ba7d47a9f7a745c2bb6943764617db308a38fa6 09-Dec-2010 Jesse Wilson <jessewilson@google.com> am c8104b03: Merge "Change TextAttribute constants to be consistent with the test and RI."

* commit 'c8104b0342382481704c6662af33968595ad6ab6':
Change TextAttribute constants to be consistent with the test and RI.
b35a6e9a1bb646c39a838d8cadbd12db0719b745 09-Dec-2010 Jesse Wilson <jessewilson@google.com> Change TextAttribute constants to be consistent with the test and RI.

Change-Id: I0550bb7ef4701685ef9bf87874789c3d441fc701
wt/font/TextAttribute.java
97db5b18334137e198322e5497e3e8842d21cda1 09-Dec-2010 Elliott Hughes <enh@google.com> am f21135bc: Go with Class<?> for Object.getClass after all...

* commit 'f21135bc13bc7db3a291ffa5a98255963873324a':
Go with Class<?> for Object.getClass after all...
f21135bc13bc7db3a291ffa5a98255963873324a 09-Dec-2010 Elliott Hughes <enh@google.com> Go with Class<?> for Object.getClass after all...

We'll update-api to track this non-change.

Change-Id: Ia6a0ef29d80b8dafd08fe7b29cdd69a7341d7f17
ang/Object.java
a292a6ac8be17c2bdc9af1060d7f5aa57b28107c 09-Dec-2010 Elliott Hughes <enh@google.com> am 69257cc2: Work around droiddoc lossage.

* commit '69257cc25dfdb409d311c18a130c1992eb2ce421':
Work around droiddoc lossage.
69257cc25dfdb409d311c18a130c1992eb2ce421 09-Dec-2010 Elliott Hughes <enh@google.com> Work around droiddoc lossage.

Change-Id: I571f94c9d78f6dd069290a14559391a82a38c690
ang/Object.java
25744ea2da208119434c6b938539506c670add07 09-Dec-2010 Jesse Wilson <jessewilson@google.com> am ce2da1ca: Merge "Fix an IndexOutOfBounds error found by OldBigDecimalScaleOperationsTest."

* commit 'ce2da1ca8ec9081cfc685f53f708ab1f62e79a4c':
Fix an IndexOutOfBounds error found by OldBigDecimalScaleOperationsTest.
ce2da1ca8ec9081cfc685f53f708ab1f62e79a4c 09-Dec-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix an IndexOutOfBounds error found by OldBigDecimalScaleOperationsTest."
8892d3288ea20a71608691fbc014d0c9033f4791 09-Dec-2010 Elliott Hughes <enh@google.com> am 2fc5dcd5: Apply various Intellij quick fixes to java.lang.

* commit '2fc5dcd5614f910f25d794d272834752a72e63b1':
Apply various Intellij quick fixes to java.lang.
2fc5dcd5614f910f25d794d272834752a72e63b1 09-Dec-2010 Elliott Hughes <enh@google.com> Apply various Intellij quick fixes to java.lang.

There's one real bug here: our Integer.toString was supposed to have a cache
for small negative values, but an accidentally-introduced temporary meant we
were never using the cached values. Other than that, this is just cleanup.

Change-Id: I457f9bd166c9a029ba8b439f3bbfa926f9b84cc9
ang/Byte.java
ang/CaseMapper.java
ang/Character.java
ang/Class.java
ang/ClassCache.java
ang/ClassCastException.java
ang/ClassLoader.java
ang/Compiler.java
ang/EmptyEnumeration.java
ang/Enum.java
ang/Integer.java
ang/IntegralToString.java
ang/Long.java
ang/Math.java
ang/Object.java
ang/Package.java
ang/ProcessBuilder.java
ang/ProcessManager.java
ang/RealToString.java
ang/Runtime.java
ang/StackOverflowError.java
ang/StrictMath.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/System.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/VMClassLoader.java
ang/VMThread.java
ang/Void.java
2850a53dfbd0c172aedaec3493aad572a5ec023d 09-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix an IndexOutOfBounds error found by OldBigDecimalScaleOperationsTest.

Change-Id: I60476fd07e1a985af2d9238d4f425fab84bd59b5
ath/BigDecimal.java
434c4bd65a469623136004ab930856820e7e14c9 09-Dec-2010 Elliott Hughes <enh@google.com> am 44a9f03a: Improve StringIndexOutOfBoundsException throwing.

* commit '44a9f03a2d602c7179112284d878b0db9284eb30':
Improve StringIndexOutOfBoundsException throwing.
44a9f03a2d602c7179112284d878b0db9284eb30 08-Dec-2010 Elliott Hughes <enh@google.com> Improve StringIndexOutOfBoundsException throwing.

Better, more-consistent detail messages, more regular naming, plus use of
the one true bounds-checking idiom (including reversal of sense to reduce
unnecessary indentation).

(The lack of an inlining JIT means that I couldn't factor the bounds checking
out, but at least we're working towards full duplicates rather than
near-duplicates!)

Change-Id: I59ded68169067305e747d30801c79a4c13f521b2
o/BufferedWriter.java
o/CharArrayWriter.java
o/OutputStreamWriter.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/String.java
ang/StringIndexOutOfBoundsException.java
bf28725d4e9eb3767abbbf48b8c342ff643f806a 08-Dec-2010 Elliott Hughes <enh@google.com> am 0515ea0a: Fix a flipped detail message thrown by Collections.copy.

* commit '0515ea0a581f329bce4f8174e098b653fb04979e':
Fix a flipped detail message thrown by Collections.copy.
0515ea0a581f329bce4f8174e098b653fb04979e 08-Dec-2010 Elliott Hughes <enh@google.com> Fix a flipped detail message thrown by Collections.copy.

Change-Id: I2e57959e7267607d484cfe177e5619de960ba0fb
til/Collections.java
20edd9ea27e17cbcb211ea025194161e372906fb 08-Dec-2010 Elliott Hughes <enh@google.com> Fix build (javadoc).

Change-Id: Iaa633e677035a527228d1de6f24e30fceb08965b
o/FilterReader.java
10de12115591b8fa0c3814aac8a3df7b51ffa8bb 08-Dec-2010 Elliott Hughes <enh@google.com> Slightly improved javadoc for FilterInputStream.skip.

Change-Id: I673088ef13e082657ba27dd9f1c44574ba0e4bdf
o/FilterInputStream.java
67d38e62ce505fb37b205d89485a91af7862b4ef 08-Dec-2010 Elliott Hughes <enh@google.com> Merge "Fix InflaterInputStream and ZipInputStream's skip methods' behavior with negative counts." into dalvik-dev
f9480f317cddcec859025833b748f096247a40aa 08-Dec-2010 Elliott Hughes <enh@google.com> Fix InflaterInputStream and ZipInputStream's skip methods' behavior with negative counts.

This fixes a couple of harmony tests. I've also cleaned up all the names to be
of the form <x>Count. I haven't made much of an effort to improve the
documentation because these methods aren't all identical and I don't have a
good tool for doing large-scale javadoc consolidation.

Change-Id: Ia11f78cbe7c17959d50709af03042aa7541733a0
o/BufferedInputStream.java
o/BufferedReader.java
o/ByteArrayInputStream.java
o/CharArrayReader.java
o/FilterReader.java
o/InputStream.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/ObjectInput.java
o/PushbackInputStream.java
o/PushbackReader.java
o/Reader.java
o/StringBufferInputStream.java
o/StringReader.java
til/zip/InflaterInputStream.java
til/zip/ZipFile.java
57192e68f53e80ac1effae04f23d91f4cf162eea 08-Dec-2010 Elliott Hughes <enh@google.com> Improve a comment.

Including the identifier that must not be renamed in the comment
explaining that it must not be renamed is my standard trick for
increasing the chances that the comment will actually be read
when someone does a global find/replace. I should have done that
here.

Change-Id: I39f9bab628beea7e5b32a71e23d348a3c75f5a6a
til/zip/Deflater.java
fa9647657b7c3ebb13d6e5e7dace3cf23f7189fd 08-Dec-2010 Elliott Hughes <enh@google.com> Rename a java.util.zip.Deflater field for RI compatibility.

This caused trouble for GSF.

Change-Id: Icbc041664ae7e365e4bdf658b33b26ee2aeb2048
til/zip/Deflater.java
f275cbd60bd57e7bccefb521685c2f05c0dafbb4 08-Dec-2010 Elliott Hughes <enh@google.com> Minor cleanup of java.lang.Character.

Change-Id: Ib010ae1e125583738ac4985c94f65d4e223db41b
ang/Character.java
2fcd1d20dae01349a5ed10689afef412f3950c96 07-Dec-2010 Elliott Hughes <enh@google.com> Merge "Throw better exceptions if an Inflater or Deflater is used after calling end."
aee3e4d2e0a2830fc2ef8e96a13796d012becab2 07-Dec-2010 Elliott Hughes <enh@google.com> Throw better exceptions if an Inflater or Deflater is used after calling end.

Bug: 3217912
Change-Id: I480c92d2f97b530f17b9b8daf2549d2f06384219
til/zip/Deflater.java
til/zip/Inflater.java
8e14d32ce621c7a48aa4d72db5bfda6b3079944a 07-Dec-2010 Glenn Kasten <gkasten@google.com> Merge "Fix documentation error"
1f0c4ff5de23e466032f1810172f16ad0077fa65 07-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix InetAddress tests that fail on the host.

Most of the fixes are to the tests. The InetAddress.getByAddress()
method has been changed to keep the user-reported host name.

Change-Id: I204caa5b975693144096e4ae1960682018c254d8
http://b/3238788
et/InetAddress.java
31b86dc55b7ef76d7d0ac47132c7f1cd4a45ee58 15-Nov-2010 Glenn Kasten <gkasten@google.com> Fix documentation error

Change-Id: I1026a2ad0ff91823835b139e999fa5f21299a5a4
til/Random.java
8fd0225a5c3918fe0cd4680258388985c25533e5 06-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix some of the most obvious bugs in URLStreamHandler's URL parsing.

Change-Id: I73ce6ccc169405e993d572ac3bf3af9ba39699c9
http://b/2753295
http://code.google.com/p/android/issues/detail?id=12724
et/URLStreamHandler.java
b9cc455ed89df1a0cf4186c92b352c9649995d96 04-Dec-2010 Elliott Hughes <enh@google.com> Use our canonical Arrays range-checking methods.

There are a handful of manual range-checkers left, thanks to specified
API that throws IllegalArgumentException instead, and a few other weird
cases.

Change-Id: I80914c2257288fc184100545aff4fd6f57bf32c9
o/BufferedOutputStream.java
o/CharArrayReader.java
o/FilterOutputStream.java
o/InputStream.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/PrintStream.java
o/PushbackInputStream.java
o/PushbackReader.java
o/StringBufferInputStream.java
o/StringReader.java
ang/AbstractStringBuilder.java
til/ArrayList.java
til/Arrays.java
til/Collections.java
til/ComparableTimSort.java
til/DualPivotQuicksort.java
til/TimSort.java
til/Vector.java
til/zip/Adler32.java
til/zip/CRC32.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/InflaterInputStream.java
til/zip/ZipInputStream.java
4e872ddaa8763051bcabe5ab804e677a39fa94dd 03-Dec-2010 Brian Carlstrom <bdc@google.com> Fix javadoc typo

Change-Id: I3091e65c04c582e633bddbe0674f5e26814a7057
til/zip/Deflater.java
5501a3d4b3d7657c183ed5446fe67fa011fbf70b 03-Dec-2010 Elliott Hughes <enh@google.com> Comments/javadoc should be in en_US, not en_CA.

Change-Id: Ie9dde4971e0a6a8dadd14af43d631158fc488cd8
o/ByteArrayInputStream.java
et/URI.java
io/FileChannelImpl.java
ext/DecimalFormat.java
7bf1b45888a5e48919abc720942be648ea3c6b1a 03-Dec-2010 Elliott Hughes <enh@google.com> Merge "Slight cleanup of java.util.zip code, plus a bug fix." into dalvik-dev
2d9c5fa8ce0182cd8c14736241b709fd50cab6f8 23-Nov-2010 Elliott Hughes <enh@google.com> Slight cleanup of java.util.zip code, plus a bug fix.

The key fix is switching to zstream's next_in and next_out fields (the
pointers into the input and output buffers) rather than relying on the
integer "accounting" fields. If turns out in the Z_NEED_DICT case that
the accounting goes slightly awry. (We shouldn't have been using the
accounting anyway, because we were silently coercing longs to ints.)
The new code is simpler, clearer, and doesn't need a special case for
Z_NEED_DICT at all.

I've also removed yet another hand-written UTF-8 encoder, made Inflater
throw ArrayIndexOutOfBoundsExceptions with useful detail messages (factored
out into Arrays so we can make this change more widely), and
rewritten the Inflater and Deflater documentation.

The unit test reproduces the problem (and tests as many other cases as
it can too). Critical for testing this bug is that we needed to limit
the size of the input buffer so that zlib has to ask us for more input.

Bug: 3220923
Change-Id: I39e5456620eaa7f75d12d885db279f009ee3e8ef
til/Arrays.java
til/zip/Deflater.java
til/zip/DeflaterOutputStream.java
til/zip/Inflater.java
til/zip/InflaterInputStream.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
e4bffb86e1105470e6f99affb377716e34b53c71 02-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix enum serialization.

We were looking up the declared field, which didn't look at the supertype recursively.

Change-Id: I65b13d08de021fedbe95e5b1cd8be15c8873483a
http://b/3246570
o/ObjectOutputStream.java
415c7497ec02890a73eb293f98f69c1f6983389b 18-Nov-2010 Elliott Hughes <enh@google.com> Throw ClassCastExceptions with good detail messages from the library.

Fix Class' methods to produce the same detail messages as the VM, remove
cruft from Arrays (so we throw the exceptions direct from the VM, like the RI
does), and fix a handful of classes that need to simulate casting because
of erasure.

Bug: 3210374
Change-Id: Ie8d1b48e069174bac60899a0530dbc8cf55fd023
ang/Class.java
til/Arrays.java
til/EnumMap.java
til/EnumSet.java
til/HugeEnumSet.java
til/MiniEnumSet.java
til/TreeMap.java
til/jar/Attributes.java
adae04bf57516f03a13045882eb04f7c479e7097 18-Nov-2010 Elliott Hughes <enh@google.com> Merge "Reflection documentation improvements." into dalvik-dev
8da55422ed93013260c1536080b14661bfecfefb 18-Nov-2010 Elliott Hughes <enh@google.com> Reflection documentation improvements.

Don't say "wrap" when we mean "box", and explicitly mention (Object[]) null in
the Method.invoke documentation.

Change-Id: I984c92f3310a08da05645a3a73b9912d08eea986
ang/reflect/Array.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/InvocationHandler.java
ang/reflect/Method.java
8c22baab6e43ced1ac2f28379fbdabcfe402ad36 17-Nov-2010 Kenny Root <kroot@google.com> am 910544a7: Fix some doc links in Arrays

* commit '910544a773fa8be76ae1fd7d27c15ad6e775082c':
Fix some doc links in Arrays
910544a773fa8be76ae1fd7d27c15ad6e775082c 17-Nov-2010 Kenny Root <kroot@google.com> Fix some doc links in Arrays

Some doc links had duplicated brackets that show up in the final parsed
result. Remove them so they don't look out-of-place.

Change-Id: Ie998e02246cef8bebaad3c5981abb2706bcbe394
til/Arrays.java
13ceab7064bc46f36e278535d96ed29a627c0c23 17-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "Use JSR 166's AbstractQueue, ArrayDeque, Deque, Queue and Navigable classes." into dalvik-dev
41ff09c89e1deebc22d0d833e0169a35be43d8a5 16-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "Add interning to KxmlPullParser." into dalvik-dev
a78c2aac2a73f001aa00971adfae90af4d6726fb 14-Nov-2010 Jesse Wilson <jessewilson@google.com> Add interning to KxmlPullParser.

Adding just a small interning pool improves performance even further.
Combined with the first round of optimizations, total improvement for
three large files is 51% 56% and 42%. Performance on a small file
improved 3%. When interning is checked in, Kxml will be significantly
faster than Expat's pull parser for everything but very small files.

/sdcard/xml/com.amazon.mp3.meta /sdcard/xml/com.cooliris.picasa /sdcard/xml/com.rhapsody.Deauth /sdcard/xml/com.snoggdoggler.r
benchmark run us linear runtime % us linear runtime % us linear runtime % us linear runtime %
Dom baseline / master 210,256 ============================== 184% 53,227 ============================== 171% 2,183 ============================== 151% 164,708 ============================= 200%
Dom first optimizations 174,580 ======================== 153% 40,964 ======================= 132% 1,968 =========================== 136% 130,814 ======================= 159%
Dom new interning 163,366 ======================= 143% 35,736 ==================== 115% 2,116 ============================= 147% 121,870 ====================== 148%
ExpatPull baseline / master 130,078 ================== 114% 21,700 ============ 70% 759 ========== 53% 85,578 =============== 104%
ExpatPull first optimizations 129,776 ================== 114% 21,621 ============ 70% 734 ========== 51% 86,799 =============== 105%
ExpatPull new interning 130,971 ================== 115% 21,627 ============ 70% 723 ========= 50% 86,555 =============== 105%
KxmlPull baseline / master 114,317 ================ 100% 31,040 ================= 100% 1,443 =================== 100% 82,478 =============== 100%
KxmlPull first optimizations 88,716 ============ 78% 20,578 =========== 66% 1,560 ===================== 108% 58,567 ========== 71%
KxmlPull new interning 55,773 ======= 49% 13,692 ======= 44% 1,394 =================== 97% 48,068 ======== 58%

http://b/3090550
Change-Id: I4515546abbbcf940de7be22f26925c4334e59146
ang/String.java
b854a55df2475a4e9acc96c271cd88da7559f019 16-Nov-2010 Elliott Hughes <enh@google.com> Switch ObjectInputStream over to reflection.

Reduces the amount of (native) code, and improves perfromance.

We can't entirely remove the native code this time because we
rely on the ability to create an instance of one class while
calling a constructor from another, which we can't do via
reflection.

Bug: 3158451
Change-Id: I896e23a6ffd7b7f1a016ff9d30cea0b2b9df7574
o/ObjectInputStream.java
o/ObjectOutputStream.java
7d0d108593ac30e19b8f2a5a157f697f3f46c041 13-Nov-2010 Elliott Hughes <enh@google.com> Switch ObjectOutputStream over to reflection.

Reduces the amount of (native) code, and improves performance. I've also
improved some of the detail messages from the reflection code (to help in
my own debugging).

I'll do ObjectInputStream next...

Bug: 3158451
Change-Id: Icf06a17507f9d011d120f2d704e084a103a400c7
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamField.java
ang/Class.java
ang/ClassCache.java
87987208b0e225bc2022190e57b01e8d57d29193 12-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "End the deflater when closing a ZipOutputStream." into dalvik-dev
1d5c4e84a256e76de529b27e7e28ed48f126fe7b 12-Nov-2010 Jesse Wilson <jessewilson@google.com> End the deflater when closing a ZipOutputStream.

I'm not particularly happy with ZipOutputStream.close() because it
doesn't call super.close(). Fixing it to call super.close() has two
problems: finish() will be called conditionally (we want it always)
and it won't null out 'out', which is observable to subclasses.

Change-Id: If565b2a94e4dff8cbc4815e971ab8b42b3663a84
http://b/3187485
til/zip/DeflaterOutputStream.java
til/zip/ZipOutputStream.java
fd2d7c4f244a78ee74db4944acf2a6378b65d43b 12-Nov-2010 Elliott Hughes <enh@google.com> More java.util.zip documentation improvements.

Follow-on to https://android-git.corp.google.com/g/79392.

Change-Id: I7ebdb5f0824d30e0b86d4e1ac236377bbda1cd08
til/zip/GZIPInputStream.java
til/zip/ZipInputStream.java
bbf2c7d0462bb2c612e5a1a28e6d0ce5413d746d 12-Nov-2010 Elliott Hughes <enh@google.com> Tidy up some jar-related code.

...and kill InputStreamHelper by inlining all that's left into the sole caller.

Change-Id: Iadddba9f067a1af2a2a66803aa9ef26ea6dc3396
til/jar/JarFile.java
til/jar/Manifest.java
a5d31fa2ea5c9d3de6ac05ae4250f931bed2d445 12-Nov-2010 Elliott Hughes <enh@google.com> Slightly better Checksum documentation.

Change-Id: Ic4c3b94d435522f8b14698d228d9e61c06ce96ae
til/zip/Adler32.java
til/zip/CRC32.java
til/zip/Checksum.java
d42697f6a5bac5d8789c82f45f79f7dd195dc768 11-Nov-2010 Elliott Hughes <enh@google.com> Better documentation for GZIPInputStream/GZIPOutputStream/ZipInputStream/ZipOutputStream.

I didn't know how to use ZipInputStream/ZipOutputStream off the top of my
head; that's a sign we need an example in the documentation.

Change-Id: I0410927a4a784991ff183c30c4cf59752b7ed8e8
til/zip/GZIPInputStream.java
til/zip/GZIPOutputStream.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
2f03027aaa09158ac70ebf9c6b53f7bb8c495541 11-Nov-2010 Jesse Wilson <jessewilson@google.com> Use JSR 166's AbstractQueue, ArrayDeque, Deque, Queue and Navigable classes.

These are better documented, better exercised and more consistent with other
platforms.

Change-Id: Ic17f1b492f637263b19281f99cd2c163e6586c8a
http://b/3131028
til/AbstractQueue.java
til/ArrayDeque.java
til/Deque.java
til/NavigableMap.java
til/NavigableSet.java
til/Queue.java
e4fe401cfde1d77126b20e1273c741addde18abc 10-Nov-2010 Elliott Hughes <enh@google.com> am e0201e2c: Merge "Fix a bug I introduced, and do more zip cleanup."

* commit 'e0201e2c65d67b516d45076da0879330d3b0e31a':
Fix a bug I introduced, and do more zip cleanup.
e43b3f6c7b343f4b6c738120a2ac2f93c5bd9a8e 10-Nov-2010 Elliott Hughes <enh@google.com> Fix a bug I introduced, and do more zip cleanup.

This code's quite hairy in its use of int/long. I can't just change the fields
to int because they seem to use -1L to mean "unset" while still allowing the
whole int range of values (including -1). We'll have to look at the zip
specification to see whether that's right, but for now, let's just avoid sign
extension.

I've also cleaned up some of the other code, most notably throwing more
detailed exception messages where it's easy, and removing hand-made readFully
implementations.

Bug: 3181430
Change-Id: I382568a8975c9b8b2ee5b344817134472369d308
til/zip/ZipEntry.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
693eacca9fa67ad79d1b35dbaad61c5ac1ac457c 10-Nov-2010 Elliott Hughes <enh@google.com> Stop allocating empty arrays.

Bug: 3166662
Change-Id: I151de373b2bf53786d19824336fa434c02b0b0e8
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
ang/AbstractStringBuilder.java
ang/String.java
ang/Thread.java
ang/Void.java
ang/reflect/Constructor.java
ang/reflect/Method.java
et/Inet6Address.java
et/NetworkInterface.java
io/DatagramChannelImpl.java
io/SelectorImpl.java
io/ServerSocketChannelImpl.java
ecurity/cert/X509CertSelector.java
ext/ChoiceFormat.java
ext/MessageFormat.java
til/ArrayList.java
til/concurrent/SynchronousQueue.java
til/prefs/AbstractPreferences.java
til/prefs/XMLParser.java
til/zip/Deflater.java
170e14d7d695e79958427fae9432953c95318370 09-Nov-2010 Elliott Hughes <enh@google.com> Ensure that changes to an IdentityHashMap entrySet mutate the underlying map.

Harmony's patch, plus a missing "private final".

Bug: https://issues.apache.org/jira/browse/HARMONY-6419
Change-Id: I92846810a1cda76b6101161a79ed25d9df503c01
til/IdentityHashMap.java
aee3b0eced54d6cb63ceee085e12cc7ff3b02645 09-Nov-2010 Elliott Hughes <enh@google.com> Merge "Improve SocketOptions.IP_TOS documentation." into dalvik-dev
9b0da29275a49266f3518aa490372965432e4219 09-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "Provide indices and length when reporting StringIndexOutOfBoundsExceptions." into dalvik-dev
f3b4a80f2ecd6dd1a0df51bb74a01042b11fad97 09-Nov-2010 Jesse Wilson <jessewilson@google.com> Provide indices and length when reporting StringIndexOutOfBoundsExceptions.

Change-Id: Ib7e52678fd2aad0e15bd04b2db4b191670cd4703
o/BufferedWriter.java
o/CharArrayWriter.java
o/OutputStreamWriter.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/String.java
75108771bf4b7de62e05f3f6da23ff7e02f7595f 09-Nov-2010 Elliott Hughes <enh@google.com> Track Java 6 Proxy.toString change.

This fixes a harmony test.

Change-Id: Id824fe62f11b0b80ce4e266ca71cbb1a675a142e
et/Proxy.java
70c145d9e9dd2a0244f813c217501a1b84189a43 09-Nov-2010 Elliott Hughes <enh@google.com> Apply a couple of trivial harmony patches.

These fix a couple of test failures.

Change-Id: Ifb0aef1822891069217fbedc450d8264d4f6b7c9
et/DatagramPacket.java
et/DatagramSocket.java
811a5c01400cf923c1827753a73297434d69fa43 09-Nov-2010 Elliott Hughes <enh@google.com> Don't eagerly resolve the hostname when doing a datagram receive.

Bug: http://code.google.com/p/android/issues/detail?id=12328
Change-Id: I850efb021b3cdcbc6c8278e9ff3cd8d34e85b1dc
et/InetSocketAddress.java
744af09bbda66a2b918a2d6b82abc8b72790f5d8 09-Nov-2010 Elliott Hughes <enh@google.com> Merge "Rewrite File.getCanonicalPath." into dalvik-dev
95101d3d5a3417755c88fded1600e039fb363019 05-Nov-2010 Elliott Hughes <enh@google.com> Rewrite File.getCanonicalPath.

My original plan was to just rely on the fixed realpath(3), but it turns out
that Java's behavior is quite different from the C library's in cases where
path elements don't exist. I also wasn't particularly excited about introducing
a fixed-length buffer. To that end, I've added a native implementation of
getCanonicalPath.

I've also improved the getAbsolutePath and getCanonicalPath documentation.

This patch also makes File.absolutePath transient, a regression in gingerbread
which uselessly bloated File's serialized form.

Bug: 2281992
Change-Id: Iff94eee07fe574251c1188b2b2eb71f585c81c6a
o/File.java
cc5fb4b5c651fe453d1319f8c47da91a65ee436c 08-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "Explicitly specify the content encoding when parsing preferences." into dalvik-dev
eae0b615a8f9aba8e8e789f0fb941ee27a0833c2 08-Nov-2010 Jesse Wilson <jessewilson@google.com> Explicitly specify the content encoding when parsing preferences.

Without this the XML parser needs to guess the encoding, which
turns out to be a fairly block of code. Avoid that since we know
the encoding is always UTF-8.

Change-Id: I265d602e7e3ba2cd8ee3e3aa564dab24a636ad85
til/prefs/XMLParser.java
05a0b1a0ef75b16a87f8e3490bb2b58040eb794a 06-Nov-2010 Elliott Hughes <enh@google.com> Improve SocketOptions.IP_TOS documentation.

Explain that this field covers both IPv4 and IPv6.

Bug: 3167335
Change-Id: I9541ac63281b7ee010897cb2dbd65a5fdcc7d9ca
et/SocketOptions.java
bd3f08d95b31543b5f1fe3d93594efc9c8a2879b 05-Nov-2010 Brian Carlstrom <bdc@google.com> Remove CloseGuard warnings for FileInputStream/FileOutputStream created from FileDescriptors

Change-Id: Ie3c0b9926810136fbbf48294e50f8a4f63f1eb0e
o/FileInputStream.java
o/FileOutputStream.java
096f877a77e0913849288837b8abac4bdafceca4 04-Nov-2010 Elliott Hughes <enh@google.com> Fix sign-extension issues in GZIPInputStream.

Bug: 3164285
Change-Id: Ic46a8d9a0ca23904fde85e70f4a8c218d4eb58f7
til/zip/GZIPInputStream.java
0d93c38cc3c7a5001aece8a18cafc6d1fc7551f3 04-Nov-2010 Elliott Hughes <enh@google.com> Add a public @hide InetAddress.isNumeric.

Some frameworks/base callers want to know whether they can call
getAllByName/getByName without incurring a DNS lookup. Rather than have them
write their own JNI to do the AI_NUMERICHOST getaddrinfo(3) call, let's just
offer them ours.

Why don't I fully expose getaddrinfo(3)? Because it doesn't map to Java API
very well, and no-one needs that yet. So for now, let's take the easy way out.

Also improve some misleading javadoc.

Bug: 3073384
Change-Id: Ia1990313306254598a4e1480cae356f68ceaaf22
et/DatagramSocket.java
et/HttpCookie.java
et/Inet6Address.java
et/InetAddress.java
et/NetworkInterface.java
et/ServerSocket.java
et/Socket.java
et/URI.java
b4bb9aba620d8a363fb3617b25839093caf39cf4 03-Nov-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of a5c608e5 to dalvik-dev

Change-Id: I0319c132ec8f42782475906da267439938308e77
a5c608e59f9d574ea4bc65e9dff44aae2f34fd26 01-Nov-2010 Brian Carlstrom <bdc@google.com> TrustManager improvements

Overhaul of TrustManagerImpl
- PKIXParameters can now be final in TrustManagerImpl because we
always immediately create an IndexedPKIXParameters instead of only
doing it in SSLParametersImpl.createDefaultTrustManager.
- Use new KeyStore constructor for IndexedPKIXParameters to remove
duplicate logic for creating set of TrustAnchors from a KeyStore.
- Improved checkTrusted/cleanupCertChain to remove special cases for
directly trusting the end cert or pruning only self signed certs. To
support b/2530852, we need to stop prune the chain as soon as we
find any trust anchor (using newly improved
TrustManagerImpl.isTrustAnchor), which could be at the beginning,
middle, or end. That means cleanupCertChain can return an empty
chain if everything was trusted directly. (and we don't need to do
extra checks on exception cases to see if the problem was just that
the trust anchor was in the chain)
- isDirectlyTrusted -> isTrustAnchor here as well, using new
IndexedPKIXParameters.isTrustAnchor APIs
- Fix incorrect assumption in getAcceptedIssuers that all TrustAnchor
instances have non-null results for getTrustedCert.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Removed indexing in createDefaultTrustManager since we always index now

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java

Overhaul of IndexedPKIXParameters
- Single map from subject X500Principal to TrustAnchors
instead of two different X500Principal keyed maps to check
- Removed map based on encoded cert. For b/2530852, we want to treat
certs as equal if they have the same name and public key, not
byte-for-byte equality, which can be done with the remaining map.
Revamped isDirectlyTrusted into isTrustAnchor(cert) to perform this
new name/key based comparison.
- Added helper isTrustAnchor(cert, anchors) to reuse code in
non-IndexedPKIXParameters case in TrustManagerImpl.
- Added constructor from KeyStore
- Moved anchor indexing code to index() from old constructor

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java

TestKeyStore.getPrivateKey allowed some existing test simplification.

luni/src/test/java/libcore/java/security/KeyStoreTest.java
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java
support/src/test/java/libcore/java/security/TestKeyStore.java

Added missing "fail()" before catching expected exceptions.

luni/src/test/java/libcore/java/security/KeyStoreTest.java

Expanded KeyManagerFactoryTest to excercise ManagerFactoryParameters b/1628001

luni/src/test/java/libcore/javax/net/ssl/KeyManagerFactoryTest.java

Added KeyStoreBuilderParametersTest because I thought I saw a bug in
KeyStoreBuilderParameters, but this convinced me otherwise.

luni/src/test/java/libcore/javax/net/ssl/KeyStoreBuilderParametersTest.java

New TrustManagerFactory test modeled on expanded KeyManagerFactoryTest.
test_TrustManagerFactory_intermediate specifically is targeting the
new functionality of b/2530852 to handling trust anchors within the
chain.

luni/src/test/java/libcore/javax/net/ssl/TrustManagerFactoryTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Some initial on tests for Elliptic Curve (b/3058375) after the RI
started reporting it was supported. Removed old @KnownFailure
tags. Skipped a test on the RI that it can't handle. Improved some
assert messages.

luni/src/test/java/libcore/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
support/src/test/java/libcore/java/security/StandardNames.java
support/src/test/java/libcore/java/security/TestKeyStore.java

Removed unneeded bytes->javax->bytes->java case of which can just go bytes->java directly.
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Removed super()
luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java

Made Security.secprops final
luni/src/main/java/java/security/Security.java

Pulled SamplingProfiler fix from dalvik-dev branch
git cherry-pick --no-commit f9dc3450e8f23cab91efc9df99bb860221ac3d6c
dalvik/src/main/java/dalvik/system/SamplingProfiler.java

Bug: 2530852
Change-Id: I95e0c7ee6a2f66b6986b3a9da9583d1ae52f94dd
ecurity/Security.java
a30033bf368e4f1adac3c597f9f0a1db8bcf87fb 03-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "Save packets by writing header+body as one packet where feasible." into dalvik-dev
0efebd8c734d30ed798b80166290b904fa357ee0 02-Nov-2010 Jesse Wilson <jessewilson@google.com> Save packets by writing header+body as one packet where feasible.

We were previously writing the HTTP header as one byte array and
then the HTTP body as a series of byte arrays, even if the body
was quite small. With this change we prefer to write header plus
body as a single write. The downside of this approach is that in
the worst case we need to allocate 32K more bytes.

In the best case we save a packet. On my test this saved 40ms for
the roundtrip.

Is this the right approach? Allocating a right-sized buffer saves
memory and minimizes the number of packets sent. But it does make
this complex code more complex.

benchmark postBodySize run ms linear runtime
HttpURLConnection none Before 10.8 ======
HttpURLConnection none After 11.0 ======
HttpURLConnection 0 Before 10.9 ======
HttpURLConnection 0 After 11.1 ======
HttpURLConnection 1 Before 51.3 =============================
HttpURLConnection 1 After 11.0 ======
HttpURLConnection 1024 Before 51.7 ==============================
HttpURLConnection 1024 After 11.3 ======
HttpURLConnection 8192 Before 51.2 =============================
HttpURLConnection 8192 After 12.8 =======

http://b/3143475

Change-Id: Id22a8449118a4b8dd13e71915700ac78803d2d9f
o/BufferedOutputStream.java
b5bde2fd72189192b52e726a2d606d70c3c8a34b 02-Nov-2010 Elliott Hughes <enh@google.com> More shift removal.

A few more customers for OSMemory's peek/poke abilities, and a bunch of shifts
that should have been multiplications.

Bug: 3032515
Change-Id: Ic518fd8f7565d67523ea10e3f5afca3a9c8501b8
o/ObjectStreamClass.java
ang/AbstractStringBuilder.java
ang/ThreadLocal.java
ath/BigDecimal.java
til/ArrayDeque.java
til/HashMap.java
til/Hashtable.java
til/IdentityHashMap.java
til/TimSort.java
til/UUID.java
til/WeakHashMap.java
til/zip/GZIPInputStream.java
til/zip/ZipEntry.java
til/zip/ZipInputStream.java
ba44e4b26f34d195054ae0ee880abe4ea1d8737d 30-Oct-2010 Dan Bornstein <danfuzz@android.com> am 93e0cbb1: am d6103319: am aeeaa64f: Replace the implementation of this class.

* commit '93e0cbb1c2d34f5ba3af704f4f62dd3fe1a73b1d':
Replace the implementation of this class.
93e0cbb1c2d34f5ba3af704f4f62dd3fe1a73b1d 30-Oct-2010 Dan Bornstein <danfuzz@android.com> am d6103319: am aeeaa64f: Replace the implementation of this class.

* commit 'd6103319a2a78f2bbc1e880c17565a54ee59c5f5':
Replace the implementation of this class.
aeeaa64fb691606d39bd24305001a4f4c71acdc3 30-Oct-2010 Dan Bornstein <danfuzz@android.com> Replace the implementation of this class.

Use the Apache Harmony version.

Change-Id: I5b9d6fac10dcaf20e16fccb73cfc2ae7110a683d
til/concurrent/CopyOnWriteArrayList.java
0eb70e31581a977afa5df3292d1c96e42e548821 28-Oct-2010 Elliott Hughes <enh@google.com> Optimize DataInputStream and a few friends.

Also ensure that we're doing a correct readFully when reading
shorts/ints/longs.

Bug: 3032515
Change-Id: I39e6f926537f5d55063db8fc1c5a1b4b794746d4
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/ObjectInputStream.java
o/RandomAccessFile.java
et/Inet4Address.java
et/InetAddress.java
ecurity/SecureRandom.java
c6c6c5d5176f739e0ceecedbdf277513bf4854b1 28-Oct-2010 Elliott Hughes <enh@google.com> Optimize DataOutputStream and RandomAccessFile.

Use OSMemory's byte[] peek/poke routines, and reuse a single buffer in
RandomAccessFile, as DataOutputStream was already doing.

Bug: 3032515
Change-Id: I50f34be9a9e126965759a221b21b05baf4b56083
o/DataOutputStream.java
o/RandomAccessFile.java
fbbae9740d65620b417b85576aa0d6c7daf4ba34 28-Oct-2010 Elliott Hughes <enh@google.com> Improve UnknownHostException detail messages.

Bug: 2542766
Change-Id: I7de3c8326508294fb5d9f17f65b3f36c8fa856fa
et/AddressCache.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InterfaceAddress.java
et/UnknownHostException.java
2dcd7e784e98faf21190a6431aa1dbff7212eb80 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix ResponseCache to support caching of HTTPS responses." into dalvik-dev
37dcf5581f177229ca6c8e7d0d640361640bfb00 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix ResponseCache to support caching of HTTPS responses.

Previously it would fail with an internal error because of
inconsistencies because HttpURLConnectionImpl claimed to be
'connected' when it had a cache hit, and HttpsURLConnection
acted upon this by talking to its sockets.

Change-Id: I51f4215ceb9c5fd851223a501488306fa6d382b1
http://b/3043966
et/ResponseCache.java
d29fddcf333997fc2d7429d531e4d934dc705c88 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Flip 'abstract public' to 'public abstract'.

Change-Id: Ice9b81c63cea4a3c08f697a28180c161a13e640e
ang/Process.java
til/Calendar.java
31741c01ddb025995692d3c46155b0626b55a389 26-Oct-2010 Jesse Wilson <jessewilson@google.com> Fixing process documentation.

This is to address enh's comments to change 76199.

Change-Id: Ie5cccab4aa212f647bb16b821518a4ab79e5c175
ang/Process.java
ang/ProcessManager.java
8890504f824eca28560987cc23d0b18e8a62bbaa 26-Oct-2010 Elliott Hughes <enh@google.com> Fix Float.parseFloat (et cetera) javadoc.

None of these constructors or decode/parse.*/valueOf methods throw
NumberFormatException when passed null, so they shouldn't claim to do so.

Bug: http://code.google.com/p/android/issues/detail?id=12114
Change-Id: I813cad4457d5db11617b615488efa8f5b4beb1cf
ang/Byte.java
ang/Double.java
ang/Float.java
ang/Integer.java
ang/Long.java
ang/Short.java
ath/BigDecimal.java
b594e8d2778666a10d645c7cd897d4029defb838 26-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Close process-spawned streams when the process is destroyed." into dalvik-dev
2353846b64570fa5932028143a0af507d41a85c5 25-Oct-2010 Jesse Wilson <jessewilson@google.com> Close process-spawned streams when the process is destroyed.

This is consistent with the RI's behavior. I can't come up with
a reasonable approach to closing these streams if they are never
requested; that's presumably a finalizer problem anyway because
only the finalizer knows that the streams won't be needed.

This change also adds test infrastructure around CloseGuard.
My approach hooks into the logger rather than reflection because
I can't be sure where the CloseGuard instance would be in the
object hierarchy. This approach also degrades reasonably when
run on the reference implementation (where it passes).

Change-Id: I08e882494d69d4245e40fb1035edbc6d3df23fbc
http://b/3111120
ang/Process.java
ang/ProcessBuilder.java
ang/ProcessManager.java
f068eee140c94a10a0d80c1369ea30820d8e30d9 25-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Change ThreadGroup to no longer hold strong references to threads." into dalvik-dev
be013ce620f6d3bd24f7f0b631a36f70197ac3e3 23-Oct-2010 Jesse Wilson <jessewilson@google.com> Change ThreadGroup to no longer hold strong references to threads.

This is intended to fix an issue where threads were leaking when
they weren't started.

This changes a lot of the internals of ThreadGroup, taking advantage
of a new utility method dereferenceIterable that turns a collection
of references into the corresponding iterable of referents.

Change-Id: I8d96c79b4ee30c557276854b38149b9131b656ee
http://b/1937448
ang/ThreadGroup.java
492c22b53424685e8bf127964e6e12078f412bdc 23-Oct-2010 Jesse Wilson <jessewilson@google.com> am 386bfdcf: am 409630d7: am 50458469: Merge "Documenting WiFi sign in and SSL fallback with HttpURLConnection." into gingerbread

Merge commit '386bfdcfd822fcb1a5ae0c0b15bacbffbdbf3560' into dalvik-dev

* commit '386bfdcfd822fcb1a5ae0c0b15bacbffbdbf3560':
Documenting WiFi sign in and SSL fallback with HttpURLConnection.
386bfdcfd822fcb1a5ae0c0b15bacbffbdbf3560 23-Oct-2010 Jesse Wilson <jessewilson@google.com> am 409630d7: am 50458469: Merge "Documenting WiFi sign in and SSL fallback with HttpURLConnection." into gingerbread

Merge commit '409630d709ac74a8d560b173d199d272472db022'

* commit '409630d709ac74a8d560b173d199d272472db022':
Documenting WiFi sign in and SSL fallback with HttpURLConnection.
50458469af0166724e3ce58ad0d84b7a5dd22535 23-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Documenting WiFi sign in and SSL fallback with HttpURLConnection." into gingerbread
23e3c8dad87724420bad70e9e9c4e8b94a565f14 23-Oct-2010 Jesse Wilson <jessewilson@google.com> Documenting WiFi sign in and SSL fallback with HttpURLConnection.

Change-Id: Ibb0f86aefd4d4db8d1560608f62735a357da73ea
http://b/2860493
et/HttpURLConnection.java
36e52396b09eabea12fd511a75aa37c835c658dd 22-Oct-2010 Jesse Wilson <jessewilson@google.com> am 28013f56: am 2e5cc6ce: am 4506af08: Merge "Improving the documentation around SecureRandom.setSeed()." into gingerbread
28013f560fb3c0757cc1fcbb1f752511aa68afb6 22-Oct-2010 Jesse Wilson <jessewilson@google.com> am 2e5cc6ce: am 4506af08: Merge "Improving the documentation around SecureRandom.setSeed()." into gingerbread
e52c164448e5420f4d094799d5af813e2ab696c7 22-Oct-2010 Jesse Wilson <jessewilson@google.com> Improving the documentation around SecureRandom.setSeed().

Change-Id: Ica6f2814702a90faf96da6fb96de9f7d295102a7
http://b/3036439
ecurity/SecureRandom.java
9559e748729ef1deb6400f31d0407543cbff3566 21-Oct-2010 Elliott Hughes <enh@google.com> Improve our modified UTF-8 implementation.

I was out looking for customers for the new OSMemory peek/poke for byte[]s,
and ran into this mess. I also noticed we didn't have any real tests for
DataOutputStream. This patch rewrites DataOuputStream and ObjectOutputStream
to be simpler and cleaner, pulls modified UTF-8 encoding support out into
ModifiedUtf8 where it belongs, and adds a new special ICU-avoiding case for
String.getBytes("UTF-16BE"). And adds tests.

Bug: 3032515
Change-Id: I618c8b1bda13138feed7710e29aee0f96f2e9b95
o/DataOutputStream.java
o/ObjectOutputStream.java
o/RandomAccessFile.java
ang/String.java
io/charset/Charsets.java
io/charset/ModifiedUtf8.java
e0cf017e333b2c529d9bd7d4ad5492f0118d773e 20-Oct-2010 Elliott Hughes <enh@google.com> Improve Data(Input|Output)(Stream)? documentation.

Bug: 3032515
Change-Id: I2e9574507a05ff5fa48ee6c85f0ce619c230baa6
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
43a9f774d075e0e441d8b996e3f6c81ea483ec89 19-Oct-2010 Elliott Hughes <enh@google.com> BufferIterator support for byte[].

Bug: 3032515
Change-Id: I040a92c3ce241aa97719ff94e3cc31c62473bf46
o/DataInput.java
io/Buffer.java
io/ByteOrder.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBufferAdapter.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ShortToByteBufferAdapter.java
til/zip/ZipFile.java
1b3761e5761862ec05d7aa283605012e236f17d1 19-Oct-2010 Elliott Hughes <enh@google.com> Merge "Factor out the code that peeks/pokes ints/longs/shorts from a byte[]." into dalvik-dev
af301fb0e674665dae3e9cb94344558923ec8e0a 19-Oct-2010 Elliott Hughes <enh@google.com> Factor out the code that peeks/pokes ints/longs/shorts from a byte[].

My intention here is that I'll want to reuse this code in my BufferIterator
for byte[]s (http://b/3032515).

This actually makes a noticeable nio benchmark improvement, presumably because
of the switch to static methods, so this helps http://b/2985452 too.

I plan on experimenting with native implementations for the new OSMemory
methods, but that can wait.

Change-Id: Ie5b34910b1e99930ba1f13c0e7002245b901039b
io/HeapByteBuffer.java
io/ReadWriteHeapByteBuffer.java
1c5aa9ad334fb7ddda5a5b2347ee4d3c67313235 19-Oct-2010 Brian Carlstrom <bdc@google.com> am 8ae047f5: Merge "Change Engine.getInstance interfaces to make usage less error prone"

Merge commit '8ae047f5329f8bc216e3fe377c068fd8457966f4' into dalvik-dev

* commit '8ae047f5329f8bc216e3fe377c068fd8457966f4':
Change Engine.getInstance interfaces to make usage less error prone
6cdb6b7e6939270ccd21790ec95e42197cefc0c3 19-Oct-2010 Brian Carlstrom <bdc@google.com> Change Engine.getInstance interfaces to make usage less error prone

Change-Id: I4c58c95ab4216b52aa8af4fbce7a8d7f4860c2b7
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/Policy.java
ecurity/SecureRandom.java
ecurity/Signature.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/cert/CertificateFactory.java
3fdb2c6ffd3cf9434e51a0a37cc53b519a2c6cbb 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Follow up on HTTP proxy selector docs." into dalvik-dev
ce23c2dff2f5ad5b3ada0a6a58aba65ac87ed08b 19-Oct-2010 Brian Carlstrom <bdc@google.com> am 0a480846: Remove Engine.spi memory leak by clearing after access

Merge commit '0a480846a9798c763b088a122ab0dcd3dc3a17b6' into dalvik-dev

* commit '0a480846a9798c763b088a122ab0dcd3dc3a17b6':
Remove Engine.spi memory leak by clearing after access
0a480846a9798c763b088a122ab0dcd3dc3a17b6 19-Oct-2010 Brian Carlstrom <bdc@google.com> Remove Engine.spi memory leak by clearing after access

Also other minor code cleanup such as:
- made assorted fields final
- fixed lazy initialization without volatile or sync

Bug: 1322442
Change-Id: I34e428dff5f07a7291d635c724111d44f2deff1c
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/Policy.java
ecurity/SecureRandom.java
ecurity/Signature.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/cert/CertificateFactory.java
ac29aad40bb1ffc25e5e66c9705cea8468021093 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Follow up on HTTP proxy selector docs.

Change-Id: Ib1e5071f112deb5129ea721836e028a26045fb91
http://b/3097518
et/ProxySelector.java
90224a5fd4a49b519039bd29d72c0a6a06a2752b 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Rewrite ProxySelector and write a test to go with it." into dalvik-dev
3b0348d1081a4645aa38da97ee299fadc040c1b4 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Rewrite ProxySelector and write a test to go with it.

http://b/3097518

Change-Id: Ic6b28ab21e00b6b55a01ae7927b87ac0d0375b44
et/ProxySelector.java
et/ProxySelectorImpl.java
1f07ea29bc2d334c55c16227582a7795b8c117c1 18-Oct-2010 Elliott Hughes <enh@google.com> Give every NumberFormatException a useful detail message.

Bug: 3095335
Change-Id: If0409c6328c2fa2a35e5027e20b4786fe87e693b
ang/Byte.java
ang/Integer.java
ang/Long.java
ang/Short.java
ath/BigDecimal.java
ath/BigInt.java
ath/BigInteger.java
ql/Timestamp.java
845da92c372adcc47dae414da5ae2f87893fbe4b 15-Oct-2010 Jesse Wilson <jessewilson@google.com> am 00e115ca: am 4aa863a0: Fix Class.getMethods() for visibility bridge methods.

Merge commit '00e115caecc5fadf010f1677d7b0cb3e83065461' into dalvik-dev

* commit '00e115caecc5fadf010f1677d7b0cb3e83065461':
Fix Class.getMethods() for visibility bridge methods.
00e115caecc5fadf010f1677d7b0cb3e83065461 15-Oct-2010 Jesse Wilson <jessewilson@google.com> am 4aa863a0: Fix Class.getMethods() for visibility bridge methods.

Merge commit '4aa863a08a4fed2f8b8967f63e0df61d72f28b79'

* commit '4aa863a08a4fed2f8b8967f63e0df61d72f28b79':
Fix Class.getMethods() for visibility bridge methods.
4aa863a08a4fed2f8b8967f63e0df61d72f28b79 14-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix Class.getMethods() for visibility bridge methods.

We had a bug where we couldn't find synthetic methods added by
subclasses to boost visibility of their superclass methods.

The old logic appeared to work fine with the covariant return
type synthetic methods, but broke down on these visibility
synthetic methods.

For reference, the general rules are:
- when there is a synthetic method for a covariant return type,
include it in getMethods() but prefer the natural method on
getMethod() calls.
- when there is a synthetic method for a visibility boost, prefer
it over the superclass method on getMethods() and getMethod()
calls.

Change-Id: Ied1f9fc9892d211647da87959746839f7e0e1140
http://b/2908173
ang/ClassCache.java
ang/reflect/Method.java
7e27918cf43b2e095cd10540185ffed81b843fa2 14-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix Class.getMethods() for visibility bridge methods.

We had a bug where we couldn't find synthetic methods added by
subclasses to boost visibility of their superclass methods.

The old logic appeared to work fine with the covariant return
type synthetic methods, but broke down on these visibility
synthetic methods.

For reference, the general rules are:
- when there is a synthetic method for a covariant return type,
include it in getMethods() but prefer the natural method on
getMethod() calls.
- when there is a synthetic method for a visibility boost, prefer
it over the superclass method on getMethods() and getMethod()
calls.

Change-Id: Ied1f9fc9892d211647da87959746839f7e0e1140
http://b/2908173
ang/ClassCache.java
ang/reflect/Method.java
b744a7edf23c14216698ad69ea59151e07cc50b8 13-Oct-2010 Elliott Hughes <enh@google.com> Add a hidden method to clear our Java-level DNS cache.

So the network guys can call this when the network changes, in case addresses
that were valid on that network aren't valid on the new network.

Change-Id: I07175b9b754bb4745a2f78b43f024723891c3f05
et/AddressCache.java
et/InetAddress.java
12f2d8e2760b78c673b7a187b9062b3938a03147 12-Oct-2010 Brian Carlstrom <bdc@google.com> Revised CloseGuard usage pattern

- CloseGuard.get() instants are now "unopened"
- In constructor cases, guard.open("...") is now at the end
- In metod cases, guard.open("...") is now after resource acquisition
- guard null pointer checks in finalizers in case constructor threw exception

Bug: 2645458
Change-Id: Ieb874a8c33b347768a9fa7437b3dd16f3d56d886
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
ath/BigInt.java
til/zip/Deflater.java
til/zip/Inflater.java
til/zip/ZipFile.java
6a27d01d76bb3ea7472e55aa275c0a1377b97003 10-Oct-2010 Jesse Wilson <jessewilson@google.com> am 058c0764: am 765c2139: Drop a proper finalizer in RandomAccessFile to catch resource leaks.

Merge commit '058c07643f09975c4361634984babbbf6e5bd157'

* commit '058c07643f09975c4361634984babbbf6e5bd157':
Drop a proper finalizer in RandomAccessFile to catch resource leaks.
e7610327dfb896959dd0a634c7e2363bbb927114 10-Oct-2010 Elliott Hughes <enh@google.com> am a8e7b5e9: am ee3152da: am 0e8cadc6: java.io.File javadoc improvements.

Merge commit 'a8e7b5e9f115615fbe63be23827589c1744e4076' into dalvik-dev

* commit 'a8e7b5e9f115615fbe63be23827589c1744e4076':
java.io.File javadoc improvements.
a8e7b5e9f115615fbe63be23827589c1744e4076 10-Oct-2010 Elliott Hughes <enh@google.com> am ee3152da: am 0e8cadc6: java.io.File javadoc improvements.

Merge commit 'ee3152daa9742c7cde95926efea58da2b5e8daeb'

* commit 'ee3152daa9742c7cde95926efea58da2b5e8daeb':
java.io.File javadoc improvements.
868f92a4063a41ab51190a4ad1a118f359a327d1 10-Oct-2010 Elliott Hughes <enh@google.com> am cc27a457: am 290e262c: am 575c2a63: Merge "Fix and improve Matcher.group(int) documentation." into gingerbread

Merge commit 'cc27a457bf6d3e20f03b7ab9c2767dc79b47a666' into dalvik-dev

* commit 'cc27a457bf6d3e20f03b7ab9c2767dc79b47a666':
Fix and improve Matcher.group(int) documentation.
cc27a457bf6d3e20f03b7ab9c2767dc79b47a666 10-Oct-2010 Elliott Hughes <enh@google.com> am 290e262c: am 575c2a63: Merge "Fix and improve Matcher.group(int) documentation." into gingerbread

Merge commit '290e262c8507f0a95bd732e1ee1e3b8eedc3667e'

* commit '290e262c8507f0a95bd732e1ee1e3b8eedc3667e':
Fix and improve Matcher.group(int) documentation.
0df59ae1c7d720dc6263760a0802aded41793f90 08-Oct-2010 Elliott Hughes <enh@google.com> Fix getLong/getDouble for byte[]-backed nio Buffers.

A regression I introduced. Happily, the correct version doesn't sacrifice speed.

Bug: 3066167
Change-Id: Idef17012b8d84a05644ba161bfdc462a38cf3326
io/HeapByteBuffer.java
68dc77f11ac04a34b797d4af716f81505c2f6fa5 08-Oct-2010 Elliott Hughes <enh@google.com> Merge "Fix our byte order behavior for slice and wrap operations." into dalvik-dev
17b2f493468764dc1f237c02d94747d122dbd101 08-Oct-2010 Elliott Hughes <enh@google.com> Fix our byte order behavior for slice and wrap operations.

Our documentation was correct, but our implementation was not. Includes
extensive new tests.

Bug: 3066167
Change-Id: Ie7d6e6432f1d675f20af020cc662dab6eb181a50
io/BaseByteBuffer.java
io/CharToByteBufferAdapter.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDirectByteBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortToByteBufferAdapter.java
765c2139fde183fc60e6fcb22a6b75378d7dbcb5 08-Oct-2010 Jesse Wilson <jessewilson@google.com> Drop a proper finalizer in RandomAccessFile to catch resource leaks.

Submitted to dalvik-dev as https://android-git.corp.google.com/g/72685
http://b/3015023

Change-Id: I30635aab91774f5eaecd354e8418ba6401705757
o/RandomAccessFile.java
0cde4bd97ee2c3e24cf8bc5356b0e83b776e310b 08-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Drop a proper finalizer in RandomAccessFile to catch resource leaks." into dalvik-dev
91e624a56a11f7235ca328429b6bf2da356a7896 07-Oct-2010 Brian Carlstrom <bdc@google.com> am 44b0fe09: am fc15fc0f: am 7b4e6828: Merge "Favor Harmony\'s CertificateFactory.X509 over BouncyCastle\'s" into gingerbread

Merge commit '44b0fe099dae10a9908194af0aebf2849adce785' into dalvik-dev

* commit '44b0fe099dae10a9908194af0aebf2849adce785':
Favor Harmony's CertificateFactory.X509 over BouncyCastle's
44b0fe099dae10a9908194af0aebf2849adce785 07-Oct-2010 Brian Carlstrom <bdc@google.com> am fc15fc0f: am 7b4e6828: Merge "Favor Harmony\'s CertificateFactory.X509 over BouncyCastle\'s" into gingerbread

Merge commit 'fc15fc0f9902bdecd1c535e6e06ea52669695fce'

* commit 'fc15fc0f9902bdecd1c535e6e06ea52669695fce':
Favor Harmony's CertificateFactory.X509 over BouncyCastle's
fbe7f04ba384cb7ea7aca7d291b2596622ff1b0e 07-Oct-2010 Jesse Wilson <jessewilson@google.com> Drop a proper finalizer in RandomAccessFile to catch resource leaks.

http://b/3015023
Change-Id: Ic938c82d3353a2231619f2bd87e4480a2b57c622
o/RandomAccessFile.java
0e8cadc6caf397fdfca97505978defdc6953a714 07-Oct-2010 Elliott Hughes <enh@google.com> java.io.File javadoc improvements.

Bug: http://code.google.com/p/android/issues/detail?id=5929
Change-Id: Ie24c1060a968e3da611aef000ff29762f6f7101a
o/File.java
575c2a638dd8ad8ca4a548b394bd3a938ab49c1d 07-Oct-2010 Elliott Hughes <enh@google.com> Merge "Fix and improve Matcher.group(int) documentation." into gingerbread
4dfae7b3e2b56160646c17d93b32b3ff495c0053 07-Oct-2010 Elliott Hughes <enh@google.com> Finish (for now) the icu4jni cleanup.

This is the most interesting change, now all the pieces are in place. The
concrete Collator implementation (now called RuleBasedCollatorICU for clarity)
becomes quite a bit simpler.

Bug: 3045778
Change-Id: I98fb5b78c42a13584e541818aa4427c78add79d0
ext/Collator.java
ext/RuleBasedCollator.java
til/SimpleTimeZone.java
5850271b4ab93ebc27c1d49169a348c6be3c7f04 06-Oct-2010 Elliott Hughes <enh@google.com> Fix and improve Matcher.group(int) documentation.

Bug: http://code.google.com/p/android/issues/detail?id=11723
Change-Id: Idd1c9009f1267ca7624ba8492a162bd72232f2cc
til/regex/Matcher.java
til/regex/Pattern.java
f7aab022dcbfcd8f27b409ab92b4bca4a84d0b8a 30-Sep-2010 Brian Carlstrom <bdc@google.com> CloseGuard: finalizers for closeable objects should log complaints

Introducing CloseGuard which warns when resources are implictly
cleaned up by finalizers when an explicit termination method, to use
the Effective Java "Issue 7: Avoid finalizers" terminology, should
have been used by the caller.

libcore classes that can use CloseGuard now do so.

Bug: 3041575
Change-Id: I4a4e3554addaf3075c823feb0a0ff0ad1c1f6196
o/Closeable.java
o/FileInputStream.java
o/FileOutputStream.java
ath/BigInt.java
til/zip/Deflater.java
til/zip/Inflater.java
til/zip/ZipFile.java
735f93475d1d54ad7b2d1c2376adc0fcf4d4c7a1 05-Oct-2010 Brian Carlstrom <bdc@google.com> Favor Harmony's CertificateFactory.X509 over BouncyCastle's

Bug: 2225935
Change-Id: Ibca92c9fa34fc539ebb8ea86fb0ced62e3dbe5de
ecurity/Security.java
ecurity/security.properties
cf686df19a9f52169247b06b09587eafcdc9960a 04-Oct-2010 Elliott Hughes <enh@google.com> Fix the default decomposition mode of Collators.

It's unclear why we thought it shouldn't be NO_DECOMPOSITION. That's the
default for both ICU and the RI. This patch undoes the part of the change that
introduced this discrepancy, and undoes a change we made to silence a test
that was warning us about the discrepancy.

Bug: 1635883
Change-Id: Ic0e121e9b10e4f332b04b3cca1946d8bce32c06e
ext/RuleBasedCollator.java
cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1f 04-Oct-2010 Elliott Hughes <enh@google.com> More package-jiggling for our ICU-related code.

Bug: 3045778
Change-Id: Ia9b29b28512deca6bd9dad806468238f8db2a8b9
ext/CollationElementIterator.java
970ed793b308c2c2ba099b6bed52a7a68af1c450 04-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Use LogManager.class.getResourceAsStream to defend against subclasses." into dalvik-dev
8ced42eaddbe441db51cf5538f15ec746c180936 03-Oct-2010 Jesse Wilson <jessewilson@google.com> Use LogManager.class.getResourceAsStream to defend against subclasses.

Previuosly we were using getClass().getResourceAsStream() which caused
the resource to be unavailable when LogManager was subclassed.

Change-Id: I4ebe13a2bb7f50ebaa3b4a458310d0c397a80aea
http://b/2487364
til/logging/LogManager.java
a7a70410e26802f3ab480b08a1ab499338cb6f7e 03-Oct-2010 Jesse Wilson <jessewilson@google.com> Use IoUtils.closeQuietly where possible.

Change-Id: I354c1e00b7068108032d09c0a1c38e29f6283fb0
et/URLClassLoader.java
ecurity/KeyStore.java
til/Formatter.java
til/Scanner.java
til/ServiceLoader.java
til/logging/FileHandler.java
til/logging/SimpleFormatter.java
til/prefs/XMLParser.java
071a878742040d0e5f3f8f508a6418180d24e664 02-Oct-2010 Elliott Hughes <enh@google.com> Merge "More icu4jni reshuffling." into dalvik-dev
c27a366a89e470690e99374b15270e7b9169ade1 02-Oct-2010 Elliott Hughes <enh@google.com> More icu4jni reshuffling.

Bug: 3045778
Change-Id: Iafb367f97d1fb169c6106adad0525cfcc0e10f25
ext/BreakIterator.java
ext/DecimalFormat.java
ext/RuleBasedBreakIterator.java
til/Formatter.java
b10024c7cf6d4cfbcc6016aa9c0e102f59c15d36 02-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix deserialization of NumberFormat.Field and related types.

This uses reflection to make it foolishly-easy to keep up-to-date
as members in these classes are added.

Change-Id: I6029aedf56f6237b971f240dbca45ed3acd50e0a
wt/font/TextAttribute.java
ext/AttributedCharacterIterator.java
ext/DateFormat.java
ext/MessageFormat.java
ext/NumberFormat.java
162b0775772fa66b7eb634760a8159a60c1ddcea 02-Oct-2010 Elliott Hughes <enh@google.com> Move more stuff out of icu4jni; ICU and LocaleData.

Bug: 3045778
Change-Id: I59fd27920a2da9a42b29fd79b8d81bdaabdef8cd
ang/CaseMapper.java
ext/BreakIterator.java
ext/Collator.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/NumberFormat.java
ext/SimpleDateFormat.java
til/Calendar.java
til/Currency.java
til/Formatter.java
til/Locale.java
til/ResourceBundle.java
8f898c05a260de523d783877d31ec4d9e62a8e9d 02-Oct-2010 Elliott Hughes <enh@google.com> Merge "Start moving icu4jni classes into libcore.icu." into dalvik-dev
644ccb2c3d69ee6f3a69996ca7651b84d409fe41 02-Oct-2010 Elliott Hughes <enh@google.com> Start moving icu4jni classes into libcore.icu.

Bug: 3045778
Change-Id: I8d87c31d36b441a69e6d3259e700b7133dfdc803
io/charset/Charset.java
io/charset/CharsetEncoder.java
572f5b0b0fc7dd3abc39ef8285871554bd5faab4 02-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Simplify skip() to use skipByReading or the superclass where possible." into dalvik-dev
8e1b1ee7fe8ec6168c44a361233cbe225a16fc9d 02-Oct-2010 Elliott Hughes <enh@google.com> Make InetSocketAddress' fields final.

Also remove worse-than-useless javadoc.

Change-Id: Ib49e6fd75a253c06bbdb58c54edc637093da4d14
et/InetSocketAddress.java
80b486724ca19b3c1c3c36334d06856330362f83 01-Oct-2010 Jesse Wilson <jessewilson@google.com> Simplify skip() to use skipByReading or the superclass where possible.

Several classes were overriding InputStream.skip() but not doing
anything better than the base class. These were deleted.

Others were allocating skip buffers which was correct, but duplicated
code with our Streams utility class.

The CipherInputStream class had a skip method that always skipped
0 bytes. This has been fixed and tested.

Change-Id: Ic96c600e111c11cf7364b4e0a721791d7e3c2ae1
o/FilterInputStream.java
o/LineNumberInputStream.java
til/jar/JarFile.java
til/zip/CheckedInputStream.java
til/zip/DeflaterInputStream.java
til/zip/ZipInputStream.java
07fa417b912bf6f7a115248cf72754bd9398d92d 01-Oct-2010 Elliott Hughes <enh@google.com> am 1c9d28c2: am 564bd43b: am 95dd6707: Merge "Better detail messages for System.loadLibrary UnsatisfiedLinkErrors." into gingerbread

Merge commit '1c9d28c2eb24e65e4c03f14ecabe06e8f59f705c' into dalvik-dev

* commit '1c9d28c2eb24e65e4c03f14ecabe06e8f59f705c':
Better detail messages for System.loadLibrary UnsatisfiedLinkErrors.
1c9d28c2eb24e65e4c03f14ecabe06e8f59f705c 01-Oct-2010 Elliott Hughes <enh@google.com> am 564bd43b: am 95dd6707: Merge "Better detail messages for System.loadLibrary UnsatisfiedLinkErrors." into gingerbread

Merge commit '564bd43b56c09c890b2d216a2246982d27260f0c'

* commit '564bd43b56c09c890b2d216a2246982d27260f0c':
Better detail messages for System.loadLibrary UnsatisfiedLinkErrors.
95dd6707dd9202c82c3b372aa1d168516330c5b4 01-Oct-2010 Elliott Hughes <enh@google.com> Merge "Better detail messages for System.loadLibrary UnsatisfiedLinkErrors." into gingerbread
a2189df6849df91e9109eea26867a355fe459d98 01-Oct-2010 Jesse Wilson <jessewilson@google.com> am cd7664c2: am 4bf3d0b0: am d5ef39f5: Include a message when a task is rejected from an executor.

Merge commit 'cd7664c2b832ee96496c28fcbc2d6fc84e5def0a' into dalvik-dev

* commit 'cd7664c2b832ee96496c28fcbc2d6fc84e5def0a':
Include a message when a task is rejected from an executor.
cd7664c2b832ee96496c28fcbc2d6fc84e5def0a 01-Oct-2010 Jesse Wilson <jessewilson@google.com> am 4bf3d0b0: am d5ef39f5: Include a message when a task is rejected from an executor.

Merge commit '4bf3d0b0e330d46659739dc095b52f82dc23a665'

* commit '4bf3d0b0e330d46659739dc095b52f82dc23a665':
Include a message when a task is rejected from an executor.
5d060f399d673f7e4d57c426fc7d87e707c31d5c 01-Oct-2010 Jesse Wilson <jessewilson@google.com> am 5df67087: am ff805724: am 16bba11e: Merge "Don\'t use the decompression-buffer as the skip buffer in InflaterInputStream." into gingerbread

Merge commit '5df6708702ddd1405e7d0a39e9f806cefd330028' into dalvik-dev

* commit '5df6708702ddd1405e7d0a39e9f806cefd330028':
Don't use the decompression-buffer as the skip buffer in InflaterInputStream.
5df6708702ddd1405e7d0a39e9f806cefd330028 01-Oct-2010 Jesse Wilson <jessewilson@google.com> am ff805724: am 16bba11e: Merge "Don\'t use the decompression-buffer as the skip buffer in InflaterInputStream." into gingerbread

Merge commit 'ff8057246a6d43a55c93c9c728a6dddb0d98fcdb'

* commit 'ff8057246a6d43a55c93c9c728a6dddb0d98fcdb':
Don't use the decompression-buffer as the skip buffer in InflaterInputStream.
ba0b0d68835bc1031a72c86f202f8951c5187376 01-Oct-2010 Elliott Hughes <enh@google.com> am 45907249: am 61799c7b: am 2bcf15aa: Merge "Fix File.getCanonicalizePath to resolve symbolic links." into gingerbread

Merge commit '45907249c392e47d7901e6c0308b0705dc5dbd3c' into dalvik-dev

* commit '45907249c392e47d7901e6c0308b0705dc5dbd3c':
Fix File.getCanonicalizePath to resolve symbolic links.
d5ef39f5d96461e5c3814157f74e30cca2234624 01-Oct-2010 Jesse Wilson <jessewilson@google.com> Include a message when a task is rejected from an executor.

Browser folks have been seeing this exception in their logcat logs
and it would be handy to give them some insight on why the pool
rejected the task.

Change-Id: I7257b3b174e6e2342e63238a542095bb3f7845f2
http://b/issue?id=3023092
til/concurrent/ThreadPoolExecutor.java
45907249c392e47d7901e6c0308b0705dc5dbd3c 01-Oct-2010 Elliott Hughes <enh@google.com> am 61799c7b: am 2bcf15aa: Merge "Fix File.getCanonicalizePath to resolve symbolic links." into gingerbread

Merge commit '61799c7ba25f60181a6e87ccf6ebdf82ae9f4473'

* commit '61799c7ba25f60181a6e87ccf6ebdf82ae9f4473':
Fix File.getCanonicalizePath to resolve symbolic links.
f46968564e0a773590292474fa9e50797b18bd42 01-Oct-2010 Elliott Hughes <enh@google.com> Better detail messages for System.loadLibrary UnsatisfiedLinkErrors.

This has a companion change in dalvik:
https://android-git.corp.google.com/g/71344

Bug: 3044042
Change-Id: Ia665ee59adf1ae1dbb45ba95988355839f4b0f23
ang/Runtime.java
ang/System.java
16bba11e69ea61cf6127ee837eb05c8ac50a7128 30-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Don't use the decompression-buffer as the skip buffer in InflaterInputStream." into gingerbread
2bcf15aac8c4dd82ef1a4b8defad00743569f927 30-Sep-2010 Elliott Hughes <enh@google.com> Merge "Fix File.getCanonicalizePath to resolve symbolic links." into gingerbread
4d2023ebe0ead25681ce350a873728dfee86b577 30-Sep-2010 Elliott Hughes <enh@google.com> Fix File.getCanonicalizePath to resolve symbolic links.

This requires fixing a few tests that don't cope with the fact that
all our temporary files are created on /sdcard, which is a symbolic
link to /mnt/sdcard, meaning that the canonical path of any temporary
file is different from the file's absolute path.

Bug: 3047893
Change-Id: I02245a290b6d2962fb1dd4d2faba30d9aa7168e0
o/File.java
3541c79d5058b86e742867b4ee5811a1de01de1f 30-Sep-2010 Jesse Wilson <jessewilson@google.com> Don't use the decompression-buffer as the skip buffer in InflaterInputStream.

This has bad consequences for the GzipInputStream subclass, which can't
use the input buffer as a scratch space because it needs to CRC all of
the decompressed data.

Change-Id: I310261dc8ef7a5082768cc6d6a2eff4ef77f5a21
http://b/3042574
o/InputStream.java
til/zip/InflaterInputStream.java
6efff39ab2e5f05764166dc6d57b76217995a470 30-Sep-2010 Jesse Wilson <jessewilson@google.com> am fe546fbd: am 6aded03e: am 7b660b46: Merge "Fix problems with OldSimpleDateFormatTest.java." into gingerbread

Merge commit 'fe546fbd1c01f9dcad3a4ac22ec0ec45bdc2455e' into dalvik-dev

* commit 'fe546fbd1c01f9dcad3a4ac22ec0ec45bdc2455e':
Fix problems with OldSimpleDateFormatTest.java.
fe546fbd1c01f9dcad3a4ac22ec0ec45bdc2455e 30-Sep-2010 Jesse Wilson <jessewilson@google.com> am 6aded03e: am 7b660b46: Merge "Fix problems with OldSimpleDateFormatTest.java." into gingerbread

Merge commit '6aded03ea65e0a8c7a2b584f2dcd76762b7b681a'

* commit '6aded03ea65e0a8c7a2b584f2dcd76762b7b681a':
Fix problems with OldSimpleDateFormatTest.java.
7b660b465a2c846c4c5633a59594a88acfe11322 30-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix problems with OldSimpleDateFormatTest.java." into gingerbread
ed4e806327360c50b232a6e0cd2201fce3fb0998 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix problems with OldSimpleDateFormatTest.java.

This changes the single 'y' documentation to point out our behavior.
http://b/2788874

It also isolates two other failures for week-in-year and timezone
formatting.
http://b/1613709 Minimal days in first week is broken
http://b/3049014 Custom SimpleTimeZones not honored by SimpleDateFormat

Change-Id: Ic632bf70076fe0dfd376317379dc363269d5b2df
ext/SimpleDateFormat.java
f3b2085bba0b73f04a3e97bffee1d84ddee5e5a5 29-Sep-2010 Brian Carlstrom <bdc@google.com> am 63fcdd7e: resolved conflicts for merge of 53e83038 to master

Merge commit '63fcdd7e833df417cfbd60961a5167ce637f3071' into dalvik-dev

* commit '63fcdd7e833df417cfbd60961a5167ce637f3071':
Scrub missing calls to super.finalize()
2019a2f983cee86e44aec30333bf6292a239973e 29-Sep-2010 Jesse Wilson <jessewilson@google.com> am 880ec6d5: am 395f899e: am 2a275f06: Merge "Tests for ServerSocketFactory.getDefault()." into gingerbread

Merge commit '880ec6d5d26a2955734e13a09a65f57f50fb1c16' into dalvik-dev

* commit '880ec6d5d26a2955734e13a09a65f57f50fb1c16':
Tests for ServerSocketFactory.getDefault().
2bf7f92e16c747c13a4e43ac9a2db846d6f3c7f0 29-Sep-2010 Jesse Wilson <jessewilson@google.com> am 1542176d: am 48100926: am d33c0e52: Merge "Fix a problem where URL.equals() was returning true when both hosts couldn\'t resolve." into gingerbread

Merge commit '1542176d768492a781a96db9c3b5a84a007e3f21' into dalvik-dev

* commit '1542176d768492a781a96db9c3b5a84a007e3f21':
Fix a problem where URL.equals() was returning true when both hosts couldn't resolve.
63fcdd7e833df417cfbd60961a5167ce637f3071 29-Sep-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 53e83038 to master

Conflicts:
luni/src/main/java/java/io/FileInputStream.java
luni/src/main/java/java/io/FileOutputStream.java
luni/src/main/java/javax/crypto/ExemptionMechanism.java
luni/src/main/java/org/apache/harmony/luni/net/PlainDatagramSocketImpl.java
luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java

Change-Id: I0dd5da8e8cb1819cb90440c462ba307dffde8ed7
d7212c5d3cde17ca20fc33cd294da2c5744df44a 29-Sep-2010 Brian Carlstrom <bdc@google.com> Merge "Scrub missing calls to super.finalize()" into gingerbread
e2f58c9501eac730d048199906dc41fe8e4cd6e9 29-Sep-2010 Brian Carlstrom <bdc@google.com> Scrub missing calls to super.finalize()

Bug: 3024226
Change-Id: I6642cb9d4929ba72244529efe4ebdfa595ae4fa7
o/FileInputStream.java
o/FileOutputStream.java
ang/Enum.java
ath/BigInt.java
ext/DecimalFormat.java
til/Timer.java
til/concurrent/Executors.java
til/concurrent/ThreadPoolExecutor.java
til/regex/Matcher.java
til/regex/Pattern.java
til/zip/Deflater.java
til/zip/Inflater.java
til/zip/ZipFile.java
880ec6d5d26a2955734e13a09a65f57f50fb1c16 29-Sep-2010 Jesse Wilson <jessewilson@google.com> am 395f899e: am 2a275f06: Merge "Tests for ServerSocketFactory.getDefault()." into gingerbread

Merge commit '395f899e35b62795c4cf9415c13c2bf8aa02552e'

* commit '395f899e35b62795c4cf9415c13c2bf8aa02552e':
Tests for ServerSocketFactory.getDefault().
2a275f0640bf3fdbd9dd6336b4f195a5a6e9a109 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Tests for ServerSocketFactory.getDefault()." into gingerbread
4d743816cad738bfeccf6dc210fc7c9bd84a8777 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Tests for ServerSocketFactory.getDefault().

Motivated by http://b/2587385

Change-Id: If30898859f869c88342d1069a2425575752ebf6e
et/ServerSocket.java
1542176d768492a781a96db9c3b5a84a007e3f21 29-Sep-2010 Jesse Wilson <jessewilson@google.com> am 48100926: am d33c0e52: Merge "Fix a problem where URL.equals() was returning true when both hosts couldn\'t resolve." into gingerbread

Merge commit '48100926c9278aa6ce1c0bccde5dc44cb6d0cc6e'

* commit '48100926c9278aa6ce1c0bccde5dc44cb6d0cc6e':
Fix a problem where URL.equals() was returning true when both hosts couldn't resolve.
67db542e53c47a28e3f96beb7c9e46330483dc40 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix a problem where URL.equals() was returning true when both hosts couldn't resolve.

See http://b/3045007

Change-Id: I83f2a0d8888dd30aaf6099049ce8008487d4337d
et/URLStreamHandler.java
6799265cb084b3afb485cf5ef56c6e0209f15e3d 28-Sep-2010 Elliott Hughes <enh@google.com> am 63b033f0: am 592ac99f: am a8bc3bd2: Improve DateFormat.parse\'s exception detail.

Merge commit '63b033f057a81c91955efb622b48d851120865a3' into dalvik-dev

* commit '63b033f057a81c91955efb622b48d851120865a3':
Improve DateFormat.parse's exception detail.
831a2f644030dd6cb9785848a43191e08cbe62d6 28-Sep-2010 Elliott Hughes <enh@google.com> am 07d06f94: am c6589535: am f3cc41ed: Somewhat perfunctory javadoc for the new Java 6 JDBC APIs.

Merge commit '07d06f949a8993027732ef88d17deb437a8e6b1e' into dalvik-dev

* commit '07d06f949a8993027732ef88d17deb437a8e6b1e':
Somewhat perfunctory javadoc for the new Java 6 JDBC APIs.
63b033f057a81c91955efb622b48d851120865a3 28-Sep-2010 Elliott Hughes <enh@google.com> am 592ac99f: am a8bc3bd2: Improve DateFormat.parse\'s exception detail.

Merge commit '592ac99f0c4867140b97e4fb650cd42bab09415f'

* commit '592ac99f0c4867140b97e4fb650cd42bab09415f':
Improve DateFormat.parse's exception detail.
07d06f949a8993027732ef88d17deb437a8e6b1e 28-Sep-2010 Elliott Hughes <enh@google.com> am c6589535: am f3cc41ed: Somewhat perfunctory javadoc for the new Java 6 JDBC APIs.

Merge commit 'c6589535005b8fac3bacc2126e3d0a0be0489408'

* commit 'c6589535005b8fac3bacc2126e3d0a0be0489408':
Somewhat perfunctory javadoc for the new Java 6 JDBC APIs.
a8bc3bd2794b36c5e935aff7b932a7945e98bf30 28-Sep-2010 Elliott Hughes <enh@google.com> Improve DateFormat.parse's exception detail.

Bug: 3041734
Change-Id: I73e9d2aefecc5fe67415eb3a6586294f8dbbcb82
ext/DateFormat.java
f3cc41ede7af1dd683e1a55eabc8f36963aec8ab 28-Sep-2010 Elliott Hughes <enh@google.com> Somewhat perfunctory javadoc for the new Java 6 JDBC APIs.

I feel dirty.

Bug: 3038452
Change-Id: I7ecd24b09c4e37a5ad29de4c6ba50a6e151a1296
ql/Array.java
ql/Blob.java
ql/CallableStatement.java
ql/Clob.java
ql/Connection.java
ql/PreparedStatement.java
ql/ResultSet.java
ql/RowId.java
ql/SQLInput.java
ql/SQLOutput.java
ql/SQLXML.java
ql/Statement.java
04c46edf3d6500cf9633e3f007a3fb15a66a79b7 27-Sep-2010 Elliott Hughes <enh@google.com> Merge "Faster String.hashCode." into dalvik-dev
36f1fe647ee886d8d8a0d703ac2fbbcc8194c716 26-Sep-2010 Elliott Hughes <enh@google.com> Faster String.hashCode.

Bend our code to fit our current JIT. The locals caching fields are still
sadly necessary, even though the JIT usually does a good job of that. (Or
have I actually been seeing the JIT do a bad job of local access instead,
thanks to thumb's x86-like lack of registers? Need to start looking at
more generated code to get an absolute "benchmark" to go with my relative
[Caliper] benchmark figures.)

Bug: 3031382
Change-Id: Icf63866b10740bd7001cc9f24e4e9c655aebc3f8
ang/String.java
d4b134ec6762fa9e85f97d2174497df5e6af8566 26-Sep-2010 Brian Carlstrom <bdc@google.com> am 873c0bfb: am a1b18854: Merge "Fix OpenSSLSessionImpl.getValueNames regression" into gingerbread

Merge commit '873c0bfbf627fa15dd44463f9a664b6f83c74594'

* commit '873c0bfbf627fa15dd44463f9a664b6f83c74594':
Fix OpenSSLSessionImpl.getValueNames regression
4071cf16af7a9a7234856d3ff1837df0da168c6c 25-Sep-2010 Brian Carlstrom <bdc@google.com> Fix OpenSSLSessionImpl.getValueNames regression

In e32b21f14d52bac429a9c54fe031f9e92c911d64, the code was converted to
use Objects.equals. However, because of a typo, an autoboxed Boolean
was passed instead of an AccessControlContext. I reviewed the rest of
the original change to make sure there were no other instances of this
regression.

Also cleaned up the SSLSessionTest (fixing two broken tests
test_getLocalPrincipal and test_getPeerPrincipal) and fixed a
whitespace issue in AccessControlContext.

Change-Id: Icaee8a0c2f5f527bea7a80037fe3f99c509d9f42
ecurity/AccessControlContext.java
739493443ce2ea5b0a92dd1725a4ed630db7b27b 23-Sep-2010 Elliott Hughes <enh@google.com> Simplify the ZipFile implementation, removing unbuffered I/O.

Bug: 3018772
Change-Id: I183e9ac597f9483418b0b337fc9e3944d473f359
til/zip/ZipEntry.java
til/zip/ZipFile.java
280870968445db979e94306036d5256d232e77f4 23-Sep-2010 Elliott Hughes <enh@google.com> private final trumps non-final package-protected.

Change-Id: Ida695c0da4fb1ffae583a2dcc7f627ec509f7107
o/DataInputStream.java
o/DataOutputStream.java
6662feeaf43812ff4336150a473bce06fc802b79 23-Sep-2010 Elliott Hughes <enh@google.com> Improve RandomAccessFile documentation.

Change-Id: I74ae5b018f2c140e97b516576ef582d213a1b7cc
o/RandomAccessFile.java
0a102bb180bae081353b6fb48646b63bdff83d13 23-Sep-2010 Elliott Hughes <enh@google.com> Merge "Remove unbuffered single-byte I/O from ZipFile." into dalvik-dev
c0c98ee1c95fd3b19646b4cb9771abf98a045ef0 23-Sep-2010 Elliott Hughes <enh@google.com> Remove unbuffered single-byte I/O from ZipFile.

This is enough to fool my current checking (and a little bit better than the
existing code), but I do plan on better checking and a rewrite of ZipFile.

Bug: 3018772
Change-Id: I607fee807c2bcbe9d59b883ef7bfbaa9a8f54ea8
til/zip/ZipEntry.java
til/zip/ZipFile.java
46b1e6e3b2f2c2de33e66676d9d508cc0fcde9bc 22-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix setLength() to adjust pointer." into dalvik-dev
ac7d2424dfd5267434d18d06174d1b481d3b51a7 22-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix setLength() to adjust pointer.

See http://b/2224985

Change-Id: Ie8b7a7a455fdbde051dea15f8d3e4dc6bf8f6fba
o/RandomAccessFile.java
0c9983973605c58367cf39340882fdc4d5ef94e2 22-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Love for FileInputStream and FileOutputStream." into dalvik-dev
5e23b687ef8b3c696d54d1880b454942875665b7 22-Sep-2010 Elliott Hughes <enh@google.com> Remove custom marker classes for locks.

Just use Object instead.

Bug: 3024308
Change-Id: I83a01020646d95e014743b76e27ca7134c155298
ang/ThreadGroup.java
et/DatagramSocket.java
et/Socket.java
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/SelectorImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/channels/spi/AbstractSelectableChannel.java
til/prefs/AbstractPreferences.java
024784c977a744708ab0bcefc4337d491e429937 21-Sep-2010 Jesse Wilson <jessewilson@google.com> Love for FileInputStream and FileOutputStream.

This changes FileOutputStream to open its channel lazily. Doing so
requires a new field, mode. It saves the allocation of the channel
and its accompanying infrastructure in the common case.

This adds example usage complete with the necessary buffers, and
removed documentation that was redundant from the superclass.

Change-Id: Ib23d12cef075169a574fddedcaf1fec018eb726c
http://b/3018687
o/FileInputStream.java
o/FileOutputStream.java
8dab4d8bebf633077b7a59c8b7d7980b768bbb75 21-Sep-2010 Elliott Hughes <enh@google.com> Fix build: nio implementation details accidentally made public.

Change-Id: I1bc4b40c2038088a1e22489f39d54e28d9ae21cb
io/ReadOnlyFileChannel.java
io/ReadWriteFileChannel.java
io/ServerSocketChannelImpl.java
io/WriteOnlyFileChannel.java
ae704b984c10a63883cc366e823d53902d6ac7a9 21-Sep-2010 Elliott Hughes <enh@google.com> Minor tidy-up.

The nio implementation is still a bit of a mess because Java doesn't have any
kind of "module" concept, nor "friend". But this makes it a little less untidy,
and makes the deliberate access control subversions a little more explicit, and
makes various things less accessible than they were.

Change-Id: I514b1e24000b91f86b768ed408fedae115dc3080
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
io/ByteOrder.java
io/DatagramChannelImpl.java
io/FileChannelImpl.java
io/MappedByteBufferAdapter.java
io/MemoryBlock.java
io/NioUtils.java
io/PipeImpl.java
io/ReadOnlyFileChannel.java
io/ReadWriteFileChannel.java
io/SelectionKeyImpl.java
io/SelectorImpl.java
io/SelectorProviderImpl.java
io/ServerSocketChannelImpl.java
io/SocketChannelImpl.java
io/WriteOnlyFileChannel.java
io/channels/spi/SelectorProvider.java
ext/RuleBasedBreakIterator.java
bc6fddf82f3bb1019dc984d37bd0c1298dd40589 20-Sep-2010 Elliott Hughes <enh@google.com> Remove dead code.

Presumably frameworks/base/ used this at some point, but it doesn't now.

Change-Id: Id299958dc2352c25b1555c07bf4d114fafdd7aea
io/NIOAccess.java
ae74f07204bd23b45b8dd8c3329dc454fa44500b 20-Sep-2010 Elliott Hughes <enh@google.com> Merge "Optimize non-direct (heap) buffer bulk put." into dalvik-dev
8fbc397fc09158bee0bc0cb231c609c4c6e9fc15 18-Sep-2010 Elliott Hughes <enh@google.com> Optimize non-direct (heap) buffer bulk put.

I've also factored out the bounds checking, even though the JIT can't yet
inline it back. I'm unwilling to duplicate all that code again.

This patch also fixes bugs in the previous checkin relating to offsets
and positions. In real life (and, seemingly, in all our tests) these tend
to be 0, making it rare that anyone trips over these bugs. (The first nio
change I made was fixing just such a bug.) I've improved the test I added
last time so that it covers more of these cases.

Here are the "after" performance figures for heap buffer bulk copies:

CharBuffer_getCharArray 5797
CharBuffer_putCharArray 5818
DoubleBuffer_getDoubleArray 13053
DoubleBuffer_putDoubleArray 13026
FloatBuffer_getFloatArray 8216
FloatBuffer_putFloatArray 8283
IntBuffer_getIntArray 8253
IntBuffer_putIntArray 8371
LongBuffer_getLongArray 13053
LongBuffer_putLongArray 13020
ShortBuffer_getShortArray 5796
ShortBuffer_putShortArray 5864

This compares well with with direct buffer performance (just gets shown here):

CharBuffer_getCharArray 4412
DoubleBuffer_getDoubleArray 11594
FloatBuffer_getFloatArray 6787
IntBuffer_getIntArray 6791
LongBuffer_getLongArray 11672
ShortBuffer_getShortArray 4430

Bug: 2985452
Change-Id: I37307f9b304c87a87af5313790444dcdf6174ff1
io/Buffer.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ShortToByteBufferAdapter.java
793e1cdbba5545b507196bf461f691e32357a0ad 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am 99b2d653: am f697be0f: am ac277be6: Handle the different definitions of \'connected\' in HttpURLConnection.

Merge commit '99b2d6535ceaeae74887b4fc4eac674d3564dddc' into dalvik-dev

* commit '99b2d6535ceaeae74887b4fc4eac674d3564dddc':
Handle the different definitions of 'connected' in HttpURLConnection.
99b2d6535ceaeae74887b4fc4eac674d3564dddc 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am f697be0f: am ac277be6: Handle the different definitions of \'connected\' in HttpURLConnection.

Merge commit 'f697be0f24572c8c653ce689b398bcd163960aa5'

* commit 'f697be0f24572c8c653ce689b398bcd163960aa5':
Handle the different definitions of 'connected' in HttpURLConnection.
5bc63447ee73a49de8a572a6b955af4cdc18be98 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am 96c076dd: am e74b3ecc: am d4bddd7d: Fix two HTTP issues that came up when writing HttpURLConnection docs.

Merge commit '96c076ddd30d862dae69a35e1700d2befb2ee055' into dalvik-dev

* commit '96c076ddd30d862dae69a35e1700d2befb2ee055':
Fix two HTTP issues that came up when writing HttpURLConnection docs.
96c076ddd30d862dae69a35e1700d2befb2ee055 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am e74b3ecc: am d4bddd7d: Fix two HTTP issues that came up when writing HttpURLConnection docs.

Merge commit 'e74b3eccd5d2ad7809c827d3e5bcbd5fcce0f3c5'

* commit 'e74b3eccd5d2ad7809c827d3e5bcbd5fcce0f3c5':
Fix two HTTP issues that came up when writing HttpURLConnection docs.
ac277be6a146ade8f150236edf730431a7e12482 18-Sep-2010 Jesse Wilson <jessewilson@google.com> Handle the different definitions of 'connected' in HttpURLConnection.

Previously we were failing with a NullPointerException when
HTTP redirects required connecting to a different server.

The connected field means 'we can't change request parameters'.
The connection being non-null means 'we're currently connected'.

Internally, multiple connections are permitted in order to support
HTTP redirects. But in the public API only one connect() call is
permitted.

I've added a new method, makeConnection() to make the magic work.

Change-Id: Ic644d5d192ec2b1de781dc271ae149bcd1655de4
et/URLConnection.java
d4bddd7d1fb7b1b7f0836648228235c6e4b56a18 16-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix two HTTP issues that came up when writing HttpURLConnection docs.

We're now more careful about which headers are sent to HTTP proxies.
And getContentEncoding() is better documented.

Change-Id: I04241f99c2f32c25ba005fbd6ff9ef7236c3c9d3
et/HttpURLConnection.java
6944bea4a129dc2d4be687c72f2a9f228ec532bc 17-Sep-2010 Elliott Hughes <enh@google.com> Make nio heap (non-direct) buffer bulk get orders of magnitude faster.

Bug: 2985452
Change-Id: I8bd210d1a623e434121f30eca6e2555e1aea11cd
io/Buffer.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ShortToByteBufferAdapter.java
cd94a13ce09bb2167fc283bc5cf7c9f4501f4b00 17-Sep-2010 Elliott Hughes <enh@google.com> am f9a07b33: am 5c595ec1: am 288041b6: Make the implementation of Formatter %e more similar to %f.

Merge commit 'f9a07b338067d91057795c3ffeb14a4cf35bac5b' into dalvik-dev

* commit 'f9a07b338067d91057795c3ffeb14a4cf35bac5b':
Make the implementation of Formatter %e more similar to %f.
c0dfbb79aae4876aeb1648168d6861dfa7972670 17-Sep-2010 Elliott Hughes <enh@google.com> am ea200493: am 4618c9b2: am 46cb23aa: Return char[] instead of String from NativeDecimalFormat.

Merge commit 'ea200493f20f61a2fdcf8528aba36ded1292fa9f' into dalvik-dev

* commit 'ea200493f20f61a2fdcf8528aba36ded1292fa9f':
Return char[] instead of String from NativeDecimalFormat.
e879c5d7ba127f99ab757d7b72340d6cf6614298 17-Sep-2010 Elliott Hughes <enh@google.com> am a838cb5c: am 14934633: am e8545ce7: Merge "Speed up Formatter %f a bit more by using a thread-local NativeDecimalFormat." into gingerbread

Merge commit 'a838cb5c162f711e81cb9017237225968b9449b5' into dalvik-dev

* commit 'a838cb5c162f711e81cb9017237225968b9449b5':
Speed up Formatter %f a bit more by using a thread-local NativeDecimalFormat.
f9a07b338067d91057795c3ffeb14a4cf35bac5b 17-Sep-2010 Elliott Hughes <enh@google.com> am 5c595ec1: am 288041b6: Make the implementation of Formatter %e more similar to %f.

Merge commit '5c595ec1f708b5d7abb693b7990c3997266b313d'

* commit '5c595ec1f708b5d7abb693b7990c3997266b313d':
Make the implementation of Formatter %e more similar to %f.
288041b6003504a2976e9a101c573e1d7a69a37a 16-Sep-2010 Elliott Hughes <enh@google.com> Make the implementation of Formatter %e more similar to %f.

Also comment the code that turns 'E' into 'e' in %e. I tried doing this in
native code but it crufts the implementation and slightly slows the path we
care about (%f) for the benefit of the one we don't (%e).

I have optimized %e (without a precision) in the same way that I did with %f.

Bug: 2934304
Change-Id: I3c99be2157f4448c1b290d5578eeb6fc14965c59
til/Formatter.java
ea200493f20f61a2fdcf8528aba36ded1292fa9f 16-Sep-2010 Elliott Hughes <enh@google.com> am 4618c9b2: am 46cb23aa: Return char[] instead of String from NativeDecimalFormat.

Merge commit '4618c9b247da6462c82e6ebddad9a9a3056a9400'

* commit '4618c9b247da6462c82e6ebddad9a9a3056a9400':
Return char[] instead of String from NativeDecimalFormat.
46cb23aaaba1b0553d02d32713abad97bd4b0428 16-Sep-2010 Elliott Hughes <enh@google.com> Return char[] instead of String from NativeDecimalFormat.

One last little speedup for Formatter %f before I call it a day for now...

Bug: 2934304
Change-Id: I9edd02d1ba8dc40a2b28fea34d7bccf95eeb56ab
ext/DecimalFormat.java
til/Formatter.java
a838cb5c162f711e81cb9017237225968b9449b5 16-Sep-2010 Elliott Hughes <enh@google.com> am 14934633: am e8545ce7: Merge "Speed up Formatter %f a bit more by using a thread-local NativeDecimalFormat." into gingerbread

Merge commit '149346332f22d63e679b45e1c347e259459e0328'

* commit '149346332f22d63e679b45e1c347e259459e0328':
Speed up Formatter %f a bit more by using a thread-local NativeDecimalFormat.
fa9acfd6b78ca206da039e7646dfb5780097a436 16-Sep-2010 Elliott Hughes <enh@google.com> Speed up Formatter %f a bit more by using a thread-local NativeDecimalFormat.

Bug: 2934304
Change-Id: I5ddcfc01bf1dc57917a544d00d4dc0d4a37ffe5c
til/Formatter.java
2c4b6b33db6740b6131246edccfc49cbe0a37a5e 16-Sep-2010 Jesse Wilson <jessewilson@google.com> Replace TODOs with comments describing why we're ignoring minBufferCapacity.

Change-Id: I3fb91ded4a574bd20198c35ab5f6f6ad23c856e6
io/channels/Channels.java
08a723cb3291b96a323478bd7d799192818cb0b1 15-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix problems discovered by Channels/Basic test.

In particular:
- available() wasn't trying very hard for FileChannels
where a reasonable value can be had.
- short writes weren't handled, so bytes were being lost
- the alternative InputStreamReader and OutputStreamReader
classes were incorrect and redundant
- the duplicated ChannelInputStream classes were redundant
and one was missing a required IllegalBlockingModeException
- bounds checks were redundant and handled by Bytebuffer.wrap
- null checks were missing.

The new code doesn't honor the user's supplied minBufferCapacity
and instead always uses 8K. 8K is larger than the 'min' so it
should be fine for undersized buffers. And it's sufficient for
high performance, so it should be fine for oversized buffers.
It'll only be a problem for clients that create a very large
number of these Readers, which shouldn't happen in practice.

http://b/issue?id=2233508

Change-Id: I3688397baae4f69f9146aed6a3a60d8333e5df1d
o/InputStream.java
io/channels/Channels.java
43175c0830e92bfed2a187676e89bdde48d84d67 14-Sep-2010 Elliott Hughes <enh@google.com> am 4dc78e4c: am 5f67bf68: am f1ab58e7: Merge "Fix the TimeZone.getTimeZone documentation and a test." into gingerbread

Merge commit '4dc78e4c16f57491c111d8974e2249ac23c6c21d' into dalvik-dev

* commit '4dc78e4c16f57491c111d8974e2249ac23c6c21d':
Fix the TimeZone.getTimeZone documentation and a test.
4dc78e4c16f57491c111d8974e2249ac23c6c21d 14-Sep-2010 Elliott Hughes <enh@google.com> am 5f67bf68: am f1ab58e7: Merge "Fix the TimeZone.getTimeZone documentation and a test." into gingerbread

Merge commit '5f67bf688c1a91c9604bd9648a69bd2e04600301'

* commit '5f67bf688c1a91c9604bd9648a69bd2e04600301':
Fix the TimeZone.getTimeZone documentation and a test.
6c0aa9e00fdbcc2765d3c498c45e078457944468 14-Sep-2010 Elliott Hughes <enh@google.com> Fix the TimeZone.getTimeZone documentation and a test.

Bug: 2996225
Change-Id: I9242b8a8e343d2b1995b5f1d0cb715d2fa3080f6
til/TimeZone.java
0bc30ae8420b5b1abc1b2eefbdf8846309b5447d 13-Sep-2010 Elliott Hughes <enh@google.com> More nio speedups.

Small improvements this time. Stop penalizing getChar/putChar with an extra
level of indirection through getShort/putShort; our VM can't win that
back yet, and the extra method call is a significant fraction of the
total time taken for these operations (1/3rd). This applies to direct, heap,
and mapped buffers. (One day we'll be able to come back and remove this.)

Also remove the float/double specializations from MemoryBlock, rewriting
the two callers of each to use int/long directly. Those callers are public
API, so this is as far as the removal of useless duplication can go here.
This applies to direct and mapped buffers.

Unroll loops (!) used to load/store short/int/long values from Java heap
byte[]s for performance. This applies to heap buffers.

Bug: 2935622
Change-Id: I093122af2b49d3ef864b87dce637c781727445dd
io/BaseByteBuffer.java
io/DirectByteBuffer.java
io/HeapByteBuffer.java
io/MemoryBlock.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteHeapByteBuffer.java
f714d3767875c96c5122683ef8c75cc9d5f1259f 13-Sep-2010 Elliott Hughes <enh@google.com> Make MappedByteBuffer.get(byte[], int, int) orders of magnitude faster.

Even with the misleading logarithmic scale graphs, this stood out like
a sore thumb. Other than this, our MappedByteBuffer looks like it's just a
layer or two of missing inlining away from DirectByteBuffer performance.

Bug: 2935622
Change-Id: Ie4ed153fad6d19a2c83748fee2e364c3e86d40f3
io/MappedByteBufferAdapter.java
03878d16fe2d6e8c158d3d78b39d1774954a8bb1 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am 49d3e932: am ce457657: am 489118a5: Merge "Even more follow up to enh\'s HttpURLConnection docs review." into gingerbread

Merge commit '49d3e9326a5348ebef770874a6a6abf32ce60460' into dalvik-dev

* commit '49d3e9326a5348ebef770874a6a6abf32ce60460':
Even more follow up to enh's HttpURLConnection docs review.
49d3e9326a5348ebef770874a6a6abf32ce60460 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am ce457657: am 489118a5: Merge "Even more follow up to enh\'s HttpURLConnection docs review." into gingerbread

Merge commit 'ce4576570a87c2c3c1f30db073235f317f430038'

* commit 'ce4576570a87c2c3c1f30db073235f317f430038':
Even more follow up to enh's HttpURLConnection docs review.
489118a5f849b76d1374dc47942f6066b4a17eb5 13-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Even more follow up to enh's HttpURLConnection docs review." into gingerbread
461c3c1e44c807a950f8dec34ba48ea425e8fcfb 13-Sep-2010 Elliott Hughes <enh@google.com> am 3628b98e: am 64612b4e: am 9d3b63b8: Merge "Document Unicode versions and that we don\'t support the locale spi junk." into gingerbread

Merge commit '3628b98ebe96ec346dd0d048f39b597c35a58e7e' into dalvik-dev

* commit '3628b98ebe96ec346dd0d048f39b597c35a58e7e':
Document Unicode versions and that we don't support the locale spi junk.
3628b98ebe96ec346dd0d048f39b597c35a58e7e 13-Sep-2010 Elliott Hughes <enh@google.com> am 64612b4e: am 9d3b63b8: Merge "Document Unicode versions and that we don\'t support the locale spi junk." into gingerbread

Merge commit '64612b4e61d7b8367133aa7ac3461953b0ab67b0'

* commit '64612b4e61d7b8367133aa7ac3461953b0ab67b0':
Document Unicode versions and that we don't support the locale spi junk.
9d3b63b8032836ff1c684974c8c7347b231cdc8b 13-Sep-2010 Elliott Hughes <enh@google.com> Merge "Document Unicode versions and that we don't support the locale spi junk." into gingerbread
11b9d26222315d4ddea223ce8f119ec25a1ba3d5 13-Sep-2010 Jesse Wilson <jessewilson@google.com> Even more follow up to enh's HttpURLConnection docs review.

Change-Id: Ia70565470d6c605d0c24105bc4ef5c712e3301a1
https://android-git.corp.google.com/g/67703
et/HttpURLConnection.java
7acfb05a46440d9952eda85ae16d486c980db7a9 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am c8eb9a4b: am c1741ca3: am 55bbb57d: More follow up to enh\'s HttpURLConnection docs review.

Merge commit 'c8eb9a4bdc2fd269ad6db13e00771eae839acc69' into dalvik-dev

* commit 'c8eb9a4bdc2fd269ad6db13e00771eae839acc69':
More follow up to enh's HttpURLConnection docs review.
d2d7abef3e9b73a57cdf1f2afd678d7f48945679 12-Sep-2010 Elliott Hughes <enh@google.com> Document Unicode versions and that we don't support the locale spi junk.

Bug: 2860486
Bug: 2938123
Change-Id: I3eb587300ea97340cdc23ba2d0136b8eeeb99b25
ang/Character.java
ext/BreakIterator.java
ext/Collator.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/DecimalFormatSymbols.java
ext/NumberFormat.java
ext/spi/BreakIteratorProvider.java
ext/spi/CollatorProvider.java
ext/spi/DateFormatProvider.java
ext/spi/DateFormatSymbolsProvider.java
ext/spi/DecimalFormatSymbolsProvider.java
ext/spi/NumberFormatProvider.java
til/Calendar.java
til/Locale.java
til/spi/CurrencyNameProvider.java
til/spi/LocaleNameProvider.java
til/spi/LocaleServiceProvider.java
til/spi/TimeZoneNameProvider.java
c8eb9a4bdc2fd269ad6db13e00771eae839acc69 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am c1741ca3: am 55bbb57d: More follow up to enh\'s HttpURLConnection docs review.

Merge commit 'c1741ca343b689a54c2f805b465b87177e494b78'

* commit 'c1741ca343b689a54c2f805b465b87177e494b78':
More follow up to enh's HttpURLConnection docs review.
55bbb57dc76ab0231583460f5af4083f4f48f8f5 12-Sep-2010 Jesse Wilson <jessewilson@google.com> More follow up to enh's HttpURLConnection docs review.

See the original review here:
https://android-git.corp.google.com/g/#patch,sidebyside,67584,1,luni/src/main/java/java/net/HttpURLConnection.java

Change-Id: If296b35e53e7bde88403e9124038f38dd725f83b
et/HttpURLConnection.java
et/URLConnection.java
13e721c71c83537e6f3f36ad43321c470267d3b3 12-Sep-2010 Jesse Wilson <jessewilson@google.com> am 00abf762: am 6ded10dd: am 8c283b62: Document HttpURLConnection\'s many features and misfeatures.

Merge commit '00abf762df0db66d57de813a168fb09e429f16c7' into dalvik-dev

* commit '00abf762df0db66d57de813a168fb09e429f16c7':
Document HttpURLConnection's many features and misfeatures.
00abf762df0db66d57de813a168fb09e429f16c7 12-Sep-2010 Jesse Wilson <jessewilson@google.com> am 6ded10dd: am 8c283b62: Document HttpURLConnection\'s many features and misfeatures.

Merge commit '6ded10dd27b7e46bba6b3f3491bb844f33844cf1'

* commit '6ded10dd27b7e46bba6b3f3491bb844f33844cf1':
Document HttpURLConnection's many features and misfeatures.
8c283b62cd1952ffa145332d94ed691acf4ac87e 11-Sep-2010 Jesse Wilson <jessewilson@google.com> Document HttpURLConnection's many features and misfeatures.

Change-Id: Ib6d9f05e6a23bc44bd5c8838c9e8098b15d19810
et/HttpURLConnection.java
961da1e7487bdb8ad8ac226d4f2789d003aa87b9 11-Sep-2010 Elliott Hughes <enh@google.com> Optimize bulk get of char[], double[], float[], long[], and short[].

I optimized int[] the other day, and byte[] has always been optimized.
This now makes our get performance equivalent to our put performance,
rather than orders of magnitude worse.

Before:

ByteBuffer_getByteArray 2041 ==========
ByteBuffer_putByteArray 1983 =========
CharBuffer_getCharArray 705152 ============================
CharBuffer_putCharArray 4375 ============
DoubleBuffer_getDoubleArray 860884 =============================
DoubleBuffer_putDoubleArray 11591 ===============
FloatBuffer_getFloatArray 839085 =============================
FloatBuffer_putFloatArray 6690 =============
IntBuffer_getIntArray 6814 =============
IntBuffer_putIntArray 6775 =============
LongBuffer_getLongArray 668171 ============================
LongBuffer_putLongArray 11585 ===============
ShortBuffer_getShortArray 620122 ============================
ShortBuffer_putShortArray 4350 ============

After:

ByteBuffer_getByteArray 2028 ===========
ByteBuffer_putByteArray 1948 ===========
CharBuffer_getCharArray 4376 =================
CharBuffer_putCharArray 4342 =================
DoubleBuffer_getDoubleArray 11616 =======================
DoubleBuffer_putDoubleArray 11540 =======================
FloatBuffer_getFloatArray 6827 ====================
FloatBuffer_putFloatArray 6747 ====================
IntBuffer_getIntArray 6824 ====================
IntBuffer_putIntArray 6733 ====================
LongBuffer_getLongArray 11597 =======================
LongBuffer_putLongArray 11489 =======================
ShortBuffer_getShortArray 4392 =================
ShortBuffer_putShortArray 4329 =================

(All times in microseconds. The relatively large amount of noise visibile from
the code that didn't change is because I told caliper I wanted results quickly,
since it was order of magnitude I cared about, not tens of microseconds. That
is, the scales on the two graphs are completely different, and it's only the
shapes of the graphs that you can usefully compare: after is less spiky,
because I've filled in the performance potholes.)

Bug: 2935622
Change-Id: Ia5a36e641ef67648fcdbda092fab36111613b1c2
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MemoryBlock.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
dbb973b7f1dc6d3e86c6f9528a2aadff1e01c0cb 10-Sep-2010 Elliott Hughes <enh@google.com> Fix MappedByteBufferAdapter.

I broke MappedByteBufferAdapter in https://android-git.corp.google.com/g/65226
because I didn't move the position-setting to _before_ the delegated gets (the
puts were correct). This was spotted in review, but I'd already submitted to
unblock a later change.

The upstream tests didn't spot this because they mainly test buffers full of
zeros (which aren't very interesting from an endian point of view). I've raised
http://b/2991877 to get the upstream tests fixed.

I've also added a motivating comment for this admittedly weird class.

Bug: 2935622
Change-Id: I6bbf00636a5e05e7396cf94ee6985bcf50fc4552
io/MappedByteBufferAdapter.java
0e1b748ecabf720065a632f28330f5d4d037d5ae 10-Sep-2010 Elliott Hughes <enh@google.com> Consistent naming for get/put/wrap arguments.

Bug: 2935622
Change-Id: Icb39392f9106f9fe5ba70ccdcb6b059dbf5617bc
io/ByteBuffer.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/IntToByteBufferAdapter.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/LongToByteBufferAdapter.java
io/MappedByteBufferAdapter.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDirectByteBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
io/ShortToByteBufferAdapter.java
692222b08ff88eb92b523bf4780d7ea17a23aa80 10-Sep-2010 Elliott Hughes <enh@google.com> Fast-path nio put for char[], double[], long[], nio get for int[].

The other vector puts were already special-cased.

int[] is the first get to be accelerated; I'll come back and do the others.
I don't know how used vector gets are, but our nio unit tests go from ~4minutes
to ~15s after these changes, and all but the last five seconds of that is
from the get(int[]) part of this change.

Bug: 2935622
Change-Id: I1f5afb77e0fc7abcb661f861fa435cbec4b3f348
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MemoryBlock.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
0c53cf8b2c46deb41e91db50ddc17d598cc64a10 09-Sep-2010 Elliott Hughes <enh@google.com> Speed up MappedByteBuffer.

Make it possible to override limit(int) and position(int) internally, so I can
avoid updating MappedByteBufferAdapter's wrapped ByteBuffer's limit and
position on every get or put. I still need to do extra work with position if
you use the get/put overloads that don't take an index, but even that becomes
cheaper. The indexed overloads benefit the most, though. Before:

benchmark before after (both us)

ByteBuffer_getByte 830 757
ByteBuffer_getChar 940 875

ByteBuffer_getByte_indexed 800 509
ByteBuffer_getChar_indexed 936 643

Also factor out duplicated toString implementations.

Bug: 2935622
Change-Id: I4cfe206fde638bddb5a7b4a62223e2588f44b8ac
io/Buffer.java
io/ByteBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/MappedByteBufferAdapter.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDirectByteBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortBuffer.java
934767b07d94041390785d8fe66c86b2379730bc 09-Sep-2010 Elliott Hughes <enh@google.com> Fix build (non-final _elementSizeShift).

Bug: 2935622
Change-Id: I5ff543b11e055a25676444d7ba9f0bb939544816
io/BaseByteBuffer.java
io/Buffer.java
io/ByteBuffer.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/HeapByteBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/ShortBuffer.java
b15055b1c9622c611b8fc83c4c92cba7f9dab3e8 08-Sep-2010 Elliott Hughes <enh@google.com> Merge "Move the MemoryBlock up into java.nio.Buffer." into dalvik-dev
0440837fd0013373ba3476283151299e7be9e5a3 08-Sep-2010 Elliott Hughes <enh@google.com> Move the MemoryBlock up into java.nio.Buffer.

This lets me kill getBaseAddress and the (bogus) DirectBuffer interface.

Bug: 2935622
Change-Id: I51c758e7687a6cfa4a3a64ef089fb600b847b70f
io/BaseByteBuffer.java
io/Buffer.java
io/ByteBuffer.java
io/CharToByteBufferAdapter.java
io/DirectBuffer.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/ShortToByteBufferAdapter.java
9bf1ab36b67d8b49797cb004b6aedc3e8f52e071 08-Sep-2010 Elliott Hughes <enh@google.com> am 4d8c37b9: am f30df55f: am 99d9f92a: Fix off-by-one error in BigInteger.valueOf.

Merge commit '4d8c37b917df4212de7f9b9e6b6c4a8f80727de4' into dalvik-dev

* commit '4d8c37b917df4212de7f9b9e6b6c4a8f80727de4':
Fix off-by-one error in BigInteger.valueOf.
4d8c37b917df4212de7f9b9e6b6c4a8f80727de4 08-Sep-2010 Elliott Hughes <enh@google.com> am f30df55f: am 99d9f92a: Fix off-by-one error in BigInteger.valueOf.

Merge commit 'f30df55f3ab26dc16523f8a8116bc93e479f3ada'

* commit 'f30df55f3ab26dc16523f8a8116bc93e479f3ada':
Fix off-by-one error in BigInteger.valueOf.
eb29579498a8860f81fd38275f8657c21bb67abb 08-Sep-2010 Elliott Hughes <enh@google.com> Rename PlatformAddress to MemoryBlock.

Bug: 2935622
Change-Id: I8a09cb9be0b0ea468278f7808f1a18c3ce820b49
io/CharToByteBufferAdapter.java
io/DirectBuffer.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/MemoryBlock.java
io/PlatformAddress.java
io/ReadOnlyDirectByteBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
99d9f92a991cbbfc58b103b3f1c114fbac5d1188 08-Sep-2010 Elliott Hughes <enh@google.com> Fix off-by-one error in BigInteger.valueOf.

Bug: 2981072
Change-Id: Ic85aea22fc4e519355c537376b1526828e2375c5
ath/BigInteger.java
0f335c4ed1a0cb419c8ce82183fabb241d5dd032 07-Sep-2010 Elliott Hughes <enh@google.com> Kill getEffectiveAddress.

Set the corresponding field in the constructors.

Requires a dalvikvm change: https://android-git.corp.google.com/g/64866

Bug: 2935622
Change-Id: I26663bfcdb80db75672be71395b861c1a79c24fc
io/Buffer.java
io/CharToByteBufferAdapter.java
io/DirectBuffer.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBufferAdapter.java
io/NIOAccess.java
io/NioUtils.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
403719757f572510dbc1ed608c1a3faa81aa2a28 07-Sep-2010 Elliott Hughes <enh@google.com> DirectBuffer can be package-private.

I should have done this when I moved this class. PlatformAddress still needs
one called moved before it can be package-private.

Bug: 2935622
Change-Id: Ib618975168ee83f06078c1c633845f5910690bbf
io/DirectBuffer.java
73ea6f8e9e248a1c10c9291e9698de1c81a62979 04-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Remove ReaderInputStream and WriterOutputStream." into dalvik-dev
498e6e60b7c9180b6d58818fe49fd72ad0209a65 04-Sep-2010 Jesse Wilson <jessewilson@google.com> Remove ReaderInputStream and WriterOutputStream.

These classes are unnecessary on our platform, where UTF-8 is
the only supported default encoding.

This was motivated by a search for dangerous calls to InputStream.available(),
which WriterOutputStream has in its flush() method.

Change-Id: Ia8d5da075581caf371e1384e05be29c2fa8a4408
ang/Runtime.java
3ae7518738fe2df948ec310096015848ebbe410b 04-Sep-2010 Brian Carlstrom <bdc@google.com> @hide java.nio.{DirectBuffer,PlatformAddress}

Change-Id: Ib8992de0394c6fc340a457d16acca9bbb9117121
io/DirectBuffer.java
io/PlatformAddress.java
c73a5be50cdd804ff3c12e7b43da08c33cdd6f21 04-Sep-2010 Elliott Hughes <enh@google.com> Move some of the nio implementation into java.nio.

Another stepping-stone to simplifying the PlatformAddress/OSMemory situation.

Bug: 2935622
Change-Id: Ic5b941ee7c17d6b5aeda53c3c2cdf2c43cebff55
io/CharToByteBufferAdapter.java
io/DirectBuffer.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/NIOAccess.java
io/NioUtils.java
io/PlatformAddress.java
io/ReadOnlyDirectByteBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
io/charset/Charset.java
ba8f3b76f98eafecd94cb5a549634eb14cfd7b1c 04-Sep-2010 Elliott Hughes <enh@google.com> Merge "Remove nio cruft, move the implementation cost of 'free' where it belongs..." into dalvik-dev
c3c38fbbccaf428200acdd819b1f7799edac54d2 04-Sep-2010 Elliott Hughes <enh@google.com> Remove nio cruft, move the implementation cost of 'free' where it belongs...

...and inline some getBaseAddress calls. The JIT doesn't manage to do that, it
seems, but being the JIT is not really my purpose: I'm trying to kill
getBaseAddress.

Bug: 2935622
Change-Id: I3cd99cd131a2c09796f5ff5bb31332287db2130f
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBufferAdapter.java
io/NIOAccess.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
01cd454055a7bef76178e301fe0d63481330676e 04-Sep-2010 Jesse Wilson <jessewilson@google.com> am bcee1dba: am e24632f5: am 4eb8ca7f: Fix the last remaining gaps in our Java 6 API.

Merge commit 'bcee1dbab816a3f32c642a7950ff824125896985' into dalvik-dev

* commit 'bcee1dbab816a3f32c642a7950ff824125896985':
Fix the last remaining gaps in our Java 6 API.
bcee1dbab816a3f32c642a7950ff824125896985 04-Sep-2010 Jesse Wilson <jessewilson@google.com> am e24632f5: am 4eb8ca7f: Fix the last remaining gaps in our Java 6 API.

Merge commit 'e24632f522e88be1a8e01ea04515fadcca45cdb0'

* commit 'e24632f522e88be1a8e01ea04515fadcca45cdb0':
Fix the last remaining gaps in our Java 6 API.
4eb8ca7f1e5de2d208c5fcee8b11a7e50200cf17 04-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix the last remaining gaps in our Java 6 API.

This updates Policy and adds PolicySpi. Both come right from
Harmony and have been tested by Harmony's test suite.

This removes redundant abstract methods in SocketImpl; these are
inherited from the SocketOptions interface.

This makes an internal method in SocketPermission private.

See http://b/issue?id=2497395

Change-Id: I734529ac7e1980453acfe0d8e7209f49b6679652
et/SocketImpl.java
et/SocketPermission.java
ecurity/Policy.java
ecurity/PolicySpi.java
040bb9d72f4a406a40f40e198857a8a27e3de688 04-Sep-2010 Elliott Hughes <enh@google.com> Merge the various kinds of PlatformAddress.

This is just a stepping-stone, not particularly interesting by itself.

Bug: 2935622
Change-Id: I561337b9e7de8a6f058b7d52e5d756bb455075e9
io/DirectByteBuffer.java
io/MappedByteBuffer.java
io/ReadWriteDirectByteBuffer.java
29dbfe19b113a13b712be2bc762ef1c81cd06c47 03-Sep-2010 Elliott Hughes <enh@google.com> Use finalizers to free direct buffers.

Also switch to a cheaper scheme for avoiding double-frees (which could only
happen if library code is broken; at the moment the only caller is the
iovec-style stuff). This halves the cost of direct buffer access, at the
unimportant cost of not throwing an exception if we try to access a buffer
we freed while we still had a reference to it.

Also use named constants for the sizes of primitive types.

Also kill BufferFactory.

Bug: 2935622
Change-Id: I6021ce7531f49d8cff7635d6d2cc54851bacaf69
io/Buffer.java
io/BufferFactory.java
io/ByteBuffer.java
io/CharBuffer.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DoubleBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatBuffer.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntBuffer.java
io/IntToByteBufferAdapter.java
io/LongBuffer.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/ReadOnlyDirectByteBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ShortBuffer.java
io/ShortToByteBufferAdapter.java
62a12324bd7c3b77e999b32becad3d2916190e56 03-Sep-2010 Elliott Hughes <enh@google.com> Change NIOAccess to consistently use the position field rather than the position() method.

This is safe (which is lucky, since we're accessing the field directly
elsewhere). position() is final and just "return position;".

Bug: 2535509
Change-Id: I5c1f569ab318cb0ddb44e887b75fdc21ac270944
io/NIOAccess.java
20a72661a2715fd4c62fe102ea8f7328ecea2fb0 03-Sep-2010 Elliott Hughes <enh@google.com> Merge "Kill PlatformAddressFactory, and remove/simplify some other code." into dalvik-dev
4d68282a79fb0417f43efdef41b9a920385bdded 03-Sep-2010 Elliott Hughes <enh@google.com> Kill PlatformAddressFactory, and remove/simplify some other code.

Now we create one PlatformAddress per direct byte buffer (or mapped byte
buffer), there's no need for object pooling.

Bug: 2935622
Change-Id: I84ef9d0b77774e1d2d80921b95b2f30383a0ab68
io/DirectByteBuffer.java
io/DirectByteBuffers.java
io/ReadWriteDirectByteBuffer.java
bbef9cc724535cf1c8b161fdfabbded2f2f7b1b8 03-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix jtreg test failures when we weren't throwing on bad parameters." into dalvik-dev
8cfafd33742282beb20c6971aafc1feb35e3fa5e 03-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix jtreg test failures when we weren't throwing on bad parameters.

See http://b/2224959

Change-Id: I9f572d08328dda280a77287a228072d33fcbea85
o/StringBufferInputStream.java
til/zip/InflaterInputStream.java
til/zip/ZipInputStream.java
ef122c9d4b1d3b4f15988682149e285098e8d4ab 02-Sep-2010 Elliott Hughes <enh@google.com> Merge "Make DirectBuffer.getEffectiveAddress cheaper." into dalvik-dev
1c2b566e4fc0b75bd5f50f17b1a6d16d8999852d 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix a findbugs bug where ZipEntry.clone() didn't call super.clone()." into dalvik-dev
f46d2ce4d4c92d16e2574f57f70fc5477dc12697 02-Sep-2010 Elliott Hughes <enh@google.com> Make DirectBuffer.getEffectiveAddress cheaper.

DirectBuffer.getEffectiveAddress is used to implement the JNI function
GetDirectBufferAddress. Currently it uses reference types unnecessarily,
and we have an object pool to reduce the cost of this. Switch to using
int instead.

I'll remove the pool in a later change.

Note that this change requires a corresponding change to the
GetDirectBufferAddress implementation in dalvik:
https://android-git.corp.google.com/g/64328

Bug: 2935622
Change-Id: Ia0c20bd58c5355550f6af840feb08acff14fd4e9
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DirectByteBuffers.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/MappedByteBufferAdapter.java
io/NIOAccess.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
355a98498e4bc434dde8809eacf6e150f9b25f89 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix a findbugs bug where ZipEntry.clone() didn't call super.clone().

See http://b/2099615

Change-Id: Ib1347aa5e35c62501d9d59eccfdfed098559d552
til/zip/ZipEntry.java
56e742806ebb265e77de750cdb4575cff781fdf8 02-Sep-2010 Elliott Hughes <enh@google.com> Kill ThreadLocalCache.

This has been a long time coming. The two public fields were only used when
writing a jar file manifest, which isn't a performance case. The class was
used very strangely in ObjectStreamClass; it seems to make more sense to just
inline the relevant code there.

Change-Id: I5c6fe307558038394a598a846f59098c77143d3a
o/ObjectStreamClass.java
til/jar/Manifest.java
9297c39c474c98b7aec19e22bf93416071080f3a 02-Sep-2010 Elliott Hughes <enh@google.com> am 1f6597dc: am ff59a5c5: am 171dc20a: Use idiomatic Java "type[] id" syntax instead of "type id[]".

Merge commit '1f6597dc2b3340c5eca6f16d8681058f913d8744' into dalvik-dev

* commit '1f6597dc2b3340c5eca6f16d8681058f913d8744':
Use idiomatic Java "type[] id" syntax instead of "type id[]".
1f6597dc2b3340c5eca6f16d8681058f913d8744 02-Sep-2010 Elliott Hughes <enh@google.com> am ff59a5c5: am 171dc20a: Use idiomatic Java "type[] id" syntax instead of "type id[]".

Merge commit 'ff59a5c5b0977ba11442422b0a853452dfb289e8'

* commit 'ff59a5c5b0977ba11442422b0a853452dfb289e8':
Use idiomatic Java "type[] id" syntax instead of "type id[]".
171dc20afe5071d5cbfad7103903bfa2c1f8d00f 02-Sep-2010 Elliott Hughes <enh@google.com> Use idiomatic Java "type[] id" syntax instead of "type id[]".

I've left xalan and the other xml filth alone, as usual.

Change-Id: I6be274501fff73e67ca6b3c872704988e0e30486
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/CharArrayReader.java
o/DataOutputStream.java
o/InputStreamReader.java
o/RandomAccessFile.java
o/Reader.java
o/StreamTokenizer.java
o/Writer.java
ang/Integer.java
ang/StringBuffer.java
ath/BigInteger.java
ath/BitLevel.java
ath/Conversion.java
ath/Logical.java
ath/Multiplication.java
ath/Primality.java
et/Inet6Address.java
et/InetAddress.java
et/URLDecoder.java
io/BufferFactory.java
ecurity/MessageDigestSpi.java
ecurity/SignatureSpi.java
ext/Bidi.java
til/Formatter.java
til/GregorianCalendar.java
7ab77235d8e82fed639eebbf93ac317ee9346498 02-Sep-2010 Brian Carlstrom <bdc@google.com> am 9cbb0f7a: am 7f0c06f7: Don\'t use StringBuffer where we don\'t need to.

Merge commit '9cbb0f7a0022b823d664c8c20daecf2de584aecb'

* commit '9cbb0f7a0022b823d664c8c20daecf2de584aecb':
Don't use StringBuffer where we don't need to.
68eebc3ce6b115bedae49693f42b49fd22f220d2 02-Sep-2010 Elliott Hughes <enh@google.com> Put fields in the canonical order.

Change-Id: I2f19343fdc154ce2b5570f6507dd39b5582543c9
ang/RealToString.java
7f0c06f737b6f1f6b3a5bb30111f95dd0ca586a2 02-Sep-2010 Brian Carlstrom <bdc@google.com> Don't use StringBuffer where we don't need to.

I've left xalan alone, because that's just one big steaming heap.

Change-Id: Ibf7b2b5e347196d4de857217b022003ccc409ac5
wt/font/NumericShaper.java
ang/Throwable.java
ang/reflect/Field.java
ath/BigDecimal.java
ath/Conversion.java
ath/MathContext.java
et/URLEncoder.java
til/prefs/AbstractPreferences.java
til/prefs/XMLParser.java
til/regex/Matcher.java
9642982339262f29e0452917b419276ad3ab42a9 02-Sep-2010 Elliott Hughes <enh@google.com> am e2f3eced: am 91236d22: am 62066678: Make StringBuilder.append(float) and append(double) 2x faster.

Merge commit 'e2f3ecedda402fbec6ef0e3498e45ab3ea365ca1' into dalvik-dev

* commit 'e2f3ecedda402fbec6ef0e3498e45ab3ea365ca1':
Make StringBuilder.append(float) and append(double) 2x faster.
65434a663de243eba8e214a52eead6c0c31aa0c3 02-Sep-2010 Elliott Hughes <enh@google.com> am 6b45cd03: am 8689d009: am 10a17e23: Speed up Float.toString (and Double.toString).

Merge commit '6b45cd03643b291efb24146c7b8ef9f3b9c5fd16' into dalvik-dev

* commit '6b45cd03643b291efb24146c7b8ef9f3b9c5fd16':
Speed up Float.toString (and Double.toString).
5dd4daab576882e55330f320426400b3804d00f2 02-Sep-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of d6e0e84f to dalvik-dev

Change-Id: Ia9fb6f5612c98b2d832d089f1320e83821ddc6bb
e1ad0aa0a03ae8c556575b1babe945488296cef8 02-Sep-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of bbdd4787 to dalvik-dev

Change-Id: Ief7c759de138017e8211ea1aed53615211f2abc1
e2f3ecedda402fbec6ef0e3498e45ab3ea365ca1 02-Sep-2010 Elliott Hughes <enh@google.com> am 91236d22: am 62066678: Make StringBuilder.append(float) and append(double) 2x faster.

Merge commit '91236d22cdf5dca974366891223ada1078500d1f'

* commit '91236d22cdf5dca974366891223ada1078500d1f':
Make StringBuilder.append(float) and append(double) 2x faster.
0116e948e00b19ffb3c43da7344484104138b8e5 02-Sep-2010 Elliott Hughes <enh@google.com> am e105541c: am f528b9df: Double the speed of StringBuilder.append(int) and append(long).

Merge commit 'e105541c578878ca2f6d75da3933032bc905a9f2'

* commit 'e105541c578878ca2f6d75da3933032bc905a9f2':
Double the speed of StringBuilder.append(int) and append(long).
a784637e4726a4abe9517f19614ae61e55f6ca48 02-Sep-2010 Elliott Hughes <enh@google.com> am 7e59598e: am ca12e576: Make StringBuilder.append(CharSequence) as cheap as append(CharSequence, int, int).

Merge commit '7e59598ee2f49fdd93d9c8c07f0a055e7ad788dc'

* commit '7e59598ee2f49fdd93d9c8c07f0a055e7ad788dc':
Make StringBuilder.append(CharSequence) as cheap as append(CharSequence, int, int).
e79b44902a2d9656df80c98f9efba5514d4d9add 02-Sep-2010 Elliott Hughes <enh@google.com> am 59b955d9: am 82a495ad: Move Integer and Long\'s toString methods into a new class.

Merge commit '59b955d9911aff328932a465d20264b23a840bdd'

* commit '59b955d9911aff328932a465d20264b23a840bdd':
Move Integer and Long's toString methods into a new class.
6b45cd03643b291efb24146c7b8ef9f3b9c5fd16 02-Sep-2010 Elliott Hughes <enh@google.com> am 8689d009: am 10a17e23: Speed up Float.toString (and Double.toString).

Merge commit '8689d009e01ac0ba2c505b42c9067760039eb97c'

* commit '8689d009e01ac0ba2c505b42c9067760039eb97c':
Speed up Float.toString (and Double.toString).
d6e0e84f4f074e185da89127b112bc68709d6b5a 02-Sep-2010 Elliott Hughes <enh@google.com> am 7585076e: am 706de116: Minor tidy-up of Float.toString and Double.toString.

Merge commit '7585076ed2a498cbd2fa615be1e5cc01f4537ec0'

* commit '7585076ed2a498cbd2fa615be1e5cc01f4537ec0':
Minor tidy-up of Float.toString and Double.toString.
bbdd47874c810cfb9d83677992c6e84a0e0ca954 02-Sep-2010 Elliott Hughes <enh@google.com> am 3337a093: am d16c3144: Faster implementations of Math/StrictMath\'s copySign methods.

Merge commit '3337a093b96f4a36d2dc5629aaa2e742019bac35'

* commit '3337a093b96f4a36d2dc5629aaa2e742019bac35':
Faster implementations of Math/StrictMath's copySign methods.
7f33d331040c0737f6cd10511654293eaac86134 02-Sep-2010 Elliott Hughes <enh@google.com> am 92ef6c9f: am 3e6f49bb: Double the speed of %.2f in Formatter.

Merge commit '92ef6c9f29dc10e4c75cb711d72067f82168c52f'

* commit '92ef6c9f29dc10e4c75cb711d72067f82168c52f':
Double the speed of %.2f in Formatter.
620666783267ed3a6f7f2b4309a66f1c1f18de53 02-Sep-2010 Elliott Hughes <enh@google.com> Make StringBuilder.append(float) and append(double) 2x faster.

Actually a bit more than 2x --- 40us down to 15us for "small" (but non-trivial)
floats.

Also StringBuffer.

[cherry-pick of 0d041e2cea528066bb87c7891ef746b977f18b9d from dalvik-dev into gingerbread]

Bug: 2243821
ang/Double.java
ang/RealToString.java
ang/StringBuffer.java
ang/StringBuilder.java
f528b9df057fe7faf3db65a931f26b6caf214991 01-Sep-2010 Elliott Hughes <enh@google.com> Double the speed of StringBuilder.append(int) and append(long).

Also StringBuilder's evil twin, StringBuffer.

Also shave some time off "%d" formatting (10us out of 60us).

[cherry-pick of 933539af534f3cda9c38602f6009478a0cc5a21f from dalvik-dev to gingerbread]

Bug: 2302920, 2243821
ang/IntegralToString.java
ang/StringBuffer.java
ang/StringBuilder.java
til/Formatter.java
ca12e576434c86b430aa08f09a14012b71b2d7eb 01-Sep-2010 Elliott Hughes <enh@google.com> Make StringBuilder.append(CharSequence) as cheap as append(CharSequence, int, int).

(Also give a few locals better names.)

[cherry-pick of 041880d62bdb2008b43b66c980ef208600d90098 from dalvik-dev to gingerbread]

Bug: 2243821
ang/AbstractStringBuilder.java
ang/StringBuffer.java
ang/StringBuilder.java
82a495ad44d76aac37f54bbbe7c31608d1054f84 31-Aug-2010 Elliott Hughes <enh@google.com> Move Integer and Long's toString methods into a new class.

I've reverted the old optimizations that used shifting and addition instead
of multiplication, because that's been slower for a while now. I've also
switched to more consistently using DIGITS. Otherwise, this code is unchanged.

I've also changed Float.toHexString to use StringBuilder.append(int) instead
of calling Integer.toString manually (with an eye to taking advantage of future
more efficient implementations of StringBuilder.append(int)).

[cherry-pick of 6151feb53344092a7fb7e1e3f417d23adaf2f6c2 from dalvik-dev to gingerbread; plus build fix]

Bug: 2302920
Change-Id: I4d65d98b79ac299208102f0753960727b77e81ce
ang/Float.java
ang/Integer.java
ang/IntegralToString.java
ang/Long.java
10a17e23b22dc0ff6363d15bce67d668b6d44dd0 27-Aug-2010 Elliott Hughes <enh@google.com> Speed up Float.toString (and Double.toString).

The special cases (NaN, infinities, and zeros) go from 30us to 1us.

There are basically three other paths through the code, depending on the value:

The small case goes from 60us to 30us.
The medium case goes from 70us to 31us.
The large case goes from 100us to 50us.

There's way less garbage produced, and now we're using StringBuilder, we're
in a position to take advantage of future optimization of
StringBuilder.append(int).

[cherry-pick of 2164031488f9788e5ee9ad2545b3aec34b65e06c from dalvik-dev to gingerbread]

Bug: 2934304
ang/Double.java
ang/Float.java
ang/RealToString.java
706de1164836051ab31cc69eb77a6bba1a723896 27-Aug-2010 Elliott Hughes <enh@google.com> Minor tidy-up of Float.toString and Double.toString.

This patch looks larger than it is. I've moved duplicated constants out of
Math and StrictMath and into Float and Double where they belong. I've also
moved a table out of BigDecimal so I can reuse it in NumberConverter, which
I've renamed to RealToString.

The main active ingredient here is that there's no longer StringBuilder usage
to prepend '-'. This actually brings us down from 74ns to 62ns for an easy
case like 123.45f.

[cherry-pick of 910106e29fe98f14b2c36312a7498287273ba826 from dalvik-dev to gingerbread; plus build fix]

Bug: 2934304
Change-Id: Id79a6fb0d739e673b7428d240fc48bdae9b8bb43
ang/Double.java
ang/Float.java
ang/Math.java
ang/RealToString.java
ang/StrictMath.java
ath/BigDecimal.java
d16c314465f7f5905fe8852eaa09d4e7e14ec835 25-Aug-2010 Elliott Hughes <enh@google.com> Faster implementations of Math/StrictMath's copySign methods.

These are only faster than the old native implementations now we have
intrinsics for float/int and double/long conversion, but given those,
they're about 4x faster.

We were already using Java for getExponent, the other obvious candidate
for an all-Java implementation.

[cherry-pick of a61c63c54ba46bb8a1dcbd888e3b29d6cedfb1ff from dalvik-dev to gingerbread]

Bug: 2935622
ang/Math.java
ang/StrictMath.java
3e6f49bbb915b880afe104ec784c66bda55da450 25-Aug-2010 Elliott Hughes <enh@google.com> Double the speed of %.2f in Formatter.

Primarily this works by going straight to the NativeDecimalFormat. This
cuts down on a bunch of objects we don't actually need. Changing
NativeDecimalFormat to not have a finalizer means we can also relieve
the GC of all the finalization work.

This also fixes a few test failures I ran across. The , flag and digit
localization aren't mutually exclusive, and BigDecimal (a) can't represent
NaN or either infinity, but (b) returns infinities from doubleValue if the
BigDecimal is out of double's range; this made our check for special
numbers in transformFromFloat wrong.

[cherry-picked 5f509be2576f2817856413301ca8135f6ee20b30 from dalvik-dev to gingerbread]

Bug: 2934304
ext/DecimalFormat.java
til/Formatter.java
b535fdb2c252e7a88cb6de46ccb479a5e9b70cf6 02-Sep-2010 Elliott Hughes <enh@google.com> am 1da033c1: am b74f4fca: am 95c82c8a: Fix "java.net.preferIPv6Addresses".

Merge commit '1da033c1c02b821561f1e372a6832d388e2188c0' into dalvik-dev

* commit '1da033c1c02b821561f1e372a6832d388e2188c0':
Fix "java.net.preferIPv6Addresses".
433827edb88e722fa28575865150cbeeb6ad540b 02-Sep-2010 Elliott Hughes <enh@google.com> Merge "Make StringBuilder.append(float) and append(double) 2x faster." into dalvik-dev
1da033c1c02b821561f1e372a6832d388e2188c0 02-Sep-2010 Elliott Hughes <enh@google.com> am b74f4fca: am 95c82c8a: Fix "java.net.preferIPv6Addresses".

Merge commit 'b74f4fca74714f96fc8e1fb467ac835d33eb78eb'

* commit 'b74f4fca74714f96fc8e1fb467ac835d33eb78eb':
Fix "java.net.preferIPv6Addresses".
0d041e2cea528066bb87c7891ef746b977f18b9d 02-Sep-2010 Elliott Hughes <enh@google.com> Make StringBuilder.append(float) and append(double) 2x faster.

Actually a bit more than 2x --- 40us down to 15us for "small" (but non-trivial)
floats.

Also StringBuffer.

Bug: 2243821
Change-Id: I9537a4973e3269d5a038150b0216e045a2df7b50
ang/Double.java
ang/RealToString.java
ang/StringBuffer.java
ang/StringBuilder.java
95c82c8a020e48793dd5db33ba1a20f9ef01737a 02-Sep-2010 Elliott Hughes <enh@google.com> Fix "java.net.preferIPv6Addresses".

I wrote getBoolean (a bogus method that shouldn't even exist) when I meant
parseBoolean.

Change-Id: Ib8c1cefdf0242fdc2b613850ec88ca35a1a83dea
et/InetAddress.java
3bd59b99319aecb86e3111c063c111e9e28e4772 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing warnings in ObjectInputStream, including possible null dereferences." into dalvik-dev
2543351c360bdfe0046e819dedb069f3724d703a 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Fixing warnings in ObjectInputStream, including possible null dereferences.

See http://b/issue?id=2099718

Change-Id: I74db9e216c0d2568823c313aeeb91fdef72ae00a
o/ObjectInputStream.java
328f533a177f7579a9ea916f5569053ec9c149b8 01-Sep-2010 Elliott Hughes <enh@google.com> Don't use StringBuffer where we don't need to.

I've left xalan alone, because that's just one big steaming heap.

Change-Id: I47e80399ebced922656e46dacd8dcbfc698e94f8
wt/font/NumericShaper.java
ang/Throwable.java
ang/reflect/Field.java
ath/BigDecimal.java
ath/Conversion.java
ath/MathContext.java
et/URLEncoder.java
til/prefs/AbstractPreferences.java
til/prefs/XMLParser.java
til/regex/Matcher.java
933539af534f3cda9c38602f6009478a0cc5a21f 01-Sep-2010 Elliott Hughes <enh@google.com> Double the speed of StringBuilder.append(int) and append(long).

Also StringBuilder's evil twin, StringBuffer.

Also shave some time off "%d" formatting (10us out of 60us).

Bug: 2302920, 2243821
Change-Id: Ie354731d728ee1664f3b5b5868d79af395d71b08
ang/IntegralToString.java
ang/StringBuffer.java
ang/StringBuilder.java
til/Formatter.java
041880d62bdb2008b43b66c980ef208600d90098 01-Sep-2010 Elliott Hughes <enh@google.com> Make StringBuilder.append(CharSequence) as cheap as append(CharSequence, int, int).

(Also give a few locals better names.)

Bug: 2243821
Change-Id: Idcc6704b16bbea9f1460724f22ed7da076c9d185
ang/AbstractStringBuilder.java
ang/StringBuffer.java
ang/StringBuilder.java
378697fcb6a10fe986380275891074a2b18bb01b 01-Sep-2010 Elliott Hughes <enh@google.com> Merge "Fix build (accidentally made an implementation detail public)." into dalvik-dev
c54dc4100febc491cdfe9879c00f687c28e0ce17 01-Sep-2010 Elliott Hughes <enh@google.com> Fix build (accidentally made an implementation detail public).

Change-Id: I86f30fc7e5224c283a26509da92e46dd19704d59
ang/IntegralToString.java
53a9f99d792c9101ed29dfb923e0550beb2e58a8 01-Sep-2010 Jesse Wilson <jessewilson@google.com> am cc479176: am 7927ab5a: am 5b65f4f2: Merge "Adding documentation for a API bug in FilterInputStream subclasses" into gingerbread

Merge commit 'cc479176939f13c99569e8919a92874b4ce3f535' into dalvik-dev

* commit 'cc479176939f13c99569e8919a92874b4ce3f535':
Adding documentation for a API bug in FilterInputStream subclasses
6151feb53344092a7fb7e1e3f417d23adaf2f6c2 31-Aug-2010 Elliott Hughes <enh@google.com> Move Integer and Long's toString methods into a new class.

I've reverted the old optimizations that used shifting and addition instead
of multiplication, because that's been slower for a while now. I've also
switched to more consistently using DIGITS. Otherwise, this code is unchanged.

I've also changed Float.toHexString to use StringBuilder.append(int) instead
of calling Integer.toString manually (with an eye to taking advantage of future
more efficient implementations of StringBuilder.append(int)).

Bug: 2302920
Change-Id: I4244081456baf29aefbf974ca7220fdba5656e1d
ang/Float.java
ang/Integer.java
ang/IntegralToString.java
ang/Long.java
cc479176939f13c99569e8919a92874b4ce3f535 01-Sep-2010 Jesse Wilson <jessewilson@google.com> am 7927ab5a: am 5b65f4f2: Merge "Adding documentation for a API bug in FilterInputStream subclasses" into gingerbread

Merge commit '7927ab5a6ff861b480e63daa38a1120c634eede4'

* commit '7927ab5a6ff861b480e63daa38a1120c634eede4':
Adding documentation for a API bug in FilterInputStream subclasses
5b65f4f2917a11ef9d2798203f5dca55682d9e81 31-Aug-2010 Jesse Wilson <jessewilson@google.com> Merge "Adding documentation for a API bug in FilterInputStream subclasses" into gingerbread
858dd42310622fd1b77bfa0fbd85ec851b3925c1 31-Aug-2010 Jesse Wilson <jessewilson@google.com> Adding documentation for a API bug in FilterInputStream subclasses

Change-Id: I76a3fdb51e9d0071efef013c6879eb2bc9e7977c
o/BufferedInputStream.java
o/DataInputStream.java
o/FilterInputStream.java
o/LineNumberInputStream.java
o/PushbackInputStream.java
ecurity/DigestInputStream.java
til/zip/CheckedInputStream.java
9c1e9452456e1634744d79e61ebe265eb15c7262 28-Aug-2010 Elliott Hughes <enh@google.com> Merge "Remove the accessors hiding our IFileSystem and INetworkSystem." into dalvik-dev
2164031488f9788e5ee9ad2545b3aec34b65e06c 27-Aug-2010 Elliott Hughes <enh@google.com> Speed up Float.toString (and Double.toString).

The special cases (NaN, infinities, and zeros) go from 30us to 1us.

There are basically three other paths through the code, depending on the value:

The small case goes from 60us to 30us.
The medium case goes from 70us to 31us.
The large case goes from 100us to 50us.

There's way less garbage produced, and now we're using StringBuilder, we're
in a position to take advantage of future optimization of
StringBuilder.append(int).

Bug: 2934304
Change-Id: Ib7441e064557973dd0c6247a149275d6367d55ea
ang/Double.java
ang/Float.java
ang/RealToString.java
3db0d1b07a79c3c871b0aa0929674adae3081b4f 28-Aug-2010 Elliott Hughes <enh@google.com> Remove the accessors hiding our IFileSystem and INetworkSystem.

These accessors aren't buying us anything, are costing us something, and have
encouraged caching of instances in fields all over the place. Lose all that
cruft.

I think we all agree that we want to merge IFileSystem and INetworkSystem at
some point, but I'll do that some other day.

Change-Id: I07696ec9650d0395ec31a71a74300e818a3fed91
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
et/DatagramSocketImpl.java
et/InetAddress.java
et/Socket.java
et/SocketImpl.java
et/URI.java
93cca26b59beb805505a031940e46f8b29f69485 27-Aug-2010 Elliott Hughes <enh@google.com> Fix build: I accidentally made java.lang.RealToString public.

Change-Id: Ide436af0b16f59a35c326cb67b3153681eeb39f9
ang/RealToString.java
910106e29fe98f14b2c36312a7498287273ba826 27-Aug-2010 Elliott Hughes <enh@google.com> Minor tidy-up of Float.toString and Double.toString.

This patch looks larger than it is. I've moved duplicated constants out of
Math and StrictMath and into Float and Double where they belong. I've also
moved a table out of BigDecimal so I can reuse it in NumberConverter, which
I've renamed to RealToString.

The main active ingredient here is that there's no longer StringBuilder usage
to prepend '-'. This actually brings us down from 74ns to 62ns for an easy
case like 123.45f.

Bug: 2934304
Change-Id: I65461753247eeb9ff890ffe66b0bc79d66d2ec9c
ang/Double.java
ang/Float.java
ang/Math.java
ang/RealToString.java
ang/StrictMath.java
ath/BigDecimal.java
2ed2cfbff943fc0ef83baba0d77b7f38c0749883 26-Aug-2010 Elliott Hughes <enh@google.com> Merge "Specialize on size rather than type in OSMemory." into dalvik-dev
6116e6265924a0983bb462e3441c8c4a0bb7e47e 26-Aug-2010 Elliott Hughes <enh@google.com> Specialize on size rather than type in OSMemory.

I'm working towards intrinsics for this stuff, so I want to minimize the number
I have to support. There are 7 types (byte, char, double, float, int, long,
and short) but only 4 sizes (1, 2, 4, and 8 bytes).

I've also finally benchmarked whether the "inlined memcpy"s really gain us
anything, and they do, so I've rewritten the sole remaining caller of the
templates (long) to have its own inlined memcpy too.

Plus a final tranche of naming consistency.

Bug: 2935622
Change-Id: Ieffd9723d0479aec6179b888d1c3b3496032e57a
io/ReadWriteDirectByteBuffer.java
39c43cceb8273e72291471efeef8928d6535f2ae 26-Aug-2010 Jesse Wilson <jessewilson@google.com> am c70b71d9: am 6450fbb8: am 73947686: Merge "Reduce duplication of tests in org.apache.harmony.luni.tests.java.lang." into gingerbread

Merge commit 'c70b71d9c7171b8b7742a2ea778eecdd7e26eee3' into dalvik-dev

* commit 'c70b71d9c7171b8b7742a2ea778eecdd7e26eee3':
Reduce duplication of tests in org.apache.harmony.luni.tests.java.lang.
c70b71d9c7171b8b7742a2ea778eecdd7e26eee3 26-Aug-2010 Jesse Wilson <jessewilson@google.com> am 6450fbb8: am 73947686: Merge "Reduce duplication of tests in org.apache.harmony.luni.tests.java.lang." into gingerbread

Merge commit '6450fbb89b64c97c0867d0d70ee7d550ab900772'

* commit '6450fbb89b64c97c0867d0d70ee7d550ab900772':
Reduce duplication of tests in org.apache.harmony.luni.tests.java.lang.
739476867cee2dca030309e55381dd2b7a93058e 26-Aug-2010 Jesse Wilson <jessewilson@google.com> Merge "Reduce duplication of tests in org.apache.harmony.luni.tests.java.lang." into gingerbread
2333d6b20eed39cfac75edaf9643aaf543251537 26-Aug-2010 Jesse Wilson <jessewilson@google.com> Reduce duplication of tests in org.apache.harmony.luni.tests.java.lang.

These classes contained tests duplicated in Harmony and libcore. I've
removed the duplicate tests and moved the libcore originals into the
libcore/ test directory.

Also fixing System.getEnv() to return a map that implements equals()
and hashCode(). This was breaking Harmony's ProcessBuilder test.

Change-Id: Iffdb0cc8f2ca3df206c8bc1f89ae16fc4e309f73
ang/System.java
a94b6572afa4024dbca538e88809bb217727d00c 26-Aug-2010 Elliott Hughes <enh@google.com> Merge "More consistent naming of the nio vector primitives." into dalvik-dev
f79897170487f79e7fb9640ba104f070731f4020 26-Aug-2010 Ben Dodson <bjdodson@google.com> am 172d4583: Merge "Update for changes to @code processing"

Merge commit '172d4583c8ad2a2121bcb8315fa1cc317cd7ff04' into dalvik-dev

* commit '172d4583c8ad2a2121bcb8315fa1cc317cd7ff04':
Update for changes to @code processing
71961a4957d24f62f7adc5f0549e236018589631 26-Aug-2010 Elliott Hughes <enh@google.com> More consistent naming of the nio vector primitives.

Just name changes here.

Change-Id: I050b33ce836270435310041dd179ceaa98d789fa
io/ReadWriteDirectByteBuffer.java
172d4583c8ad2a2121bcb8315fa1cc317cd7ff04 26-Aug-2010 Ben Dodson <bjdodson@google.com> Merge "Update for changes to @code processing"
1d58625189328f29c10fa98d52512ee6cf8cc641 26-Aug-2010 Ben Dodson <bjdodson@google.com> Update for changes to @code processing

Change-Id: Ifb7dbe3105bdef15dadb84740845a71b019d62e3
ang/Class.java
ang/reflect/ParameterizedType.java
ang/reflect/TypeVariable.java
ath/MathContext.java
et/SocketPermission.java
ext/DecimalFormat.java
til/Arrays.java
til/BitSet.java
til/Locale.java
til/Scanner.java
74d3e1acc35230a9e33d4f24009fb41a5b27d4c5 25-Aug-2010 Jesse Wilson <jessewilson@google.com> am 31eaebc3: am 23b98862: am 172531a2: Fix several code hygiene problems in BigInteger.

Merge commit '31eaebc31869c077020261c897a5d1a3de57a0a2' into dalvik-dev

* commit '31eaebc31869c077020261c897a5d1a3de57a0a2':
Fix several code hygiene problems in BigInteger.
568bb0e4cce166d9751988349fcb07789da8ce7b 25-Aug-2010 Elliott Hughes <enh@google.com> Merge "Double the speed of %.2f in Formatter." into dalvik-dev
5f509be2576f2817856413301ca8135f6ee20b30 25-Aug-2010 Elliott Hughes <enh@google.com> Double the speed of %.2f in Formatter.

Primarily this works by going straight to the NativeDecimalFormat. This
cuts down on a bunch of objects we don't actually need. Changing
NativeDecimalFormat to not have a finalizer means we can also relieve
the GC of all the finalization work.

This also fixes a few test failures I ran across. The , flag and digit
localization aren't mutually exclusive, and BigDecimal (a) can't represent
NaN or either infinity, but (b) returns infinities from doubleValue if the
BigDecimal is out of double's range; this made our check for special
numbers in transformFromFloat wrong.

Bug: 2934304
Change-Id: I5aa38fbb2f775c0ac6728f8a70c8874c134155c0
ext/DecimalFormat.java
til/Formatter.java
172531a275b620d879126a2d24d0074fe4f084a0 25-Aug-2010 Jesse Wilson <jessewilson@google.com> Fix several code hygiene problems in BigInteger.

These were pointed out in the code review for change 62669.

Change-Id: Icf0bb27d826988765c6d49f4887ac86f9b52dc6e
ath/BigInteger.java
7740fdf49bd3968f8a3f23b251db07291e2b0595 24-Aug-2010 Andy McFadden <fadden@android.com> Add SUSPENDED state.

Goes with change 62657.

Bug 2667016.

(cherry-pick from dalvik-dev)

Change-Id: I8723f6fa21195978ef63e69e47677f273f73ef05
ang/VMThread.java
4158b8437386abfd664ebc606696f9d1332c311e 25-Aug-2010 Andy McFadden <fadden@android.com> Merge "Add SUSPENDED state." into dalvik-dev
e445beac2b8ab96025974e3dec66332806ba5b09 25-Aug-2010 Jesse Wilson <jessewilson@google.com> am 1a320a05: am 99f3ca01: am e866b788: Fix BigDecimal.precision() to return the correct result.

Merge commit '1a320a0563bc683e4ed0aeacdd4a021a5fb0a65c' into dalvik-dev

* commit '1a320a0563bc683e4ed0aeacdd4a021a5fb0a65c':
Fix BigDecimal.precision() to return the correct result.
e866b788d613e0566b85b799fff998a09371520f 24-Aug-2010 Jesse Wilson <jessewilson@google.com> Fix BigDecimal.precision() to return the correct result.

http://b/issue?id=2947416

We had a bug where precision() returned the wrong value because it's
using Math.log10(), and that returns an approximate value. The buggy
precision() causes other methods like round() to behave incorrectly
as well.

Revealed by an unrelated test,
org.apache.harmony.math.tests.java.math.BigDecimalArithmeticTest#testDivideMathContextNonTrivial

Change-Id: I3564887f53bde9e91ce21c9b100ec977d26f2b35
ath/BigDecimal.java
a1e211ac2a244f7cc663d36d63a10bec1b981013 25-Aug-2010 Elliott Hughes <enh@google.com> Merge "Faster implementations of Math/StrictMath's copySign methods." into dalvik-dev
a61c63c54ba46bb8a1dcbd888e3b29d6cedfb1ff 25-Aug-2010 Elliott Hughes <enh@google.com> Faster implementations of Math/StrictMath's copySign methods.

These are only faster than the old native implementations now we have
intrinsics for float/int and double/long conversion, but given those,
they're about 4x faster.

We were already using Java for getExponent, the other obvious candidate
for an all-Java implementation.

Bug: 2935622
Change-Id: I77549c88b7448b6087a67b37f8c317579b4f92b8
ang/Math.java
ang/StrictMath.java
fc4da8d2aa032ce09d1c133a61798dbbcd2eea92 24-Aug-2010 Andy McFadden <fadden@android.com> Add SUSPENDED state.

Goes with change 62657.

Bug 2667016.

Change-Id: I787783a126651fafbc973bcd910de106f045d159
ang/VMThread.java
9364f103b3a84c990becde7920d49f33de9f7f59 24-Aug-2010 Jesse Wilson <jessewilson@google.com> am 774ec3c8: am 13842b02: am 159b7cca: Merge "Fix concurrency issues in BigInteger." into gingerbread

Merge commit '774ec3c88529293b9fbcfe2982287618bdf2b202' into dalvik-dev

* commit '774ec3c88529293b9fbcfe2982287618bdf2b202':
Fix concurrency issues in BigInteger.
9f99a7402edc83a110be99c12ea79163fe96b929 24-Aug-2010 Elliott Hughes <enh@google.com> am d71b3630: am 2001d5f2: am 7023c8ff: Fix error in Float.floatToIntBits documentation.

Merge commit 'd71b3630b04781233f78f3acdf35047209d997b5' into dalvik-dev

* commit 'd71b3630b04781233f78f3acdf35047209d997b5':
Fix error in Float.floatToIntBits documentation.
157335d338a75cfd594be25f0d3d47a8191553c8 24-Aug-2010 Jesse Wilson <jessewilson@google.com> am 833ad294: am 5c33fc0d: am 125f068f: Fix a bug when user sets "Content-Encoding: chunked" manually.

Merge commit '833ad294e6138102f055856dbd09663c1f118cbf' into dalvik-dev

* commit '833ad294e6138102f055856dbd09663c1f118cbf':
Fix a bug when user sets "Content-Encoding: chunked" manually.
fd3f1748b8627e8b6ee907bdaad4cbf2abd7403b 24-Aug-2010 Jesse Wilson <jessewilson@google.com> Fix concurrency issues in BigInteger.

Also go over the class documentation and formatting and give it some long overdue
attention. The docs are still far from perfect! But this should get rid of the
most obvious problems.

See http://b/issue?id=2785595

Change-Id: Iea40975b95a850702a4cdc693f65e4eaff0dd8b0
ath/BigDecimal.java
ath/BigInt.java
ath/BigInteger.java
ath/BitLevel.java
ath/Conversion.java
ath/Division.java
ath/Logical.java
ath/Multiplication.java
ath/Primality.java
7023c8ff547217ec58f062255a850e54bfefc681 23-Aug-2010 Elliott Hughes <enh@google.com> Fix error in Float.floatToIntBits documentation.

Change-Id: I33cd839c3fc18f9308efe214a66ed00284853726
ang/Float.java
125f068f0a6cd739beac97821c9421cf8317cc87 20-Aug-2010 Jesse Wilson <jessewilson@google.com> Fix a bug when user sets "Content-Encoding: chunked" manually.

We used to try to build a -1-sized ByteArrayOutputStream, which
failed miserably with an exception.

Change-Id: Ia6fa72c639a14c03f03b6f73083ce37ffab8b4e5
et/HttpURLConnection.java
1b9018762e87e3dda69020248817011efd5a40dc 20-Aug-2010 Elliott Hughes <enh@google.com> Minor nio speedups (scalar operations only).

This patch speeds up nio scalar operations for all types larger than byte.
Basically just by trimming fat, pushing any byte-swapping down into Java,
and adding a boolean field to ByteOrder that basically caches the "do we
need byte swapping?" comparison.

For the worst case, byte-swapped doubles, this patch gives a 2x speedup.
At the other end of the spectrum, for native-order chars and shorts, this
patch gives a 20% speedup. Still, that's not bad for quite a reduction in
code.

Now I've tidied this up a bit, I have more of a plan. This is just the warmup.

Bug: 2935622

Change-Id: I3cfc4e61b12ea7a8f32fc497106ddc66474efe01
io/ByteOrder.java
io/DirectByteBuffer.java
io/MappedByteBuffer.java
io/ReadWriteDirectByteBuffer.java
29183729e5671a819d5f735969c7772804457b9f 19-Aug-2010 Elliott Hughes <enh@google.com> Minor net cleanup.

Move two constants to where they belong, and fix a well-intentioned but broken
detail message (confusion between two locals: an InetSocketAddress and its
InetAddress --- when the latter is null, we want to print the former).

Change-Id: Ic6a29edb31c0cde11f03ec511a3a9a864fec957f
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/MulticastSocket.java
0b29a1fecc601de2f642ded891726ac3e460d74b 18-Aug-2010 Elliott Hughes <enh@google.com> Multicast cleanup.

This doesn't fix any bugs, but it does get rid of a lot of code. This is how
Stevens' book tells us we should be doing things.

Bug: 1610553
Change-Id: I00a79a6c34084ba018fb69c7f1123300a2698ce9
et/DatagramSocketImpl.java
et/MulticastGroupRequest.java
et/MulticastSocket.java
4940ff34c242c7907f548e6eb7b1680d7d53fbc7 17-Aug-2010 Elliott Hughes <enh@google.com> Remove a bit more nio cruft.

Collapse the unused MemorySpy hierarchy, and remove some dead code.
I've left all the dead rangeCheck stuff in in case we ever need it, but
maybe that should go too.

Change-Id: Ibff4e99f27e235453ae2983483e54878a679db34
io/ReadOnlyDirectByteBuffer.java
io/ReadWriteDirectByteBuffer.java
8510524dab13e0acc1babf22cbc55002fb122777 17-Aug-2010 Elliott Hughes <enh@google.com> Some nio tidying.

Remove indirection on OSMemory, and use public ByteOrder and MapMode types
throughout the implementation, rather than adding our own duplication. Also
remove some unnecessary Java methods that just forwarded to identical native
methods, and an unnecessary factory class for MappedByteBuffer instances.
Also get rid of ICommonDataTypes, most of which was unused cruft.

Change-Id: I3240b02bcc19941b1b1cbba351ae7f7c1cdfc5b4
io/ByteBuffer.java
io/ByteOrder.java
io/HeapByteBuffer.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/ReadWriteDirectByteBuffer.java
60a0a96f334f159418763cab17c48a09c97cbd2f 13-Aug-2010 Elliott Hughes <enh@google.com> Fix reading from an empty non-blocking pipe.

The active ingredient here is getting rid of the lines that threw
InterruptedIOException in "OSFileSystem.cpp". I don't think that code was ever
right, but until I rewrote Pipe it wasn't possible to exercise that code.

The other changes are cosmetic, made while understanding this code well enough
to find the bug, plus a new test for this behavior.

Bug: 2901552
Change-Id: Id9cd3cdd6a97b225bbf7c352a6e0c535e9f9da1d
io/channels/Channels.java
io/channels/Selector.java
e22935d3c7040c22b48d53bd18878844f381287c 13-Aug-2010 Elliott Hughes <enh@google.com> Remove most of our C-style casts.

After being burned by an incorrect C-style cast that cast away const, I've been
keen to remove them all and turn on -Wold-style-cast. This patch doesn't get us
that far, but it does kill the majority of our C-style casts. In turn, the
majority of the casts that it removes are the ones from our tables of native
methods to be registered.

The new NATIVE_METHOD macro also _enforces_ our convention of using the
"Class_nativeMethod" style of naming. Mostly this works out fine. In some
cases (most notably ExpatParser and ExpatAttributes) I've had to un-overload
a few functions, but I don't like overloading anyway, and in the particular
case of a native method, where the stack trace doesn't show a line number,
overloading makes it one step harder to work out which native method you're
actually in. So good riddance to that. The only unfortunate case is
Math.copySign, where there are two overloads corresponding to copysign(3)
and copysignf(3). I had to add an extra layer of indirection there. In my
defense, we've never shipped these functions before, they're unlikely to
become anyone's hotspot, and the right fix is to be doing such trivial work
on the Java side anyway, with intrinsics making the conversion between
float/double and int/long cheap.

This patch also replaces other C-style casts, primarily in
"OSNetworkSystem.cpp".

This patch also removes unnecessary uses of the "struct" keyword.

This patch also fixes a "may be used uninitialized" warning (now error) in
the sim build for "ICU.cpp".

The remaining C-style casts are in the hairy float-parsing code. That stuff --
and turning on -Wold-style-cast -- will have to wait for another day.

Change-Id: I9b3ee14aefd4676f980f6a7ca757595d78d80e6a
o/ObjectInputStream.java
ang/Math.java
a92f883cda9e483c64f78dbba0031e6e43cd00ab 12-Aug-2010 Elliott Hughes <enh@google.com> Replace createDatagramSocket and createStreamSocket with one call.

(Continuing our policy of having native methods' names correspond to the
underlying syscall, this one sadly gets the ugly name of "socket".)

Change-Id: Icf08e4e0637ee3ae9eab673d350860181f547250
et/InetAddress.java
705462a2b003b2eeed90bf3cebe0871e02554cbd 12-Aug-2010 Elliott Hughes <enh@google.com> Minor documentation improvements.

Fix unqualified uses of SimpleDateFormat in TimeZone.java, explain how to use
getPercentageInstance (http://code.google.com/p/android/issues/detail?id=10333),
add an explicit test to make sure no-one accidentally "fixes" that
odd-but-correct behavior, and remove an example from the DecimalFormat
documentation that doesn't really clarify anything.

Bug: http://code.google.com/p/android/issues/detail?id=10333
Change-Id: I52f22d817c7c6c32ad38fb6953fbe909a76f8943
ext/DecimalFormat.java
ext/NumberFormat.java
til/TimeZone.java
f3507d0976cb14ba59e0715f22f4c6b7c97cbae8 12-Aug-2010 Jesse Wilson <jessewilson@google.com> Use the declaring class loader when resolving types for reflection.

Previously we were using the calling class loader, which was completely
unrelated to solving the problem at hand.

Also splitting the test for an issue unrelated to class loaders into
its own test.

Change-Id: I5fa9f34cac0d6a76db7fdf3e7bcbe19b57281971
ang/Class.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
0917c4a9d5d0115950450cdd0bb46e43a48da5db 12-Aug-2010 Elliott Hughes <enh@google.com> Clean up some dead/useless code.

(The DatagramPacketTest.java change is unrelated, but it's been lurking in my
repository for weeks now.)

Change-Id: I65d3ad53dd30709b2daed3c5787cc38c6081ffea
wt/font/NumericShaper.java
ang/Character.java
et/InetAddress.java
et/MulticastSocket.java
et/Socket.java
et/SocketPermission.java
7365de1056414750d0a7d1fdd26025fd247f0d04 12-Aug-2010 Jesse Wilson <jessewilson@google.com> Sorting imports.

Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
eans/PropertyChangeSupport.java
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/Console.java
o/File.java
o/InputStreamReader.java
o/ObjectInputStream.java
o/OutputStreamWriter.java
o/RandomAccessFile.java
ang/Class.java
ang/ClassLoader.java
ang/Package.java
ang/ProcessManager.java
ang/Runtime.java
ang/SecurityManager.java
ang/StrictMath.java
ang/System.java
ang/Thread.java
ang/ThreadLocal.java
ang/VMThread.java
ang/reflect/AccessibleObject.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
ath/BigInteger.java
et/AddressCache.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/Inet6Address.java
et/InetAddress.java
et/NetworkInterface.java
et/ProxySelectorImpl.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
io/CharToByteBufferAdapter.java
io/DoubleToByteBufferAdapter.java
io/FloatToByteBufferAdapter.java
io/IntToByteBufferAdapter.java
io/LongToByteBufferAdapter.java
io/ReadWriteDirectByteBuffer.java
io/ShortToByteBufferAdapter.java
io/channels/DatagramChannel.java
io/channels/SelectionKey.java
io/channels/SocketChannel.java
io/charset/Charset.java
ecurity/AccessControlContext.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/CodeSource.java
ecurity/Identity.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyRep.java
ecurity/KeyStore.java
ecurity/MessageDigest.java
ecurity/Policy.java
ecurity/Provider.java
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/Signature.java
ecurity/Timestamp.java
ecurity/UnresolvedPermission.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertStore.java
ecurity/cert/CertificateFactory.java
ecurity/cert/PolicyQualifierInfo.java
ecurity/cert/TrustAnchor.java
ecurity/cert/X509CRL.java
ecurity/cert/X509CRLEntry.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
ecurity/cert/X509Certificate.java
ecurity/interfaces/ECPublicKey.java
ql/Blob.java
ql/CallableStatement.java
ql/Clob.java
ql/PreparedStatement.java
ql/ResultSet.java
ql/SQLInput.java
ql/SQLXML.java
ext/Collator.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/Format.java
ext/NumberFormat.java
til/Calendar.java
til/Currency.java
til/EnumSet.java
til/InvalidPropertiesFormatException.java
til/PropertyPermission.java
til/TreeMap.java
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArrayList.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Delayed.java
til/concurrent/Exchanger.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/FutureTask.java
til/concurrent/LinkedBlockingQueue.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicReferenceArray.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/jar/Attributes.java
til/jar/InitManifest.java
til/jar/JarEntry.java
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/prefs/AbstractPreferences.java
til/prefs/NodeChangeEvent.java
til/prefs/NodeChangeListener.java
til/prefs/NodeSet.java
til/prefs/Preferences.java
til/prefs/XMLParser.java
til/regex/Pattern.java
til/zip/ZipFile.java
3ab13ebe9d67b0b210865853902b854711ef45b0 11-Aug-2010 Elliott Hughes <enh@google.com> Improve the performance of TimeZone.getTimeZone.

Rewrite the code that reads time zone data so that rather than opening,
reading, and closing the file each time, we just keep the file mapped.

This patch actually removes functionality: we no longer support reading
individual Unix time zone data files.

Also stop cloning guaranteed-new instances returned by ZoneInfoDB.

Before:

benchmark us logarithmic runtime
TimeZone_getDefault 9.85 =
TimeZone_getTimeZoneUTC 211.40 =====================
TimeZone_getTimeZone_America_Caracas 437.87 ==========================
TimeZone_getTimeZone_America_Santiago 783.29 ==============================
TimeZone_getTimeZone_GMT_plus_10 181.80 ====================
TimeZone_getTimeZone_default 194.78 ====================

After:

benchmark us logarithmic runtime
TimeZone_getDefault 10.8 =
TimeZone_getTimeZoneUTC 70.9 =============
TimeZone_getTimeZone_America_Caracas 118.9 =================
TimeZone_getTimeZone_America_Santiago 797.5 ==============================
TimeZone_getTimeZone_GMT_plus_10 57.8 ============
TimeZone_getTimeZone_default 72.2 =============

(Note that these have very different scales.)

Bug: 2870945
Change-Id: Iae5aa86153006d4de8e7278d30bcaeef6a9ccab7
til/TimeZone.java
f14cadb15b06371fb9a6daf885dc1c4bccf975b9 10-Aug-2010 Elliott Hughes <enh@google.com> Minor TimeZone cleanup.

Getting ready to do some real work here, I thought I'd improve the
documentation and remove some cruft.

Bug: 2870945
Change-Id: I771badc8afa5c0a5f77880f64e1542d77672d984
til/TimeZone.java
036ffc75d2b7ece42bcd97f290c026e215868ba9 05-Aug-2010 Elliott Hughes <enh@google.com> Rationalize and simplify our "connect" implementations.

We don't need to copy a context structure back and forth between native code
and Java: it didn't contain anything but temporaries anyway. We don't need a
convenience method for a blocking connect with no timeout. We don't need a
separate codepath for datagram and stream sockets' connect calls.

There are further simplifications that could be made, I think. I think we
could implement "connect" in Java in terms of "connectNonBlocking" and
"isConnected" (since that's how our native implementation works anyway).
I also think we can fix the 100ms polling too, though I haven't investigated
and that may require that we fix the general "interrupt on close" problem.

Change-Id: Ib5989fa05f5dd7dd24b681fab70f856cd0bc5c56
et/InetAddress.java
io/channels/SelectionKey.java
99a89dd6f0a0e1396aa9b3feebf15ea31f703d3a 04-Aug-2010 Elliott Hughes <enh@google.com> Rewrite the nio Pipe to use a Unix pipe behind the scenes.

We were using an AF_INET or AF_INET6 socket to implement the nio Pipe, which
was causing trouble for people on systems where IPv6 wasn't working yet.

This patch switches over to pipe(2). My first implementation used socketpair(2)
and retained the SocketChannelImpls, but it still seemed a bit off to be asking
for a full-duplex pipe to implement a unidirectional channel, and it required
hacks in the networking code to cope with the AF_LOCAL family, and in the
BlockGuard for the isLingeringSocket test.

This implementation uses pipe(2) and FileChannelImpl. It breaks a few tests, but
the tests are wrong, and it actually brings us closer to the RI's behavior of
throwing IOException "broken pipe" when writing to a broken pipe.

Rather than keep throwing junk into the FileSystem/NetworkSystem classes, and
resolving the question of which of those setNonBlocking belonged in (answer:
neither; this is a false Windows-style dichotomy that isn't helpful here), I've
added a new IoUtils with a few generally useful methods. The remainder of this
patch switches over existing code. We could probably make
FileDescriptor.descriptor private now I've exposed accessors, but this change
is large enough already...

Bug: 2735373
Bug: http://code.google.com/p/android/issues/detail?id=9431
Change-Id: I6b6d1e50bdddd435e71c31105a73c9d4fd135d7e
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
ang/ProcessManager.java
io/channels/Pipe.java
f4f96a70ae784447d1657a7d56fa73eee1ccb3f2 03-Aug-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of 7b3ebefc to dalvik-dev

Change-Id: I7bb0341107f0b3f5b568d151f062e30f61e5ee14
7b3ebefcdf79a251cf2a5619dd2354952fc67665 02-Aug-2010 Elliott Hughes <enh@google.com> Use the existing mime-type/extension mapping from frameworks/base.

(An accompanying change to frameworks/base switches that over so that both
android.webkit.MimeTypeMap and java.net.URLConnection use the same data.)

Bug: 2422917
Bug: http://code.google.com/p/android/issues/detail?id=10100
Change-Id: I37f008a00093efcf7b336ea0c206e8977544b0bf
et/DefaultFileNameMap.java
et/FileNameMap.java
et/URLConnection.java
4fe378672d700aaae3a50db956b693b3ed599c7d 31-Jul-2010 Elliott Hughes <enh@google.com> Remove "java.net.preferIPv4Stack" (which has been broken >= eclair).

Change-Id: I4733a0e266ff7c02c25033e79bcceff4d7357868
et/InetAddress.java
et/MulticastSocket.java
e7cdf919cf8bbb971eede72cd89168da11e38f82 30-Jul-2010 Elliott Hughes <enh@google.com> Merge "Fix setTrafficClass." into dalvik-dev
2cd82d7111f68ff63145ef7c393bf1479ff06223 29-Jul-2010 Elliott Hughes <enh@google.com> Fix setTrafficClass.

Pass the traffic class setting down to the kernel, rather than trying to
fake it in Java and then not actually using it at all in the native code.

There are two ways to set traffic class (aka type of service, or TOS):
per-packet or per-socket. The Java API is for the per-socket style, but
the old implementation had each SocketImpl intercept calls to
SocketOptions.setOption for SocketOptions.IP_TOS, stash the traffic class
in one of the SocketImpl's private fields, skip calling native code, and
then pass the traffic class to each native method that would need it to
implement the per-packet style. Unfortunately, each of those methods was
just ignoring the traffic class.

I've removed all this interception, so we now pass the traffic class straight
to the kernel via setsockopt(2), and we don't need to pass anything to the
individual per-packet calls.

The motivation for going the per-packet route appears to have been to work
around a lack of support for the per-socket route in old versions of Linux
and other OSes. It all works now, though, so there's no point making our
lives harder (and doing more work at runtime) to work around bugs and
infelicities that no longer exist.

I tested the new code manually with tcpdump, for both IPv4 (radio) and
IPv6 (wifi), and in both cases it looks like it's doing the right thing now.
We also still pass all of our tests, though none of them are capable of
recognizing whether we're actually doing anything useful anyway...

Change-Id: Ice241e088d25037123c73733a3f2bfade976fb31
et/DatagramSocket.java
et/InetAddress.java
et/Socket.java
et/SocketImpl.java
et/SocketOptions.java
b0b73fa970581e7aa8735c0c388c4363cf8da07b 29-Jul-2010 Ben Dodson <bjdodson@google.com> Fix for poorly compiling documentation

Change-Id: I6077052df3cf6ba1f977aa312552ef8fe43bd56c
et/HttpCookie.java
0371d85fa3ecb5f162d107cdbff0a99cd987fdcc 27-Jul-2010 Elliott Hughes <enh@google.com> Fix setSoLinger.

The bizarre use of Boolean or Integer (rather than just using -1) comes
from the RI. Third-party SocketImpl implementations may expect the RI's
documented behavior, so we should probably do the same.

I've also changed SocketChannelImpl.SocketAdapter to reuse Socket's
implementation of all the socket option getting/setting code, mainly so
we don't have two copies of all the weirdness.

I've also fixed a bug in the native getSocketOption code which returned
a Boolean rather than an Integer for IP_TOS/IPV6_TCLASS, though that code
is actually never called at the moment.

I've removed support for passing Byte values to setSocketOption. The RI
only uses Boolean and Integer.

Change-Id: I80ba63745f4c4f3ac357dc3f0b7cbf254a291bce
et/DatagramSocket.java
et/MulticastSocket.java
et/ServerSocket.java
et/Socket.java
et/SocketOptions.java
et/SocketUtils.java
0753206c1dca5e26fbd0e0381c637d0ad951e0f8 29-Jul-2010 Brian Carlstrom <bdc@google.com> am 06f47d3e: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-master

Merge commit '06f47d3e721e7032c97f80b3b2c7d25a8e6f2d21' into dalvik-dev

* commit '06f47d3e721e7032c97f80b3b2c7d25a8e6f2d21':
06f47d3e721e7032c97f80b3b2c7d25a8e6f2d21 29-Jul-2010 Brian Carlstrom <bdc@google.com> Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

Change-Id: I9687c2ef06dc2bd1ba573bf40ec00236c25e558f
7ed4d9e13b7d599a2d6cfdc8cb9e86a8ef0b0dd8 29-Jul-2010 Ben Dodson <bjdodson@google.com> EnumMap.toString throws NPE

Fix for bug: 2787265

Change-Id: I56f9a2c7088f5263b26e93be1a3a28903c9e49cd
til/EnumMap.java
623978ac0a3f9e4e2d1111aee41b64195d9ac64c 28-Jul-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of 01a18c74 to dalvik-dev

Change-Id: Ib569414191a6e7b0e7aebb804fe1f4d57c5184a9
01a18c74534e68f19c90912e8f87e856f9901dfb 28-Jul-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of fb4045a3 to master

Change-Id: I2100c70f6078108e7b646c393ac2e4b42ca8d066
48b569bddf13e20ecdca657f598b7005b6f86b8e 27-Jul-2010 Brian Carlstrom <bdc@google.com> Fix SecureRandom default service

Further profiling revealed a bug in the early performance fix which
was always returning null because it the Services.getService interface
expected SecureRandom.<algorithm>, not just SecureRandom.

However, the basic idea of using the precomputed Services approach was
sound. Services.refresh now calculates the default SecureRandom
services as a special case.

Confirmed that the RI also has this apparently undocumented behavior
of defaulting the SecureRandom to the highest priority provider that
has an available implementation.a

Change-Id: Icf3be52e5d9113b0940cd38522857ba7e339a60f
ecurity/SecureRandom.java
4e4000ed98f9056639fba0713a3fd3caacf9746c 27-Jul-2010 Elliott Hughes <enh@google.com> Let the kernel handle network timeouts by setting SO_RCVTIMEO.

As far as I can tell, the reason other implementations use select(2)
instead of SO_RCVTIMEO is that traditionally the latter wasn't implemented.
Stevens is unusually unspecific about the portability of SO_RCVTIMEO, but
the web says that Linux didn't support it until 2.4, and Solaris was late
and buggy too. Modern versions of Linux, Mac OS, and Windows all support
SO_RCVTIMEO, though, so portability should not be a concern for us.

This patch causes a regression; several of the blocking network I/O methods
that used to be interruptible by virtue of their select(2)-based manual
implementation of timeouts are no longer interruptible. Making all network
I/O interruptible is work in progress, covered by http://b/2823977.

Bug: http://b/2512069
Change-Id: I0a2812ca1537bd171c4205343d6b3b526b72b2b2
et/DatagramSocket.java
et/ServerSocket.java
et/Socket.java
et/SocketImpl.java
et/SocketOptions.java
io/channels/spi/AbstractSelectableChannel.java
5b7fe83570b3c48e892dd0cd2c7447cc786c37e2 24-Jul-2010 Brian Carlstrom <bdc@google.com> SecureRandom constructor performance improvement

The SecureRandom constructor was iterating all service providers to
find an implementation (the providers are in priority order). Changed
to use Service.getService which respects the priority but is a hash
lookup instead of a linear search.

This problem was brought to light when the Harmony provider was moved
after the BouncyCastle provider, making the search take much longer.

b/2748913

Change-Id: I44a4928bf80c81745d3bbbd510b48b3d0d6ad70e
ecurity/SecureRandom.java
dbbdffce5ac97a0e93ef495adaacca3660b9ab21 23-Jul-2010 Elliott Hughes <enh@google.com> Remove UCharacter's unnecessary layer of indirection.

Also fix this sim-eng build failure:

libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSMemory.cpp: In function ‘jint OSMemory_flushImpl(JNIEnv*, _jobject*, jint, jlong)’:
libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSMemory.cpp:334: error: invalid conversion from ‘const void*’ to ‘void*’
libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSMemory.cpp:334: error: initializing argument 1 of ‘int msync(void*, size_t, int)’

Change-Id: Ia23c9af79c690254179139072b84bd0a35f17fba
ang/CaseMapper.java
ang/Character.java
aaacdb095b10293286adbfd94af2fd83b8dae3a8 22-Jul-2010 Elliott Hughes <enh@google.com> Remove File's cached UTF-8 byte[].

This doesn't really improve File.getCanonicalPath and its helpers much, but it
improves everything else, and feels like a step in the right direction.

Benchmarking shows only a tiny difference in the uncommon case of a reused
File, and a significant increase in performance in the more likely case of
a single-use File.

Before:

benchmark us
Exists 26.14
ExistsReuse 5.08

After:

benchmark us
Exists 13.90
ExistsReuse 5.23

Bug: 2281992
Change-Id: Ibc6fd2581983ae8a57bf4b7f49196c76ad41169e
o/File.java
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
bda80cff4d206aa89157031e7acb8a1967dfa4e1 17-Jul-2010 Elliott Hughes <enh@google.com> Merge "Fix build (droiddoc @param error)." into dalvik-dev
6efc5229f2edc0f6a228e541cd5b23c53c4a01a8 17-Jul-2010 Elliott Hughes <enh@google.com> Fix build (droiddoc @param error).

Change-Id: I5996c9fd2c17e7b2fa8a44dd9b96beb65adc7ab1
o/PipedOutputStream.java
e3a187163504f00c98bd75cbd8bcbdde123ae2cd 14-Jul-2010 Brian Carlstrom <bdc@google.com> Fix PKCS12 and BKS KeyStore as well as SSL renegotiation

Summary:
- Added KeyStoreTest and fixed PKCS and BKS keystores to be fully functional
- KeyStore and KeyStoreImpl improvements in libcore and bouncycastle for more RI-like behavior
- SSL Renegotiation fix for new implementation

Details:

external/bouncycastle

TwoFish added back for BKS KeyStore. Like RC2, it not supported as
a general cipher, but instead used internally for KeyStore
implementation.

src/main/java/org/bouncycastle/crypto/engines/TwofishEngine.java
bouncycastle.config

Added back PBEWITHSHAANDTWOFISH, PBEWITHSHAANDTWOFISH-CBC,
PBEWITHSHA1ANDRC2-CBC, PBEWITHHMACSHA, PBEWITHHMACSHA1 to support
PKCS12 and BKS KeyStore implementations (as determined by new
KeyStoreTest)

src/main/java/org/bouncycastle/jce/provider/BouncyCastleProvider.java
src/main/java/org/bouncycastle/jce/provider/JCEBlockCipher.java
src/main/java/org/bouncycastle/jce/provider/JCEMac.java
src/main/java/org/bouncycastle/jce/provider/JCESecretKeyFactory.java

Don't throw an error when deleting a non-existing KeyStore entry. The
RI documentation (and behavior) says it throws an error when it fails
to remove an entry, not when the entry does not exist.

src/main/java/org/bouncycastle/jce/provider/JDKKeyStore.java
src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Try to make BC's PKCS KeyStore have a more RI-like getCreationDate behavior

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Make BC's PKCS KeyStore failfast on setting non-supported key,
instead of failing later on get.

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Make BC's PKCS KeyStore handle setting a PrivateKey with an emtpy chain.

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Add more general avoidance of NullPointerExceptions on null aliases

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Added notes about changes improvements

patches/README

Regenerated patch with above changes

patches/android.patch

libcore

KeyStore improvements based on KeyStoreTest

- Fix UnrecoverableKeyException to be a subclass of
UnrecoverableEntryException, which was keeping the new
KeyStoreTest from compiling.

luni/src/main/java/java/security/UnrecoverableKeyException.java

- Fix to not convert UnrecoverableKeyException to KeyStoreException,
which was only being done because of the UnrecoverableKeyException
superclass bug.

luni/src/main/java/java/security/KeyStoreSpi.java

- Harmony KeyStore was being overly aggresive about throwing on null
alias arguments in cases where the RI was happy to pass them to the
KeyStoreSpi.

luni/src/main/java/java/security/KeyStore.java

- New test after PKCS12 regresion. It enumerates and excercises
all methods on all available KeyStore
implementations. Unfortunately, the main varieties of KeyStores
made this a lot more complicated than I was originally
expecting. It does clarifiy the differences between the RI and
BC KeyStore implementations, especially for PKCS12, where in
some ways the RI is more feature complete (setting key via
byte[]), but in other ways BC goes beyond some RI limitations
(allowing storage of certificates).

luni/src/test/java/java/security/KeyStoreTest.java

TestKeyStore improvements while writing KeyStoreTest
- Renamed "keyStorePassword" working usages to clarify if it really
means the "storePassword" on the whole KeyStore, or if it is a
"keyPassword" on individual keys.
- Moved TestKeyStore from javax.net.ssl to java.security

luni/src/test/java/javax/net/ssl/SSLContextTest.java
luni/src/test/java/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java
support/src/test/java/java/security/StandardNames.java
support/src/test/java/java/security/TestKeyStore.java
support/src/test/java/javax/net/ssl/TestKeyStore.java
support/src/test/java/javax/net/ssl/TestSSLContext.java

Fixing up SSL renegotiation support. Now that we are not trying to
prevent renegotiation, make sure it is working correctly.

- Remove SSL_VERIFY_CLIENT_ONCE to take the default behavior of
re-requesting client certificate on renegotiation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

- Updated comments to reflect renegotiation. Bug fix to not clear
out callback reference on handshake complete, since we need it for
renegotiation.

luni/src/main/native/NativeCrypto.cpp

Updated for PKCS12 KeyStore support

support/src/test/java/java/security/StandardNames.java

Added javadoc when writint KeyStoreTest

luni/src/test/java/java/security/ProviderTest.java

frameworks/base

Tracking changes to UnrecoverableKeyException superclass

api/8.xml
api/current.xml

Change-Id: I6349dbfc02896417595b52e364ade8000b567615
ecurity/KeyStore.java
ecurity/KeyStoreSpi.java
ecurity/UnrecoverableKeyException.java
95b6f9eb6c3ccd0c016245a75ac02cc9ac6534d5 15-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Improving the performance of Class.getName() and Class.getMethods()." into dalvik-dev
b92764b27a1e26c4251c436d5cba299f6df05243 15-Jul-2010 Jesse Wilson <jessewilson@google.com> Improving the performance of Class.getName() and Class.getMethods().

Class.getName() was going to native code with every call. Caching
it in a field saves the native call and results in a large savings
in the new implementation of getAllMethods().

Class.getMethods() was allocating strings for every method as a hash
key for deduplicating overloads.

This table shows runtime with the optimization. The previous code
was hashing to deduplicate; the new code uses sorting.

run us linear runtime
hashing 4126.5 ===============
hashing+getName 3131.8 ===========
sorting 8062.4 ==============================
sorting+getName 2079.8 =======

Full details here, including some intermediate results:
http://microbenchmarks.appspot.com/run/jessewilson@google.com/java.lang.reflect.ReflectionBenchmark

Change-Id: I562785705847ab7af23dd57c98e593e7e0df284a
ang/Class.java
ang/ClassCache.java
ang/reflect/Method.java
221d0ccb4cc23ee0bf0646e9abe471fb48b3a1a8 15-Jul-2010 Elliott Hughes <enh@google.com> Simplify the network send(2) interfaces.

Similar to the change for the recv(2) code.

Unrelatedly, I've pulled out our exception-throwing helpers for reuse. This
was meant to be in a separate change, but I accidentally mixed it in.

Bug: 2823977
Change-Id: I314a4337189277b6eff65f7ccf9e897b5d0b73f2
et/SocketImpl.java
06a62bfda6aa4919d92a505ede4c8cd247fe15ba 15-Jul-2010 Elliott Hughes <enh@google.com> Match the RI in the exception thrown by DatagramPacket's constructor.

We were failing an existing harmony test, so no new test necessary.

Change-Id: I056187225af52a2bc927da208f9d174f3249b5fa
et/DatagramPacket.java
79ff4e73fd689dae6667a8137ee57137962ff13a 14-Jul-2010 Elliott Hughes <enh@google.com> Make it possible to interrupt network reads.

This patch simplifies the network I/O interface, in particular for read/recv.

The bounds checking from OSNetworkSystem.read goes, since the caller already
checks. (If we want that checking in native code, we should add it uniformly.)

We also remove supportsUrgentData (which was always returning true), and remove
the sole caller, so we just try the operation and report failures if they happen
rather than trying to predict the failure (as the original code seemed to want
to do, and which is never a good idea).

The native code gains logic to recognize when the FileDescriptor has been
closed from another thread, though this logic remains largely unused at this
point. (There's comment-out code in "close" that does a shutdown(2) to wake
us up so we can recognize this situation.) I've switched code over to using
the new NetFd class, but haven't ensured that we handle the wakeups correctly.
(The "read" implementation being the notable exception.) For now, with the
shutdown(2) commented out, this shouldn't have any visible behavioral changes.
(And our tests don't spot any.)

Code that was using malloc(3)/free(3) to allocate temporary buffers, and copying
to and from those buffers has been rewritten to use JNI-provided pointers onto
the heap, as part of the general "don't lie to the garbage collector" push.

The implementations for the various old forms of recv have been collapsed into
one.

Bug: 2823977
Change-Id: I05cf742c44827a24df3c1ff59727013ee4636233
et/InetAddress.java
et/Socket.java
3bf03b8be207d0c760bcad5eae5028e854498376 14-Jul-2010 Elliott Hughes <enh@google.com> Remove the last few "Answer"/"Answers" from javadoc.

Change-Id: I753bd9bbfc1462d948929197f00668fa1e1237f2
eans/IndexedPropertyChangeEvent.java
o/InputStreamReader.java
et/ServerSocket.java
ql/DatabaseMetaData.java
ql/Wrapper.java
a5df574bf93265d41986b7e5474fb2fbb527c9f0 14-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Cleanup HTTP retries." into dalvik-dev
c0372d90016d241ac979faa6fa1731f30b6f2a03 13-Jul-2010 Jesse Wilson <jessewilson@google.com> Cleanup HTTP retries.

We now do the right thing when redirects point us at a different
host or a different scheme.

Also...

Invert the parameter to AbstractHttpInputStream.endOfInput()
and HttpURLConnection.releaseSocket() to be positive 'reuse'
rather than negative 'close'. It makes the code in that method
read better.

Combine discardResponse() and endRequest(). The new method is
discardIntermediateResponse(). Cleanup how we handle intermediate
responses, and how those connections get recycled.

Remove HttpURLConnection's cached fields for proxy addresses.
Instead just update the proxy field when those fields change.
This attempts to make it clear that the names represent the
connected address and not the origin server's address. (This
is different when a proxy is in use.)

Document a consistent interpretation of the inherited protected
field 'connected'. Unfortunately it does not mean connected.

Change-Id: I8d4b65bffa5aeba353186b60cf951232f7762a18
et/InetSocketAddress.java
e8ca15fac603d1adb0fd9007ea6343584a15db67 12-Jul-2010 Elliott Hughes <enh@google.com> Fix Throwable.printStackTrace for exceptions without stack traces.

Also improve the documentation for fillInStackTrace.

Bug: http://code.google.com/p/android/issues/detail?id=9722
Change-Id: I9c539df136058e5300b33aa0d1104d567db71ad4
ang/Throwable.java
16773d4f29a6cc3d0ab11f66ff15d606cffe4059 12-Jul-2010 Elliott Hughes <enh@google.com> Improved System.getProperty documentation.

We were claiming to support properties we don't (and aren't required to), but
missing many that we do (and are required to).

Change-Id: I39e5c5beb2e341c690187557b4dd1bce369952da
ang/System.java
ccbe3404e0691dab506d017550658e8e5974c83e 10-Jul-2010 Elliott Hughes <enh@google.com> Use 'dst' (or an even more appropriate name where possible) rather than 'dest'.

(The ArrayIndexOutOfBoundsException for System.arraycopy already talks
about 'dst' and 'dstPos'.)

Change-Id: Iba9415dd4a9ec3b457938ea4469b4a0024bab6e4
o/File.java
o/PipedOutputStream.java
ang/AbstractStringBuilder.java
ang/System.java
ath/Division.java
et/InetAddress.java
io/ByteBuffer.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/DirectByteBuffer.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/HeapByteBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
til/jar/Manifest.java
99a8c7aecaaa5eb4278ef2b839f7c1648a8c8ad7 09-Jul-2010 Elliott Hughes <enh@google.com> Merge "Stop Matcher from copying its input onto the native heap." into dalvik-dev
da289bcd0a9e207cc03c752f7c21c9004056e179 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Address feedback from change 57066,
Rewrite the main request retry loop of HttpURLConnection.

Change-Id: I7e10e356614970971253f2e3f60d173a2e5433d4
et/HttpURLConnection.java
e3836e959fe04ab6c0dcda61cc585e35c82317b8 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Rewrite the main request retry loop of HttpURLConnection." into dalvik-dev
ffd579b668428272b78f5c6c64f9c89766f37c1a 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Rewrite the main request retry loop of HttpURLConnection.

We had problems where HTTP auth failures weren't eligible
for automatic retries, particularly when HTTP post was
in use.

This fixes that problem and generally cleans up the HTTP
request loop. In particular:
- Be more careful about keeping state about whether
we've sent a request or a request header.
- Document the nuanced behavior around when headers are
transmitted.
- Simplify the daisy-chain of methods. Formerly we had
sendReqeust, writeRequest, doRequest, and doRequestInternal.
We now have more intention-revealing method names.
- Manage reentrant calls to doRequest(). Previously weird
things would happen, such as the following chain of calls:
doRequest()
doRequestInternal()
sendRequest()
readServerResponse()
maybeCache()
ResponseCache.put()
getHeaders()
doRequest()
Things are now more straight forward and retrieveResponse()
initializes everything.
- Throw HttpRetryException when we should.

Also moving inner HttpOutputStreams into their own classes and
splitting DefaultHttpOutputStream into ChunkedOutputStream and
RetryableOutputStream.

Change-Id: I5c1da717f0dee7ecc896e51701b702e535867417
et/HttpURLConnection.java
c1d2d99619f44fb5fea07744bc34de725e807f9d 09-Jul-2010 Carl Shapiro <cshapiro@google.com> Add a distinct field to thread pending references together.

Presently, reference objects discovered during a trace are threaded
together using the queueNext field. This field is also used by the
reference queue class to thread together its enqueued objects.

When the garbage collector is run concurrently, a user may enqueue a
reference object simultaneously discovered by the trace. This will
corrupt the pendingNext values by aliasing to a reference queue.

To avoid this problem, a forthcoming VM change will use this new field
to thread pending references. If the garbage collector discovers that
a pending reference has been added to a reference queue it will short
circuit the reference processing of that object.

Change-Id: I280cc4a4fc4abd67dd80add1969aed12133c9369
ang/ref/Reference.java
5d40b59c6bba79dc978f173ad64cdfbd8a937018 08-Jul-2010 Elliott Hughes <enh@google.com> Clean up File.createTempFile and make Math.random thread-safe.

File.createTempFile has long annoyed me: using a SecureRandom but then always
incrementing by one is silly. Using a new Random is more random, more scalable,
and slightly faster than reusing a SecureRandom according to my benchmark.

Relatedly, access to the Random used by Math.random wasn't synchronized, which
is a bug.

I've also fixed a typo in a comment in a test. Woo!

Change-Id: Ief72ec0e378ed3d5807c278c589f7b0e44c21d3e
o/File.java
ang/Math.java
ab73941feb7f8677174cc97722201437edcb1299 03-Jul-2010 Jesse Wilson <jessewilson@google.com> Fix new String(String) to copy the backing array.

Adding documentation explaining the backing array, and
how it interacts with this copy constructor and substring().

Change-Id: I1044bcb614645e3f12c0701d5a883de6a65496f1
ang/String.java
aecd669ba84f758222c374027df1cc6849d37eed 02-Jul-2010 Elliott Hughes <enh@google.com> Stop Matcher from copying its input onto the native heap.

This uses ICU 4.6 API that we've manually backported to Android's ICU 4.4.

Bug: 2777924
Change-Id: I799b3e621a8c87d560495bc3d7b48f2e11de9c60
til/regex/Matcher.java
5cd6df2f627e06f9b7f714181d70d3148a3d6c60 01-Jul-2010 Elliott Hughes <enh@google.com> Part 2 of the "new String"/String.getBytes performance work.

I didn't plan on a part 2, but my benchmark was bogus. I'd failed to take into
account the fact that the ICU code (which I was comparing against) has a higher
intercept but lower slope than the Java I replaced it with. This new code
offers the best of both worlds: low intercept (start-up cost) and low slope
(per-byte/char cost).

The bad news is that this means I'm adding more native code. In addition to the
improved benchmark, I'll commit a benchmark that contains the pure Java
implementations so we can see when the JIT advances to the point that we can
retire this native code.

Change-Id: Ibac24c2e3deed216bd492acf2fac7554d3f96d85
ang/String.java
io/charset/Charset.java
io/charset/Charsets.java
7329fa972d9c20777444e5e1b13169d700de6567 29-Jun-2010 Brian Carlstrom <bdc@google.com> Fixes to support new dalvik.googlecode.com benchmarks

The following new benchmarks where tested with the below changes:
- DigestBenchmark
- MessageDigestBenchmark
- SSLSocketBenchmark
- SignatureBenchmark

Fix package name of OpenSSLProvider

luni/src/main/java/java/security/security.properties

Restore Java (vs OpenSSL) SSLSocket wrappers on SSLEngine for benchmarking

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketWrapper.java

Restore HandshakeProtocol.socketOwner code for SSLSocket to function

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Remove unneeded OpenSSLMessageDigestJDK.getInstance since these are
registered via OpenSSLProvider and SHA224 which is not part of the RI.
We had already removed the BouncyCastle version of this.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
luni/src/test/java/tests/targets/security/AllTests.java
luni/src/test/java/tests/targets/security/MessageDigestTestSHA224.java
luni/src/test/java/tests/targets/security/SignatureTestSHA224withRSA.java

Change-Id: I7daae7f0d9f50acad6df9157eac1b0133af83062
ecurity/security.properties
bfdb06dfa90bad70f55ae5c302a699fe28184b81 29-Jun-2010 Elliott Hughes <enh@google.com> Stop using CharsetDecoder when reading JAR manifests.

This gives us simpler code and a 2x speedup reading the JARs in
/system/framework. No new test failures.

Bug: 2772041
Change-Id: I750616923580196614d75db6e9e38984a66651f2
ang/UnsafeByteSequence.java
til/jar/InitManifest.java
til/jar/Manifest.java
12cd1f00c2fa1a7f37bf644cecdf7588bdc0b0a9 23-Jun-2010 Brian Carlstrom <bdc@google.com> Remove libcore's dependency on bouncycastle

external/bouncycastle
- Change to be the primary build for bouncycastle sources (as opposed to part of libcore)
- Moved OpenSSLMessageDigest from libcore to OpenSSLDigest
It uses NativeCrypto API from core, but implements a bouncycastle specific interface
- restored registration of bouncycastle MessageDigests for SHA-1, SHA-256, MD5
OpenSSLProvider versions take precedence, but explicit provider of "BC" allows choice
- enabled native versions of SHA-384 and SHA-512
- pruned MD4 implementation

frameworks/base
- frameworks and CoreTests modules now depend on bouncycastle
- update preloades classes for NativeBN package change
- moved CryptoTest to libcore

libcore
- core now builds without bouncycastle sources
- core-tests, core-tests-support, core-tests-supportlib now depend on bouncycastle
- removed libcore/openssl directory, moving NativeBN to java/math
- minor cleanup of Provider, Security, Services style while working on ProviderTest
- added new OpenSSLProvider registered as first provider to have
priority over the others to ensure our native implementations are used
- moved BouncyCastle to have priority as a provider over Harmony
- JarVerifier and JarUtils now implicitly use OpenSSLMessageDigest
- Cleanedup OpenSSLSignature, implementation needs to be finished to move to OpenSSLProvider
- To avoid using PEMWriter from BouncyCastle, NativeCrypto now takes binary encoded certs and keys
This is more efficient as well avoiding the base64 decode/encode of the binary data
- removed SHA-224 to match the RI

packages/apps/CertInstaller
- CertificateInstaller module now depends on bouncycastle
this is the only app to depend on bouncycastle

system/core
- updated BOOTCLASSPATH

Change-Id: I6205366b12baec4331b4a76e2c85d8324bf64b2c
ath/BigInt.java
ath/NativeBN.java
ecurity/Provider.java
ecurity/Security.java
ecurity/security.properties
til/jar/JarVerifier.java
768595838705d7e03921f8eb259e1f3a4b13b6d9 26-Jun-2010 Elliott Hughes <enh@google.com> Merge "Rewrite java.util.regex to use ICU's C++ API." into dalvik-dev
e377c5a424823bacf28e8ffb2a2f02bfe46d4a2b 26-Jun-2010 Elliott Hughes <enh@google.com> Rewrite java.util.regex to use ICU's C++ API.

I've also removed a bunch of dead code and changed the interface to reduce the
number of JNI transitions. Error checking is more uniform, various special
cases have been removed, and we pass all the tests referenced by
libcore/luni/src/test/java/tests/regex/AllTests.java for the first time.

This should also be a stepping-stone to fixing http://b/2777924, removing the
need to copy the input string to the native heap.

Bug: 2587040
Change-Id: I62685a2384db441cd02df159e117187f3175e10d
til/regex/Matcher.java
til/regex/Pattern.java
a86610254b4fe8dcd7a57986c8115f346d3fe067 25-Jun-2010 Barry Hayes <bhayes@google.com> Merge "Remove the vmData field from java.lang.ref.Reference." into dalvik-dev
870b23b3febc851c9cd2321f82a9971a34093e77 24-Jun-2010 Elliott Hughes <enh@google.com> Fix String.replace("", _).

Bug: http://code.google.com/p/android/issues/detail?id=8807
Change-Id: Id587df266a547ff17db4dbb32493bed394a7c51e
ang/String.java
095cbb8709ed62713b64f8dfe91164507ac7a65b 24-Jun-2010 Elliott Hughes <enh@google.com> Merge "Use Charset.defaultCharset() instead of "file.encoding"." into dalvik-dev
46ff2ede6c9f5ad431303d388986ec3d72b2fbd3 24-Jun-2010 Elliott Hughes <enh@google.com> Use Charset.defaultCharset() instead of "file.encoding".

It's cheaper, simpler, and we've already found that all bets are off in the RI
if you try to change "file.encoding" at runtime anyway (in terms of whether any
given class notices the change).

Also revert a premature optimization that breaks tests; saving a single
comparison before calling code that takes tens of microseconds is
counterproductive. (I have a bug to make that code faster, but it's never
going to be fast enough to worry about a single comparison.)

Also use the canonical name of ISO-8859-1, and use Charsets.UTF_8 in yet
another place I missed.

Change-Id: Ic15c2bae2f2ed57968ee7e34652f564a1420b458
o/InputStreamReader.java
o/OutputStreamWriter.java
o/PrintStream.java
ang/Runtime.java
til/Properties.java
3b777d1b4c1dc5d4c817fb70167b02a4f7e15092 24-Jun-2010 Elliott Hughes <enh@google.com> A couple of intention-revealing renames I missed in the last commit.

Change-Id: Ifb16948b201d3f5e2359550d36ef66b213b0ac4c
ext/SimpleDateFormat.java
21557bb6a8f35a2f9889adba449cac950c9d41b9 23-Jun-2010 Elliott Hughes <enh@google.com> Add TimeZones.forLocale, plus some tidying.

The new feature here is TimeZones.forLocale and the accompanying JNI. I've also
taken the liberty of pulling the time zone stuff out of ICU.java and ICU.cpp,
and I've moved some of the ICU-related code I've written recently (NativeIDN,
NativeNormalizer, and NativePluralRules) into a new libcore.icu package.

I've also renamed various things so the implementation details use the same
terminology as the thing they're implementing.

Bug: 2790386
Change-Id: Ie39a2f5f7023e8e29864de15790be8a660f5cba6
et/IDN.java
ext/DateFormatSymbols.java
ext/Normalizer.java
ext/SimpleDateFormat.java
til/TimeZone.java
e608e409843d2a0bb356522f2781a00cb0493cec 23-Jun-2010 Barry Hayes <bhayes@google.com> Remove the vmData field from java.lang.ref.Reference.

It is no longer needed.

Change-Id: If0e8ff7438c31cc2f88be401d826b0efba308ff1
ang/ref/Reference.java
561247df42b6d84bf0fae8412b7547ead01bf4f5 23-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing various test failures in Harmony's ArrayListTest." into dalvik-dev
a00b0e541a77ec76e0a327b2442147869c232ed0 23-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing various test failures in Harmony's ArrayListTest.

Alongside this are some fixes to Harmony's test, which is too
aggressive about checking that exceptions have messages.

Change-Id: I1b71066d89855770d3f733e4065bd62050b0cb91
til/ArrayList.java
1d7a5c66d9973f3383e7e4f9f8be5262161a1421 23-Jun-2010 Elliott Hughes <enh@google.com> Fix Math.atan2 documentation.

The StrictMath.atan2 documentation is already correct.

Bug: http://code.google.com/p/android/issues/detail?id=9260
Change-Id: Ibd86cf7fe73a120578840dce4126a902a827fb40
ang/Math.java
e7163561816da4afa9c800b53425007856fdbb9c 23-Jun-2010 Elliott Hughes <enh@google.com> Improve Formatter exception detail messages and fix test expectations.

Bug: 2788945
Change-Id: I959df2c338a4d85497a23705b553f0c749ef1070
til/DuplicateFormatFlagsException.java
til/FormatFlagsConversionMismatchException.java
til/Formatter.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
3879e020661c580a3ff58cbe6af079a21e91e335 23-Jun-2010 Elliott Hughes <enh@google.com> Merge "Minor java.util.regex.Pattern documentation fixes." into dalvik-dev
c78823c8b75283e8013b2665311527ef5e0c0228 23-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing ProcessBuilder.environment() to maintain a mutable copy." into dalvik-dev
9f05b37e3f0a1c0d30e1a64e1d5115e87fe03444 23-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing ProcessBuilder.environment() to maintain a mutable copy.

Previously we were failing with "UnsupportedOperationException: Can't modify environment"
when trying to set the env on a forked process.

Change-Id: Id42b7d431574925bc29a2bd4e16667f3cca5fdb5
ang/ProcessBuilder.java
069774ea75c32440ad39f54c9a77d0eda6b20b53 23-Jun-2010 Elliott Hughes <enh@google.com> Minor java.util.regex.Pattern documentation fixes.

Change-Id: If6a4afc8c9365cfce42fcaef00f19b0597a068bf
til/regex/Pattern.java
151a7022d25b58cc2788f0cbe2922f9653e9ee7c 23-Jun-2010 Elliott Hughes <enh@google.com> String should throw UnsupportedEncodingException if Charset.forName fails.

Bug: 2788958
Change-Id: I1be003c58338a63c34294dfe0498c3f5ede10996
ang/String.java
2da83dc205e701b8dbe2cb84c54c2f8bb1073869 22-Jun-2010 Elliott Hughes <enh@google.com> Stop using CharsetEncoder in File.newCString.

Also reuse Charsets.UTF_8.

Bug: 2772041
Change-Id: Ie1e910b519b365eb581b22b147bb97c5faf74b65
o/File.java
b1b8fbeeae579e9f49c41166bb5d9b2e60b75438 22-Jun-2010 Elliott Hughes <enh@google.com> Switch Base64 over to Charset.

Using Charset is faster and removes the need to handle impossible run-time
errors.

Change-Id: I0d0531b5f2c296725aa97ce4258264c694f640a5
til/prefs/AbstractPreferences.java
2304b91fe0b80e61502c40c64a89766336702637 21-Jun-2010 Jean-Baptiste Queru <jbq@google.com> am 5b1fb173: resolved conflicts for merge of c4c9ba1d to master

Merge commit '5b1fb17362830a90aff5a9a5ad41d13a39bc7533' into dalvik-dev

* commit '5b1fb17362830a90aff5a9a5ad41d13a39bc7533':
New implementation for java.lang.Runtime's availableProcessors().
5b1fb17362830a90aff5a9a5ad41d13a39bc7533 21-Jun-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of c4c9ba1d to master

Change-Id: I9103e220058fbc348b821f321b5761ffd2d5800c
e32b21f14d52bac429a9c54fe031f9e92c911d64 18-Jun-2010 Jesse Wilson <jessewilson@google.com> Implementing ZoneInfo.hasSameRules().

Moving TimeZoneTest to OldTimeZoneTest and removing test methods
that are duplicated between libcore and Harmony.

Also adding Objects.equals() to make implementing this easy,
and removing redundant time zone tests. I did a few searches
to find candidate code that could take advantage of this new
utility method and adopted it there.

Change-Id: I133298f1b36d755bd35c1ad0dc0ab366fd164270
o/File.java
o/FilePermission.java
et/HttpCookie.java
et/URLStreamHandler.java
ecurity/Identity.java
ext/MessageFormat.java
til/HashMap.java
til/TimeZone.java
til/TreeMap.java
til/logging/Level.java
a2952462d8f654b2e0ccfac4a1f2d54aa0259516 18-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing various problems with HTTPS proxies thru HTTP." into dalvik-dev
f10b2437ae5ec073f8c4118f7235022ba83667c4 18-Jun-2010 Elliott Hughes <enh@google.com> Minor bidi tidying.

Fix the bidi code to consistently use finally blocks to ensure we can't
leak native UBidi objects. Rename BidiWrapper to NativeBidi since it isn't
a class with a finalizer that wraps a UBidi: it's just a namespace for static
native methods.

Also remove the useless public constructor from NativeCollation.

Bug: 2772065
Change-Id: I441ff4811bb66c37daf270d74d5403b9848cce90
ext/Bidi.java
74c50755c30b3afd4852e006aeedeb25232ca757 17-Jun-2010 Elliott Hughes <enh@google.com> Rewrite FileDescriptor and ProcessManager's JNI in terms of JNIHelp.h's API.

This lets us remove JniConstants::fileDescriptorClass and rely on the cached
jclass in JNIHelp.c.

Change-Id: Ie9b067113050e95413c28befe0143a8bbf2113de
o/FileDescriptor.java
d93bf0f076628f52c56610853435f04ce9983a15 16-Jun-2010 Elliott Hughes <enh@google.com> Merge "Apply harmony patch for https://issues.apache.org/jira/browse/HARMONY-6271." into dalvik-dev
776982b51c97692b1fab09828057d2f2516f50b9 16-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am 32a84bfe: am 65bfb219: am 7983be97: Sprinkle BlockGuard checks on DNS lookups.

Merge commit '32a84bfee7611f4553de46465a7fc00ecff99b81' into dalvik-dev

* commit '32a84bfee7611f4553de46465a7fc00ecff99b81':
Sprinkle BlockGuard checks on DNS lookups.
32a84bfee7611f4553de46465a7fc00ecff99b81 16-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am 65bfb219: am 7983be97: Sprinkle BlockGuard checks on DNS lookups.

Merge commit '65bfb2194248a27d8bf35b39c9d0e234fd329d7d'

* commit '65bfb2194248a27d8bf35b39c9d0e234fd329d7d':
Sprinkle BlockGuard checks on DNS lookups.
5737216377e5a139745f32e39769c8ea6fbd4392 16-Jun-2010 Elliott Hughes <enh@google.com> Apply harmony patch for https://issues.apache.org/jira/browse/HARMONY-6271.

Bug: https://issues.apache.org/jira/browse/HARMONY-6271
Change-Id: I6d6be2fa89ebbe4b759420edf17418af9cea9d4d
ath/Multiplication.java
7983be972905950b4a4e7d66df908f083c81ee29 16-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Sprinkle BlockGuard checks on DNS lookups.

Change-Id: Ib1ac2ce633fc1277ab8b6f11da37a739d0995cfe
et/InetAddress.java
cb8d09e94846d073ee7b50bef89c0b33113697fb 16-Jun-2010 Elliott Hughes <enh@google.com> Use ServiceLoader in Charset.

Also more internal tidying to remove unnecessary levels of indirection, and
reduce the amount of time we spend under a lock in forName and friends.

Bug: 2567593
Change-Id: I1a309d8b685fe1b78eec6b94114061407dd382ae
io/charset/Charset.java
io/charset/CoderResult.java
c8977f474b30c5f3807398859a6b16687af6fc7b 15-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing various problems with HTTPS proxies thru HTTP.

- reading extra bytes from the server depending on available()
- not sending the port with the proxy request
- returning a read-til-the-end stream instead of a read-0-bytes-stream
on CONNECT requests
- fixing MockWebServer to omit the unnecessary \r\n after
the response body
- tests no longer mask the issue by unambiguously reading characters.
Trailing newlines aren't discarded!
- New tests when content-length and content disagree. The RI fails
the test when the transfer-encoding is not chunked.

Change-Id: I888569844d323bc770cd5bb95ac71c740dd5e720
et/HttpURLConnection.java
et/URI.java
et/URL.java
a9d779fa6375b2d4bce8d15f369773480b7c6b71 15-Jun-2010 Elliott Hughes <enh@google.com> Various broken tests.

I'll commit a vogar bug fix to the public repository too.

Change-Id: I3c18a1b8f74303aab65f67940ff41539f9620df1
ang/Character.java
4a35d4810b346a8198ab780a934ca3414b4136a1 15-Jun-2010 Elliott Hughes <enh@google.com> Merge "More charset-related cleanup/optimization." into dalvik-dev
e810d3b49631329b11440aa5b7a54db181d42ed1 15-Jun-2010 Elliott Hughes <enh@google.com> More charset-related cleanup/optimization.

This patch adds a Charsets class that lets us avoid a hash lookup and an extra
level of method call indirection when calling String.getBytes or "new String"
for a well-known guaranteed charset. It also fixes callers to take advantage.

This also adds a special case to "new String" for the UTF-8 charset to avoid
needless duplication if we guessed the correct buffer size (which we will for
input that happens to be US-ASCII too).

The ModifiedUtf8 class gives a more meaningful name for Utils.convertUTF8WithBuf.

This also removes a dead link and un-tinyurl'ed another.

Change-Id: I02712f53dee16feb3b1db2c14536dc055126cd04
o/DataInputStream.java
o/RandomAccessFile.java
ang/ProcessManager.java
ang/String.java
et/URIEncoderDecoder.java
et/URLConnection.java
io/charset/Charsets.java
io/charset/ModifiedUtf8.java
til/jar/Attributes.java
til/jar/JarVerifier.java
til/prefs/AbstractPreferences.java
til/zip/ZipEntry.java
til/zip/ZipInputStream.java
16ad213de6a8e364c7f0065a4f539f9de56be776 14-Jun-2010 Elliott Hughes <enh@google.com> am 3c998caa: resolved conflicts for merge of 637d3aef to master

Merge commit '3c998caacc0ded3b97e0c53b039a30cde2b27389' into dalvik-dev

* commit '3c998caacc0ded3b97e0c53b039a30cde2b27389':
Make System.setSecurityManager throw in the actual gingerbread.
3c998caacc0ded3b97e0c53b039a30cde2b27389 14-Jun-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of 637d3aef to master

Change-Id: I025453c1064214ce2707239437b8c752b920e776
09ee91efa4b73c1d14179964e9edf21fcd5dccb5 14-Jun-2010 Elliott Hughes <enh@google.com> Merge "Fix serialization of DateFormatSymbols after https://android-git.corp.google.com/g/54091." into dalvik-dev
2cde53e669fdf0422c4dda13f5766dc68a7f63ce 12-Jun-2010 Elliott Hughes <enh@google.com> Fix serialization of DateFormatSymbols after https://android-git.corp.google.com/g/54091.

I added non-RI fields, but didn't make them transient. This patch fixes that (so we write
RI-compatible serialized forms), and copes with reading in RI-compatible forms (that don't
have the stand-alone names) by falling back to the regular names.

Bug: http://b/2633414
Change-Id: I03f6fae78f09fc9cb9235d16cb982944069ef292
ext/DateFormatSymbols.java
79f07cc86be9abc27d0da7df3245ba4bab809ae6 12-Jun-2010 Elliott Hughes <enh@google.com> Improve MessageDigest documentation.

As explained in the bug, I don't think we can/should fix this potential
native crash, but we can and should improve the documentation to explain
how you're _supposed_ to use MessageDigest.

Bug: http://code.google.com/p/android/issues/detail?id=8709
Change-Id: I1cbab5995e5673d5386e21270ac52b6f90b9f421
ecurity/MessageDigest.java
63710430c17f7c0a1e74b926cd21248fde8e9589 11-Jun-2010 Elliott Hughes <enh@google.com> Make BigInteger thread-safe.

We were sharing an openssl BN_CTX between threads, which is unsafe. Stop
doing that, creating BN_CTXes on demand (which seems to be what openssl
does internally). For 1024-bit integers, this makes division faster,
multiplication slower, and makes no convincing difference to gcd. I
instrumented a build to report any time one of the methods that needs
a BN_CTX gets called, and couldn't find anywhere they're used during
boot or https browser usage. (These things do use BigInteger; they just
don't use the methods this change affects.)

Bug: 2652542
Change-Id: I98c94b41df95566cb4c8598f299911e641f72f63
ath/BigInt.java
ath/BigInteger.java
ath/Primality.java
9a0668a7f531b04dd001a4d193c159dabdb7bf0c 11-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing some miscellaneous jtreg failures in pipes." into dalvik-dev
2375e98761ddc54d0a30a6c06a835a2f723dc748 11-Jun-2010 Elliott Hughes <enh@google.com> Merge "Support stand-alone month and weekday names in SimpleDateFormat." into dalvik-dev
143e8c9cf91cfc01c3c91c8e93cad661ec7554ee 11-Jun-2010 Elliott Hughes <enh@google.com> Support stand-alone month and weekday names in SimpleDateFormat.

Also rewrite the SimpleDateFormat documentation.

Bug: 2633414
Change-Id: I8fcc3b1f73dd6f264dd292852a8ab0c5a2742f5b
ql/Date.java
ql/Timestamp.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/SimpleDateFormat.java
dfc6136d9473dfd0aa5b310035ce48d5f8eebe0d 11-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing some miscellaneous jtreg failures in pipes.

Change-Id: I52c69b027a1e7636ec0ee8d83b3c8d938bec71f2
http://b/issue?id=2224976
o/PipedInputStream.java
o/PipedReader.java
o/PipedWriter.java
6969125ec1a8073ca1142df2d663cf9c052bfb6c 11-Jun-2010 Elliott Hughes <enh@google.com> www.ietf.org is the canonical home for RFCs.

Change-Id: Ib83ff61230649757917346645f6cf47d9df3f348
ang/Character.java
c61e057ac9af32c1987d70d19cb2ead75ed8f612 09-Jun-2010 Elliott Hughes <enh@google.com> Optimize String.getBytes for ISO-8859-1, US-ASCII, and UTF-8.

This is 10x faster for UTF-8 and 20x for US-ASCII/ISO-8859-1.

Change-Id: Ie34c8d0522175c9e0a0433fe42bc1c2b1d328b49
ang/String.java
ang/UnsafeByteSequence.java
73113fb0d6ab5708b284913431b22ec93d335521 09-Jun-2010 Elliott Hughes <enh@google.com> Remove a duplicate of Charset.defaultCharset (from a deprecated method).

Change-Id: Ia7be1cfb2f7c3e891cd421fea4f814e62a1bc283
et/URLDecoder.java
d0628c5cb80e3c1270634c56a784329a4836b9aa 08-Jun-2010 Elliott Hughes <enh@google.com> Make Charset.defaultCharset cheap.

This is a slight behavioral change, but this is how the RI works: changing
"file.encoding" after startup has no effect there either.

Change-Id: I0fd44edd3aedcfd7f72cda572bb2ff3c44ad3ab9
ang/String.java
io/charset/Charset.java
c903e6720bbbf6540c29f141bd2fa559813ea20a 08-Jun-2010 Elliott Hughes <enh@google.com> Improve Charset.forName/"new String" performance.

Lookup String's default charset once at class initialization. Stop
creating a new empty char[] every time we create an empty string. Fix
the documentation not to lie about using ISO-8859-1 in all kinds of
places we don't (and where the RI doesn't specify that we should).
Fix the performance of the String(byte[]...String) and String(byte[]...Charset)
constructors to be equivalent rather than wildly different (and not in the way
anyone would reasonably expect). Canonicalize the requested charset's name
so that we can uniformly optimize all aliases of those charsets we
special-case, rather than just those few aliases we used to hard-code.

Tidy up the String.getBytes methods in preparation for optimization (in a later
patch).

Fix the performance of Charset.forName to be amortized constant time regardless
of what name is used, in recognition of the fact that Unicode TR#22 section 1.4
means that there are a potentially infinite number of valid pseudo-aliases for
any charset (at least two of which are relatively common in libcore itself, so
I'd imagine plenty are used in the wild too). Some slight synchronized-related
tidying, and more reuse of public API (because one day I'd like to improve the
locking situation deeper down in this code).

In HistoricalNameUtil.java, remove ugliness.

In File.java, use "new String" rather than junk from Util.

In RandomAccessFile.java, reuse convertUTF8WithBuf instead of the otherwise
unused convertFromUTF8 convenience method.

In Util.java, remove now-dead code and comment some code that looks like it
should be killed but is actually unique and necessary. (I'll probably move
this into an intention-revealing class in my next patch. "Util", FFS! "UTF8",
FFS!)

Also add a couple of tests to StringTest.java to show that my improved String
documentation is true, and that some bogus code that I removed was indeed
bogus.

Change-Id: I746f990172c51c30aa5f5037346644552a224841
o/File.java
o/RandomAccessFile.java
ang/String.java
io/charset/Charset.java
d0b3bfdf6eeae495a44940eb6e9f9a64ac906b50 07-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing a bug wherin exceptions weren't being reported for generic methods." into dalvik-dev
98a7a76fe5c0dd5ff949b38da809368681169205 07-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing a bug wherin exceptions weren't being reported for generic methods.

Change-Id: Ic695ce127c8b4d59508f888028102fb8410e1600
http://b/issue?id=2742467
ang/reflect/Constructor.java
ang/reflect/Method.java
6decf73f7142017e514bb1beb8aa4076848b968f 07-Jun-2010 Elliott Hughes <enh@google.com> am c7787cfa: Merge "ICU4.4.1 upgrade 1. Replaced the temp Android patch for BigDecimal support with ICU APIs. 2. Changed ICU.cpp for resource re-structure in ICU4.4 release. 3. Fixed the test data for NumberFormat test caused by the locale data changes."

Merge commit 'c7787cfacfb9800f57c4506db1ba773460335af2' into dalvik-dev

* commit 'c7787cfacfb9800f57c4506db1ba773460335af2':
ICU4.4.1 upgrade
c7787cfacfb9800f57c4506db1ba773460335af2 07-Jun-2010 Elliott Hughes <enh@google.com> Merge "ICU4.4.1 upgrade 1. Replaced the temp Android patch for BigDecimal support with ICU APIs. 2. Changed ICU.cpp for resource re-structure in ICU4.4 release. 3. Fixed the test data for NumberFormat test caused by the locale data changes."
d7d1ce2c63111de39905851e7970b782c7597dbf 07-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Adding a few missing type parameters to reflect classes" into dalvik-dev
8556e0aed87cbbf5338e053f9df55a936f788f5f 05-Jun-2010 Jesse Wilson <jessewilson@google.com> Filling in missing Java 6 APIs for AccessController.

This keeps with our current policy: gracefully handle security manager
doPrivileged calls, but don't permit user-defined security managers.

Change-Id: Ie77274e1c82c2baddad74fe467d3a7b80d9dc379
ecurity/AccessController.java
fc01d49659672a4272a2f5a489ce950fb8576b05 05-Jun-2010 Jesse Wilson <jessewilson@google.com> Adding a few missing type parameters to reflect classes

Change-Id: Idae3034c37f3eaff6921d5cf01541abee85762f2
ang/reflect/Array.java
ang/reflect/Member.java
55b2d1c3f492f6140ad6dd18a4bec4ec2643d664 05-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing the last API deltas between Dalvik and Java 6.

This addresses some problems with generic type signatures (missing <?>)
and new factory methods for XML factory classes.

Change-Id: I9cd886e38b8bc9d495ae4e5ed70f71f27ac3f0cc
ang/Class.java
947eeb80f985827209c9500851e288504d58ec2e 03-Jun-2010 claireho <chinglanho@gmail.com> ICU4.4.1 upgrade
1. Replaced the temp Android patch for BigDecimal support
with ICU APIs.
2. Changed ICU.cpp for resource re-structure in ICU4.4 release.
3. Fixed the test data for NumberFormat test caused by the locale
data changes.

Change-Id: I307e798f1a135a5024a693d23363733d020ed22f
ext/DecimalFormat.java
b10f4611e8c74fd4e996c8ed999a16d81f0df986 03-Jun-2010 Elliott Hughes <enh@google.com> Fix javadoc error found by sdk build.

Can we build this target on our dalvik-dev continuous build too, so we catch
errors like this on our own branch before breaking master? What is the target?

Change-Id: I677220b3a95c2b053572a7d6dc916e1ecfcb61c4
io/charset/CharsetEncoder.java
466b89ce07ef0ce77504f45690dba56cf933fd41 03-Jun-2010 Elliott Hughes <enh@google.com> Merge remote branch 'goog/dalvik-dev' into mm

Change-Id: I6905802cfe7cda73bb6f52fe0cc79767b4645e82
57a151cc43ef3dfc1040fad5581836c66c8e53f3 03-Jun-2010 Elliott Hughes <enh@google.com> Fix EUC-JP (and friends) to be better than before.

In froyo, EUC-JP, SCSU, and Shift_JIS all worked because we mangled their
replacement byte sequences to 0x3f, which didn't make a lot of sense but
which silenced the RI's mandated checks on valid replacement byte sequences.

This patch subverts the checking for ICU-supported charsets, and lets us
use the best byte sequences for the job.

Also new tests, and rewritten documentation for CharsetEncoder.

Bug: 2732849
Change-Id: Ia104a0bd2adc9c99bfeb550abfd7d5336c412c86
io/charset/CharsetEncoder.java
io/charset/CoderResult.java
42c2d693868179248e907ad864f2b8840945e95a 02-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing file leaks in SelectorImpl." into dalvik-dev
6b739231f8985f33f20672fe727fde0d0f023ead 02-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing file leaks in SelectorImpl.

There were two core problems:
source.close() and sink.close() weren't being called by SelectorImpl
ServerSocketChannelImpl was opening a stream socket into a file descriptor,
only to have its PlainServerSocketImpl clobber that file descriptor later
when create() was called.

Alongside fixing these problems I've done some style cleanup. None
of which should impact behavior.

Change-Id: I39eead3fbdc0290e83784e8b50861aeef7020513
o/FileDescriptor.java
et/SocketImpl.java
753dcd862b31e85766225590d90ba0b9f481176f 02-Jun-2010 Elliott Hughes <enh@google.com> Refactor some of the OSNetworkSystem stuff to more appropriate homes.

Also rewrite PlainDatagramSocketImpl.peek in terms of existing primitives
rather than requiring its own. I still don't see how it can get called, but
at least now it doesn't require its own native code.

Bug: 2686833

Change-Id: I0453add66dab4c7095ee2a3f51a49efbd1205598
et/InetAddress.java
et/URI.java
io/channels/spi/SelectorProvider.java
3784ab1a0eafa37f1181df2815075300ab1c60f6 01-Jun-2010 Elliott Hughes <enh@google.com> Fix a mistake in the new Charset documentation: UTF-16 swallows BOMs.

Introduced in https://android-git.corp.google.com/g/52835.

Change-Id: I4c8ede55cbec84e25bc8cd522af1f56c79f4369a
io/charset/Charset.java
b004e4c3d1183a51b9d3d9e012abb1c28481e978 01-Jun-2010 Elliott Hughes <enh@google.com> Merge "Add tests to confirm that Charset behaves as the RI documentation claims." into dalvik-dev
c89c180eb85cc0392c3a6c2eb4803594478e665c 28-May-2010 Elliott Hughes <enh@google.com> Add tests to confirm that Charset behaves as the RI documentation claims.

Also improve our Charset documentation.

Note that we fail these new tests, but ICU 4.4 has what we need to fix
this.

Bug: 2702411
Change-Id: I6195dd807e33acdee96138a1d16dde95a786a322
io/charset/Charset.java
8ee6350602b1cf57f82e07e2c200ef2feb19a239 29-May-2010 Elliott Hughes <enh@google.com> Merge "Remove the last exception message catalog." into dalvik-dev
897538a36c18f4db8f9f68ee566aec0bda842e9f 29-May-2010 Elliott Hughes <enh@google.com> Remove the last exception message catalog.

Bug: 1251121
Change-Id: I45931b9ff908531bda06d6569a4e9618986f821b
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/AllPermissionCollection.java
ecurity/BasicPermission.java
ecurity/BasicPermissionCollection.java
ecurity/CodeSigner.java
ecurity/CodeSource.java
ecurity/Identity.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyPairGeneratorSpi.java
ecurity/KeyRep.java
ecurity/KeyStore.java
ecurity/KeyStoreSpi.java
ecurity/MessageDigest.java
ecurity/MessageDigestSpi.java
ecurity/Permissions.java
ecurity/PermissionsHash.java
ecurity/Provider.java
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/Signature.java
ecurity/SignatureSpi.java
ecurity/Timestamp.java
ecurity/UnresolvedPermission.java
ecurity/UnresolvedPermissionCollection.java
ecurity/cert/CertPath.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertPathValidatorException.java
ecurity/cert/CertStore.java
ecurity/cert/Certificate.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
ecurity/cert/PKIXBuilderParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/PKIXCertPathValidatorResult.java
ecurity/cert/PKIXParameters.java
ecurity/cert/PolicyQualifierInfo.java
ecurity/cert/TrustAnchor.java
ecurity/cert/X509CRL.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
ecurity/cert/X509Certificate.java
ecurity/spec/ECFieldF2m.java
ecurity/spec/ECFieldFp.java
ecurity/spec/ECGenParameterSpec.java
ecurity/spec/ECParameterSpec.java
ecurity/spec/ECPoint.java
ecurity/spec/ECPrivateKeySpec.java
ecurity/spec/ECPublicKeySpec.java
ecurity/spec/EllipticCurve.java
ecurity/spec/MGF1ParameterSpec.java
ecurity/spec/PSSParameterSpec.java
ecurity/spec/RSAMultiPrimePrivateCrtKeySpec.java
ecurity/spec/RSAOtherPrimeInfo.java
018b67accb28954d35f3cd697be3428e9b45b7d8 28-May-2010 Jesse Wilson <jessewilson@google.com> Further small fixes to increase API compatibility with RI v6.

Highlights:
code was moved from SSLContextImpl to its superclass.
took X500Principal code from Harmony

Tested with Harmony's tests.api.javax.security.auth.x500.X500PrincipalTest.

Change-Id: I89b46d4b47e692a5461916cca972e05de95f3280
ql/SQLException.java
ext/DecimalFormatSymbols.java
til/Deque.java
til/LinkedList.java
til/concurrent/ConcurrentLinkedDeque.java
til/zip/DeflaterInputStream.java
til/zip/InflaterInputStream.java
til/zip/InflaterOutputStream.java
d23d1433b18b971771a14fa1ac1d1262a827b369 28-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Filling in APIs from RI 6 that we missed." into dalvik-dev
f2422829389c7dba1b23c8c2c6fb34dd7a40fe42 28-May-2010 Jesse Wilson <jessewilson@google.com> Filling in APIs from RI 6 that we missed.

Change-Id: I7f98bbbb3c68efee61b88acc3bc25f2c9990b519
wt/font/TextAttribute.java
bf87c56b39383f6b11c36c3cdc93df4b03fed914 28-May-2010 Brian Carlstrom <bdc@google.com> Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

Conflicts:
JavaLibrary.mk
luni/src/main/java/java/lang/System.java
luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/test/java/java/net/URLConnectionTest.java
support/src/test/java/tests/TestSuiteFactory.java
x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Change-Id: I1038f749c8c9bd640aae7ca96627810936454883
82317aca10195366fe67b70b0d10554a8886e183 28-May-2010 Elliott Hughes <enh@google.com> Merge "Javadoc improvements." into dalvik-dev
4adff24306c86433ce4f771da8489a574e63318e 27-May-2010 Elliott Hughes <enh@google.com> Javadoc improvements.

Bug: 2718660
Change-Id: Ifae8541d269ac0fa5581802a8d78453af19a0e10
ang/Object.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
til/HashMap.java
f0c42694d45de3d263ca8c123ec37e02818fefb0 28-May-2010 Jesse Wilson <jessewilson@google.com> Fixing Class.getMethod() to support synthetic methods from covariant return types.

Change-Id: I569d5d68888975f2828c8ab56b015fd323ad9114
ang/ClassCache.java
04a837d3657716ea4e618194f4e8771554caec46 27-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing many test failures with the new cookie implementation." into dalvik-dev
6e5d43fafa5d4fa75cefa8e552c6c1c60a5d3534 27-May-2010 Jesse Wilson <jessewilson@google.com> Fixing many test failures with the new cookie implementation.

Highlights:
- don't send cookies with nonmatching ports or secure attributes
- default the port when "port" with no value is received
- make CookieStore threadsafe
- make CookieStore retain only host in URIs
- fix concurrent mod bug when removing expired cookies
- support null URIs in the CookieStore (unfortuantely)
- parse more date formats; even ridiculous date formats
- match ".google.com" to "google".
- support single quotes in attribute values
- exploit @hide to add a new API, URI.getEffectivePort()

Alongside this change I've fixed several test problems in dalvik-prebuild's
copy of both the Harmony tests and the jtreg tests. Most of the fixes involve
commenting out bogus assertions.

Change-Id: I71f09110b48d8ca4f3538fd21c8dde7ffdd35a6a
et/CookieManager.java
et/CookieStore.java
et/CookieStoreImpl.java
et/HttpCookie.java
et/URI.java
162a12c1442641a95fe95859fa4e561b22db049f 25-May-2010 Elliott Hughes <enh@google.com> Remove @hide from Java 6 API.

I've left the two new spi packages @hidden, because I think we shouldn't
support them without convincing demand from developers (and I don't
believe there could be such a thing --- they just don't make sense, and
if we add anything, it should be the ability to provide extra ICU data).

Also fix a handful of javadoc syntax errors in Arrays.java and TreeMap.java.

Bug: 2497395
Change-Id: I4176b72daff0face4ed6c7ee1d1f4267d52006b4
o/Console.java
o/File.java
o/IOError.java
o/IOException.java
o/ObjectStreamClass.java
o/PipedInputStream.java
o/PipedReader.java
o/PrintStream.java
o/PrintWriter.java
ang/Double.java
ang/Enum.java
ang/Float.java
ang/Math.java
ang/StrictMath.java
ang/String.java
ang/System.java
et/IDN.java
et/InterfaceAddress.java
et/NetworkInterface.java
io/Buffer.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/Normalizer.java
ext/NumberFormat.java
til/Arrays.java
til/Calendar.java
til/ListResourceBundle.java
til/Locale.java
til/Properties.java
til/PropertyResourceBundle.java
til/ResourceBundle.java
til/Scanner.java
til/ServiceConfigurationError.java
til/ServiceLoader.java
til/TreeMap.java
til/logging/Logger.java
til/zip/DeflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/ZipError.java
36b3cdfbcd219d0308753d919638262c16fd34da 14-May-2010 Jeremy Sharpe <jsharpe@google.com> Implement Java 6 SQL API. Javadoc is still messy and some unit tests
need to be updated to reflect newly implemented parts of the API.

Change-Id: Icee718ef997d29aa08fc78b101f87532dc89167f
ql/Array.java
ql/BatchUpdateException.java
ql/Blob.java
ql/CallableStatement.java
ql/ClientInfoStatus.java
ql/Clob.java
ql/Connection.java
ql/DataTruncation.java
ql/DatabaseMetaData.java
ql/NClob.java
ql/ParameterMetaData.java
ql/PreparedStatement.java
ql/ResultSet.java
ql/ResultSetMetaData.java
ql/RowId.java
ql/RowIdLifetime.java
ql/SQLClientInfoException.java
ql/SQLDataException.java
ql/SQLException.java
ql/SQLFeatureNotSupportedException.java
ql/SQLInput.java
ql/SQLIntegrityConstraintViolationException.java
ql/SQLInvalidAuthorizationSpecException.java
ql/SQLNonTransientConnectionException.java
ql/SQLNonTransientException.java
ql/SQLOutput.java
ql/SQLRecoverableException.java
ql/SQLSyntaxErrorException.java
ql/SQLTimeoutException.java
ql/SQLTransactionRollbackException.java
ql/SQLTransientConnectionException.java
ql/SQLTransientException.java
ql/SQLWarning.java
ql/SQLXML.java
ql/Statement.java
ql/Types.java
ql/Wrapper.java
59cb78e2355929587089ee436a0172af652d2aa5 21-May-2010 Jeremy Sharpe <jsharpe@google.com> Fix NullPointerException from TreeMap immutable entry methods by checking the return values for null before wrapping them with new SimpleImmutableEntrys.

Change-Id: Ib8a78dd13b8b2895acd5f0016bc353f763ea50be
til/TreeMap.java
a4a1f1ce70da1dd3a4ddf0b962b669cb78a63000 25-May-2010 Elliott Hughes <enh@google.com> Merge "Remove the luni localized exception messages." into dalvik-dev
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
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/DataInputStream.java
o/DataOutputStream.java
o/File.java
o/FileInputStream.java
o/FileOutputStream.java
o/FilePermission.java
o/FilterOutputStream.java
o/InputStream.java
o/InputStreamReader.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/SequenceInputStream.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
ang/AbstractStringBuilder.java
ang/ArrayIndexOutOfBoundsException.java
ang/ClassCastException.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/StringIndexOutOfBoundsException.java
ang/reflect/Proxy.java
et/CookieStoreImpl.java
et/DatagramPacket.java
et/DatagramSocket.java
et/HttpURLConnection.java
et/Inet6Address.java
et/MulticastSocket.java
et/NetworkInterface.java
et/Proxy.java
et/ProxySelectorImpl.java
et/ServerSocket.java
et/Socket.java
et/SocketImpl.java
et/SocketPermission.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLStreamHandler.java
til/Arrays.java
til/BitSet.java
til/Collections.java
til/Currency.java
til/MissingFormatArgumentException.java
til/Scanner.java
til/SimpleTimeZone.java
til/Timer.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
d44d87eac62e1710d2cd420b00c05c98aebc8c98 25-May-2010 Jesse Wilson <jessewilson@google.com> Working through jtreg failures in java.util.

TreeMap.clone() failed on an empty treemap.
Some EnumSet tests needed to be suppressed or given an extended timeout.

Change-Id: I98240910f5fdbe3226ef1071f99a8cac37e2c7ef
til/TreeMap.java
1ca3a957ea02c279214b668925e0b61e618da606 25-May-2010 Jesse Wilson <jessewilson@google.com> Reduce the visibility of HttpCookie.isFullyQualifiedDomainName().

This is a genuine bug caught by apicheck. Yay apicheck.

Change-Id: I8f9cb60d42d7cba1b65b3173660ef51cd8427622
et/HttpCookie.java
3fab88eb2cd44ee5231b05f63e20917d3db12079 25-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Redo HttpCookie.parse()." into dalvik-dev
77160e9cd7841fcf49d20b97a75d60e827c351ee 21-May-2010 Jesse Wilson <jessewilson@google.com> Redo HttpCookie.parse().

The previous code failed on quoted strings like ;Port="80,8080".
It also had weird behavior, like not supporting Expires headers
when the requesting locale wasn't English.

Tested with Harmony's tests and our CookieTest.

Change-Id: I271817b6febd30248f55f834cdcc2e3d5dfcd4c2
et/CookieManager.java
et/HttpCookie.java
et/InetAddress.java
ebc652d27ed8d68240acf2ff778c01356e1e6ba6 24-May-2010 Elliott Hughes <enh@google.com> Merge "Remove more localized exception messages." into dalvik-dev
c8a71612646a1b0e2b787fe985245def93ecc705 24-May-2010 Jesse Wilson <jessewilson@google.com> Fixing binary search for large arrays of reference types.

Change-Id: Ibf2b49fd2cf1538a1a369fa36f2a1c8275e33677
til/Collections.java
80a7fbab52b96c9fd47c72f8987d1babe2cd001d 22-May-2010 Elliott Hughes <enh@google.com> Remove more localized exception messages.

I also accidentally mixed two unrelated changes in here: replacing "".equals
and equals("") with String.isEmpty, and removing some dead code in
org.apache.harmony.luni.util.Util.

Change-Id: I0aaad43290b083085b3095b624caf096de487223
o/FilePermission.java
ang/ClassLoader.java
et/NetworkInterface.java
et/ProxySelectorImpl.java
et/SocketPermission.java
et/URI.java
et/URL.java
et/URLClassLoader.java
et/URLStreamHandler.java
til/Scanner.java
til/logging/Logger.java
til/prefs/AbstractPreferences.java
c941a854631c4bf2369adc84887bb6dd386a1bcc 22-May-2010 Elliott Hughes <enh@google.com> Fix build.

Change-Id: I61d838fdb9147b1e488cf6c9ea0aa1e1e87f935e
til/jar/InitManifest.java
til/jar/JarFile.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/Inflater.java
til/zip/InflaterInputStream.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
b1433b3bd4dfc05426e5d9c3100b5fbaa198d8a0 21-May-2010 Elliott Hughes <enh@google.com> More messages.properties removal.

Change-Id: Ie90ca910b1d9f23565f8929c63186879932a4dc3
til/jar/InitManifest.java
til/jar/JarFile.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/Inflater.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
c60bc1815dca549f3fb4e572f6aac749d7fa9fc6 21-May-2010 Elliott Hughes <enh@google.com> Fix more Charset/CharsetDecoder/CharsetEncoder bugs.

Another round of Get/Release Critical removal led me to some code that couldn't
possibly be right, and wasn't. This patch fixes a large number of our
Charset-related bugs, including ones that previous hacks were added to paper
over. With this patch, we have three failures, all "new", but all there since
the start, and relating to the fact that our UTF-16 and UTF-32 encoders don't
write big-endian output on little-endian devices (for which I've raised
http://b/2702411).

Bug: 2663177
Change-Id: I70dfa55f88a3f635528be3ad27b2a5fc1bfb70fc
io/charset/Charset.java
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
io/charset/CoderResult.java
io/charset/IllegalCharsetNameException.java
io/charset/UnsupportedCharsetException.java
cf6c3a752da274cc5025191d3bcd62e6222f4a4c 19-May-2010 Elliott Hughes <enh@google.com> Fix CharsetEncoder.replaceWith, and simplify our implementation.

All I wanted to do was remove some more Get/Release Critical calls,
but I stumbled across some code that couldn't possibly be right.

Bug: 2663177
Change-Id: I82e240fe27ff9fcfe7f036c2d7708a9e55afa3ee
io/charset/CharsetEncoder.java
4e2163262dcdd279f442d5d2b1cdacf4adf3b446 19-May-2010 Elliott Hughes <enh@google.com> Remove more uses of Get/Release Critical.

Bug: 2663177
Change-Id: I87325ca8bb064b6be6c3cc3c885a8b18cceaa36c
ath/BigInt.java
bd55297544e2db648bce35c605c9257903fcb8aa 18-May-2010 Elliott Hughes <enh@google.com> Add error checking in setZoneStrings and improve the documentation.

Also some internal tidying, and a few more test expectations.

Change-Id: Ic183baecab7d12151fcdb3b73842c345075b173c
ext/DateFormatSymbols.java
ext/Format.java
ext/SimpleDateFormat.java
1d4cff0114344c22b43007ecdd12903474f25e74 18-May-2010 Elliott Hughes <enh@google.com> Fix the exception thrown by Matcher.region.

Caught by a harmony test; the RI documentation agrees.

Change-Id: Ia7239033a35f6b952163d753ed36c5c8122dc171
til/regex/Matcher.java
99c59bfa432e36933a7a5033fba8b89209f737bc 18-May-2010 Elliott Hughes <enh@google.com> Expand upon the old ScopedByteArray, and start removing some of the Get/ReleaseCritical calls.

This adds Scoped*Array classes for all primitive types, and switches all
read-only users of arrays over. At the same time, all read-only users of
Get/ReleaseCritical get switched to non-critical access.

Bug: 2663177
Change-Id: I5542cea3e24faa987ced463fcb695b9598da94af
til/zip/Adler32.java
b64216b26ade0c4da110590b7a7c5fabcbb3f021 15-May-2010 Elliott Hughes <enh@google.com> Remove dead code.

Change-Id: Ib9732c712a50a3bc9ed186464586a0f407e27287
et/MulticastSocket.java
et/Socket.java
d7119eb12622a4187553e68a32aafa61999d7162 15-May-2010 Elliott Hughes <enh@google.com> Merge "Fix getInetAddress/getPort/getLocalAddress/getLocalPort." into dalvik-dev
8cc54e9f098c4f299d2b88bb2b9110ce44354ed7 14-May-2010 Elliott Hughes <enh@google.com> Fix getInetAddress/getPort/getLocalAddress/getLocalPort.

Responsibility is split between Socket, SocketImpl, PlainSocketImpl,
SocketChannel, SocketChannelImpl, and SocketChannelImpl.SocketAdapter, and
we need to keep them synchronized. Our hands are somewhat tied by the fact
that the RI exposed way too much. I think, now I understand the relationships
a bit better, that we can probably rewrite this cluster of classes to be
simpler, but I don't want to bite off more than I can chew right now, and
this does fix the known problems.

This patch also makes us more compatible with the RI by making getLocalAddress
after the socket has been closed return the address we used.

By strange coincidence, harmony addressed this at the same time I was looking
at it (see http://svn.apache.org/viewvc?rev=944119&view=rev) but I feel they're
going in the wrong direction and making the relationships even more complicated.
I have run their new tests in addition to my own, though.

Bug: 1952042
Bug: http://code.google.com/p/android/issues/detail?id=1933
Bug: http://code.google.com/p/android/issues/detail?id=3123
Change-Id: Icb7793fb5d868e0d1f1b8b3d5da88c32fb973744
et/Socket.java
7cf7ec13b4e7e8f044c310e63dd0f6f9f58577d7 11-May-2010 Jeremy Sharpe <jsharpe@google.com> Fix bug in TreeMap. All methods that returns Entrys must return immutable Entrys, except entrySet(), which returns a set of mutable Entrys. Currently, the Entrys from entrySet() are immutable. Adds some new unit tests to verify this behavior.

Change-Id: I1149185412cd60d8e9c888179c43f5bef5057a69
til/TreeMap.java
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
wt/font/NumericShaper.java
wt/font/TextAttribute.java
eans/IndexedPropertyChangeEvent.java
eans/PropertyChangeEvent.java
eans/PropertyChangeListener.java
eans/PropertyChangeListenerProxy.java
eans/PropertyChangeSupport.java
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/Closeable.java
o/DataInput.java
o/DataInputStream.java
o/DataOutputStream.java
o/EOFException.java
o/EmulatedFields.java
o/EmulatedFieldsForDumping.java
o/EmulatedFieldsForLoading.java
o/Externalizable.java
o/File.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FilePermissionCollection.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/Flushable.java
o/IOError.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/SequenceInputStream.java
o/SerializablePermission.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/Appendable.java
ang/ArrayIndexOutOfBoundsException.java
ang/AssertionError.java
ang/Boolean.java
ang/CaseMapper.java
ang/Character.java
ang/Class.java
ang/ClassCache.java
ang/ClassCastException.java
ang/ClassLoader.java
ang/Cloneable.java
ang/Compiler.java
ang/Double.java
ang/EmptyEnumeration.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LangAccessImpl.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/Object.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Package.java
ang/Process.java
ang/ProcessBuilder.java
ang/ProcessManager.java
ang/Readable.java
ang/Runtime.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SecurityException.java
ang/SecurityManager.java
ang/StackOverflowError.java
ang/StackTraceElement.java
ang/StrictMath.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/SuppressWarnings.java
ang/System.java
ang/Thread.java
ang/ThreadGroup.java
ang/ThreadLocal.java
ang/Throwable.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/annotation/Annotation.java
ang/annotation/AnnotationFormatError.java
ang/annotation/AnnotationTypeMismatchException.java
ang/annotation/Documented.java
ang/annotation/ElementType.java
ang/annotation/IncompleteAnnotationException.java
ang/annotation/Inherited.java
ang/annotation/Retention.java
ang/annotation/RetentionPolicy.java
ang/annotation/Target.java
ang/ref/PhantomReference.java
ang/ref/Reference.java
ang/ref/SoftReference.java
ang/ref/WeakReference.java
ang/reflect/AccessibleObject.java
ang/reflect/AnnotatedElement.java
ang/reflect/Array.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Method.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/Proxy.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ath/BigInteger.java
ath/BitLevel.java
ath/Conversion.java
ath/Logical.java
et/AddressCache.java
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/CookieManager.java
et/CookieStoreImpl.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpCookie.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/IDN.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketException.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketTimeoutException.java
et/URI.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
io/BaseByteBuffer.java
io/Buffer.java
io/BufferFactory.java
io/BufferOverflowException.java
io/BufferUnderflowException.java
io/ByteBuffer.java
io/ByteOrder.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DirectByteBuffers.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/IntToByteBufferAdapter.java
io/InvalidMarkException.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/ReadOnlyBufferException.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDirectByteBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
io/ShortToByteBufferAdapter.java
io/channels/AlreadyConnectedException.java
io/channels/AsynchronousCloseException.java
io/channels/ByteChannel.java
io/channels/CancelledKeyException.java
io/channels/Channel.java
io/channels/Channels.java
io/channels/ClosedByInterruptException.java
io/channels/ClosedChannelException.java
io/channels/ClosedSelectorException.java
io/channels/ConnectionPendingException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/FileLockInterruptionException.java
io/channels/GatheringByteChannel.java
io/channels/IllegalBlockingModeException.java
io/channels/IllegalSelectorException.java
io/channels/InterruptibleChannel.java
io/channels/NoConnectionPendingException.java
io/channels/NonReadableChannelException.java
io/channels/NonWritableChannelException.java
io/channels/NotYetBoundException.java
io/channels/NotYetConnectedException.java
io/channels/OverlappingFileLockException.java
io/channels/Pipe.java
io/channels/ReadableByteChannel.java
io/channels/ScatteringByteChannel.java
io/channels/SelectableChannel.java
io/channels/SelectionKey.java
io/channels/Selector.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
io/channels/UnresolvedAddressException.java
io/channels/UnsupportedAddressTypeException.java
io/channels/WritableByteChannel.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelectableChannel.java
io/channels/spi/AbstractSelectionKey.java
io/channels/spi/AbstractSelector.java
io/channels/spi/SelectorProvider.java
io/charset/Charset.java
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
io/charset/CoderMalfunctionError.java
io/charset/CoderResult.java
io/charset/CodingErrorAction.java
io/charset/IllegalCharsetNameException.java
io/charset/MalformedInputException.java
io/charset/UnmappableCharacterException.java
io/charset/UnsupportedCharsetException.java
io/charset/spi/CharsetProvider.java
ecurity/AccessControlContext.java
ecurity/AccessController.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameterGeneratorSpi.java
ecurity/AlgorithmParameters.java
ecurity/AlgorithmParametersSpi.java
ecurity/AllPermission.java
ecurity/AllPermissionCollection.java
ecurity/AuthProvider.java
ecurity/BasicPermission.java
ecurity/BasicPermissionCollection.java
ecurity/Certificate.java
ecurity/CodeSigner.java
ecurity/CodeSource.java
ecurity/DigestInputStream.java
ecurity/DigestOutputStream.java
ecurity/DomainCombiner.java
ecurity/Identity.java
ecurity/IdentityScope.java
ecurity/Key.java
ecurity/KeyFactory.java
ecurity/KeyFactorySpi.java
ecurity/KeyPair.java
ecurity/KeyPairGenerator.java
ecurity/KeyPairGeneratorSpi.java
ecurity/KeyRep.java
ecurity/KeyStore.java
ecurity/KeyStoreException.java
ecurity/KeyStoreSpi.java
ecurity/MessageDigest.java
ecurity/MessageDigestSpi.java
ecurity/Permission.java
ecurity/PermissionCollection.java
ecurity/Permissions.java
ecurity/Policy.java
ecurity/PrivateKey.java
ecurity/PrivilegedActionException.java
ecurity/ProtectionDomain.java
ecurity/Provider.java
ecurity/ProviderException.java
ecurity/PublicKey.java
ecurity/SecureClassLoader.java
ecurity/SecureRandom.java
ecurity/SecureRandomSpi.java
ecurity/Security.java
ecurity/Signature.java
ecurity/SignatureException.java
ecurity/SignatureSpi.java
ecurity/SignedObject.java
ecurity/Signer.java
ecurity/Timestamp.java
ecurity/UnrecoverableEntryException.java
ecurity/UnrecoverableKeyException.java
ecurity/UnresolvedPermission.java
ecurity/UnresolvedPermissionCollection.java
ecurity/acl/Acl.java
ecurity/acl/AclEntry.java
ecurity/acl/Group.java
ecurity/acl/NotOwnerException.java
ecurity/acl/Owner.java
ecurity/acl/Permission.java
ecurity/cert/CRL.java
ecurity/cert/CRLException.java
ecurity/cert/CRLSelector.java
ecurity/cert/CertPath.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathBuilderException.java
ecurity/cert/CertPathBuilderResult.java
ecurity/cert/CertPathBuilderSpi.java
ecurity/cert/CertPathParameters.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertPathValidatorException.java
ecurity/cert/CertPathValidatorResult.java
ecurity/cert/CertSelector.java
ecurity/cert/CertStore.java
ecurity/cert/CertStoreException.java
ecurity/cert/CertStoreParameters.java
ecurity/cert/CertStoreSpi.java
ecurity/cert/Certificate.java
ecurity/cert/CertificateEncodingException.java
ecurity/cert/CertificateException.java
ecurity/cert/CertificateExpiredException.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
ecurity/cert/CertificateNotYetValidException.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/PKIXBuilderParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/PKIXCertPathChecker.java
ecurity/cert/PKIXCertPathValidatorResult.java
ecurity/cert/PKIXParameters.java
ecurity/cert/PolicyNode.java
ecurity/cert/PolicyQualifierInfo.java
ecurity/cert/TrustAnchor.java
ecurity/cert/X509CRL.java
ecurity/cert/X509CRLEntry.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
ecurity/cert/X509Certificate.java
ecurity/cert/X509Extension.java
ecurity/interfaces/DSAKey.java
ecurity/interfaces/DSAKeyPairGenerator.java
ecurity/interfaces/DSAParams.java
ecurity/interfaces/DSAPrivateKey.java
ecurity/interfaces/DSAPublicKey.java
ecurity/interfaces/ECKey.java
ecurity/interfaces/ECPrivateKey.java
ecurity/interfaces/ECPublicKey.java
ecurity/interfaces/RSAKey.java
ecurity/interfaces/RSAMultiPrimePrivateCrtKey.java
ecurity/interfaces/RSAPrivateCrtKey.java
ecurity/interfaces/RSAPrivateKey.java
ecurity/interfaces/RSAPublicKey.java
ecurity/spec/DSAParameterSpec.java
ecurity/spec/DSAPrivateKeySpec.java
ecurity/spec/DSAPublicKeySpec.java
ecurity/spec/ECField.java
ecurity/spec/ECFieldF2m.java
ecurity/spec/ECFieldFp.java
ecurity/spec/ECGenParameterSpec.java
ecurity/spec/ECParameterSpec.java
ecurity/spec/ECPoint.java
ecurity/spec/ECPrivateKeySpec.java
ecurity/spec/ECPublicKeySpec.java
ecurity/spec/EllipticCurve.java
ecurity/spec/EncodedKeySpec.java
ecurity/spec/InvalidKeySpecException.java
ecurity/spec/InvalidParameterSpecException.java
ecurity/spec/MGF1ParameterSpec.java
ecurity/spec/PKCS8EncodedKeySpec.java
ecurity/spec/PSSParameterSpec.java
ecurity/spec/RSAKeyGenParameterSpec.java
ecurity/spec/RSAMultiPrimePrivateCrtKeySpec.java
ecurity/spec/RSAOtherPrimeInfo.java
ecurity/spec/RSAPrivateCrtKeySpec.java
ecurity/spec/RSAPrivateKeySpec.java
ecurity/spec/RSAPublicKeySpec.java
ecurity/spec/X509EncodedKeySpec.java
ql/Array.java
ql/BatchUpdateException.java
ql/Blob.java
ql/CallableStatement.java
ql/Clob.java
ql/Connection.java
ql/DataTruncation.java
ql/DatabaseMetaData.java
ql/Date.java
ql/Driver.java
ql/DriverManager.java
ql/DriverPropertyInfo.java
ql/ParameterMetaData.java
ql/PreparedStatement.java
ql/Ref.java
ql/ResultSet.java
ql/ResultSetMetaData.java
ql/SQLData.java
ql/SQLException.java
ql/SQLInput.java
ql/SQLOutput.java
ql/SQLPermission.java
ql/SQLWarning.java
ql/Savepoint.java
ql/Statement.java
ql/Struct.java
ql/Time.java
ql/Timestamp.java
ql/Types.java
ext/Annotation.java
ext/AttributedCharacterIterator.java
ext/AttributedString.java
ext/Bidi.java
ext/BreakIterator.java
ext/CharacterIterator.java
ext/ChoiceFormat.java
ext/CollationElementIterator.java
ext/CollationKey.java
ext/Collator.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/FieldPosition.java
ext/Format.java
ext/MessageFormat.java
ext/Normalizer.java
ext/NumberFormat.java
ext/ParseException.java
ext/ParsePosition.java
ext/RuleBasedBreakIterator.java
ext/RuleBasedCollator.java
ext/SimpleDateFormat.java
ext/StringCharacterIterator.java
ext/spi/BreakIteratorProvider.java
ext/spi/CollatorProvider.java
ext/spi/DateFormatProvider.java
ext/spi/DateFormatSymbolsProvider.java
ext/spi/DecimalFormatSymbolsProvider.java
ext/spi/NumberFormatProvider.java
til/AbstractCollection.java
til/AbstractQueue.java
til/AbstractSet.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collections.java
til/ConcurrentModificationException.java
til/Dictionary.java
til/DuplicateFormatFlagsException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MiniEnumSet.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/NoSuchElementException.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/ResourceBundle.java
til/Scanner.java
til/ServiceLoader.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/SpecialAccess.java
til/StringTokenizer.java
til/TimSort.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
til/jar/Attributes.java
til/jar/InitManifest.java
til/jar/JarEntry.java
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/jar/Pack200.java
til/logging/ConsoleHandler.java
til/logging/ErrorManager.java
til/logging/FileHandler.java
til/logging/Filter.java
til/logging/Formatter.java
til/logging/Handler.java
til/logging/Level.java
til/logging/LogManager.java
til/logging/LogRecord.java
til/logging/Logger.java
til/logging/LoggingMXBean.java
til/logging/LoggingPermission.java
til/logging/MemoryHandler.java
til/logging/SimpleFormatter.java
til/logging/SocketHandler.java
til/logging/StreamHandler.java
til/logging/XMLFormatter.java
til/prefs/AbstractPreferences.java
til/prefs/BackingStoreException.java
til/prefs/FilePreferencesFactoryImpl.java
til/prefs/FilePreferencesImpl.java
til/prefs/InvalidPreferencesFormatException.java
til/prefs/NodeChangeEvent.java
til/prefs/NodeChangeListener.java
til/prefs/NodeSet.java
til/prefs/PreferenceChangeEvent.java
til/prefs/PreferenceChangeListener.java
til/prefs/Preferences.java
til/prefs/PreferencesFactory.java
til/prefs/XMLParser.java
til/regex/MatchResultImpl.java
til/regex/Matcher.java
til/regex/Pattern.java
til/regex/PatternSyntaxException.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/Inflater.java
til/zip/InflaterOutputStream.java
til/zip/ZipError.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
d21d78fd49a2d798218e8c8aefbddb26a0e71bbb 13-May-2010 Elliott Hughes <enh@google.com> Convert tabs to spaces.

Change-Id: I16cfbd2faac6b565b78b5dd97e2345323a36f652
o/ObjectInputStream.java
ang/Short.java
ang/Void.java
et/URL.java
ecurity/DigestInputStream.java
ecurity/DigestOutputStream.java
ecurity/KeyStore.java
ecurity/Provider.java
ecurity/UnresolvedPermission.java
ecurity/UnresolvedPermissionCollection.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
til/LinkedList.java
til/Timer.java
til/prefs/XMLParser.java
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
wt/font/NumericShaper.java
wt/font/TextAttribute.java
eans/PropertyChangeSupport.java
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/DataInputStream.java
o/DataOutputStream.java
o/File.java
o/FileOutputStream.java
o/FilePermission.java
o/FilterOutputStream.java
o/InputStream.java
o/InputStreamReader.java
o/InvalidClassException.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamField.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/SequenceInputStream.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/WriteAbortedException.java
o/Writer.java
ang/AbstractStringBuilder.java
ang/ArrayIndexOutOfBoundsException.java
ang/Boolean.java
ang/ClassCastException.java
ang/Double.java
ang/Enum.java
ang/Float.java
ang/ProcessBuilder.java
ang/RuntimePermission.java
ang/SecurityManager.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/Void.java
ang/reflect/Proxy.java
ath/Conversion.java
et/Authenticator.java
et/CookieHandler.java
et/CookieManager.java
et/CookieStoreImpl.java
et/DatagramPacket.java
et/DatagramSocket.java
et/HttpCookie.java
et/HttpURLConnection.java
et/Inet4Address.java
et/Inet6Address.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MulticastSocket.java
et/NetworkInterface.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ServerSocket.java
et/Socket.java
et/SocketImpl.java
et/SocketPermission.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
io/ByteBuffer.java
io/ByteOrder.java
io/CharBuffer.java
io/DoubleBuffer.java
io/FloatBuffer.java
io/IntBuffer.java
io/LongBuffer.java
io/ShortBuffer.java
io/channels/FileChannel.java
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/SelectorProvider.java
io/charset/Charset.java
io/charset/CoderResult.java
io/charset/CodingErrorAction.java
io/charset/spi/CharsetProvider.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameters.java
ecurity/AllPermission.java
ecurity/AllPermissionCollection.java
ecurity/BasicPermission.java
ecurity/BasicPermissionCollection.java
ecurity/CodeSigner.java
ecurity/CodeSource.java
ecurity/DigestInputStream.java
ecurity/DigestOutputStream.java
ecurity/Identity.java
ecurity/IdentityScope.java
ecurity/KeyFactory.java
ecurity/KeyPairGenerator.java
ecurity/KeyPairGeneratorSpi.java
ecurity/KeyRep.java
ecurity/KeyStore.java
ecurity/KeyStoreSpi.java
ecurity/MessageDigest.java
ecurity/MessageDigestSpi.java
ecurity/Permission.java
ecurity/PermissionCollection.java
ecurity/Permissions.java
ecurity/Policy.java
ecurity/PrivilegedActionException.java
ecurity/ProtectionDomain.java
ecurity/Provider.java
ecurity/SecureRandom.java
ecurity/Security.java
ecurity/Signature.java
ecurity/SignatureSpi.java
ecurity/Signer.java
ecurity/Timestamp.java
ecurity/UnresolvedPermission.java
ecurity/UnresolvedPermissionCollection.java
ecurity/cert/CertPath.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertPathValidatorException.java
ecurity/cert/CertStore.java
ecurity/cert/Certificate.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/PKIXBuilderParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/PKIXCertPathValidatorResult.java
ecurity/cert/PKIXParameters.java
ecurity/cert/PolicyQualifierInfo.java
ecurity/cert/TrustAnchor.java
ecurity/cert/X509CRL.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
ecurity/cert/X509Certificate.java
ecurity/spec/ECFieldF2m.java
ecurity/spec/ECFieldFp.java
ecurity/spec/ECGenParameterSpec.java
ecurity/spec/ECParameterSpec.java
ecurity/spec/ECPoint.java
ecurity/spec/ECPrivateKeySpec.java
ecurity/spec/ECPublicKeySpec.java
ecurity/spec/EllipticCurve.java
ecurity/spec/MGF1ParameterSpec.java
ecurity/spec/PKCS8EncodedKeySpec.java
ecurity/spec/PSSParameterSpec.java
ecurity/spec/RSAMultiPrimePrivateCrtKeySpec.java
ecurity/spec/RSAOtherPrimeInfo.java
ecurity/spec/X509EncodedKeySpec.java
ql/DataTruncation.java
ql/Date.java
ql/Time.java
ext/Annotation.java
ext/DecimalFormat.java
ext/FieldPosition.java
ext/ParsePosition.java
til/AbstractCollection.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collections.java
til/EnumMap.java
til/EventObject.java
til/IdentityHashMap.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/ResourceBundle.java
til/Scanner.java
til/SimpleTimeZone.java
til/StringTokenizer.java
til/Timer.java
til/UUID.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
til/jar/Attributes.java
til/jar/InitManifest.java
til/jar/JarEntry.java
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/jar/Pack200.java
til/logging/FileHandler.java
til/logging/Formatter.java
til/logging/Handler.java
til/logging/Level.java
til/logging/Logger.java
til/logging/SimpleFormatter.java
til/logging/SocketHandler.java
til/logging/XMLFormatter.java
til/prefs/AbstractPreferences.java
til/prefs/FilePreferencesImpl.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/Inflater.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
a008cf079f1cb812ec42a4fcc941fe170cc9b40d 13-May-2010 Elliott Hughes <enh@google.com> Minor file system changes.

Use fstat(2) instead of three seek(2)s to get the length of a file.

Java's readv should return -1 at EOF rather than 0.

The size() == 0 check in FileChannelImpl was (apparently) bogus.

(These changes are basically the same as harmony changes, and fix existing
harmony tests, so no new tests.)

Change-Id: I302611f777e91571b95654e03d0a3a41e1f97968
o/FileInputStream.java
o/RandomAccessFile.java
0b2836e81d354e9bb7df9d43cda5ccfb9c199450 12-May-2010 Elliott Hughes <enh@google.com> Apply http://svn.apache.org/viewvc?rev=936696&view=rev.

Change-Id: I24080d57d69d7763f67def2ec5c06583beda6c59
et/URLConnection.java
0bcf4405371581bc413563298bb9c749e4697390 12-May-2010 Elliott Hughes <enh@google.com> Merge "Documentation improvements." into dalvik-dev
5f37da05bb48298568f8abd7c97c3d11552e1867 11-May-2010 Elliott Hughes <enh@google.com> Documentation improvements.

Remove a bunch of content-free "package.html" files, and rewrite the Pattern
documentation.

Change-Id: Ieb4eee940dbbeab21828b8d7b2f172732f9dd6de
o/package.html
ang/Character.java
ang/String.java
ang/annotation/package.html
ang/package.html
ang/reflect/package.html
ath/package.html
et/package.html
io/channels/package.html
io/channels/spi/package.html
io/charset/package.html
io/charset/spi/package.html
io/package.html
ext/package.html
til/jar/package.html
til/logging/package.html
til/package.html
til/prefs/package.html
til/regex/Pattern.java
til/regex/package.html
til/zip/package.html
509ca343769fa66b6f644561f9a9384a4c5ee5d1 11-May-2010 Jeremy Sharpe <jsharpe@google.com> Fix a bug in PriorityQueue where compareTo() is used instead of equals() in the remove() method.

According to the documentation for PriorityQueue, equals() must be used.

Fixed one unit test (which needed the incorrect behaviour in order to pass). Verified that the old test fails against Sun's libraries, and the new one passes (and fails against ours until the change is applied).

Change-Id: I93e7d3435d5cdc4432969585064df704f92d6ae5
til/PriorityQueue.java
edc2dae4345ea305f092ade00419685d77c8eee9 08-May-2010 Elliott Hughes <enh@google.com> Trivia.

Remove unused parameters from NetworkInterface's native methods.

Remove commented-out static initializers.

Fix FileChannel.force so that force(true) doesn't do _less_ than force(false).
Note that force(true) still doesn't do _more_ than force(false) because bionic
doesn't implement fdatasync(2). I've raised a bug against bionic about that.

Change-Id: Ia5e827638606a7919e3bcf324810747ee6bcbb9a
et/DatagramSocket.java
et/NetworkInterface.java
et/ServerSocket.java
et/Socket.java
io/channels/DatagramChannel.java
io/channels/SocketChannel.java
0356c447b30e092bdc12a4b7288c08f5ef87534c 08-May-2010 Elliott Hughes <enh@google.com> Fix sim build, remove static initalizers from Deflater/Inflater.

Change-Id: I56a453a1382559cdcf9f22c6a185db7178fbe098
o/ObjectStreamClass.java
til/zip/Deflater.java
til/zip/Inflater.java
50d99e18a862aab4b20f6b9b1c2f16c99991443b 06-May-2010 Elliott Hughes <enh@google.com> Merge "Fix SimpleDateFormat's unsafe Date handling." into dalvik-dev
6fcba7b74c6b5a700d386fabac72d380f63be966 06-May-2010 Elliott Hughes <enh@google.com> Fix SimpleDateFormat's unsafe Date handling.

Bug: 2483056
Change-Id: Ib9581ba035c3185b534fa2885c2239c56b8117e0
ext/SimpleDateFormat.java
3642569f572913df26e48b04f32b719cb1c38261 06-May-2010 Jesse Wilson <jessewilson@google.com> Setting expectations and fixing failures from scrubbing Harmony tests.

The tests found a few small problems (yay) but required many suppressions.
Later we might want to convert the suppressions into fixes for the
corresponding tests.

Change-Id: I29f2f9cef7e2c878aba8303b44c9b990de0777dd
til/TreeMap.java
til/UnknownFormatConversionException.java
til/prefs/FilePreferencesImpl.java
ab3683bce6e370c946598bfad54387fa38ce69df 06-May-2010 Elliott Hughes <enh@google.com> Improve File.renameTo documentation.

Bug: http://code.google.com/p/android/issues/detail?id=8172
Change-Id: I497f23ee9e320c43e525040a9da3f470c33894fb
o/File.java
eeefcae2980c8db05ec08303b5b112afce232d26 06-May-2010 Elliott Hughes <enh@google.com> Remove the "Answers" javadoc barbarism.

I didn't realize how little of it was left, or I'd have done this earlier.

Change-Id: Ic4c23c3779bbee0ed4a8117584c5332e04536b5d
o/ObjectStreamClass.java
ang/Math.java
ang/StrictMath.java
et/HttpCookie.java
ext/SimpleDateFormat.java
til/ResourceBundle.java
til/TreeSet.java
6247987eb505a482a67f5f19678260d9e7240a5f 05-May-2010 Elliott Hughes <enh@google.com> Fix HttpURLConnection to not cache failures.

Found while investigating http://code.google.com/p/android/issues/detail?id=7787,
which turned out to be caused by unclear documentation. I've improved the
documentation somewhat, and stopped offering failed responses to the cache.

Bug: http://code.google.com/p/android/issues/detail?id=7787
Change-Id: Iec69769344af92345392c7ced817b0c823963524
et/CacheResponse.java
et/ResponseCache.java
et/URLConnection.java
6b811c5daec1b28e6f63b57f98a032236f2c3cf7 03-May-2010 Peter Hallam <peterhal@google.com> Merge awt-kernel, icu, luni-kernel, prefs, security-kernel, x-net into luni
Merge xml except xmlpull and kxml into luni
wt/font/NumericShaper.java
wt/font/TextAttribute.java
eans/IndexedPropertyChangeEvent.java
eans/PropertyChangeEvent.java
eans/PropertyChangeListener.java
eans/PropertyChangeListenerProxy.java
eans/PropertyChangeSupport.java
ang/Class.java
ang/ClassCache.java
ang/ClassLoader.java
ang/Compiler.java
ang/LangAccessImpl.java
ang/Object.java
ang/Package.java
ang/ProcessManager.java
ang/Runtime.java
ang/StackTraceElement.java
ang/System.java
ang/Thread.java
ang/ThreadGroup.java
ang/Throwable.java
ang/ref/PhantomReference.java
ang/ref/Reference.java
ang/ref/SoftReference.java
ang/ref/WeakReference.java
ang/reflect/AccessibleObject.java
ang/reflect/Array.java
ang/reflect/Constructor.java
ang/reflect/Field.java
ang/reflect/Method.java
ang/reflect/ReflectionAccessImpl.java
ecurity/AccessControlContext.java
ecurity/AccessController.java
til/prefs/AbstractPreferences.java
til/prefs/BackingStoreException.java
til/prefs/FilePreferencesFactoryImpl.java
til/prefs/FilePreferencesImpl.java
til/prefs/InvalidPreferencesFormatException.java
til/prefs/NodeChangeEvent.java
til/prefs/NodeChangeListener.java
til/prefs/NodeSet.java
til/prefs/PreferenceChangeEvent.java
til/prefs/PreferenceChangeListener.java
til/prefs/Preferences.java
til/prefs/PreferencesFactory.java
til/prefs/XMLParser.java
til/prefs/package.html
0a98ab45e3566542f2d669eb0ffd28a560d97d28 05-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Improving the doc for java.util.Timer" into dalvik-dev
c38102eb6f7a01fe70094a63054337f53ab5283d 05-May-2010 Jesse Wilson <jessewilson@google.com> Improving the doc for java.util.Timer

Change-Id: Ie6fd0f7509a2dbf84255aebb02b8216c98201dc4
til/Timer.java
4cb7f05dc68abb23ae54a5891c369062185f2210 04-May-2010 Elliott Hughes <enh@google.com> Remove an unused field and tidy up a test.

Change-Id: I23fdfe9b0470f8e1f1744660457542a999a13054
et/MulticastSocket.java
60b01a5cdc0ee5c954a7027da8ba2ba0bddcd2f0 30-Apr-2010 Jesse Wilson <jessewilson@google.com> Merge "Adding public API for cookies." into dalvik-dev
d138a32a96aef19d6ae3bd7ead3fbfef1a5f8217 29-Apr-2010 Jesse Wilson <jessewilson@google.com> Adding public API for cookies.

We still need to wire this into the HTTP connection classes.
http://b/issue?id=1608781
et/CookieManager.java
et/CookiePolicy.java
et/CookieStore.java
et/CookieStoreImpl.java
et/HttpCookie.java
21d030801384475a84f8dd67b18b8773f5eb652c 29-Apr-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing a few TreeMap bugs found by the latest Harmony tests." into dalvik-dev
2f2e06eeabb1c4b2064918f4aa041ba3a7fe7c67 29-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing a few TreeMap bugs found by the latest Harmony tests.
til/TreeMap.java
286772eb30e454847a7000b001529fca9cb65e6d 28-Apr-2010 Jesse Wilson <jessewilson@google.com> Filling out implementations of java.util.

The new code comes straight from Harmony. None of the below classes
were divergent from Harmony so the change was quite straightforward.

The changes have been tested against Harmony's test suite and jtreg.
I haven't added any new tests to our suite, but I don't need to.
til/Collections.java
til/LinkedList.java
til/TreeSet.java
cec4dd4b1d33f78997603d0f89c0d0e56e64dbcd 26-Apr-2010 Peter Hallam <peterhal@google.com> merge more modules into luni
ang/annotation/Annotation.java
ang/annotation/AnnotationFormatError.java
ang/annotation/AnnotationTypeMismatchException.java
ang/annotation/Documented.java
ang/annotation/ElementType.java
ang/annotation/IncompleteAnnotationException.java
ang/annotation/Inherited.java
ang/annotation/Retention.java
ang/annotation/RetentionPolicy.java
ang/annotation/Target.java
ang/annotation/package.html
ath/BigDecimal.java
ath/BigInt.java
ath/BigInteger.java
ath/BitLevel.java
ath/Conversion.java
ath/Division.java
ath/Logical.java
ath/MathContext.java
ath/Multiplication.java
ath/Primality.java
ath/RoundingMode.java
ath/package.html
io/charset/CharacterCodingException.java
io/charset/Charset.java
io/charset/CharsetDecoder.java
io/charset/CharsetEncoder.java
io/charset/CoderMalfunctionError.java
io/charset/CoderResult.java
io/charset/CodingErrorAction.java
io/charset/IllegalCharsetNameException.java
io/charset/MalformedInputException.java
io/charset/UnmappableCharacterException.java
io/charset/UnsupportedCharsetException.java
io/charset/package.html
io/charset/spi/CharsetProvider.java
io/charset/spi/package.html
ecurity/AccessControlException.java
ecurity/AlgorithmParameterGenerator.java
ecurity/AlgorithmParameterGeneratorSpi.java
ecurity/AlgorithmParameters.java
ecurity/AlgorithmParametersSpi.java
ecurity/AllPermission.java
ecurity/AllPermissionCollection.java
ecurity/AuthProvider.java
ecurity/BasicPermission.java
ecurity/BasicPermissionCollection.java
ecurity/Certificate.java
ecurity/CodeSigner.java
ecurity/CodeSource.java
ecurity/DigestException.java
ecurity/DigestInputStream.java
ecurity/DigestOutputStream.java
ecurity/DomainCombiner.java
ecurity/GeneralSecurityException.java
ecurity/Guard.java
ecurity/GuardedObject.java
ecurity/Identity.java
ecurity/IdentityScope.java
ecurity/InvalidAlgorithmParameterException.java
ecurity/InvalidKeyException.java
ecurity/InvalidParameterException.java
ecurity/Key.java
ecurity/KeyException.java
ecurity/KeyFactory.java
ecurity/KeyFactorySpi.java
ecurity/KeyManagementException.java
ecurity/KeyPair.java
ecurity/KeyPairGenerator.java
ecurity/KeyPairGeneratorSpi.java
ecurity/KeyRep.java
ecurity/KeyStore.java
ecurity/KeyStoreException.java
ecurity/KeyStoreSpi.java
ecurity/MessageDigest.java
ecurity/MessageDigestSpi.java
ecurity/NoSuchAlgorithmException.java
ecurity/NoSuchProviderException.java
ecurity/Permission.java
ecurity/PermissionCollection.java
ecurity/Permissions.java
ecurity/PermissionsHash.java
ecurity/Policy.java
ecurity/Principal.java
ecurity/PrivateKey.java
ecurity/PrivilegedAction.java
ecurity/PrivilegedActionException.java
ecurity/PrivilegedExceptionAction.java
ecurity/ProtectionDomain.java
ecurity/Provider.java
ecurity/ProviderException.java
ecurity/PublicKey.java
ecurity/SecureClassLoader.java
ecurity/SecureRandom.java
ecurity/SecureRandomSpi.java
ecurity/Security.java
ecurity/SecurityPermission.java
ecurity/Signature.java
ecurity/SignatureException.java
ecurity/SignatureSpi.java
ecurity/SignedObject.java
ecurity/Signer.java
ecurity/Timestamp.java
ecurity/UnrecoverableEntryException.java
ecurity/UnrecoverableKeyException.java
ecurity/UnresolvedPermission.java
ecurity/UnresolvedPermissionCollection.java
ecurity/acl/Acl.java
ecurity/acl/AclEntry.java
ecurity/acl/AclNotFoundException.java
ecurity/acl/Group.java
ecurity/acl/LastOwnerException.java
ecurity/acl/NotOwnerException.java
ecurity/acl/Owner.java
ecurity/acl/Permission.java
ecurity/acl/package.html
ecurity/cert/CRL.java
ecurity/cert/CRLException.java
ecurity/cert/CRLSelector.java
ecurity/cert/CertPath.java
ecurity/cert/CertPathBuilder.java
ecurity/cert/CertPathBuilderException.java
ecurity/cert/CertPathBuilderResult.java
ecurity/cert/CertPathBuilderSpi.java
ecurity/cert/CertPathParameters.java
ecurity/cert/CertPathValidator.java
ecurity/cert/CertPathValidatorException.java
ecurity/cert/CertPathValidatorResult.java
ecurity/cert/CertPathValidatorSpi.java
ecurity/cert/CertSelector.java
ecurity/cert/CertStore.java
ecurity/cert/CertStoreException.java
ecurity/cert/CertStoreParameters.java
ecurity/cert/CertStoreSpi.java
ecurity/cert/Certificate.java
ecurity/cert/CertificateEncodingException.java
ecurity/cert/CertificateException.java
ecurity/cert/CertificateExpiredException.java
ecurity/cert/CertificateFactory.java
ecurity/cert/CertificateFactorySpi.java
ecurity/cert/CertificateNotYetValidException.java
ecurity/cert/CertificateParsingException.java
ecurity/cert/CollectionCertStoreParameters.java
ecurity/cert/LDAPCertStoreParameters.java
ecurity/cert/PKIXBuilderParameters.java
ecurity/cert/PKIXCertPathBuilderResult.java
ecurity/cert/PKIXCertPathChecker.java
ecurity/cert/PKIXCertPathValidatorResult.java
ecurity/cert/PKIXParameters.java
ecurity/cert/PolicyNode.java
ecurity/cert/PolicyQualifierInfo.java
ecurity/cert/TrustAnchor.java
ecurity/cert/X509CRL.java
ecurity/cert/X509CRLEntry.java
ecurity/cert/X509CRLSelector.java
ecurity/cert/X509CertSelector.java
ecurity/cert/X509Certificate.java
ecurity/cert/X509Extension.java
ecurity/cert/package.html
ecurity/interfaces/DSAKey.java
ecurity/interfaces/DSAKeyPairGenerator.java
ecurity/interfaces/DSAParams.java
ecurity/interfaces/DSAPrivateKey.java
ecurity/interfaces/DSAPublicKey.java
ecurity/interfaces/ECKey.java
ecurity/interfaces/ECPrivateKey.java
ecurity/interfaces/ECPublicKey.java
ecurity/interfaces/RSAKey.java
ecurity/interfaces/RSAMultiPrimePrivateCrtKey.java
ecurity/interfaces/RSAPrivateCrtKey.java
ecurity/interfaces/RSAPrivateKey.java
ecurity/interfaces/RSAPublicKey.java
ecurity/interfaces/package.html
ecurity/package.html
ecurity/security.properties
ecurity/spec/AlgorithmParameterSpec.java
ecurity/spec/DSAParameterSpec.java
ecurity/spec/DSAPrivateKeySpec.java
ecurity/spec/DSAPublicKeySpec.java
ecurity/spec/ECField.java
ecurity/spec/ECFieldF2m.java
ecurity/spec/ECFieldFp.java
ecurity/spec/ECGenParameterSpec.java
ecurity/spec/ECParameterSpec.java
ecurity/spec/ECPoint.java
ecurity/spec/ECPrivateKeySpec.java
ecurity/spec/ECPublicKeySpec.java
ecurity/spec/EllipticCurve.java
ecurity/spec/EncodedKeySpec.java
ecurity/spec/InvalidKeySpecException.java
ecurity/spec/InvalidParameterSpecException.java
ecurity/spec/KeySpec.java
ecurity/spec/MGF1ParameterSpec.java
ecurity/spec/PKCS8EncodedKeySpec.java
ecurity/spec/PSSParameterSpec.java
ecurity/spec/RSAKeyGenParameterSpec.java
ecurity/spec/RSAMultiPrimePrivateCrtKeySpec.java
ecurity/spec/RSAOtherPrimeInfo.java
ecurity/spec/RSAPrivateCrtKeySpec.java
ecurity/spec/RSAPrivateKeySpec.java
ecurity/spec/RSAPublicKeySpec.java
ecurity/spec/X509EncodedKeySpec.java
ecurity/spec/package.html
ql/Array.java
ql/BatchUpdateException.java
ql/Blob.java
ql/CallableStatement.java
ql/Clob.java
ql/Connection.java
ql/DataTruncation.java
ql/DatabaseMetaData.java
ql/Date.java
ql/Driver.java
ql/DriverManager.java
ql/DriverPropertyInfo.java
ql/ParameterMetaData.java
ql/PreparedStatement.java
ql/Ref.java
ql/ResultSet.java
ql/ResultSetMetaData.java
ql/SQLData.java
ql/SQLException.java
ql/SQLInput.java
ql/SQLOutput.java
ql/SQLPermission.java
ql/SQLWarning.java
ql/Savepoint.java
ql/Statement.java
ql/Struct.java
ql/Time.java
ql/Timestamp.java
ql/Types.java
ql/package.html
ext/Annotation.java
ext/AttributedCharacterIterator.java
ext/AttributedString.java
ext/Bidi.java
ext/BreakIterator.java
ext/CharacterIterator.java
ext/ChoiceFormat.java
ext/CollationElementIterator.java
ext/CollationKey.java
ext/Collator.java
ext/DateFormat.java
ext/DateFormatSymbols.java
ext/DecimalFormat.java
ext/DecimalFormatSymbols.java
ext/FieldPosition.java
ext/Format.java
ext/MessageFormat.java
ext/Normalizer.java
ext/NumberFormat.java
ext/ParseException.java
ext/ParsePosition.java
ext/RuleBasedBreakIterator.java
ext/RuleBasedCollator.java
ext/SimpleDateFormat.java
ext/StringCharacterIterator.java
ext/package.html
ext/spi/BreakIteratorProvider.java
ext/spi/CollatorProvider.java
ext/spi/DateFormatProvider.java
ext/spi/DateFormatSymbolsProvider.java
ext/spi/DecimalFormatSymbolsProvider.java
ext/spi/NumberFormatProvider.java
til/concurrent/AbstractExecutorService.java
til/concurrent/ArrayBlockingQueue.java
til/concurrent/BlockingDeque.java
til/concurrent/BlockingQueue.java
til/concurrent/BrokenBarrierException.java
til/concurrent/Callable.java
til/concurrent/CancellationException.java
til/concurrent/CompletionService.java
til/concurrent/ConcurrentHashMap.java
til/concurrent/ConcurrentLinkedDeque.java
til/concurrent/ConcurrentLinkedQueue.java
til/concurrent/ConcurrentMap.java
til/concurrent/ConcurrentNavigableMap.java
til/concurrent/ConcurrentSkipListMap.java
til/concurrent/ConcurrentSkipListSet.java
til/concurrent/CopyOnWriteArrayList.java
til/concurrent/CopyOnWriteArraySet.java
til/concurrent/CountDownLatch.java
til/concurrent/CyclicBarrier.java
til/concurrent/DelayQueue.java
til/concurrent/Delayed.java
til/concurrent/Exchanger.java
til/concurrent/ExecutionException.java
til/concurrent/Executor.java
til/concurrent/ExecutorCompletionService.java
til/concurrent/ExecutorService.java
til/concurrent/Executors.java
til/concurrent/Future.java
til/concurrent/FutureTask.java
til/concurrent/LinkedBlockingDeque.java
til/concurrent/LinkedBlockingQueue.java
til/concurrent/PriorityBlockingQueue.java
til/concurrent/RejectedExecutionException.java
til/concurrent/RejectedExecutionHandler.java
til/concurrent/RunnableFuture.java
til/concurrent/RunnableScheduledFuture.java
til/concurrent/ScheduledExecutorService.java
til/concurrent/ScheduledFuture.java
til/concurrent/ScheduledThreadPoolExecutor.java
til/concurrent/Semaphore.java
til/concurrent/SynchronousQueue.java
til/concurrent/ThreadFactory.java
til/concurrent/ThreadPoolExecutor.java
til/concurrent/TimeUnit.java
til/concurrent/TimeoutException.java
til/concurrent/atomic/AtomicBoolean.java
til/concurrent/atomic/AtomicInteger.java
til/concurrent/atomic/AtomicIntegerArray.java
til/concurrent/atomic/AtomicIntegerFieldUpdater.java
til/concurrent/atomic/AtomicLong.java
til/concurrent/atomic/AtomicLongArray.java
til/concurrent/atomic/AtomicLongFieldUpdater.java
til/concurrent/atomic/AtomicMarkableReference.java
til/concurrent/atomic/AtomicReference.java
til/concurrent/atomic/AtomicReferenceArray.java
til/concurrent/atomic/AtomicReferenceFieldUpdater.java
til/concurrent/atomic/AtomicStampedReference.java
til/concurrent/atomic/UnsafeAccess.java
til/concurrent/atomic/package-info.java
til/concurrent/locks/AbstractOwnableSynchronizer.java
til/concurrent/locks/AbstractQueuedLongSynchronizer.java
til/concurrent/locks/AbstractQueuedSynchronizer.java
til/concurrent/locks/Condition.java
til/concurrent/locks/Lock.java
til/concurrent/locks/LockSupport.java
til/concurrent/locks/ReadWriteLock.java
til/concurrent/locks/ReentrantLock.java
til/concurrent/locks/ReentrantReadWriteLock.java
til/concurrent/locks/UnsafeAccess.java
til/concurrent/locks/package-info.java
til/concurrent/package-info.java
til/jar/Attributes.java
til/jar/InitManifest.java
til/jar/JarEntry.java
til/jar/JarException.java
til/jar/JarFile.java
til/jar/JarInputStream.java
til/jar/JarOutputStream.java
til/jar/JarVerifier.java
til/jar/Manifest.java
til/jar/Pack200.java
til/jar/package.html
til/logging/ConsoleHandler.java
til/logging/ErrorManager.java
til/logging/FileHandler.java
til/logging/Filter.java
til/logging/Formatter.java
til/logging/Handler.java
til/logging/Level.java
til/logging/LogManager.java
til/logging/LogRecord.java
til/logging/Logger.java
til/logging/LoggingMXBean.java
til/logging/LoggingPermission.java
til/logging/MemoryHandler.java
til/logging/SimpleFormatter.java
til/logging/SocketHandler.java
til/logging/StreamHandler.java
til/logging/XMLFormatter.java
til/logging/logging.properties
til/logging/package.html
til/regex/MatchResult.java
til/regex/MatchResultImpl.java
til/regex/Matcher.java
til/regex/Pattern.java
til/regex/PatternSyntaxException.java
til/regex/Splitter.java
til/regex/package.html
til/zip/Adler32.java
til/zip/CRC32.java
til/zip/CheckedInputStream.java
til/zip/CheckedOutputStream.java
til/zip/Checksum.java
til/zip/DataFormatException.java
til/zip/Deflater.java
til/zip/DeflaterInputStream.java
til/zip/DeflaterOutputStream.java
til/zip/GZIPInputStream.java
til/zip/GZIPOutputStream.java
til/zip/Inflater.java
til/zip/InflaterInputStream.java
til/zip/InflaterOutputStream.java
til/zip/ZipConstants.java
til/zip/ZipEntry.java
til/zip/ZipError.java
til/zip/ZipException.java
til/zip/ZipFile.java
til/zip/ZipInputStream.java
til/zip/ZipOutputStream.java
til/zip/package.html
3ff29eb11a241d58c54ecc84230bb0672f4aa148 23-Apr-2010 Peter Hallam <peterhal@google.com> More merging of nio into luni

Change-Id: Ib4356b3cd57490df8ff246ea6a4bc1c269ba848b
io/BaseByteBuffer.java
io/Buffer.java
io/BufferFactory.java
io/BufferOverflowException.java
io/BufferUnderflowException.java
io/ByteBuffer.java
io/ByteOrder.java
io/CharArrayBuffer.java
io/CharBuffer.java
io/CharSequenceAdapter.java
io/CharToByteBufferAdapter.java
io/DirectByteBuffer.java
io/DirectByteBuffers.java
io/DoubleArrayBuffer.java
io/DoubleBuffer.java
io/DoubleToByteBufferAdapter.java
io/FloatArrayBuffer.java
io/FloatBuffer.java
io/FloatToByteBufferAdapter.java
io/HeapByteBuffer.java
io/IntArrayBuffer.java
io/IntBuffer.java
io/IntToByteBufferAdapter.java
io/InvalidMarkException.java
io/LongArrayBuffer.java
io/LongBuffer.java
io/LongToByteBufferAdapter.java
io/MappedByteBuffer.java
io/MappedByteBufferAdapter.java
io/NIOAccess.java
io/ReadOnlyBufferException.java
io/ReadOnlyCharArrayBuffer.java
io/ReadOnlyDirectByteBuffer.java
io/ReadOnlyDoubleArrayBuffer.java
io/ReadOnlyFloatArrayBuffer.java
io/ReadOnlyHeapByteBuffer.java
io/ReadOnlyIntArrayBuffer.java
io/ReadOnlyLongArrayBuffer.java
io/ReadOnlyShortArrayBuffer.java
io/ReadWriteCharArrayBuffer.java
io/ReadWriteDirectByteBuffer.java
io/ReadWriteDoubleArrayBuffer.java
io/ReadWriteFloatArrayBuffer.java
io/ReadWriteHeapByteBuffer.java
io/ReadWriteIntArrayBuffer.java
io/ReadWriteLongArrayBuffer.java
io/ReadWriteShortArrayBuffer.java
io/ShortArrayBuffer.java
io/ShortBuffer.java
io/ShortToByteBufferAdapter.java
io/channels/AlreadyConnectedException.java
io/channels/AsynchronousCloseException.java
io/channels/ByteChannel.java
io/channels/CancelledKeyException.java
io/channels/Channel.java
io/channels/Channels.java
io/channels/ClosedByInterruptException.java
io/channels/ClosedChannelException.java
io/channels/ClosedSelectorException.java
io/channels/ConnectionPendingException.java
io/channels/DatagramChannel.java
io/channels/FileChannel.java
io/channels/FileLock.java
io/channels/FileLockInterruptionException.java
io/channels/GatheringByteChannel.java
io/channels/IllegalBlockingModeException.java
io/channels/IllegalSelectorException.java
io/channels/InterruptibleChannel.java
io/channels/NoConnectionPendingException.java
io/channels/NonReadableChannelException.java
io/channels/NonWritableChannelException.java
io/channels/NotYetBoundException.java
io/channels/NotYetConnectedException.java
io/channels/OverlappingFileLockException.java
io/channels/Pipe.java
io/channels/ReadableByteChannel.java
io/channels/ScatteringByteChannel.java
io/channels/SelectableChannel.java
io/channels/SelectionKey.java
io/channels/Selector.java
io/channels/ServerSocketChannel.java
io/channels/SocketChannel.java
io/channels/UnresolvedAddressException.java
io/channels/UnsupportedAddressTypeException.java
io/channels/WritableByteChannel.java
io/channels/package.html
io/channels/spi/AbstractInterruptibleChannel.java
io/channels/spi/AbstractSelectableChannel.java
io/channels/spi/AbstractSelectionKey.java
io/channels/spi/AbstractSelector.java
io/channels/spi/SelectorProvider.java
io/channels/spi/package.html
io/package.html
38607710cdc82cb1a0e81c2fc5c78278b435e4fc 23-Apr-2010 Jesse Wilson <jessewilson@google.com> Remove unnecessary IPv6 and IPv4 parsing from URI.

Cleanup URI and InetAddress exception localization.
et/InetAddress.java
et/URI.java
et/URLClassLoader.java
d5fa369bd73d4098c59b3d9949a67f89910e71f1 23-Apr-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing java.lang.NullPointerException at java.net.URI$Helper.isValidDomainName" into dalvik-dev
733642b27de051f9fabcd689d160282971a30cef 22-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing java.lang.NullPointerException at java.net.URI$Helper.isValidDomainName

See http://b/issue?id=2604061
et/URI.java
a7d4139bed693bf6037bf5f7f49a24b077102adc 22-Apr-2010 Elliott Hughes <enh@google.com> java.text.RuleBasedCollator fixes.

Add expectations for broken harmony tests, add our own equivalent (but correct)
tets, and fix the bug turned up by the correct tests: the icu4jni
RuleBasedCollator was using toString to convert a CharacterIterator to a
String, resulting in iteration over the result of Object.toString (the class
name and identity hash code) rather than the characters of interest.

Also shut javac up about non-ASCII characters in Locale.java.

Bug: 2608742
Bug: 2608750
Change-Id: I2171789058c8116eacd7e5815bd483f0bc07c69b
til/Locale.java
0ade1b6059b1f8cec27fa65c6ee18f13f2e0cebd 21-Apr-2010 Elliott Hughes <enh@google.com> Fix Locale.getDisplayName for unlocalizable languages/countries/variants.

This does not address the interpretation of script identifiers, but does bring us
in line with the RI's behavior. That's why the test doesn't use the example from
the bug.

Bug: 2611311
Change-Id: I54af89aaf418cd520dc6ebdb1e27dc1ac373f70f
til/Locale.java
2f633269e71f3fb0b6248cc695cf37c5cbaf7e60 20-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing TimeZone.setDefault() documentation.

Set expectations for date formatting to tolerate "GMT-07" in the
output. The alternative is to emit an ambigous date string.
Applications that want pretty date formatting should use the
proper facilities: SimpleDateFormat, etc.

This problem was detected by org.apache.harmony.luni.tests.java.util.DateTest.test_toString
til/Locale.java
til/TimeZone.java
6dda210e2d2e01727a6894c11300fd43cbd9b593 19-Apr-2010 Elliott Hughes <enh@google.com> Speed up %d for locales with non-ASCII digits.

The small "localizeDigits" part of this change is the big speedup. It takes
%d in the "ar" Locale from 5x more expensive than "en_US", to just a small
percentage more expensive.

The big part of this change: removing the useless Transformer and FloatUtils
classes touches many lines (mostly just changing the level of indentation),
and only has a small percentage effect on performance. The motivation for
this is actually primarily that it makes the code easier to read, and makes
it easier to share code.

Change-Id: I07e86a3ee448510d9ae36579a9af283349f777f1
til/Formatter.java
757a7942eed2b0aa457f8517a0259d2ac82c5b18 16-Apr-2010 Elliott Hughes <enh@google.com> Merge LocaleData and Resources, rename Resources to ICU.

Also move our ICU tests into our little tree of tests.

Bug: 2596471
Change-Id: I73b53d74c26ef9bf670f12cac58b51ba61eefead
til/Calendar.java
til/Currency.java
til/Formatter.java
til/Locale.java
til/ResourceBundle.java
til/TimeZone.java
2699e44956f8ea8bd554c177b6b0a41e3a6a2181 16-Apr-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing TreeMap serialization issues." into dalvik-dev
b7e820b92c7345cdc0cd4fea50954289ae66eb67 16-Apr-2010 Elliott Hughes <enh@google.com> Change DecimalFormatSymbols to have a field per symbol.

I'd been wanting to do this for some time, but cleaning up the recent
performance changes I made to Formatter was the final straw.

Change-Id: I6d516de66a0bed5e759bca590b4cc124ce2eb712
til/Formatter.java
0790403433525b7ca94391592d72b13a4c94578c 16-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing TreeMap serialization issues.

When I was testing this on the JDK I had my own TreeMap on
the classpath, which caused my tests to pass even when they
shouldn't have.

The new serialization data was generated by the JDK's
collections, both v5 and v6. The tests pass on both Dalvik
and the JDK.
til/Collections.java
til/TreeMap.java
e875cc0c3dc0ecb816fc154ddcfba38c064d00e2 16-Apr-2010 Elliott Hughes <enh@google.com> Merge "java.util.Formatter: fix localization of numbers." into dalvik-dev
ef415fba11d8588a8dba48b4afdde420e5dcdccc 15-Apr-2010 Elliott Hughes <enh@google.com> java.util.Formatter: fix localization of numbers.

Bug: 2301911
Change-Id: Ic594702a80bdef2e8fd97e52fd5fa301def19cac
til/Formatter.java
til/Locale.java
984dc62f58d1f9611ebccc2598f714c15242a6eb 06-Apr-2010 Jesse Wilson <jessewilson@google.com> From scratch implementation of a Navigable TreeMap.

Between Java 5 and Java 6, Harmony's implementation ballooned
from ~2400 lines to ~5900 lines. This implementation is a more
compact ~1700 lines.

This implementation and its views have been rigorously tested
using Google Collections' test framework in addition to the
tests of our own suite.
til/AbstractMap.java
til/TreeMap.java
til/TreeSet.java
03c0a8e681c776fdba0389ab8593282139afc6d6 14-Apr-2010 Elliott Hughes <enh@google.com> Remove "Messages" from the nio, prefs, sql, text, and x-net modules.

Also remove an file of unused messages from luni, and inline one of luni's
other files. (There are plenty more.)

Also remove some German translations of bouncycastle messages (that are
actually in English anyway).

Change-Id: I9c565f6f2201a5d877eba5bf0af4ffad7b769984
o/ObjectInputStream.java
ang/EnumConstantNotPresentException.java
til/Collections.java
til/Date.java
til/Properties.java
5dc59cfad86607a8348c4561ec91584462aa058d 14-Apr-2010 Elliott Hughes <enh@google.com> Use the same documentation in all the methods that take a format string.

Change-Id: I8e7d06df72a7b8db9edd17aa2748800329e837fa
o/Console.java
o/PrintStream.java
o/PrintWriter.java
til/Formatter.java
3106a99ccbe2e2a25bb66266d0ee42d98dd18099 13-Apr-2010 Elliott Hughes <enh@google.com> Improve documentation about the user's default locale.

Add a bit of text to Locale's class documentation, and include a link from
every method that uses Locale.getDefault(). Also try to consistently say
"user's default locale", as a subliminal hint that this isn't necessarily
the developer's locale, nor en_US.

Bug: 2593000
Change-Id: Ieebe864ed6b9fecbfef5d5415269299739cedd1b
o/PrintStream.java
o/PrintWriter.java
ang/String.java
til/Currency.java
til/Formatter.java
til/Locale.java
til/TimeZone.java
9de899cc3ffd3aa3f8f827201cbe14120609018b 13-Apr-2010 Elliott Hughes <enh@google.com> Fix String.toLowerCase and toUpperCase.

Rather than try to cope with Lithuanian, let's just hand that one to ICU4C.
I've removed my hand-crafted Azeri/Turkish lowercasing too, in favor of ICU.
Presence of a high surrogate (which implies a supplemental character) is a
good reason to hand over to ICU too.

On the uppercasing side, I've kept our existing hard-coded table and just
added code to defer to ICU for Azeri, Lithuanian, and Turkish (plus
supplemental characters). I don't like the tables, but I don't have proof
that they're incorrect.

Bug: 2340628
Change-Id: I36b556b0444623a5aacc1afc58ebb4d84211d3dc
ang/CaseMapper.java
ang/String.java
4a6cd08d55ec407dea29586cc917f8a423f5645f 12-Apr-2010 Elliott Hughes <enh@google.com> Fix supplementary character support.

Fixes all known bugs in our handling of supplementary characters. This change
introduces a performance regression on the assumption that it won't be released
without a corresponding JIT change to enable the code to be inlined back to
pretty much what it used to be.

Bug: 2587122
Change-Id: I3449c9718bbe32ebe53b6c10454ae1dc82105b59
ang/String.java
d9d4093169787d2a52d0e392933f77ec08ff1045 10-Apr-2010 Elliott Hughes <enh@google.com> Throw the same exceptions as the RI from String methods.

String has its own StringIndexOutOfBoundsException subclass of
IndexOutOfBoundsException. We can run more tests if we behave
the same.

The RI only admits to IndexOutOfBoundsException, though,
so our documentation and throws clause shouldn't change.

Change-Id: Ib87777f8a42d4bcac21e8f8f00f4dcbc0ada4201
ang/String.java
a94813f0f7b050e1834f9994bcf867aa677d4472 10-Apr-2010 Elliott Hughes <enh@google.com> Merge "Make String.split 10x faster." into dalvik-dev
0510f0d8ce7c20b8f6022545a70e8b868805dc60 10-Apr-2010 Elliott Hughes <enh@google.com> Make String.split 10x faster.

Almost all uses of String.split in the Android codebase use trivial single
literal character separators. This patch optimizes that case to avoid the
use of regular expressions entirely.

The 10x speedup isn't the whole story, because the speedup is really
proportional to the number of separators in the input. 10x is easily
achievable, but the speedup could be arbitrarily high.

Before:

benchmark us logarithmic runtime
PatternSplitComma 84.8 XXXXXXXXXXXXXX||||||||||||||
PatternSplitLiteralDot 85.0 XXXXXXXXXXXXXX||||||||||||||
StringSplitComma 166.3 XXXXXXXXXXXXXXXXXXXXXXXXXXXX|
StringSplitHard 173.6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
StringSplitLiteralDot 167.7 XXXXXXXXXXXXXXXXXXXXXXXXXXXX|

After:

benchmark us logarithmic runtime
PatternSplitComma 18.9 XXX|||||||||||||||||||||
PatternSplitLiteralDot 19.0 XXX|||||||||||||||||||||
StringSplitComma 18.8 XXX|||||||||||||||||||||
StringSplitHard 174.2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
StringSplitLiteralDot 18.8 XXX|||||||||||||||||||||

(The benchmarks starting "Pattern" use a precompiled Pattern for performance.
Those starting "String" use String.split and would traditional entail a
temporary Pattern. As you can see, creating Patterns is very expensive for
us, and each one throws a finalizer spanner in the GC works too. The new
fast path avoids all this. I'll commit the benchmark -- along with all the
others I've ever used -- to http://code.google.com/p/dalvik this afternoon.)

Tests? We actually pass _more_ tests after this patch, because the increase
in performance means we don't hit timeouts.

Change-Id: I404298e21a78d72cf5ce6ea675844bf251e3825b
ang/String.java
6232a5efed0ea103e35aec73206e5e03a8b82e0c 08-Apr-2010 Jesse Wilson <jessewilson@google.com> Latest java.util.concurrent from the JSR 166 project.

Code was downloaded from CVS on 2010-april-7 at 10:00pst
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/

The new interfaces and ArrayDeque class are all from Harmony.
til/AbstractMap.java
til/ArrayDeque.java
til/Deque.java
til/NavigableMap.java
til/NavigableSet.java
8c462dbd86ae088ad0952df22b1ce9fd5a678234 07-Apr-2010 Elliott Hughes <enh@google.com> Fix build by adding missing imports.

Change-Id: I433778b02d3ad67090ee88444700f79b3138d778
til/ServiceLoader.java
e8f1d7b6ad9fa1185ba2f9f9698f6627fc4eaf03 07-Apr-2010 Elliott Hughes <enh@google.com> Merge "Actually use ServiceLoader in places where we had a hard-coded equivalent." into dalvik-dev
64e526d079a7218f984eeaba6ff2feeaadeeaffb 07-Apr-2010 Elliott Hughes <enh@google.com> Actually use ServiceLoader in places where we had a hard-coded equivalent.

I've also removed a file that was causing us to use this code unnecessarily
at run-time to explicitly specify the built-in default PreferencesFactory.

I haven't touched Charset, but should come back and fix that too at some
point.

Change-Id: I3a2145041d048078bdb55ae7b8fa4ec9d8726922
til/ServiceLoader.java
f307b1e2834db71e4713f6ea5d6d5bad7c4e8c03 06-Apr-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of dd53c703 to dalvik-dev

Change-Id: Ia95af76e2995ce7fb0778b020baf2882a8b0a3dd
582d926fbf5f5fd4800def67f86ecfedee44681e 05-Apr-2010 Elliott Hughes <enh@google.com> Froyo InputStream.available documentation improvement.

This method causes a lot of confusion, and we can do a lot better. (Ideally,
the API would either not exist or be something like "public boolean ready()".)

I've removed poor-quality documentation overrides too, so the full
documentation is visible in most places. (InflaterInputStream is an obvious
exception.)

Also, to a lesser extent, improve the InputStream.skip documentation.

Change-Id: I6d6cd788e6a32ad4a2613d1e381610f1ad8575fe
o/BufferedInputStream.java
o/ByteArrayInputStream.java
o/FileInputStream.java
o/FilterInputStream.java
o/InputStream.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/PipedInputStream.java
o/PushbackInputStream.java
o/SequenceInputStream.java
o/StringBufferInputStream.java
3604384c5f53c83383ce85f838901e46b0105e5e 02-Apr-2010 Elliott Hughes <enh@google.com> Add Java 6's java.util.ServiceLoader.

New implementation, documentation, and tests, very loosely based on the harmony
code.

We can't run the harmony or jtreg tests because we don't have the infrastructure.
My test just tests the most obvious use cases, on the assumption that at some
point we'll get the other test suites working; quite possibly before anyone ever
wants to use this stuff on Android.

(We might want to switch over existing META-INF/services/ code to use
ServiceLoader. I've raised http://b/2567593 for this.)

Bug: 2497395
Change-Id: I62b0ac4748204555d3ba9356794a72aff4f4f01e
til/ServiceConfigurationError.java
til/ServiceLoader.java
f9157eaea53923d3dbe6a521b29427819052f176 01-Apr-2010 Elliott Hughes <enh@google.com> Tidy up our getAvailableLocales methods to actually ask ICU4C.

These specialized methods are little used, and in several cases ICU itself
just returns the list of locales, but that's ICU's business, not ours. As
long as ICU is in charge of our locale-specific data, it should be responsible
for answering questions about what locale-specific data is available...

Change-Id: Idc8a66bbf7fcbc6b06e30929e6a7af3fe30ab7d1
til/Calendar.java
til/Locale.java
f072c0384c0b12f081fb99bc365d284ae6381379 01-Apr-2010 Elliott Hughes <enh@google.com> Merge "Add Java 6's java.net.IDN." into dalvik-dev
79179d5284bdc6854d1366226d26eec8b766d1ac 01-Apr-2010 Elliott Hughes <enh@google.com> Add Java 6's java.net.IDN.

harmony's tests and my code, though ICU4C does all the hard work.

I've added a test of my own to demonstrate some weird RI behavior (that I've
emulated in our implementation).

Bug: 2497395
Change-Id: I8146f72a8a3204449ee3d0d9065dadc1c1c77fcc
et/IDN.java
a927a856e41ce3e68ae91e4eaeda9e8a70caee6c 01-Apr-2010 Elliott Hughes <enh@google.com> Merge "Add Java 6's ResourceBundle/Properties API." into dalvik-dev
565a85d06ab8bc321d39f12012468cdfb65f5cfe 31-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's ResourceBundle/Properties API.

I've pretty much taken the upstream ResourceBundle implementations
as-is, putting back our string-to-locale conversion, removing a bit
of duplication and non-free, non-spec EBCDIC support, and hard-coding
the text of the MissingResourceExceptions (since harmony's changed
its message catalog from ours, so I had to touch those bits of the
code anyway).

(Why haven't I bothered to pay much attention to the resource bundle
implementations? Because I already rewrote our only code that was
using them to not use them, and third-party developers should be
using Android's resource system instead. There's very little chance
anyone needs Java resource bundles. I paid some attention to Properties,
because they're still somewhat useful.)

Also remove various unused messages, and update our tests. I've mostly
_not_ taken the upstream tests, because it would require a lot of work
that we'll be doing anyway when we switch to using their test suite
properly.

I ran the jtreg tests we're able to run, and the normal-case ones (plus
the stress test) seemed okay.

Bug: 2497395
Change-Id: I91606df0dc1a45e6974fbb27a0d334af87254f0b
til/ListResourceBundle.java
til/Properties.java
til/PropertyResourceBundle.java
til/ResourceBundle.java
2e43b95339579a2ea8b749d7598677bb44f2770f 31-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's Calendar API changes.

Also correct two javadoc mistakes I added, and bring back the latest harmony
java6 CalendarTest.

Bug: 2497395
Change-Id: If481390948ca93d5f709a8ed4585991889de9f8b
til/Calendar.java
97144c87ada735a82221d7cdf65555b8f063a05a 30-Mar-2010 Elliott Hughes <enh@google.com> Trivial tidying up of networking code.

Removing cruft and renaming things.

Change-Id: I317726c40a1addf3a1ad9d905239438424082549
et/InetAddress.java
abd91e389e4462208eb004b38d378f67d9676ec1 30-Mar-2010 Elliott Hughes <enh@google.com> Fix build.

Rather than try to be clever with header files (which didn't work with glibc
for the sim build) let's make Math.copySign have the StrictMath behavior,
and have StrictMath call Math. (The other way round, though it might seem
more logical, wouldn't solve the problem. We already have numerous cases of
StrictMath calling Math anyway.)

Change-Id: Ifff065ddc8fbd5d5f8d4d5b67bc9ac07a719eb00
ang/StrictMath.java
ace7e6ff6285c073a80aaad68321b17bdcd09a4b 27-Mar-2010 Elliott Hughes <enh@google.com> Fix StrictMath.copySign's behavior with NaN.

StrictMath's copySign method is defined to treat all NaNs as positive, regardless
of their sign bit. Rather than add yet more code on the Java side (which already
called down to native code three times), let's just make one call to native code.

This change fixes failures in already-committed StrictMath tests.

The only other potential instances of this class of error were in the
max and min methods, but they all handle NaNs before calling
(double|float)To(Raw)?LongBits, so the choice there really is arbitrary.

Change-Id: I439dbdff9068cb420b78a6330cde9d7d0d12c0ef
ang/Math.java
ang/StrictMath.java
b57e439ac3f5401e39dbe4d9097e476fe20b889e 25-Mar-2010 Elliott Hughes <enh@google.com> Apply https://issues.apache.org/jira/browse/HARMONY-4307.

They didn't add a test for this; supposedly it fixed a flaky AWT test. But
the change looks plausible.

Change-Id: I358849a20d5e38d01d6c77a4c335002bb7bba095
o/ObjectStreamField.java
9e95c528a090dac847aa97fec1b0ad331929c685 25-Mar-2010 Elliott Hughes <enh@google.com> Clean up a few toStrings.

I couldn't find any more that were using getClass() rather than
getClass().getName().

Change-Id: I30b375748d36bc36d1e6999349fc472496456746
til/Scanner.java
264f9e92b2ed5887c1e23a4855f694458fed2415 25-Mar-2010 Elliott Hughes <enh@google.com> am ec7c8c98: Fix java.util.Random\'s constructors.

Merge commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29' into dalvik-dev

* commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29':
Fix java.util.Random's constructors.
1e8bd6143140f44337d6f567335afeb48b263d95 25-Mar-2010 Elliott Hughes <enh@google.com> Fix java.util.Random's constructors.

Subclasses rely on having their overridden setSeed called by Random's
constructors, and the RI actually documents this behavior. (The
documentation even changed between Java 5 and Java 6 to make it _more_
explicit.)

This patch keeps that part of I6239d93bb46876ef1c4a5e155a6dc1ac6fab4eae
that improved our randomness, but reverts the attempt to fix Random's
uncouth behavior.

Also a regression test so we don't try to fix Random again in future.

Bug: 2502231
Change-Id: Ieea1009145c74eac9475c0cd5066dabad20eb114
til/Random.java
93f0d794f264baeb7a90d02e58cae60305b3912a 24-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSymbols.

This patch also improves the documentation of all getAvailableLocales methods
to clarify exactly what "available" means. Note that at the moment, many of
our implementations just return Locale.getAvailableLocales. It turns out that
ICU does the same in most cases, but I'll come back in a separate patch and
add code so we just pass these down to ICU, and wash our hands of the matter.

I've rewritten DateFormatSymbols.equals, which was very wrong. The time zone
names comparison had an invalid optimization, and its slow-path loop was wrong
too: it only ever tested values against themselves, which isn't likely to have
been the author's intention.

I've added toString overrides to DateFormatSymbols and DecimalFormatSymbols,
because I need them every time I work on these classes.

I've made the constants in DecimalFormatSymbols static final, and given them
idiomatic names. (I still think we might benefit from breaking these into
separate fields, as in the serialized form, but that's a separate issue.)

Finally, and unrelatedly, I've added a comment to BreakIteratorProvider that
I missed in my last change to that file.

Change-Id: I5d6cb30f9afdb502d38353d8a624dc2f0fef41ac
til/Calendar.java
6edeab307d95e5ef0610889ab3ef68e16e0b0510 24-Mar-2010 Elliott Hughes <enh@google.com> Merge "Remove explicit 8192 arguments to BufferedReader and friends." into dalvik-dev
81e3c1d7a6ff5b1f6a587890249e1cb1b3beccc7 24-Mar-2010 Elliott Hughes <enh@google.com> am b7b9be13: Merge "Improve java.net.InetAddress.getLocalHost documentation."

Merge commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2' into dalvik-dev

* commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2':
Improve java.net.InetAddress.getLocalHost documentation.
b748a9b827665a8b19d60af4b419503b45e74329 24-Mar-2010 Elliott Hughes <enh@google.com> Remove explicit 8192 arguments to BufferedReader and friends.

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
o/InputStreamReader.java
o/OutputStreamWriter.java
o/PrintWriter.java
et/ProxySelectorImpl.java
til/Formatter.java
til/Properties.java
fb4616d0efbba1903b9237c0a428b59868365a69 23-Mar-2010 Elliott Hughes <enh@google.com> Remove the "default buffer size" warnings.

Everyone seems to agree these have outlived their usefulness.

Change-Id: Ia2a53ffa1f9498333b4b2d51d5c1db488b89abaf
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
ce64852f32d7d10ebd61a9c8f9ba2e91068f9bd2 23-Mar-2010 Elliott Hughes <enh@google.com> Improve java.net.InetAddress.getLocalHost documentation.

Bug: 1518707
Change-Id: I741a7a28325320949e84e997e6a49d3356c9a308
et/InetAddress.java
c4a9c063cb234987b4dea66b5d1d26be8e754d0b 23-Mar-2010 Elliott Hughes <enh@google.com> Add the Java 6 java.text.spi and java.util.spi interfaces.

We don't currently use these, and don't necessarily plan to. Full support
would have a run-time cost, and it's not obvious that it would be particularly
useful.

Code search can't actually find any users of this stuff in the wild outside
of the various VM implementations and their test suites.

Bug: 2497395
Change-Id: Ie25aef73ece6d1fd169fdcb7b2f847761d77914d
til/spi/CurrencyNameProvider.java
til/spi/LocaleNameProvider.java
til/spi/LocaleServiceProvider.java
til/spi/TimeZoneNameProvider.java
d1c610c2a641157df80aa8aefefc49393074f507 22-Mar-2010 Elliott Hughes <enh@google.com> Remove all remaining "@since Android" tags.

I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.

Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
o/FileOutputStream.java
o/PrintStream.java
o/SerializablePermission.java
o/package.html
ang/Cloneable.java
ang/package.html
ang/ref/package.html
ang/reflect/package.html
et/package.html
til/ConcurrentModificationException.java
til/NoSuchElementException.java
til/package.html
055c2521fc7776a0651de9be5be0fbbd2b312e7b 22-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's java.util.Arrays changes.

I've kept our binary search implementation and just generalized the
interface.

I've gone out of my way to preserve exception priority. I know we don't
agree that it's necessary, but it is important if we want to be able to
run other people's tests. If someone wants to write a new high-quality
test suite (which would be a great thing to have), we should remove the
hacks. (I've commented them.) Otherwise, I've gone out of my way to keep
the near-duplicates forced on us by Java's primitive type system as
identical as possible.

This passes all harmony and jtreg tests.

Change-Id: I91fbf707dac76124c6dbe59b0b30b7ded9a69529
til/Arrays.java
7b00ce846d4cdadceadb197e3d207946168970ed 18-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc.

(The harmony ScannerTest.java is quite different from ours, and doesn't test
this trivial method anyway.)

Bug: 2497395
Change-Id: I8b2b3db7233f766ef70bfdbfdcdfbd0f23e4bdb4
til/Scanner.java
05d77746d9936ce913b6f4fa35c63e5945b0e7cb 17-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's new PipedReader/PipedInputStream constructors.

Also bring back the latest harmony java6 branch tests, and modify them to pass
with our deliberate [spec-compliant] exception changes.

Bug: 2497395
Change-Id: Ifb3f9bf48f8eec4120f9e59b03beb3969cfe0cd3
o/PipedInputStream.java
o/PipedReader.java
a845eec505ce5314b1a8be3d8dd6cc46bda782f7 17-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's ObjectStreamClass.lookupAny.

Also bring back the latest harmony java6 tests. We fail two of these tests,
but this is not a regression caused by this patch: our existing code fails
the same tests in the same way, so we already had the bugs and just didn't
know.

Bug: 2497395
Change-Id: I70412cdea747c30ea8d19a55d2ae5e73d3c59c1a
o/ObjectStreamClass.java
e51cae060bf9543c7b786c3d7f297fab8a551acb 17-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's PrintStream.clearError/PrintWriter.clearError methods.

Also bring back the latest harmony java6 branch tests.

Bug: 2497395
Change-Id: I242e9a7d0446b46faaa5b28e0348806e999d8fdf
o/PrintStream.java
o/PrintWriter.java
705aafd104f0bd1a11de90afd85144de098f91c4 17-Mar-2010 Elliott Hughes <enh@google.com> Merge "Add Java 6's java.io.Console." into dalvik-dev
f7fb59f46848901875d317fdaa1008b63fd74ad2 17-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's java.io.Console.

This is actually functional, if you're in the mood to "adb shell".

The implementation is based on harmony's, but with the initialization and
native code rewritten, with readPassword responsible for echoing a newline (so
we don't have to play silly tricks with the ECHONL flag), and a vastly
simplified ConsoleReader class. I've also rewritten the documentation.

Change-Id: I902b47fb27a8fdb2d6f067bb905ee02c6a10e454
o/Console.java
d9d263010b4b3fb039ecb88bddbc565414d82c63 16-Mar-2010 Elliott Hughes <enh@google.com> Remove dead fields, constants, and redundant pass-through methods.

(This is just preliminary to what I really want to do, which is vastly
reduce the number of near-duplicate methods we have: all the send/recv
variants, for example.)

Change-Id: Ib03653820a18f55aea6c5b876c397afd281a98dc
et/Socket.java
08ec8fd5c950cb94e12aefa08c89d78762acf18a 12-Mar-2010 Elliott Hughes <enh@google.com> Java 6 java.io.File changes.

IOError and IOException are just copied from harmony. The native code
is all our own, and the File code is rewritten to match our earlier
changes. FileTest gains more tests for the new methods' behavior with
File("").

We still can't test most of this stuff directly because we run our tests
as root. Manual inspection looks good, though, and I've raised a bug
for switching our tests over to run as a non-root user.

I've removed all the Java 6 exceptions from expectations.txt because
we plan on fixing them all, and almost all of the ones mentioned there
are already addressed anyway.

Bug: 2497395
Change-Id: I517cd2d871bff64d63b2f4eb80fda4cfd6d19cd8
o/File.java
o/IOError.java
o/IOException.java
49e79cdc1aadb2922178e8905a7907df0bdaf7b3 12-Mar-2010 Elliott Hughes <enh@google.com> Use ioctl(FIONREAD) rather than recv(MSG_PEEK) to implement Socket.available.

As well as avoiding unnecessary work, this also means we can reuse the native
code we already have for ioctl(FIONREAD), though we need to change the
interface to take FileDescriptor rather than int, and extract the int on the
native side.

Change-Id: I4c6d9e4e72e514e3e7872c7f882bda5441059915
o/FileInputStream.java
acde9699a7a7395b42345d74629b92d50209b90f 11-Mar-2010 Elliott Hughes <enh@google.com> Throw UnknownFormatConversionException instead of AssertionError.

There's already a perfectly good exception to throw when we see
a format conversion we don't understand, and my assertion prevented
us from getting to the code that would have thrown it.

Change-Id: I38fdd95482a3d48e26b68b045444f45e94ffc26f
til/Formatter.java
5820c2d5ea8199005b9c1c9dbf34b3d5cdbb8c10 11-Mar-2010 Elliott Hughes <enh@google.com> Tidy up java.lang.Math and java.lang.StrictMath.

Removes duplication, fixes typos, and removes some unnecessary object creation.
Note that otherwise-duplicated code that calls a native method needs to remain
duplicated, because the native methods have different implementations. Other
than that, it's not clear to me that the remaining textual differences (mainly
scalb and its implementation details) are meaningful, but it's not clear that
they're not, so I'm leaving them for now. We can always come back later.

This new code still passes all the junit and jtreg tests.

Change-Id: Ica28a01fd1469a162e05deccdb9e6f919246d9f3
ang/Math.java
ang/StrictMath.java
73342e0a7adba5a494309c1fcee0c64fee4f79f1 11-Mar-2010 Elliott Hughes <enh@google.com> Copy harmony's jdk6 Math and StrictMath.

There's some ugliness here I want to remove, but it'll be less confusing if
I commit the upstream code first without my changes...

...that said, I've reverted the upstream Math.pow change because it it's just
cruft; we already pass their tests and jtreg's more thorough pow tests (see
http://blogs.sun.com/darcy/entry/finding_a_bug_in_fdlibm). My guess is that
their real problem was that they were using the buggy fdlibm 5.2 until after
they made the Math.pow change. We've always used 5.3, so we were fine.

Change-Id: I5a6c080d9fd6b60dc7bf77ac10096a913766f512
ang/Math.java
ang/StrictMath.java
b43c9fb9c581d94304e9a54ec96cf4d752e8d917 10-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6 additions to Double, Enum, Float, and String.

I rewrote the documentation for Double, Enum, and Float, but the "code" is the
same as harmony's. I rewrote the String code and wrote some tests to ensure
that a malicious Charset can't subvert String immutability.

I've also extracted the Android-specific bits of StringTest (which weren't
testing String at all) and brought back the latest harmony StringTest.java.

(The Class and Package changes are just to placate our API comparison tools.)

Bug: 2497395
Change-Id: Id57bda806891c3c85adfcb3b85eea8a8fad2c7b4
ang/Double.java
ang/Enum.java
ang/Float.java
ang/String.java
2f406841aa79db4c56a4357a20d271fb5cd598e1 10-Mar-2010 Elliott Hughes <enh@google.com> am 40bd3d28: Merge "Work around droiddoc bug http://b/2022288."

Merge commit '40bd3d28fb2f34f060e7413cc19eeeb195c0ff90' into dalvik-dev

* commit '40bd3d28fb2f34f060e7413cc19eeeb195c0ff90':
Work around droiddoc bug http://b/2022288.
3dd153c6795866734d66e6b5f69c40edae698f6d 10-Mar-2010 Elliott Hughes <enh@google.com> Work around droiddoc bug http://b/2022288.

Change-Id: Ib46a260916dee99f190aa8b9465f4f2d3b04aa67
ang/String.java
7237ad6013b4b4eea62e270a1beb07fb400264a8 10-Mar-2010 Elliott Hughes <enh@google.com> am 16e0f24a: Another go at making droiddoc as happy as javadoc...

Merge commit '16e0f24a8641d1cdf059ae15a5bf60a3e553ce1b' into dalvik-dev

* commit '16e0f24a8641d1cdf059ae15a5bf60a3e553ce1b':
Another go at making droiddoc as happy as javadoc...
66c28d7bc60d6dbe470147a2be8b01717cb38f06 10-Mar-2010 Elliott Hughes <enh@google.com> Another go at making droiddoc as happy as javadoc...

Change-Id: I70dd8d57053a6e60b9be0cbe8a95d9937d9b00ef
ang/String.java
9cfa09432e0b3060b8860c781774760343a8f6da 10-Mar-2010 Elliott Hughes <enh@google.com> am 1f6a0425: Fix javadoc errors.

Merge commit '1f6a0425433b4daca86cf4df5854b9dbc5ee57d7' into dalvik-dev

* commit '1f6a0425433b4daca86cf4df5854b9dbc5ee57d7':
Fix javadoc errors.
a7127f86d49f9a8b0f7af92e229fee4a0e2831cd 10-Mar-2010 Elliott Hughes <enh@google.com> Fix javadoc errors.

Change-Id: Ib3eb500006f5b4b1dadf959397fce7737fb53fe7
ang/String.java
til/Vector.java
b7da2eb9bf081ee86ed52a2c23ff0ef0b8aa9c97 09-Mar-2010 Elliott Hughes <enh@google.com> am a6d228d4: Merge "Minor documentation improvements."

Merge commit 'a6d228d44153ea2ee831eba1d41cd363989cdf7e' into dalvik-dev

* commit 'a6d228d44153ea2ee831eba1d41cd363989cdf7e':
Minor documentation improvements.
438d9883775e6ee31c097e2103a25571d2426cd9 09-Mar-2010 Elliott Hughes <enh@google.com> Minor documentation improvements.

Based on user-submitted bugs that were just misunderstandings, plus
implementation bugs caused by the intended behavior being somewhat
subtle.

Change-Id: Ic2606b5e57dadc95a35c2d0a977c01434a2fa28a
ang/Double.java
ang/Float.java
ang/Integer.java
ang/Iterable.java
ang/Long.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
til/ArrayList.java
til/Enumeration.java
til/HashMap.java
til/Hashtable.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedList.java
til/Vector.java
f1072c37db1f647ab6bbbb9b866b699ef1e19ec3 09-Mar-2010 Elliott Hughes <enh@google.com> Fix a comment.

Change-Id: Iba79dbc04876d5c7cb93aba56541e7dda3c6f887
et/ServerSocket.java
bf5d76daa288a111dcaa33b084a099948c52d200 09-Mar-2010 Elliott Hughes <enh@google.com> Merge "Implement the Java 6 NetworkInterface/InterfaceAddress functionality." into dalvik-dev
d2af45a6fd008ceb958ac74e5a50e582b8419e9c 05-Mar-2010 Elliott Hughes <enh@google.com> Implement the Java 6 NetworkInterface/InterfaceAddress functionality.

The Java bits are based on harmony's code (though only the bit that pulls
out the sub-interfaces is copied verbatim), but the native side is new
code, continuing our previous plan of (a) doing the least possible work
on the native side and (b) using the BSD getifaddrs(3) interface as our
portability layer.

This patch also updates our NetworkInterfaceTest to be the latest code
from harmony's java6 branch.

We pass all the harmony and jtreg tests, and visual inspection shows that
the untested (and hard to test) bits -- such as prefix length and hardware
address -- are correct.
et/InetAddress.java
et/InterfaceAddress.java
et/NetworkInterface.java
b7d1452b9213e8add3e89209dc68f7be558e7c48 04-Mar-2010 Elliott Hughes <enh@google.com> am 042cc582: Merge "Don\'t call a method that can be overridden from File\'s constructors."

Merge commit '042cc58283c6a16db56fd758481388eee0f78619' into dalvik-dev

* commit '042cc58283c6a16db56fd758481388eee0f78619':
Don't call a method that can be overridden from File's constructors.
028794d8a42840233d3cb316feb09b5593f19d1d 04-Mar-2010 Elliott Hughes <enh@google.com> Don't call a method that can be overridden from File's constructors.

Bug: 2486943
o/File.java
4f8f6c65064b494940fb8d4a41d86403d1f2ac3e 03-Mar-2010 Elliott Hughes <enh@google.com> Improve error checking and error reporting in java.util.Formatter.

This causes three new harmony failures, in tests specifically designed to
probe exception priorities (despite the fact that the RI explicitly doesn't
define exception priorities).

Comically, this same change actually fixes 24 jtreg tests that were failing
because of differences in exception priorities between harmony and the RI.

What I care about is that the new code is way easier to understand, shouldn't
waste as much space in our puny instruction caches, should be a more tempting
JIT target, and lets the actual formatting code assume that it's only ever
called in a valid way.

Bug: 2477140
til/Formatter.java
31df07d33bf4730c76d5f11b802e8e2bd40baba9 03-Mar-2010 Elliott Hughes <enh@google.com> Add (but @hide) String.isEmpty and Locale.ROOT.
ang/String.java
til/Locale.java
2cf62473cac4347ffa293cb5f0dea4326b777509 01-Mar-2010 Elliott Hughes <enh@google.com> am 16525029: Merge "Fix a FormatFlagsConversionMismatchException bug I introduced in Froyo."

Merge commit '165250293744f0aadcb0a0bfba1b53b8a4fb99b7' into dalvik-dev

* commit '165250293744f0aadcb0a0bfba1b53b8a4fb99b7':
Fix a FormatFlagsConversionMismatchException bug I introduced in Froyo.
d6396db55bdc457bd8dfce23991aa9bf10b418e5 28-Feb-2010 Elliott Hughes <enh@google.com> Fix a FormatFlagsConversionMismatchException bug I introduced in Froyo.

We want to show the characters representing the flags, not the decimal
values of their ASCII representation. "Use overloading judiciously",
as the man says, or cause errors like this.

Seen in FRE56B (see https://android-git.corp.google.com/g/42528).
til/Formatter.java
0a9a0a1a459ff7debb4ea5455a83e9cf5bb87730 28-Feb-2010 Elliott Hughes <enh@google.com> am 4d5e5a0f: Merge "Keep the order from getaddrinfo() unchanged if preferIPv6Addresses() is true."

Merge commit '4d5e5a0f65e3cca6662fac8e832712fba61b9d2c' into dalvik-dev

* commit '4d5e5a0f65e3cca6662fac8e832712fba61b9d2c':
Keep the order from getaddrinfo() unchanged if preferIPv6Addresses() is true.
a2a7fa1da77a6aaac09595f5712bc4a450ad2025 12-Feb-2010 Steinar H. Gunderson <sesse@google.com> Keep the order from getaddrinfo() unchanged if preferIPv6Addresses() is true.
et/InetAddress.java
b2cebc7221ba9e3a58a7a37d7bc80459d611be0e 13-Feb-2010 Elliott Hughes <enh@google.com> Merge "Fix a few of our FindBugs "high" warnings." into dalvik-dev
deacd761e85ee4d75a6adbdd63225fc4a6d3088d 13-Feb-2010 Elliott Hughes <enh@google.com> Fix a few of our FindBugs "high" warnings.

RuleBasedBreakIterator was breaking the equals/hashCode contract.

Various classes were calling toString on arrays, which isn't very useful.

GregorianCalendar was missing a null/instanceof check. (FindBugs complained about
the former, but the super.equals would actually take care of that. The lack of
the explicit "instanceof" did mean that we could throw ClassCastException if you
had a Calendar that wasn't a GregorianCalendar, though. [Not easily testable,
and I hope we'll replace our calendars with ICU4J's before we actually have
another Calendar subclass.])

Collator's cache was broken, but luckily never had anything inserted into it
anyway.
til/GregorianCalendar.java
8482ba207c66d3251d8c5ec0fb3f59d6995b6c02 13-Feb-2010 Elliott Hughes <enh@google.com> Merge "Use one method to create a Locale from a String." into dalvik-dev
b0e5963793d8980b349f8e553067c19fd31601c5 13-Feb-2010 Elliott Hughes <enh@google.com> Throw IllegalArgumentException if Currency.getInstance is given an invalid currency code.

This fixes an existing harmony DecimalFormatSymbolsTest failure, but I've added
an explicit test for clarity (and to reduce the likelihood of regression).
til/Currency.java
aa3919543be785a76742c5ae2a753178cb2d928a 13-Feb-2010 Elliott Hughes <enh@google.com> Use one method to create a Locale from a String.

Bug: 2392157
til/Locale.java
til/ResourceBundle.java
18aa2ce5993b2f06e1d4d60c90d92fe4650b1d75 06-Feb-2010 Elliott Hughes <enh@google.com> Fix a bug I introduced to SimpleTimeZone with my Calendar.setTimeZone fix.

Our implementations of SimpleTimeZone and Calendar became mutually recursive
for custom time zones when I changed GregorianCalendar.computeFields to use
TimeZone.inDaylightTime --- SimpleTimeZone's implementation of inDaylightTime
creates a GregorianCalendar leading to a stack overflow looking something
like this...

at java.util.SimpleTimeZone.inDaylightTime(SimpleTimeZone.java:599)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:595)
at java.util.Calendar.complete(Calendar.java:819)
at java.util.Calendar.setTimeInMillis(Calendar.java:1319)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:339)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:325)
at java.util.SimpleTimeZone.inDaylightTime(SimpleTimeZone.java:599)

I've cut the knot by introducing "Grego" from ICU4J, and rewriting our
SimpleTimeZone.inDaylightTime in the style of ICU4J's implementation.

Maybe we'll be using the ICU4J calendar implementation sooner than I thought!
til/Grego.java
til/GregorianCalendar.java
til/SimpleTimeZone.java
69bcb487b7317dde579a8ddc1a8094040ed7ae2b 04-Feb-2010 Elliott Hughes <enh@google.com> Minimal fix for Calendar.setTimeZone.

The interpretation of Calendar's competing member variables when the time,
time zone, and fields[] don't agree is confusing, and led to
Calendar.setTimeZone having no effect. I've improved the documentation
based on my reverse-engineering and fixed this bug. I noticed a lot of
other code that looks incorrect though, and I've raised http://b/2419810
suggesting that we switch to icu4j's calendars in the longer term.

Bug: http://code.google.com/p/android/issues/detail?id=6184
til/Calendar.java
til/GregorianCalendar.java
e5a4be15160c6f2cf54729ab29de21c0944dfbce 02-Feb-2010 Elliott Hughes <enh@google.com> Add a missing "static", found by FindBugs.
et/AddressCache.java
2b1f1d31b83dbabc432a928bd30d443e01b16b46 30-Jan-2010 Elliott Hughes <enh@google.com> Fix fallback in Currency.getSymbol(Locale).

If ICU doesn't have any localized symbol for a currency, we're supposed to
return the currency code, not null.

I introduced this bug in my recent changes. The Currency tests don't find it,
but DecimalFormatTest.test_setCurrencyLjava_util_Currency does, by accident.
I've added an explicit test.
til/Currency.java
f8ba29b25f7fc2ef93ab39a8ac436c94d55b3984 29-Jan-2010 Elliott Hughes <enh@google.com> Fix tests.api.java.io.SerializationStressTest3.test_18_116_writeObject.

The dead field 'minExponentDigits' was of type 'byte', not 'int'.

Also add detail to serialization exception messages (this isn't just test code ---
ObjectInputStream calls this).
o/EmulatedFields.java
96474a05d47fcca92f7d511e41a20f994fc1e677 27-Jan-2010 Elliott Hughes <enh@google.com> Add a cache to Currency.getInstance(Locale).

Statically there are lots of calls to Currency.getInstance(String) in the
core libraries and only one to Currency.getInstance(Locale). This might
be why the former has a cache but the latter doesn't. Dynamically, looking
up Currency by Locale is a common operation because that one caller --
DecimalFormatSymbols -- is widely used, and it sets up its currency data
eagerly. (Which might be worth coming back and also fixing later.)
til/Currency.java
til/Formatter.java
2c93c5c6ee4d1b7d8d5a3f930fec46787e1d4c30 25-Jan-2010 Elliott Hughes <enh@google.com> Fix @link and @see tags.
til/Formatter.java
4d756372aa8c13ec7710179a92543420b0f1e41a 23-Jan-2010 Elliott Hughes <enh@google.com> java.util.Formatter javadoc fix.
til/Formatter.java
cb4ede2175f1678b1c27dfa74962f3493fb1fea3 23-Jan-2010 Elliott Hughes <enh@google.com> Fix java.util.Formatter "%tz".

Found by jtreg.
til/Formatter.java
707352ffb98f15e7f832fc593ef6fc5f72854431 22-Jan-2010 Elliott Hughes <enh@google.com> Rewrite java.util.Formatter documentation.

Some guy on the internets pointed out that our documentation of argument
indexes was garbled. I fixed that, and then noticed that pretty much all
the documentation was close enough to be convincing but wrong enough to
not be very useful.

I've fixed everything I've found. The result isn't perfect, but it's good
enough that I could stand to use it myself now.
til/Formatter.java
b2d899b733e6f9f130a13d3684a9318da7ef9b2f 21-Jan-2010 Elliott Hughes <enh@google.com> Fix String.format("%d", null) and relatives.

Must have been asleep at the wheel when I mistranslated this.

We need to get the number of test failures down so we don't have to rely
on our memories of how many test failures we're expecting to see.
til/Formatter.java
7bf573490e6c41a9e8cb26b755bc01ad7cd41cce 21-Jan-2010 Elliott Hughes <enh@google.com> More java.util.Formatter performance work.

I got distracted into doing a bit more here, mainly speeding up the slow path
for integers. I've started to pull out some of the error checking too. We could
do a lot more along those lines, but then we'd fail even more jtreg tests which
assume a specific order in which checks are made. (I don't think we should
worry about that; I'm stopping here because this isn't what I wanted to do
today, not because I don't think we should press on. There's plenty of more
important stuff to look at first.)
til/Formatter.java
4c5cbf2953ada194c4dc9d7b387615b1c6fe3e63 20-Jan-2010 Elliott Hughes <enh@google.com> One true way to query "java.net.preferIPv6Addresses".

Also stop querying and passing this boolean to code that doesn't care. (We
sort our InetAddress[]s appropriately, so most code doesn't need to worry
about this.)

Bug: http://code.google.com/p/android/issues/detail?id=5903
et/DatagramSocketImpl.java
et/InetAddress.java
et/MulticastSocket.java
et/Socket.java
048303b64df9c987ae2f57b6bf88ff5ac1b5cca0 16-Jan-2010 Elliott Hughes <enh@google.com> Rewrite InetAddress' DNS cache.

Replace harmony's two 5-element linked lists with a single 512-element
LinkedHashMap. Greatly reduce the time we spend under locks (and no network
I/O is done under a lock any more!). Take advantage of various properties
of how the cache is used to avoid having to do much explicit work to handle
expiry.

I've also optimized the usual no-SecurityManager/no custom system properties
configuring cache TTLs case (without making the slow path much slower than it
already was).

I've also updated the native method names to correspond to the C functions
they're really wrapping (rather than completely different IPv4-only ones
they probably used to wrap long ago).

I've also improved the InetAddress documentation.

Bug: 2320435
et/AddressCache.java
et/InetAddress.java
et/NegCacheElement.java
et/NegativeCache.java
aa6c33c1a15dc53c213a9b32d37ed0beb21cc91a 15-Jan-2010 Elliott Hughes <enh@google.com> Fix Formatter's behavior with %% and %n.

Yesterday's fix to the behavior with genuine null arguments didn't take into
account that we have format specifiers that don't take arguments. Fix the fix,
and add an explicit test.
til/Formatter.java
9ded0f2cf1ca1e18923e3dd3313ee2adb9b37c74 15-Jan-2010 Ficus Kirkpatrick <ficus@android.com> Fix a NPE in java.util.Formatter.

A recent optimization to simple '%s' and '%d' formats was
failing to format null as "null". Also add a test.
til/Formatter.java
e1e5e8e60af12f145c4dd0395e30069665f97529 14-Jan-2010 Elliott Hughes <enh@google.com> Fix Date.toString.

Date.toString was using the TimeZone id ("America/Los_Angeles") rather than
the time zone short name ("PDT" or "PST", depending on time of year). The
naive fix made things 5x slower, so I improved Resources.getDisplayTimeZone
so the fixed Date.toString is only 2x slower. This could be improved further
with a faster getDisplayTimeZone.

I hoped to replace the body of Date.toString with a call to SimpleDateFormat,
but that turns out to be 40x slower. This patch also optimizes SimpleDateFormat
to bring the gap down to 8x by using Resources.getDisplayTimeZone instead of
asking for all the strings.

(Note that these improvements refer to the hopefully common case of localized
strings for the default locale. If you have the misfortune to need strings for
other locales, the new code will be more like 600x faster. At 0.5s a call on
the fastest current hardware, I hope no-one's actually doing that.
Dalvik Explorer -- available on the Market -- needs to do it when generating
summary reports, and it is indeed ridiculously slow. It uses two
SimpleDateFormat objects per locale, so it takes 1s per locale, for about 60
locales. I've tested Dalvik Explorer with this patch, and it does fix that
pathological behavior.)

Also fix a bug I introduced in https://android-git.corp.google.com/g/36242 that
meant that our zone names String[][] contained incorrect values (accidentally
concatenating each successive value in a row), found by existing tests now we
use more of those values.

Also replace a couple of "new Integer" calls with Integer.valueOf for a modest
speedup.

Also factor out some duplication.

Bug: http://code.google.com/p/android/issues/detail?id=6013
til/Date.java
aba52f92911e0faa4ae1907becc5a66cdb3254de 13-Jan-2010 Elliott Hughes <enh@google.com> Remove the last bits of the ICU ResourceBundle hack.

This patch switches us over to calling ICU directly for localized currency
symbols, and then removes all the mechanism for sneaking fake ResourceBundle
implementations in. The code's a lot simpler too, because ICU's default
behavior is what we want anyway.
til/Currency.java
til/ResourceBundle.java
fafc8016f5911d05053a6fd38c6349965647b0d3 13-Jan-2010 Elliott Hughes <enh@google.com> Fix a comment.
til/Formatter.java
d8170b39f42e17cf6d01a8890dfb5f43a94b2f0c 13-Jan-2010 Elliott Hughes <enh@google.com> Make Formatter %d cost about the same as %s (i.e. 60% faster).

Fast-path "%d" and "%s", the only two cases that matter, so they don't have to
go through all the flags, width, and precision machinery unless flags, widths,
or precisions are actually specified.

This makes "%s" slightly but not significantly faster -- because I'd already
optimized that code for the default case pretty well -- but makes a huge
difference to "%d", which wasn't as amenable to general optimization.

I've also improved the identifiers and comments surrounding the date suffix,
after TraceView misled me into attempting to optimize this non-hotspot (though
to be fair, I'm only benchmarking on passion-eng with JIT; TraceView might be
telling the truth for a G1 without JIT).

TraceView also misled me into trying to optimize away the check for uppercase
conversion types at the end of Transformer.transform (by adding different bodies
to the uppercase entries in the switch directly above it), but that made no
convincing difference on passion-eng.

Bug: 2272346
til/Formatter.java
71b856e4813468e5b5ad85e40ba7efdc18e748eb 12-Jan-2010 Elliott Hughes <enh@google.com> Shave another 10%-25% off Formatter.

Array indexing might be fast, but String.charAt is pretty fast, and
String.indexOf is pretty fast too, while String.toCharArray is really
rather expensive.

For a format string with no format specifiers, this is 25% faster. For
a format string with a single %s or %d format specifier (the common
cases in the Android codebase), this is about 10% faster.
til/Formatter.java
c9a29bea2462417ebe58bdd3b4f6514d67b53610 08-Jan-2010 Jesse Wilson <jessewilson@google.com> The SecurityManager doesn't work, so advertise that shouldn't be used.
ang/SecurityManager.java
96b251cd6e3aa354b86330da0c598d538151be0a 06-Jan-2010 Elliott Hughes <enh@google.com> Fix String.toLowerCase/toUpperCase for Azeri, Greek (all locales), and Turkish.

This patch fixes Greek final sigma in all locales, treats Azeri locales like
Turkish locales, and fixes our dotted/dotless-i/I behavior in Turkish locales
(and thus now Azeri locales too).

Still broken: behavior in Lithuanian locales, supplementary characters.

I've also removed String's own optimized-for-ASCII toLowerCase(char) and
toUpperCase(char): we've optimized Character's methods and don't want another
copy. I've removed the unused String.getValue which provided access to the
underlying char[] --- this wasn't used, and wouldn't work anyway without
some way to access String's 'offset' and 'count' fields too.
ang/CaseMapper.java
ang/String.java
33aa6eb602478e7f51ac16f30c88db3566022886 23-Dec-2009 Elliott Hughes <enh@google.com> Stop using ResourceBundle for locale data.

This offers an additional speed increase and gets rid of a lot of native code.
til/Calendar.java
til/Currency.java
2e3a41defb42a97b463194d859d2d4088a600fd8 21-Dec-2009 Elliott Hughes <enh@google.com> Speed up the way we access ICU's locale data.

This patch makes creating a new NumberFormat or new SimpleDateFormat 2x faster.

Basically, the ResourceBundle mechanism is really expensive in several ways:

1. The two-level caching is unnecessary for locale data, and expensive because
it burns through a lot of temporary objects.
2. The PrivilegedAction stuff is unnecessary and expensive because it too burns
quite a few temporary objects (including an ArrayList for each call; should
we consider removing support for SecurityManager so we can remove this cruft
from our code?).
3. The caching in most cases doesn't cache anything useful; the ResourceBundles
simply forward all questions straight to native code anyway, all we're
caching is an unnecessary forwarding object (in a cache where lookups cost
more than just creating a new unnecessary forwarding object would cost).

I've left CurrencyResourceBundle on the slow (ResourceBundle.getBundle) path
because I'm not yet sure how much of that path's semantics it relies on.

I still return LocaleResourceBundle instances (albeit via a much faster path)
but we should fix that. The native code returns an array which ResourceBundle
stuffs into a Hashtable and the calling code accesses via hash table lookups.
This despite the fact that the keys are a small fixed set known in advance.
We could make the native layer and the calling layer simpler and faster by
using a "struct", and doing so would make the middle layer go away completely.
til/Calendar.java
til/Currency.java
til/Locale.java
ccb052344fadac2153c1ec998eb70a8dc41c8da1 20-Dec-2009 Elliott Hughes <enh@google.com> Fix Long.toBinaryString, Long.toHexString, and Long.toOctalString for negative values.

Although (int) -1 == (long) -1, Integer.toXString produces a shorter result than
Long.toXString should.
ang/Long.java
cf85c7a465d494ba9f56fb3b5b6d57c7fbbb1798 18-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I1e941570

* changes:
Depessimize string conversions.
f787a8787d0b7bcdc178ffc2e3343f1c1b02ed30 18-Dec-2009 Elliott Hughes <enh@google.com> Depessimize string conversions.

Why does this idiom persist? It's ugly, and it's the least efficient way to do
it. (I found the ones in DecimalFormatSymbols while invesigating why
"new SimpleDateFormat()" burns through so many StringBuilders. grep(1) found
the rest.)

The DocumentBuilderImpl removes an unnecessary level of indirection, since we
implement Character.toString in terms of String.valueOf. (I wouldn't have
bothered except this was the only use of Character.toString in the core
libraries, and I added it myself a few weeks ago.)
til/Date.java
386ddaf3659003b7188188b5d9af6cc95c61254f 18-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I60383632

* changes:
Update luni package to Harmony r888752.
4c2b8db255a9225079f5a1a942b76be1c242b7a7 17-Dec-2009 Elliott Hughes <enh@google.com> Improve our java.util.Locale documentation.

Bug: http://code.google.com/p/android/issues/detail?id=5476
til/Locale.java
c93e26215cff24bc8c234b1b9268b03075e44ce4 17-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Ice913bbd

* changes:
Make java.lang.Character fast.
c574d81e3de6cb92cf68bd44f7e50ac52fe2fd87 17-Dec-2009 Elliott Hughes <enh@google.com> Make java.lang.Character fast.

This patch reinstates some of the upstream ASCII fast paths, adds some new
ones, and forwards all char overloads to the int methods (placing the fast
paths in the int overload), so using the int overload isn't automatically
3x slower than the char overload even for the same characters.

See the bug for benchmark results. The ASCII speedups are between 2x and 4x.

Bug: 2295801
ang/Character.java
9e13cc8ad982ba191400889bb8e5248a1933d45e 17-Dec-2009 Joshua Bloch <jjb@google.com> Fixed a bug int the new version of Long.reverse introduce in change Id6bd7c81.
The corresponding code in Hacker's Delight is written in C, which supports
unsigned numbers. In Java, it's essential to use explicit unsigned shifts,
but I neglected to do so. This bug was caught by jtreg test
java.lang.Long.BitTwiddle (which I wrote in 2003). This preexisting
test serves as the regression test for this change.
ang/Long.java
c54a98f8a987a2ac35f3523b1dbe43588b1cc773 16-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Id6bd7c81

* changes:
Rewrote all the toString and bit twiddling code in Integer and Long using state-of-the-art recipes. The resulting code is much faster than what it replaced, as well as being more concise. While I was in the neighborhood I also cleaned up a few other things in the boxed primitives (TYPE fields, small-value caches, etc.).
55392539fea537abfb6581b474918f9d611fba27 16-Dec-2009 Jesse Wilson <jessewilson@google.com> Update luni package to Harmony r888752.

Conflicts:
libcore/luni/META-INF/MANIFEST.MF
libcore/luni/make/findbugs-exclude-filter.xml
libcore/luni/src/main/java/java/io/BufferedOutputStream.java
libcore/luni/src/main/java/java/io/BufferedReader.java
libcore/luni/src/main/java/java/io/CharArrayReader.java
libcore/luni/src/main/java/java/io/StringReader.java
libcore/luni/src/main/java/java/lang/StrictMath.java
libcore/luni/src/main/java/java/lang/ref/ReferenceQueue.java
libcore/luni/src/main/java/java/net/Inet4Address.java
libcore/luni/src/main/java/java/net/InetAddress.java
libcore/luni/src/main/java/java/util/ArrayList.java
libcore/luni/src/main/java/java/util/EnumSet.java
libcore/luni/src/main/java/java/util/HugeEnumSet.java
libcore/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyConstantPool.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IPlatformConstants.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/util/InputStreamExposer.java
libcore/luni/src/main/native/hyzip/shared/zipcache.c
libcore/luni/src/main/native/hyzip/shared/zipsup.c
libcore/luni/src/main/native/include/jni.h
libcore/luni/src/main/native/include/jni_types.h
libcore/luni/src/main/native/include/jvmti.h
libcore/luni/src/main/native/include/jvmti_types.h
libcore/luni/src/main/native/launcher/unix/main_hlp.c
libcore/luni/src/main/native/luni/shared/OSNetworkSystem.c
libcore/luni/src/main/native/luni/shared/file.c
libcore/luni/src/main/native/luni/windows/makefile
libcore/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/UnixFileTest.java
libcore/luni/src/test/java/tests/api/java/io/BufferedOutputStreamTest.java
libcore/luni/src/test/java/tests/api/java/io/BufferedReaderTest.java
libcore/luni/src/test/java/tests/api/java/io/SerializationStressTest.java
libcore/luni/src/test/java/tests/api/java/net/SocketTest.java
libcore/luni/src/test/java/tests/api/java/util/ArrayListTest.java
libcore/luni/src/test/java/tests/api/java/util/EnumSetTest.java
libcore/luni/src/test/java/tests/api/java/util/TimerTest.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/CharArrayReader.java
o/FilterOutputStream.java
o/InputStreamReader.java
o/LineNumberReader.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PrintStream.java
o/PrintWriter.java
o/StringReader.java
o/Writer.java
ang/StrictMath.java
et/DatagramPacket.java
et/DatagramSocket.java
et/InetAddress.java
et/ServerSocket.java
et/SocketPermission.java
et/URL.java
et/URLConnection.java
et/URLEncoder.java
et/URLStreamHandler.java
til/AbstractMap.java
til/AbstractSet.java
til/Collections.java
til/EnumSet.java
til/HugeEnumSet.java
til/MiniEnumSet.java
til/Stack.java
til/Timer.java
til/TreeMap.java
til/TreeSet.java
726ac583d69b37db03c6279af5b36df7b837ede1 15-Dec-2009 Joshua Bloch <jjb@google.com> Rewrote all the toString and bit twiddling code in Integer and Long using
state-of-the-art recipes. The resulting code is much faster than what it
replaced, as well as being more concise. While I was in the neighborhood
I also cleaned up a few other things in the boxed primitives (TYPE fields,
small-value caches, etc.).

Addressed review comments.
ang/Boolean.java
ang/Byte.java
ang/Character.java
ang/Double.java
ang/Float.java
ang/Integer.java
ang/Long.java
ang/Short.java
f226fd4060db45a0738cbbc1bb49bebe5963ac11 10-Dec-2009 Elliott Hughes <enh@google.com> More java.io.File cleanup.

Make File.list (and friends) cost one JNI call instead of four,
and move the conversion of UTF-8 byte sequences into the JNI, so
it returns String[] instead of byte[][].

Switch to readdir_r(3) so we don't need the JNI to be "static
synchronized".

Remove fixed-length buffers from the native code.

Fix leaks by introducing a "proper" native container (similar to
std::forward_list). We should still investigate either using
std::vector or passing in an ArrayList<String> and using JNI to
call ArrayList.add, but this is a step forward from the old
code anyway.

Bug: 2281992
o/File.java
a1e5d8a2c1594f7a6ed8aca6e82b106ec8ce79d6 09-Dec-2009 Elliott Hughes <enh@google.com> Fix java.util.Formatter formatting of -0.0.

The active ingredient here is the two changes to stop comparing longValue
with doubleValue and formatting the long if the two compare equal. This
causes us to lose the sign of 0 (because there's no long -0, but -0.0d == 0).
Instead, we explicitly test for boxed Double and Float arguments (because
the number of integral types is larger, they get the "else" clause).

The other changes are just minor cosmetic changes made as I followed the code.

Bug found by jtreg, so no new test.
til/Formatter.java
932be7210341cec0742f00de7068e31902ae1636 08-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I8cdf9790

* changes:
Take Locale into account in java.util.Formatter uppercase conversions.
1f7da4ea71ba7423dc62ea7a8ff52482cc9fd4e8 08-Dec-2009 Elliott Hughes <enh@google.com> Take Locale into account in java.util.Formatter uppercase conversions.

(This is an RI incompatibility, but Sun accepts that the RI's behavior is a
bug.)

Bug: 2301938
til/Formatter.java
0af4ef265f1e67edfcc5e34bcb68ee42a791beef 06-Dec-2009 Elliott Hughes <enh@google.com> More java.io.File cleanup.

Remove the duplication between the various list and listFiles methods.
This also makes the variants that take a filter no less efficient than
those that don't, for the special case of the null filter.

The upstream code sometimes assumed returned filenames were UTF-8, and
at other times assumed returned filenames were in the platform encoding.
The new code always uses UTF-8, to match filenames sent to the operating
system, which were and are always sent as UTF-8 byte sequences.

This patch does not alter the native listImpl method. That's for the
next patch.

A couple of unrelated cosmetic changes have been made in this patch:
declarations of native methods have been moved next to the methods
they implement, and a minor simplification has been made to the
documentation of isAbsolute.

Bug: 2281992
o/File.java
9244d201851360f6ebfa95647a9f23caf8a34cd1 06-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I76f1dbe7

* changes:
More java.io.File cleanup.
070f14c41b2494fd008afc4d96b873873692945f 05-Dec-2009 Elliott Hughes <enh@google.com> More java.io.File cleanup.

Mostly cosmetic: improve documentation, factor out the code to join two
strings into a path, put fields in canonical order, defer to String (which
might be able to perform optimizations we can't), simplify the path
cleaning code.

Also remove more unused Windows support (since our File is already totally
broken on Windows anyway).

Bug: 2281992
o/File.java
dc30337534e7970bb5b8cfbcb3c2b7f75d818795 05-Dec-2009 Elliott Hughes <enh@google.com> Improve TimeZone documentation.

We can't do anything about the RI's unfortunate choice of method names,
but improving our documentation might help reduce the confusion they
cause.

Bug: 2244560
til/TimeZone.java
b7a82cf4a81de20455670855e2a9974a16102a52 05-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I97af6ec8

* changes:
More java.io.File cleanup.
93a4b2a6cc35a72aa5a58027025f3e18c0ec2e64 05-Dec-2009 Elliott Hughes <enh@google.com> More java.io.File cleanup.

Two changes:

1. Change the createNewFile JNI to match the Java interface, so we can lose the
glue. (Also make the Java/JNI names match, and sort the table of native method
names alphabetically.)

2. Fix the caching of the path byte sequence so we're caching the exact byte
sequence we want to hand to JNI. Also switch to caching the byte[] at
construction time, rather than hiding it behind an accessor.

There's a deliberate functional change here too: previously we were inconsistent
about which encoding was in use. Sometimes it was explicitly UTF-8, other times
the default platform encoding (which happens to be UTF-8 on Android). Now we
always use UTF-8. (But note that the File.list methods, which I haven't got to
yet, still return a mix of UTF-8 and platform-encoded strings.)

Bug: 2281992
o/File.java
o/FileInputStream.java
o/FileOutputStream.java
o/RandomAccessFile.java
bbf2a4b56f779b2c943862bb8c27d436a1e3b1ca 04-Dec-2009 Elliott Hughes <enh@google.com> Fix two trivial Formatter bugs (found by jtreg).

jtreg complains that we allow "%<%" and "%<n". This patch disallows
the special "last argument" case to conversions that don't take
arguments.

We also reject explicitly-numbered arguments such as "%123$n" or
"%123$%" (whether or not a corresponding argument was provided) though
the RI ignores such errors. I've modified the harmony tests to stop
passing unused argument indexes to %n and %%.

This fixes about 80 jtreg complaints (the java/util/Formatter/Basic test is
generated by shell script and seems to accidentally repeat many of the same
tests over and over).

This patch also includes a little more tidying for readability, but
no other functional changes.
til/Formatter.java
9c4c0a1fa859879e1e8a2303fcef89e5d3ab4720 04-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I6d8a640c

* changes:
Make java.util.Formatter perform acceptably (and fix two jtreg failures).
9a501d6cb2a26c3b5d77497826ea33481716ab2d 02-Dec-2009 Elliott Hughes <enh@google.com> Make java.util.Formatter perform acceptably (and fix two jtreg failures).

Here are the slowdowns compared to hand-written StringBuilder.append code,
for three cases: a long format string with no format specifiers, a long
format string with a single %d, and a long format string with a
single %s (in that order):

passion-old: 54x 40x 10x
sim-new: 1.7x 3.4x 5.3x
passion-new: 9.2x 2.2x 1.8x

Formatter has been changed to use a less expensive mechanism for parsing
the format string, to not create expensive temporary objects unless they're
actually needed (particularly strings used only in error messages), to not
create a temporary StringBuilder in every transform* method, and to not
charge for padding (or truncation) unless actually required.

As Stroustrup would say, "you don't pay for what you don't use".

Other changes:

AbstractStringBuilder adds a special case for appending one StringBuilder to
another, similar to its existing special case for String (because we do a
much better job of copying a char[] with System.arraycopy than iterating over
a CharSequence).

Character reinstates the ASCII-range optimizations for isDigit and
isUpperCase, both of which are used by Formatter. Bug 2295801 covers
reinstating the rest of Character's special cases.

String loses the unused inner class ConsolePrintStream, which isn't actually
relevant to this change, but offended me greatly.

CharBuffer gets a rewritten toString that's less inefficient. (This doesn't
matter to us because the new Formatter doesn't use CharBuffer, but one
shouldn't leave broken glass on the lawn.)

The change to Formatter.close fixes a jtreg failure (and brings our
implementation in line with our documentation, which already stated that
multiple calls to Formatter.close only close the underlying Closeable
once).

The change to Formatter.format(Locale, ...) fixes a jtreg failure: any
Formattable we call out to needs to be able to use Formatter.locale to
find out the locale it's formatting for. I've reworded the documentation
so that it's clearer (it was already correct, but ambiguous).

Bug: 2272346
ang/AbstractStringBuilder.java
ang/Character.java
ang/String.java
til/Formatter.java
e693c3d04e1ab4f7d66e9a39e4698150749d2195 01-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I47b9b7f9

* changes:
DPQ Comment cleanup (and a few very minor code changes)
7d6b0007041b192e33858c38d099561237264cb0 01-Dec-2009 Joshua Bloch <jjb@google.com> Replaced all versions of binarySearch with better versions.
For float[] and double[], the new versions should run significantly faster than the old.
Removed some obsolete helper methods.
til/Arrays.java
ef487e8906482e62f90487639ea3d6f4a565b564 01-Dec-2009 Joshua Bloch <jjb@google.com> DPQ Comment cleanup (and a few very minor code changes)
til/DualPivotQuicksort.java
c5c9c667028146ab5f5e446c44f911c2fdd7dd30 30-Nov-2009 Elliott Hughes <enh@google.com> More java.io.File improvements.

Three themes to this change: not making unnecessary native calls (like the
pointless "exists" check in canWrite), being consistent in our
treatment of the empty path, and removing unnecessary cruft from the native
code.

I'm sure there must be a better implementation for handling the empty
path (the few methods for which it *isn't* invalid should be the special
cases, not every single method), but in this patch I'm just interested
in correctness.

With this patch, we pass the jtreg empty path test (which we previously
failed) and we pass my more complete test (added to FileTest.java in this
patch).

Bug: 2281992
o/File.java
87415b1521402398d4470aecbef7c126a6948290 26-Nov-2009 Elliott Hughes <enh@google.com> Fix File.isHidden and File.listRoots.

Not only were the old implementations of these methods over-complicated, they
were both incorrect. We now pass all our existing tests plus the jtreg tests.

Bug: 2281992
o/File.java
1072631d16a5e5ffd97ae346e20dcd112df9dc13 24-Nov-2009 Jesse Wilson <jessewilson@google.com> A few notes on why we don't cache canonical paths.
o/File.java
fb917ba71e0440774660ba18a6725612c7ed79c5 24-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I9189bd9d

* changes:
Fix java.io.File's JNI's fixed-length buffers.
1326cfc6f105f6c8fd5ffd83793223e1a797409d 21-Nov-2009 Elliott Hughes <enh@google.com> Fix java.io.File's JNI's fixed-length buffers.

I've also removed most of the duplication, simplified a lot of the
implementation, and added loads of TODOs now it's possible to see
what's going on under all the obfuscation. (The native code is
roughly half its previous size, but more functional.)

I want to stop here rather than start fixing any of the TODOs
because this change is already large enough and the history will
be clearer if unrelated changes are kept separate (easy though many
of them are).

Strictly speaking, I haven't removed all the fixed-length buffers:
the File.list implementation still uses fixed-length buffers, but
as the new TODOs point out, I think we want to rewrite that code
to better match its callers, and doing so will make the fixed-length
buffers go away. There's no point polishing code that's already
scheduled for deletion.

Add a couple of basic tests, one that assumes that if Path copes
with long paths in a couple of File's methods, it works in all of
them; another that singles out our readlink(2) wrapper because
that's the only place so far where we cope with arbitrary-length
paths moving in the opposite direction (from kernel to JNI to Java).
o/File.java
820172a7b862b4fa8c87684c7f16b08fbdf523cd 24-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I4bd6f817

* changes:
Replaced primitive sorts with Iaroslavski, Bentley, and Bloch's Dual Pivot Quicksort. The originals were based on Bentley and McIlroy's "Engineering a Sort Function." The original floating point sorts suffered from poor performance due to the use of a naive comparison function. In round numbers, the new version is 1.5x as fast as the old one on integers and twice as fast on floating point numbers (on the latest Android build running on Sholes). On some data sets (e.g., nearly sorted data, the new version is substantially faster.
2626284e3b8aa00ac87146a324854bbd40f0726f 12-Nov-2009 Joshua Bloch <jjb@google.com> Replaced primitive sorts with Iaroslavski, Bentley, and Bloch's Dual Pivot Quicksort.
The originals were based on Bentley and McIlroy's "Engineering a Sort Function."
The original floating point sorts suffered from poor performance due to the use
of a naive comparison function. In round numbers, the new version is 1.5x as fast
as the old one on integers and twice as fast on floating point numbers (on the
latest Android build running on Sholes). On some data sets (e.g., nearly sorted data,
the new version is substantially faster.

Now, with added performance tweaks from Jesse and Bob!! With these tweaks, the sort
is 70% faster than the original sort on integers and over twice as fast on doubles.
None of the optimizations are Dalvik-specific, and we may be able to make it even
faster by adding Dalvik-specific optimizations.

Also added beefier tests.
til/Arrays.java
til/DualPivotQuicksort.java
d2c1275661bbebbbb3fae30b6359f71f2628c4b3 21-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I9fa3ef2c

* changes:
Rewrite NetworkInterface's JNI for IPv6.
e004690c9eb948e9276aa9d4bb92d98f22bc879f 21-Nov-2009 Dan Egnor <egnor@google.com> am 070dbac8: am 0dfef7bc: Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects

Merge commit '070dbac882856834111bc0e766224ee53c8d5471'

* commit '070dbac882856834111bc0e766224ee53c8d5471':
Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects
ff30d8c3c306d660a58a9bad60e7256d372bc6e8 21-Nov-2009 Dan Egnor <egnor@google.com> Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects
til/Formatter.java
b5fc5ecd3fe5315fc2756c0c25adc458cc8c8d91 20-Nov-2009 Elliott Hughes <enh@google.com> Rewrite NetworkInterface's JNI for IPv6.

The old ioctl SIOCGIFCONF implementation of getNetworkInterfaces only returns
IPv4 addresses. Now we've switched everything over to IPv6, that's not good
enough. This change (a) implements glibc/BSD-like getifaddrs(3)/freeifaddrs(3)
for Android, and (b) rewrites our getNetworkInterfaces to use that method. Of
particular note is that we now do more of the work in Java. The JNI hands back
a Java equivalent of getifaddrs(3)'s linked list of ifaddrs structs. The new
package-private java.net.InterfaceAddress class serves as Java's "struct
ifaddrs".

The old implementation was also broken: SIOCGIFCONF doesn't actually return
interface indexes from the kernel as the old code believed, so we were
pulling the address family out of the IPv4 address it returned, leading
us to assign the index 2 to all network interfaces. This caused all kinds of
weird behavior later.

I also had to fix GenericIPMreq so that its interface index field is actually
set. The native code gets passed one of these objects when setNetworkInterface
is called, so it's kind of important that the object identify which interface
it's supposed to correspond to.

I've also added missing copyright headers.

This fixes all of the harmony tests on the simulator and on the device. It
fixes several but not all of the jtreg MulticastSocket and IPv6 tests.
et/InterfaceAddress.java
et/NetworkInterface.java
d5011e8caf816d71ac85243e3c5f6343e362236c 18-Nov-2009 Dan Egnor <egnor@google.com> am 50f82ad4: am 08e0023c: Merge change I42d17725 into eclair-mr2

Merge commit '50f82ad4f2c4047382029560fd09d1907518adc8'

* commit '50f82ad4f2c4047382029560fd09d1907518adc8':
Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
84a0540c3925ef1e48ea3ef310db76adce1246fa 18-Nov-2009 Dan Egnor <egnor@google.com> Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
so they can be reused between multiple instances of Formatter on the
same thread. This speeds up my unscientific benchmark (a number of
printouts involved in a debugging diagnostics output) by 3x, and
should have a similar impact on anyone who uses String.format(),
PrintWriter.format(), and the like.
til/Formatter.java
3cc642cb0627dd99441bf90f72054de81a5948cf 22-Sep-2009 Elliott Hughes <enh@google.com> Fix Formatter.format's handling of Formattable.

This doesn't make much difference to performance, but it is
slightly faster and I think it reads better too. Proof of the
latter is the fact that the rewritten form accidentally fixed
bug 1767: the old code was storing up literal text until after
handling the next format specifier, which is wrong if the
format specifier has side effects caused by the use of
Formattable.

(I don't plan on doing any more on the performance bug for now,
though I note that %g allocates and manipulates BigDecimal
instances, which would be worth looking at when we get round to
the bug that causes it to fail a harmony test.)

Bug: 1476, 1767
til/Formatter.java
c707cc4edeee6a6bf62a8da4d6d223ae61025dd9 21-Sep-2009 Elliott Hughes <enh@google.com> Consistently use Formatter's cached NumberFormat.

%f is a lot more expensive than it should be because we're not using the cached
NumberFormat (as we are for %d). Running the microbenchmark I added to the
bug (times in ms, on a Cortex A8):

old new
new Formatter %f 1732 811
String.format %d 635 651
String.format %f 1752 900
reuse Formatter %f 1521 188
Double.toString + 149 148
Double.toString append 33 33
StringBuilder.append 143 139

Bug: 1476
til/Formatter.java
7861ea9a813b337a4abd0378584baae9cc177896 12-Nov-2009 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.oneTimeInitialization.

Do this work at JNI registration time, as we do for almost everything else.
(I did this to rule out a warning from the dalvikvm deadlock prediction
code, which doesn't like the unusual lock ordering at initialization time,
and although it didn't make any difference to that, I prefer to have a
defined static order of initialization.)
et/DatagramSocket.java
et/ServerSocket.java
et/Socket.java
d15a2c34e554c7180936ee0325b414a47a6cca0b 03-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Ie098e2fa

* changes:
Fixing PipedWriters/PipedOutputStreams silent failures during close().
da1bdbd09a1f6c394fa9d4210de9db0b570ac1fd 02-Nov-2009 Jesse Wilson <jessewilson@google.com> Fixing PipedWriters/PipedOutputStreams silent failures during close().

See bug 2224903 and jtreg test java.io.BufferedWriter.Cleanup.
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
82a2dfcd2281c2f8042fd5f09c98bea1e728530f 30-Oct-2009 Jesse Wilson <jessewilson@google.com> Fixing 1 of the 4 BufferedReader test failures in bug 2224903.

This CL includes the following functional changes:
- changing read to not clear the mark upon reading EOF
- changing read(char[], int, int) to use the 'read
directly from the source stream' shortcut when the
mark has exceeded its limit. Previously we took the
shortcut only when the mark was unset.

And these nonfunctional changes
- rewrote read(char[], int, int) dramatically. The new
revision contains only one call to 'System.arrayCopy'
and the related bookkeeping. Previously there was one call
before the loop, and another call in the loop.
- renamed markpos to mark
- renamed marklimit to markLimit
- renamed count to end (it isn't a count, it's a position)
- simplifying conditions that used >= when > was impossible
- reducing the number of field reads where convenient
o/BufferedReader.java
1805727c24b2b80161fef93c4b7742cf2322bdea 27-Oct-2009 Elliott Hughes <enh@google.com> Implement ProcessBuilder.redirectErrorStream.

Also simplify and correct the security to ensure that the user can't modify
the command to be executed after the SecurityManager has approved it.

Bug: 2180063
ang/ProcessBuilder.java
08091cfcf0fd89cb0021718d56501535b57a90e2 20-Oct-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I7cc0fe4d

* changes:
rightsize StringBuilders for arrays; see bug 2135223
4030ad60f305d1f23e9b681dca7a181ab4f09276 20-Oct-2009 Jesse Wilson <jessewilson@google.com> Removing caching of file canonical path caching, and fixing NIO tests.

I checked in some regressions in the NIO test cases with the NIO patch;
this addresses those problems.
o/File.java
388ae438a01d2de1e0f9c6a95ab5ad71e5e21f60 19-Oct-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I1f575e9e

* changes:
Improve error handling in InetAddress native code.
fc354fea0c535ceef679e8856a73dd05be8351df 17-Oct-2009 Elliott Hughes <enh@google.com> Improve error handling in InetAddress native code.

Fix a bug where we changed the return values of functions such
as byteArrayToSocketAddress without changing the logic in the
callers that's supposed to distinguish success and failure.
For simplicity, I've switch all of these functions over to
returning bool, and I've gone through all the callers to ensure
we're using the right check now. (This is the majority of the
diff.)

Also switch to throwing IllegalArgumentException instead of SocketException
when we find ourselves with a bad byte[] --- before we were throwing
a checked exception we weren't allowed to (from native code, which
can't actually be checked statically) and then trying to cover up
in Java.

I've also simply removed one case where we were trying to mask an
OutOfMemoryError with a SocketException.

I also removed dead code in socketAddressToString: this function's
sole caller always passed false for withPort. This makes the
temporary variable and the copying (which was unsafe) unnecessary.

In instances where I was already changing the code, I've removed
bogus "handle == 0" failures, but I'll come back and remove all
the other instances in another patch.

Since I was in connectSocketImpl, I've removed the dead second half
of that method.
et/InetAddress.java
9fa1c846e67286c6cd0030ebb455841a4a893540 16-Oct-2009 Jesse Wilson <jessewilson@google.com> rightsize StringBuilders for arrays; see bug 2135223
til/Arrays.java
1c422fc0ab0692e10a05af6f48c6276c4dad4bea 16-Oct-2009 Jesse Wilson <jessewilson@google.com> Respond to impossible CloneNotSupportedExceptions with AssertionErrors.

See bug 2183132.
til/BitSet.java
til/Calendar.java
til/Date.java
til/EnumMap.java
til/EnumSet.java
til/HashSet.java
til/IdentityHashMap.java
til/LinkedList.java
til/Locale.java
til/MapEntry.java
til/TimeZone.java
til/TreeMap.java
til/TreeSet.java
til/Vector.java
5839b909d9528b7726e678a4b696ed37df15d897 10-Oct-2009 Jesse Wilson <jessewilson@google.com> Udating luni to Harmony r823222.

Highlights:
- InputStream.skip concurrency issue
- "better" messages in bound exceptions for streams and arrays
- prefer fewer writes to underlying streams (using byte[] buffers)
- Rename subclasses to not reuse names from their superclasses
- PlatformAddressFactory.allocMap bugfix

Plus some spelling fixes, style fixes, serial version UIDs and other
boilerplate improvements.
o/BufferedOutputStream.java
o/CharArrayReader.java
o/DataOutputStream.java
o/EmulatedFieldsForDumping.java
o/File.java
o/FileInputStream.java
o/FilterOutputStream.java
o/InputStream.java
o/LineNumberInputStream.java
o/NotSerializableException.java
o/ObjectInputStream.java
o/ObjectOutputStream.java
o/PrintStream.java
o/PushbackInputStream.java
o/PushbackReader.java
o/StringBufferInputStream.java
o/StringReader.java
ang/AbstractStringBuilder.java
ang/ArrayIndexOutOfBoundsException.java
ang/Enum.java
ang/Integer.java
ang/Math.java
ang/SecurityManager.java
et/DatagramSocketImpl.java
et/InetAddress.java
et/JarURLConnection.java
et/NetworkInterface.java
et/SocketAddress.java
et/URL.java
et/URLClassLoader.java
til/Arrays.java
til/Collection.java
til/Collections.java
til/Formatter.java
til/GregorianCalendar.java
til/Locale.java
til/Scanner.java
til/UnknownFormatFlagsException.java
7fb15841fb9efbdf924be69f1a585c4868c527ac 09-Oct-2009 Dan Bornstein <danfuzz@android.com> Fix the docs for the no-arg Random() constructor to better reflect reality,
and make the constructors more resilient with respect to subclassing by
using System.identityHashCode() instead of Object.hashCode(), and also by
not calling overridable methods.

Change-Id: I6239d93bb46876ef1c4a5e155a6dc1ac6fab4eae
til/Random.java
128041b19c25037bb6b60830c0d53f11a1b3f77e 01-Oct-2009 Jesse Wilson <jessewilson@google.com> am a20c6d23: am b5b7f4ba: Merge change I9899be9d into eclair

Merge commit 'a20c6d2347224d89dced471e61a36610699b7e71'

* commit 'a20c6d2347224d89dced471e61a36610699b7e71':
Fixing a Harmony regression in ObjectInputStream.
109fc1115e7afd2907544b805eaa2cc8a0e2635f 01-Oct-2009 Elliott Hughes <enh@google.com> Simplify FileInputStream.skip to match the RI.

The RI throws IOException on any non-seekable stream, including stdin.
This patch removes harmony's special-case hack for stdin, and the native
cruft that wasn't even necessary if you did want a special hack for
stdin.

Bug: 1542253
o/FileInputStream.java
655cccb8a5447bfd6f3369d545870930a5f14b10 30-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I9899be9d into eclair

* changes:
Fixing a Harmony regression in ObjectInputStream.
5905afbf06aa390d6e580d75f3e1419f9cf67472 30-Sep-2009 Jesse Wilson <jessewilson@google.com> Fixing a Harmony regression in ObjectInputStream.

We check the field type against the instance being
populated and not the field descriptor on the wire.
The root cause is a bug in Harmony which we should
send upstream.
o/ObjectInputStream.java
e8596906d75fd8ccda31600d71ad56391cd7cd3a 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Manual merge of change I3665f82b into master.
et/InetAddress.java
7de2d41b95fc968b0ccc530c28d66f003ff9ab2a 21-Sep-2009 Joshua Bloch <jjb@google.com> Replace existing ArrayList implementation with faster, simpler one.
til/ArrayList.java
e175af7bae1c6bd254471b2503a8e01c68f4ed27 26-Sep-2009 Jesse Wilson <jessewilson@google.com> DO NOT MERGE: Cleaning up PipedInputStream
o/PipedInputStream.java
f05f05786703045d75dc1366c2b1e3eb5ee27cf1 23-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 26453

* changes:
Fix Formatter.format's handling of Formattable.
d8f217f6b2ef6201a6db0652bad2e9435d3bf9fd 23-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 26285 into eclair

* changes:
Use native code to convert strings to IP addresses.
7356e5631e05b8b31d22a7e303bdef8b1221b065 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Use native code to convert strings to IP addresses.

1. Add an ipStringToByteArray method to the OSNetworkSystem interface and
provide a native implementation for it.
2. Change InetAddress to use the new method.
3. Remove a mid-sized chunk of Inet6Util, which is now redundant.
4. Remove the KnownFailure annotations from the InetAddress, InetAddress and
Inet6Address tests that expected 1.2.3, 1.3 and 3 to be valid IPv4
addresses. These tests now pass again.
5. Removed an unused native method.
6. Added a comment to the top of the native socket implementation to the effect
that the file is significantly different from harmony.

Change-Id: I3665f82b00ebc089e9133cc6166dda5a99fa10e4
et/InetAddress.java
ced76a9b276a0f120c2226855c4c704b2074ec5b 22-Sep-2009 Elliott Hughes <enh@google.com> Fix Formatter.format's handling of Formattable.

This doesn't make much difference to performance, but it is
slightly faster and I think it reads better too. Proof of the
latter is the fact that the rewritten form accidentally fixed
bug 1767: the old code was storing up literal text until after
handling the next format specifier, which is wrong if the
format specifier has side effects caused by the use of
Formattable.

(I don't plan on doing any more on the performance bug for now,
though I note that %g allocates and manipulates BigDecimal
instances, which would be worth looking at when we get round to
the bug that causes it to fail a harmony test.)

Bug: 1476, 1767
til/Formatter.java
ad1af8e17368582b24fd9e2b6e2b2578ab4d8829 22-Sep-2009 Joshua Bloch <jjb@google.com> am 4b8fbfe9: am 51ccfdb5: Merge change 26318 into eclair

Merge commit '4b8fbfe9f7dcd8cfa796f968b9feaadb3c72661c'

* commit '4b8fbfe9f7dcd8cfa796f968b9feaadb3c72661c':
Fixed LinkedHashMap bug 2121546
0e70fdb9bfb8bae59347f4e3a700db3603e14e04 22-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 26288

* changes:
Cleaning up PipedInputStream.
9483551bcc25e4df0a27d6548b54e1971fac9aea 21-Sep-2009 Joshua Bloch <jjb@google.com> Fixed LinkedHashMap bug 2121546
Also made minor improvements in LinkedHashMap and NegativeCache.
(The "opportunities for improvement" were discovered while investigating the bug.)
et/NegCacheElement.java
et/NegativeCache.java
til/HashMap.java
til/LinkedHashMap.java
801d4e3787d81f759514e99172cb762e38f8c808 22-Sep-2009 Jesse Wilson <jessewilson@google.com> Cleaning up PipedInputStream.

In particular, fixing a problem where the reader thread fails
as soon as the writer thread exists, even if there is data left
for the reader thread to read. Similarly, the writer fails fast
even when the buffer has space remaining.

Also fixing some concurrency issues by making readers and writers
release each other more aggressively.
o/PipedInputStream.java
a564e32377d6b926988fe67559f7550233a9845b 21-Sep-2009 Elliott Hughes <enh@google.com> Consistently use Formatter's cached NumberFormat.

%f is a lot more expensive than it should be because we're not using the cached
NumberFormat (as we are for %d). Running the microbenchmark I added to the
bug (times in ms, on a Cortex A8):

old new
new Formatter %f 1732 811
String.format %d 635 651
String.format %f 1752 900
reuse Formatter %f 1521 188
Double.toString + 149 148
Double.toString append 33 33
StringBuilder.append 143 139

Bug: 1476
til/Formatter.java
511ab05f7731dffa3480cbd0b79836b231f77ef6 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Manual merge of eclair change I26548922 into master.
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
ec67773c5d9bbdbff7e846ef28816a3870d4cac2 18-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Use native code to convert IP addresses to strings.

- Add a byteArrayToIpString method to the INetworkSystem interface and implement
it in native code
- Fix the native code so it does better error reporting
- Change InetAddress's getHostAddress, getHostName and getCanonicalHostName
methods to use it and remove the IPv4-only Java implementations
- Remove Inet6Util.createIPAddrStringFromByteArray
- Fix InetAddress so getByAddress(null) throws UnknownHostException instead of
NullPointerException for compatibility with the RI.

Change-Id: I26548922e9eed63b295173456183c4ab3ce20718
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
e39e41b1c09aa6e0f2db0ee68723bea28d7fd1d8 15-Sep-2009 Lorenzo Colitti <lorenzo@google.com> am 60195db6: am 9ccfb95e: Merge change 24723 into eclair

Merge commit '60195db609e4f5125e39348651d7a06ff807cc96'

* commit '60195db609e4f5125e39348651d7a06ff807cc96':
Remove code duplication in InetAddress.getByAddress.
55b49708e6a5f5f5047513b67094257b32ff9e93 11-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Remove code duplication in InetAddress.getByAddress.

Change-Id: Id2d72572fbe5b26ff4be9a2c959c41a48b859ea0
et/InetAddress.java
8d8cd4cc76b8a93d0de6bb83c85750c8c28ac171 03-Sep-2009 Jesse Wilson <jessewilson@google.com> do not merge: Josh's optimized HashMap and Hashtable

This commit squashes two changes from master. The only
additional change is that I've added "implements Map<K, V>"
to the signature of HashMap, which is necessary until we
get Josh's Apicheck fix in the master branch.

commit 5483e8adebc09b7bc58eb568793868388c240116
Author: Joshua Bloch <jjb@google.com>
Date: Mon Aug 31 17:55:19 2009 -0700

Replaced existing Hashtable implementation with fast one.

commit 90dbc304086ba1f6f51ed0d0b3a7368cc0fd46cb
Author: Joshua Bloch <jjb@google.com>
Date: Thu Aug 20 17:34:39 2009 -0700

Replace existing HashMap and LinkedHashMap with faster versions.
Among other optimizations, the new versions do no division and
use a high-quality defensive hash function to minimize the odds
of poor key distribution among buckets. Third time's a charm.
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/LinkedHashMap.java
fe5caf7124432a5b5e0c9a8dfb8dea80b909f7f1 03-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 23384

* changes:
Replaced existing Hashtable implementation with fast one.
a7ba9cd1eb59536b2c5092bf60397d003297e053 02-Sep-2009 Lorenzo Colitti <lorenzo@google.com> am 0f45017c: am 94e11fc4: InetAddress refactoring.

Merge commit '0f45017ce76906ed4c43b60a4538607e5171294f'

* commit '0f45017ce76906ed4c43b60a4538607e5171294f':
InetAddress refactoring.
c0a4d9b35cbdd33dcc8e6a78a829573f0ed9bf6d 01-Sep-2009 Joshua Bloch <jjb@google.com> Replaced existing Hashtable implementation with fast one.
til/HashMap.java
til/Hashtable.java
til/LinkedHashMap.java
051128862ae7c5c031b8ddb763848ed264a63746 26-Aug-2009 Lorenzo Colitti <lorenzo@google.com> InetAddress refactoring.

1. Refactor all protocol-specific methods from InetAddress into Inet[46]Address.
2. Move all protocol-specific constants from InetAddress into Inet[46]Address.

This change should have no effect on the stack's behaviour but makes it easy to
find parts of the code that still have dependencies on IPv4 so they can be
examined and fixed.

Change-Id: I70860ee04cf7c01bffaa35c8c64199f69d99826f
et/DatagramSocket.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/MulticastSocket.java
et/ServerSocket.java
et/Socket.java
bcde70337cc97ec09b70138acd164aede3910729 27-Aug-2009 Lorenzo Colitti <lorenzo@google.com> am 3a9a1a10: Merge change 22845 into eclair

Merge commit '3a9a1a10d85e7c26293ac8ea95de70763b9c317f'

* commit '3a9a1a10d85e7c26293ac8ea95de70763b9c317f':
IPv6 fixes to java.net.InetAddress.
8bd617c940d848591e88f3847365b06d5e64a854 27-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 22845 into eclair

* changes:
IPv6 fixes to java.net.InetAddress.
7d992a9cf08b3e702c959f3b9aa50840485a76cd 27-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 22193

* changes:
Replace existing HashMap and LinkedHashMap with faster versions. Among other optimizations, the new versions do no division and use a high-quality defensive hash function to minimize the odds of poor key distribution among buckets. Third time's a charm.
19ab821c3b1da5812590140a21ad9d551a3a3ec5 21-Aug-2009 Joshua Bloch <jjb@google.com> Replace existing HashMap and LinkedHashMap with faster versions.
Among other optimizations, the new versions do no division and
use a high-quality defensive hash function to minimize the odds
of poor key distribution among buckets. Third time's a charm.
til/HashMap.java
til/HashSet.java
til/LinkedHashMap.java
1b544a6111a1005e502559a6e5f269c8ecf4a53b 26-Aug-2009 Lorenzo Colitti <lorenzo@google.com> IPv6 fixes to java.net.InetAddress.

1. Make hashCode() do something that makes sense for IPv6 addresses.
2. Expand coverage of hashCode unit test.
3. Fix failing regression test for getAllByName().
4. Document that the getByName test is broken. I will fix it in a future change.
5. Expand test coverage of the isMulticastAddress test to include IPv6 and
non-multicast addresses.

All tests now pass.

Change-Id: I6f52c7c3213dd01bf773228b1ed5d44df813f877
et/Inet6Address.java
142d526f8bf90fb9bb63c637beb5299f39791f55 27-Aug-2009 Jesse Wilson <jessewilson@google.com> Update sql to Harmony 802921.

Notable changes
- ConnectionEvent field changed for serialization
- Date toString classes no longer use SimpleDateFormat
- Timestamp doesn't call through an overridable method in its constructor
- Timestamp now checks the String passed to valueOf() using a regex
- Properties now specifies a buffer size to avoid a user-inescapable warning

Squashed commit of the following:

commit dd9926cddda4db0227adbc174070791e5a9afa72
Merge: 8be3b27 4bed1fc
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 10:34:56 2009 -0700

Merge branch 'sql_802921' into sql_dalvik

Conflicts:
libcore/sql/.classpath
libcore/sql/META-INF/MANIFEST.MF
libcore/sql/build.xml
libcore/sql/src/main/java/java/sql/Array.java
libcore/sql/src/main/java/java/sql/BatchUpdateException.java
libcore/sql/src/main/java/java/sql/Blob.java
libcore/sql/src/main/java/java/sql/CallableStatement.java
libcore/sql/src/main/java/java/sql/Clob.java
libcore/sql/src/main/java/java/sql/Connection.java
libcore/sql/src/main/java/java/sql/DataTruncation.java
libcore/sql/src/main/java/java/sql/DatabaseMetaData.java
libcore/sql/src/main/java/java/sql/Date.java
libcore/sql/src/main/java/java/sql/Driver.java
libcore/sql/src/main/java/java/sql/DriverManager.java
libcore/sql/src/main/java/java/sql/DriverPropertyInfo.java
libcore/sql/src/main/java/java/sql/ParameterMetaData.java
libcore/sql/src/main/java/java/sql/PreparedStatement.java
libcore/sql/src/main/java/java/sql/Ref.java
libcore/sql/src/main/java/java/sql/ResultSet.java
libcore/sql/src/main/java/java/sql/ResultSetMetaData.java
libcore/sql/src/main/java/java/sql/SQLData.java
libcore/sql/src/main/java/java/sql/SQLException.java
libcore/sql/src/main/java/java/sql/SQLInput.java
libcore/sql/src/main/java/java/sql/SQLOutput.java
libcore/sql/src/main/java/java/sql/SQLPermission.java
libcore/sql/src/main/java/java/sql/SQLWarning.java
libcore/sql/src/main/java/java/sql/Savepoint.java
libcore/sql/src/main/java/java/sql/Statement.java
libcore/sql/src/main/java/java/sql/Struct.java
libcore/sql/src/main/java/java/sql/Time.java
libcore/sql/src/main/java/java/sql/Timestamp.java
libcore/sql/src/main/java/java/sql/Types.java
libcore/sql/src/main/java/javax/sql/ConnectionEvent.java
libcore/sql/src/main/java/javax/sql/ConnectionEventListener.java
libcore/sql/src/main/java/javax/sql/ConnectionPoolDataSource.java
libcore/sql/src/main/java/javax/sql/DataSource.java
libcore/sql/src/main/java/javax/sql/PooledConnection.java
libcore/sql/src/main/java/javax/sql/RowSet.java
libcore/sql/src/main/java/javax/sql/RowSetEvent.java
libcore/sql/src/main/java/javax/sql/RowSetInternal.java
libcore/sql/src/main/java/javax/sql/RowSetListener.java
libcore/sql/src/main/java/javax/sql/RowSetMetaData.java
libcore/sql/src/main/java/javax/sql/RowSetReader.java
libcore/sql/src/main/java/javax/sql/RowSetWriter.java
libcore/sql/src/main/java/javax/sql/rowset/BaseRowSet.java
libcore/sql/src/main/java/javax/sql/rowset/WebRowSet.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialClob.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialDatalink.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialException.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialJavaObject.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialRef.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialStruct.java
libcore/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java
libcore/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java
libcore/sql/src/main/java/javax/transaction/xa/XAException.java
libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DataTruncationTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DateTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverManagerTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverPropertyInfoTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ParameterMetaDataTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ResultSetMetaDataTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ResultSetTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLPermissionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLWarningTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/StatementTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_ClassLoader.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_DriverManager.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimeTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimestampTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TypesTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/ConnectionEventTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/BaseRowSetTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialClobTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialJavaObjectTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialRefTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialStructTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/InvalidTransactionExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/TransactionRequiredExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/TransactionRolledbackExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/xa/XAExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/xa/XAResourceTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/xa/XidTest.java

commit 8be3b27082122a5c5b650ad5aad6a70b45fd58d4
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 09:39:01 2009 -0700

Dalvik SQL

commit 4bed1fc3972b50198299137dc152d46dd9d5d532
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 09:38:11 2009 -0700

SQL 802921

commit 82f57ed5049955585aecfae659310b6bde3354d8
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 09:36:42 2009 -0700

SQL 527399
til/Properties.java
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.
o/BufferedReader.java
o/DataInputStream.java
o/File.java
o/PipedInputStream.java
o/PushbackInputStream.java
o/StreamTokenizer.java
ang/AbstractStringBuilder.java
ang/Math.java
ang/String.java
ang/reflect/Modifier.java
et/ServerSocket.java
et/SocketImpl.java
et/SocketPermission.java
et/URI.java
et/URIEncoderDecoder.java
et/URLClassLoader.java
et/URLConnection.java
et/URLEncoder.java
et/URLStreamHandler.java
til/AbstractList.java
til/ArrayList.java
til/BitSet.java
til/Calendar.java
til/Date.java
til/HashMap.java
til/Hashtable.java
til/IdentityHashMap.java
til/Locale.java
til/Properties.java
til/TimeZone.java
til/Timer.java
til/Vector.java
1f2d2815dc31bf3c464eec6d1de7e428d7f1dcf6 29-Jul-2009 Lorenzo Colitti <lorenzo@google.com> Try to connect to all the IP addresses of a host instead of just the first.
et/Socket.java
ca8f5b66c546d8545e41f71b6fb852424c681881 29-Jul-2009 Lorenzo Colitti <lorenzo@google.com> Store all IP addresses for a hostname instead of just one.
et/InetAddress.java
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
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/CharConversionException.java
o/Closeable.java
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/EOFException.java
o/EmulatedFields.java
o/Externalizable.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FileInputStream.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FilePermissionCollection.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/FilterWriter.java
o/Flushable.java
o/IOException.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputStream.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/Serializable.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
ang/AbstractMethodError.java
ang/AbstractStringBuilder.java
ang/Appendable.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/Boolean.java
ang/Byte.java
ang/CharSequence.java
ang/Character.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/ClassNotFoundException.java
ang/CloneNotSupportedException.java
ang/Comparable.java
ang/Deprecated.java
ang/Double.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Process.java
ang/ProcessBuilder.java
ang/Readable.java
ang/Runnable.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SecurityException.java
ang/SecurityManager.java
ang/Short.java
ang/StackOverflowError.java
ang/StrictMath.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/SuppressWarnings.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/ref/ReferenceQueue.java
ang/reflect/AnnotatedElement.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/Proxy.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ang/reflect/WildcardType.java
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ConnectException.java
et/ContentHandler.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NegCacheElement.java
et/NegativeCache.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketAddress.java
et/SocketException.java
et/SocketImpl.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketPermissionCollection.java
et/SocketTimeoutException.java
et/URI.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractQueue.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collection.java
til/Collections.java
til/Comparator.java
til/Currency.java
til/Date.java
til/Dictionary.java
til/DuplicateFormatFlagsException.java
til/EmptyStackException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MapEntry.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/Observable.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/RandomAccess.java
til/ResourceBundle.java
til/Scanner.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/Stack.java
til/StringTokenizer.java
til/TimeZone.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/TreeMap.java
til/TreeSet.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
d70537861937f700bb541eb65a659ff19d65232a 17-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 7487

* changes:
Fixed a tiny bug in TimSort that slightly affects performance on small arrays Martin Buchholz discovered this bug by running all tests with assertions enabled. That's the only way he could have discovered it, as it doesn't affect correctness:) The assertion that failed was the one at the head of countRunAndMakeAscending. The cause was that I called the method with (a, start, length) instead of (a, start, end).
30e58c2ae16137fc26a9ae916a92ddb0e9a6cc6b 16-Jul-2009 Joshua Bloch <jjb@google.com> Fixed a tiny bug in TimSort that slightly affects performance on small arrays
Martin Buchholz discovered this bug by running all tests with assertions
enabled. That's the only way he could have discovered it, as it doesn't
affect correctness:) The assertion that failed was the one at the head of
countRunAndMakeAscending. The cause was that I called the method with
(a, start, length) instead of (a, start, end).
til/ComparableTimSort.java
til/TimSort.java
283b3a99b7c7135db1d8a217629a76cf17ff0b7e 15-Jul-2009 Joshua Bloch <jjb@google.com> Fix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.
til/Arrays.java
21a8f1ff4c7728776f1af48c5057cfd6871bc917 12-Jun-2009 Jesse Wilson <jessewilson@google.com> Test and fix for the ArrayList.addAll(), bug 2954.
til/ArrayList.java
7e6b45e8a5674356e46765effc33ed00dc0b0f07 12-Jun-2009 Jesse Wilson <jessewilson@google.com> Test and fix for the ArrayList.addAll(), bug 2954.
til/ArrayList.java
43f11e509433970a5f33a6e5edd9b90089fa7d88 11-May-2009 Dan Bornstein <nobody@android.com> AI 148692: Merge change #148679 into Cupcake, since we probably want to
take it for rel if there's an opportunity. Original
description:
Fix InputStreamReader to not drop input on buffer boundaries.
This fix takes the salient code from Harmony tip-of-tree,
though it's not a wholesale replacement of the file. In
particular, I left in the old encoding name handling as well
as one remaining "FIXME" that I don't think would have been
addressed.
BUG=1836908

Automated import of CL 148692
o/InputStreamReader.java
ab28398a565e5ce8a56cdfd50ac6226e5317cf66 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
til/ComparableTimSort.java
til/TimSort.java
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/CharConversionException.java
o/Closeable.java
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/EOFException.java
o/EmulatedFields.java
o/EmulatedFieldsForDumping.java
o/EmulatedFieldsForLoading.java
o/Externalizable.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FileInputStream.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FilePermissionCollection.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/FilterWriter.java
o/Flushable.java
o/IOException.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputStream.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/Serializable.java
o/SerializablePermission.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
o/package.html
ang/AbstractMethodError.java
ang/AbstractStringBuilder.java
ang/Appendable.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/Boolean.java
ang/Byte.java
ang/CharSequence.java
ang/Character.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/ClassNotFoundException.java
ang/CloneNotSupportedException.java
ang/Cloneable.java
ang/Comparable.java
ang/Deprecated.java
ang/Double.java
ang/EmptyEnumeration.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Process.java
ang/ProcessBuilder.java
ang/Readable.java
ang/Runnable.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SecurityException.java
ang/SecurityManager.java
ang/Short.java
ang/StackOverflowError.java
ang/StrictMath.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/SuppressWarnings.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VMClassLoader.java
ang/VMThread.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/package.html
ang/ref/ReferenceQueue.java
ang/ref/package.html
ang/reflect/AnnotatedElement.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/Proxy.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ang/reflect/WildcardType.java
ang/reflect/package.html
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ConnectException.java
et/ContentHandler.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NegCacheElement.java
et/NegativeCache.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketAddress.java
et/SocketException.java
et/SocketImpl.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketPermissionCollection.java
et/SocketTimeoutException.java
et/URI.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
et/package.html
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractQueue.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collection.java
til/Collections.java
til/ComparableTimSort.java
til/Comparator.java
til/ConcurrentModificationException.java
til/Currency.java
til/Date.java
til/Dictionary.java
til/DuplicateFormatFlagsException.java
til/EmptyStackException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MapEntry.java
til/MiniEnumSet.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/NoSuchElementException.java
til/Observable.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/RandomAccess.java
til/ResourceBundle.java
til/Scanner.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/SpecialAccess.java
til/Stack.java
til/StringTokenizer.java
til/TimSort.java
til/TimeZone.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/TreeMap.java
til/TreeSet.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
til/package.html
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/CharConversionException.java
o/Closeable.java
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/EOFException.java
o/EmulatedFields.java
o/EmulatedFieldsForDumping.java
o/EmulatedFieldsForLoading.java
o/Externalizable.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FileInputStream.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FilePermissionCollection.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/FilterWriter.java
o/Flushable.java
o/IOException.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputStream.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/Serializable.java
o/SerializablePermission.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
o/package.html
ang/AbstractMethodError.java
ang/AbstractStringBuilder.java
ang/Appendable.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/Boolean.java
ang/Byte.java
ang/CharSequence.java
ang/Character.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/ClassNotFoundException.java
ang/CloneNotSupportedException.java
ang/Cloneable.java
ang/Comparable.java
ang/Deprecated.java
ang/Double.java
ang/EmptyEnumeration.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Process.java
ang/ProcessBuilder.java
ang/Readable.java
ang/Runnable.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SecurityException.java
ang/SecurityManager.java
ang/Short.java
ang/StackOverflowError.java
ang/StrictMath.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/SuppressWarnings.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VMClassLoader.java
ang/VMThread.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/package.html
ang/ref/ReferenceQueue.java
ang/ref/package.html
ang/reflect/AnnotatedElement.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/Proxy.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ang/reflect/WildcardType.java
ang/reflect/package.html
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ConnectException.java
et/ContentHandler.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NegCacheElement.java
et/NegativeCache.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketAddress.java
et/SocketException.java
et/SocketImpl.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketPermissionCollection.java
et/SocketTimeoutException.java
et/URI.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
et/package.html
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractQueue.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collection.java
til/Collections.java
til/ComparableTimSort.java
til/Comparator.java
til/ConcurrentModificationException.java
til/Currency.java
til/Date.java
til/Dictionary.java
til/DuplicateFormatFlagsException.java
til/EmptyStackException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MapEntry.java
til/MiniEnumSet.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/NoSuchElementException.java
til/Observable.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/RandomAccess.java
til/ResourceBundle.java
til/Scanner.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/SpecialAccess.java
til/Stack.java
til/StringTokenizer.java
til/TimSort.java
til/TimeZone.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/TreeMap.java
til/TreeSet.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
til/package.html
2fb02ef3025449e24e756a7f645ea6eab7a1fd4f 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
til/ArrayList.java
d11a65b017fde8c4c997f41ee59e87e90d68b3f5 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
til/ArrayList.java
ac4f307115a738b0206030fe0d127f7c7f035b03 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
et/InetAddress.java
b7926325a1c1a370c84c81db80372f59af240a53 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
ang/VMThread.java
ang/reflect/AnnotatedElement.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/ParameterizedType.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/WildcardType.java
et/InetAddress.java
et/SocketPermission.java
et/URLConnection.java
til/Arrays.java
til/ComparableTimSort.java
til/TimSort.java
687f18b91f4a0a728a027579110953ee729adcb8 22-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127436
et/InetAddress.java
et/NegCacheElement.java
et/NegativeCache.java
et/Socket.java
4351da844f9132d2d801d1a10ccc195091e31a8a 20-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127101
til/HashMap.java
til/LinkedHashMap.java
a0881d052ee72e3f7e773374e9b1aa75fbd6be4c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
o/BufferedOutputStream.java
o/BufferedWriter.java
o/CharArrayReader.java
o/File.java
o/FileInputStream.java
o/FileOutputStream.java
o/FilterOutputStream.java
o/FilterWriter.java
o/InputStream.java
o/LineNumberInputStream.java
o/ObjectInputStream.java
o/OutputStreamWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/Writer.java
et/InetAddress.java
et/ServerSocket.java
til/Currency.java
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/CharConversionException.java
o/Closeable.java
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/EOFException.java
o/Externalizable.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FileInputStream.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FilePermissionCollection.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/FilterWriter.java
o/Flushable.java
o/IOException.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputStream.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/Serializable.java
o/SerializablePermission.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
o/package.html
ang/AbstractMethodError.java
ang/AbstractStringBuilder.java
ang/Appendable.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/Boolean.java
ang/Byte.java
ang/CharSequence.java
ang/Character.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/ClassNotFoundException.java
ang/CloneNotSupportedException.java
ang/Cloneable.java
ang/Comparable.java
ang/Deprecated.java
ang/Double.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Process.java
ang/ProcessBuilder.java
ang/Readable.java
ang/Runnable.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SecurityException.java
ang/SecurityManager.java
ang/Short.java
ang/StackOverflowError.java
ang/StrictMath.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/SuppressWarnings.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VMThread.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/package.html
ang/ref/ReferenceQueue.java
ang/reflect/AnnotatedElement.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/Proxy.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ang/reflect/WildcardType.java
ang/reflect/package.html
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ConnectException.java
et/ContentHandler.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NegCacheElement.java
et/NegativeCache.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketAddress.java
et/SocketException.java
et/SocketImpl.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketPermissionCollection.java
et/SocketTimeoutException.java
et/URI.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
et/package.html
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractQueue.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collection.java
til/Collections.java
til/Comparator.java
til/ConcurrentModificationException.java
til/Currency.java
til/Date.java
til/Dictionary.java
til/DuplicateFormatFlagsException.java
til/EmptyStackException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/NoSuchElementException.java
til/Observable.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/RandomAccess.java
til/ResourceBundle.java
til/Scanner.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/SpecialAccess.java
til/Stack.java
til/StringTokenizer.java
til/TimeZone.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/TreeMap.java
til/TreeSet.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
til/ZoneInfo.java
til/ZoneInfoDB.java
til/package.html
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
o/BufferedInputStream.java
o/BufferedOutputStream.java
o/BufferedReader.java
o/BufferedWriter.java
o/ByteArrayInputStream.java
o/ByteArrayOutputStream.java
o/CharArrayReader.java
o/CharArrayWriter.java
o/CharConversionException.java
o/Closeable.java
o/DataInput.java
o/DataInputStream.java
o/DataOutput.java
o/DataOutputStream.java
o/EOFException.java
o/EmulatedFields.java
o/EmulatedFieldsForDumping.java
o/EmulatedFieldsForLoading.java
o/Externalizable.java
o/File.java
o/FileDescriptor.java
o/FileFilter.java
o/FileInputStream.java
o/FileNotFoundException.java
o/FileOutputStream.java
o/FilePermission.java
o/FilePermissionCollection.java
o/FileReader.java
o/FileWriter.java
o/FilenameFilter.java
o/FilterInputStream.java
o/FilterOutputStream.java
o/FilterReader.java
o/FilterWriter.java
o/Flushable.java
o/IOException.java
o/InputStream.java
o/InputStreamReader.java
o/InterruptedIOException.java
o/InvalidClassException.java
o/InvalidObjectException.java
o/LineNumberInputStream.java
o/LineNumberReader.java
o/NotActiveException.java
o/NotSerializableException.java
o/ObjectInput.java
o/ObjectInputStream.java
o/ObjectInputValidation.java
o/ObjectOutput.java
o/ObjectOutputStream.java
o/ObjectStreamClass.java
o/ObjectStreamConstants.java
o/ObjectStreamException.java
o/ObjectStreamField.java
o/OptionalDataException.java
o/OutputStream.java
o/OutputStreamWriter.java
o/PipedInputStream.java
o/PipedOutputStream.java
o/PipedReader.java
o/PipedWriter.java
o/PrintStream.java
o/PrintWriter.java
o/PushbackInputStream.java
o/PushbackReader.java
o/RandomAccessFile.java
o/Reader.java
o/SequenceInputStream.java
o/Serializable.java
o/SerializablePermission.java
o/StreamCorruptedException.java
o/StreamTokenizer.java
o/StringBufferInputStream.java
o/StringReader.java
o/StringWriter.java
o/SyncFailedException.java
o/UTFDataFormatException.java
o/UnsupportedEncodingException.java
o/WriteAbortedException.java
o/Writer.java
o/package.html
ang/AbstractMethodError.java
ang/AbstractStringBuilder.java
ang/Appendable.java
ang/ArithmeticException.java
ang/ArrayIndexOutOfBoundsException.java
ang/ArrayStoreException.java
ang/AssertionError.java
ang/Boolean.java
ang/Byte.java
ang/CharSequence.java
ang/Character.java
ang/ClassCastException.java
ang/ClassCircularityError.java
ang/ClassFormatError.java
ang/ClassNotFoundException.java
ang/CloneNotSupportedException.java
ang/Cloneable.java
ang/Comparable.java
ang/Deprecated.java
ang/Double.java
ang/EmptyEnumeration.java
ang/Enum.java
ang/EnumConstantNotPresentException.java
ang/Error.java
ang/Exception.java
ang/ExceptionInInitializerError.java
ang/Float.java
ang/IllegalAccessError.java
ang/IllegalAccessException.java
ang/IllegalArgumentException.java
ang/IllegalMonitorStateException.java
ang/IllegalStateException.java
ang/IllegalThreadStateException.java
ang/IncompatibleClassChangeError.java
ang/IndexOutOfBoundsException.java
ang/InheritableThreadLocal.java
ang/InstantiationError.java
ang/InstantiationException.java
ang/Integer.java
ang/InternalError.java
ang/InterruptedException.java
ang/Iterable.java
ang/LinkageError.java
ang/Long.java
ang/Math.java
ang/NegativeArraySizeException.java
ang/NoClassDefFoundError.java
ang/NoSuchFieldError.java
ang/NoSuchFieldException.java
ang/NoSuchMethodError.java
ang/NoSuchMethodException.java
ang/NullPointerException.java
ang/Number.java
ang/NumberFormatException.java
ang/OutOfMemoryError.java
ang/Override.java
ang/Process.java
ang/ProcessBuilder.java
ang/Readable.java
ang/Runnable.java
ang/RuntimeException.java
ang/RuntimePermission.java
ang/SecurityException.java
ang/SecurityManager.java
ang/Short.java
ang/StackOverflowError.java
ang/StrictMath.java
ang/String.java
ang/StringBuffer.java
ang/StringBuilder.java
ang/StringIndexOutOfBoundsException.java
ang/SuppressWarnings.java
ang/ThreadDeath.java
ang/ThreadLocal.java
ang/TypeNotPresentException.java
ang/UnknownError.java
ang/UnsatisfiedLinkError.java
ang/UnsupportedClassVersionError.java
ang/UnsupportedOperationException.java
ang/VMClassLoader.java
ang/VMThread.java
ang/VerifyError.java
ang/VirtualMachineError.java
ang/Void.java
ang/package.html
ang/ref/ReferenceQueue.java
ang/ref/package.html
ang/reflect/AnnotatedElement.java
ang/reflect/GenericArrayType.java
ang/reflect/GenericDeclaration.java
ang/reflect/GenericSignatureFormatError.java
ang/reflect/InvocationHandler.java
ang/reflect/InvocationTargetException.java
ang/reflect/MalformedParameterizedTypeException.java
ang/reflect/Member.java
ang/reflect/Modifier.java
ang/reflect/ParameterizedType.java
ang/reflect/Proxy.java
ang/reflect/ReflectPermission.java
ang/reflect/Type.java
ang/reflect/TypeVariable.java
ang/reflect/UndeclaredThrowableException.java
ang/reflect/WildcardType.java
ang/reflect/package.html
et/Authenticator.java
et/BindException.java
et/CacheRequest.java
et/CacheResponse.java
et/ConnectException.java
et/ContentHandler.java
et/ContentHandlerFactory.java
et/CookieHandler.java
et/DatagramPacket.java
et/DatagramSocket.java
et/DatagramSocketImpl.java
et/DatagramSocketImplFactory.java
et/FileNameMap.java
et/HttpRetryException.java
et/HttpURLConnection.java
et/Inet4Address.java
et/Inet6Address.java
et/InetAddress.java
et/InetSocketAddress.java
et/JarURLConnection.java
et/MalformedURLException.java
et/MulticastSocket.java
et/NegCacheElement.java
et/NegativeCache.java
et/NetPermission.java
et/NetworkInterface.java
et/NoRouteToHostException.java
et/PasswordAuthentication.java
et/PortUnreachableException.java
et/ProtocolException.java
et/Proxy.java
et/ProxySelector.java
et/ProxySelectorImpl.java
et/ResponseCache.java
et/SecureCacheResponse.java
et/ServerSocket.java
et/Socket.java
et/SocketAddress.java
et/SocketException.java
et/SocketImpl.java
et/SocketImplFactory.java
et/SocketOptions.java
et/SocketPermission.java
et/SocketPermissionCollection.java
et/SocketTimeoutException.java
et/URI.java
et/URIEncoderDecoder.java
et/URISyntaxException.java
et/URL.java
et/URLClassLoader.java
et/URLConnection.java
et/URLDecoder.java
et/URLEncoder.java
et/URLStreamHandler.java
et/URLStreamHandlerFactory.java
et/UnknownHostException.java
et/UnknownServiceException.java
et/package.html
til/AbstractCollection.java
til/AbstractList.java
til/AbstractMap.java
til/AbstractQueue.java
til/AbstractSequentialList.java
til/AbstractSet.java
til/ArrayList.java
til/Arrays.java
til/BitSet.java
til/Calendar.java
til/Collection.java
til/Collections.java
til/Comparator.java
til/ConcurrentModificationException.java
til/Currency.java
til/Date.java
til/Dictionary.java
til/DuplicateFormatFlagsException.java
til/EmptyStackException.java
til/EnumMap.java
til/EnumSet.java
til/Enumeration.java
til/EventListener.java
til/EventListenerProxy.java
til/EventObject.java
til/FormatFlagsConversionMismatchException.java
til/Formattable.java
til/FormattableFlags.java
til/Formatter.java
til/FormatterClosedException.java
til/GregorianCalendar.java
til/HashMap.java
til/HashSet.java
til/Hashtable.java
til/HugeEnumSet.java
til/IdentityHashMap.java
til/IllegalFormatCodePointException.java
til/IllegalFormatConversionException.java
til/IllegalFormatException.java
til/IllegalFormatFlagsException.java
til/IllegalFormatPrecisionException.java
til/IllegalFormatWidthException.java
til/InputMismatchException.java
til/InvalidPropertiesFormatException.java
til/Iterator.java
til/LinkedHashMap.java
til/LinkedHashSet.java
til/LinkedList.java
til/List.java
til/ListIterator.java
til/ListResourceBundle.java
til/Locale.java
til/Map.java
til/MapEntry.java
til/MiniEnumSet.java
til/MissingFormatArgumentException.java
til/MissingFormatWidthException.java
til/MissingResourceException.java
til/NoSuchElementException.java
til/Observable.java
til/Observer.java
til/PriorityQueue.java
til/Properties.java
til/PropertyPermission.java
til/PropertyPermissionCollection.java
til/PropertyResourceBundle.java
til/Queue.java
til/Random.java
til/RandomAccess.java
til/ResourceBundle.java
til/Scanner.java
til/Set.java
til/SimpleTimeZone.java
til/SortedMap.java
til/SortedSet.java
til/SpecialAccess.java
til/Stack.java
til/StringTokenizer.java
til/TimeZone.java
til/Timer.java
til/TimerTask.java
til/TooManyListenersException.java
til/TreeMap.java
til/TreeSet.java
til/UUID.java
til/UnknownFormatConversionException.java
til/UnknownFormatFlagsException.java
til/Vector.java
til/WeakHashMap.java
til/ZoneInfo.java
til/ZoneInfoDB.java
til/package.html