1d70b849467dfcfa30f495e6d03bcbdef47b2588 |
|
03-Mar-2017 |
Tobias Thierer <tobiast@google.com> |
Tweak java.util classes to minimize diffs vs. upstream All of these changes are minor. They fix minor needless differences vs. upstream code. Some tweaks to Android-changed documentation were also made. "upstream" means OpenJDK8u121-b13, except for AbstractQueue, whose upstream is the same as in http://r.android.com/316686 (a commit between jdk-9+113 and jdk-9+114). - AbstractMap: - Minor whitespace changes. - AbstractQueue: - Minor whitespace changes. - Tweaks to Android-changed docs. - Arrays: - tweak to rangeCheck() argument name and docs, missed in the update to OpenJDK8u60 - Tweaks to Android-changed docs. - Base64: - avoid integer overflow, missed in the update to OpenJDK8u121-b13. - EnumMap: - Fixed copyright year change, missed in the update to OpenJDK8u60. - Minor whitespace change. - Hashtable: - Tweaks to Android-changed docs. - Minor whitespace changes. - List: - Removed empty documentation line. - TreeMap: - Dropped redundant "= null" initialization, consistent with upstream OpenJDK8u60 (this line still differs from upstream because of the rename Entry -> TreeMapEntry). - Tweaks to Android-changed docs. - Vector: - Minor whitespace change. Bug: 35910877 Test: CtsLibcoreTestCases Change-Id: Iaff5c5130e4ff32cbb28677d2fb8715d75d08a5e
|
6975f84c2ed72e1e26d20190b6f318718c849008 |
|
01-Mar-2017 |
Tobias Thierer <tobiast@google.com> |
Make Android patch docs in ojluni more consistent with style guide This CL consists of an automated and a manual part (originally reviewed as separate CLs, then squashed together before submitting in order to minimize the number of times each Android-changed line is touch, since that makes future git archaeology on these simpler). Automated part: Run the following command (performs regex replacements): find ojluni -name \*\.java | xargs sed -i \ -e 's/Android[- ]changed/Android-changed/ig' \ -e 's/Android-changed :/Android-changed:/g' \ -e 's/Android-changed \(BEGIN\|END\)/\1 Android-changed/g' \ -e 's/Android-changed - /Android-changed: /g' \ -e 's/Android[- ]removed/Android-removed/ig' \ -e 's/Android-removed :/Android-removed:/g' \ -e 's/Android-removed \(BEGIN\|END\)/\1 Android-removed/g' \ -e 's/Android-removed - /Android-removed: /g' \ -e 's/Android[- ]added/Android-added/ig' \ -e 's/Android-added :/Android-added:/g' \ -e 's/Android-added \(BEGIN\|END\)/\1 Android-added/g' \ -e 's/Android-added - /Android-added: /g' \ -e 's/----- \(BEGIN\|END\) android\( -----\)\?/\1 Android-changed/g' \ -e 's/\/\* \(BEGIN\|END\) Android-changed \*\//\/\/ \1 Android-changed/g' Manual part: Move BEGIN Android-* lines out of block comments Some Android-{changed,removed,added} lines occurred inside block comments. This CL targets places in ojluni that contained the String "* BEGIN Android-" Changes made by this CL include: - Move the "BEGIN Android-" line into a line comment (the style guide mandates that "Android-" lines are always in line comments). In many cases, that line comment is immediately followed by a block comment holding commented-out upstream code. - Add corresponding "// END Android-" line comments, where missing. - Drop documented import changes altogether. These create noise for little benefit: (1.) Most import problems will be found at compile time (2.) They generally correspond to documented changes elsewhere in the file. - In most cases, the phrasing of comments and the decision whether to keep commented out upstream code was not changed by this CL. - Some additional tweaks were made in line with the style guide. No attempt was made to: - Verify that commented-out upstream code actually matches the current upstream. - Make any fixes (eg. to comments) that would have required git archaeology (looking up historic commits). Bug: 35841464 Test: make droid cts update-api Change-Id: Ibc60979cb6061cfb0e9c7096cc9dcab30ddfa733
|
08e9e364940586cb242839c8f0e303b82438f58b |
|
19-Aug-2016 |
Tobias Thierer <tobiast@google.com> |
Fix regression in Vector.listIterator.add() introduced in N. AOSP commit 887ab3fe607c582e10e33b3d631401d7a791aaed touched Vector.Itr to fix an app compability bug, but did not make a corresponding change to Vector.ListItr which extends Vector.Itr. Specifically, ListItr.add() does not account for the extra element in the hasNext() logic that it inherits from the super class. This causes iteration to terminate prematurely when an element was added via the ListIterator. This CL fixes the regression by incrementing limit during ListItr.add(). Bug: 27430229 Bug: 30974375 Test: VectorTest Test: 842 guava-testlib tests for Vector; coverage for Vector was contributed to guava-testlib in http://cl/130778873 (cherry picked from commit c13c9eddc3f7eeb760fcd9032b85ef2767cc82ba) Change-Id: I9a565f11f7b8b7368cf967d66e986d6130e17267
|
c13c9eddc3f7eeb760fcd9032b85ef2767cc82ba |
|
19-Aug-2016 |
Tobias Thierer <tobiast@google.com> |
Fix regression in Vector.listIterator.add() introduced in N. AOSP commit 887ab3fe607c582e10e33b3d631401d7a791aaed touched Vector.Itr to fix an app compability bug, but did not make a corresponding change to Vector.ListItr which extends Vector.Itr. Specifically, ListItr.add() does not account for the extra element in the hasNext() logic that it inherits from the super class. This causes iteration to terminate prematurely when an element was added via the ListIterator. This CL fixes the regression by incrementing limit during ListItr.add(). Bug: 27430229 Bug: 30974375 Test: VectorTest Test: 842 guava-testlib tests for Vector; coverage for Vector was contributed to guava-testlib in http://cl/130778873 Change-Id: I1e2042ebfd78a4956791bd43d60db7d1dec8edf5
|
5e590c486de72c6f7569cdfb984c7e2cd35b43a8 |
|
19-Aug-2016 |
Tobias Thierer <tobiast@google.com> |
Update Vector to JDK8u60. - Position of replaceAll() and sort() implementation in the file now matches upstream. - Added a missing "Android changed" comment. Test: cts-tradefed run cts -p android.core.tests.libcore.package.libcore Bug: 29935305 Change-Id: Ibe48287ac4f51528c4aa8fe81ed334116d2607be
|
49965c1dc9da104344f4893a05e45795a5740d20 |
|
30-Jun-2016 |
Ganesh Mahendran <opensource.ganesh@gmail.com> |
remove x attribute of java file java file does not need x attribute. This patch removes it. Change-Id: I2a7170d99f4bee7a7b819621c84dd197ded37fa2 Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
|
309f9df28350e15445b9135e8b710fa2b34b5dc1 |
|
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 (cherry picked from commit d2449bb576ad1e3a3877364e5e1ae28625f69e35)
|
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
|
4f549c0a2df05bf19a068fcd8a917ba332cf809a |
|
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 Change-Id: Id32df836e79bee614c0dce8c61dbc7b06731265d
|
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
|
887ab3fe607c582e10e33b3d631401d7a791aaed |
|
17-Mar-2016 |
Narayan Kamath <narayan@google.com> |
Vector: Rework CME checks in hasNext() and next(). Port over commit b10b2a3ab693cfd6156d06ffe4e00ce69b9c9194 from java.util.ArrayList to java.util.Vector. Also adds the same set of tests to Vector / ArrayList so to make sure their iterators behave identically in this regard. bug: 27430229 (cherry picked from commit 6e5b758a4438d2c154dd11a5c04d14a5d2fc907c) Change-Id: I04cadc3eac6d591ce8b93d04a999825f65fb867a
|
6e5b758a4438d2c154dd11a5c04d14a5d2fc907c |
|
17-Mar-2016 |
Narayan Kamath <narayan@google.com> |
Vector: Rework CME checks in hasNext() and next(). Port over commit b10b2a3ab693cfd6156d06ffe4e00ce69b9c9194 from java.util.ArrayList to java.util.Vector. Also adds the same set of tests to Vector / ArrayList so to make sure their iterators behave identically in this regard. bug: 27430229 Change-Id: Idd8e44737a216ac5ea9f1e6fed8892b364997292
|
5c35c7ebda68cc39b6bdee20f678a150336ebd1d |
|
14-Mar-2016 |
Yi Kong <yikong@google.com> |
Port java.util.Collection.removeIf from OpenJDK8 Source code is taken from jdk8u60. Bug: 27538943 Change-Id: I485c024f87871e33d2f455be9807775601af77ee (cherry picked from commit d41ca4a76ea570f9dd89a7ae56410cc75cc0a856)
|
d41ca4a76ea570f9dd89a7ae56410cc75cc0a856 |
|
14-Mar-2016 |
Yi Kong <yikong@google.com> |
Port java.util.Collection.removeIf from OpenJDK8 Source code is taken from jdk8u60. Bug: 27538943 Change-Id: I485c024f87871e33d2f455be9807775601af77ee
|
8b056f0b15bc1e45da8d4c504353b05e681ac013 |
|
04-Mar-2016 |
Narayan Kamath <narayan@google.com> |
Add java.lang.Iterable.spliterator() and supporting classes. The only android specific changes here are to HashMap - their spliterators add Spliterator.ORDERED if the HashMap is an instance of a LinkedHashMap. There's some degree of duplication between the test code used to exercise primitive arrays (Arrays / Spliterators provide similar APIs). These differences are quite hard to consolidate, since the Arrays version declares that their Spliterators are ORDERED but the Spliterator version doesn't. The latter also allows us to declare additional Spliterator characteristics. bug: 27426688 Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
|
4c89023ef86f29fa9add7db2574f2169fe842577 |
|
04-Mar-2016 |
Narayan Kamath <narayan@google.com> |
Add java.lang.Iterable.spliterator() and supporting classes. The only android specific changes here are to HashMap - their spliterators add Spliterator.ORDERED if the HashMap is an instance of a LinkedHashMap. There's some degree of duplication between the test code used to exercise primitive arrays (Arrays / Spliterators provide similar APIs). These differences are quite hard to consolidate, since the Arrays version declares that their Spliterators are ORDERED but the Spliterator version doesn't. The latter also allows us to declare additional Spliterator characteristics. (cherry-picked from commit ed21aa3a8dcd34eca6f0317eeb683e7afdc825b9) bug: 27426688 Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
|
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
|
e633814ad4dc6c7dc0c34080292c2c9622cbd5a3 |
|
02-Mar-2016 |
Narayan Kamath <narayan@google.com> |
Add Iterator.forEachRemaining / Iterator.remove. Also pulls in various specializations from concrete subclasses. bug: 27426688 Change-Id: I4d37bb61973447b5621fc2b389a04d40666a941d
|
60796efea3a74e02aea384b8eb56103ea21b880b |
|
29-Feb-2016 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Add Iterable#forEach & Map#forEach from openJdk8 Based on openJdk 8u40 source & iam@ stream change in ag/872080 Bug: 27404545 Change-Id: Ic67e20b35c24e7acce513e010b727510af09a83e (cherry picked from commit c3a9db83a352d92d5a6e0098f22bde07e34a1d3b)
|
c3a9db83a352d92d5a6e0098f22bde07e34a1d3b |
|
29-Feb-2016 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Add Iterable#forEach & Map#forEach from openJdk8 Based on openJdk 8u40 source & iam@ stream change in ag/872080 Bug: 27404545 Change-Id: Ic67e20b35c24e7acce513e010b727510af09a83e
|
51b1b6997fd3f980076b8081f7f1165ccc2a4008 |
|
16-Feb-2015 |
Piotr Jastrzebski <haaawk@google.com> |
Initial import of OpenJdk files. Create new libcore/ojluni directory with src/main/java and src/main/native subdirectiories. Build ojluni into core-oj jar. Use openjdk classes from java.awt.font package. Copy all files from jdk/src/share/classes and jdk/src/solaris/classes directories in openjdk into libcore/ojluni/src/main/java. Copy following native files from openjdk to libcore/ojluni/src/main/native: jdk/src/solaris/native/java/io/canonicalize_md.c build/linux-amd64/include/classfile_constants.h jdk/src/share/native/java/net/DatagramPacket.c jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c jdk/src/share/native/java/lang/Double.c jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c jdk/src/solaris/native/java/io/FileDescriptor_md.c jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c jdk/src/share/native/java/io/FileInputStream.c jdk/src/solaris/native/sun/nio/ch/FileKey.c jdk/src/solaris/native/java/io/FileOutputStream_md.c jdk/src/solaris/native/java/io/FileSystem_md.c jdk/src/share/native/java/lang/Float.c jdk/src/share/native/java/net/Inet4Address.c jdk/src/solaris/native/java/net/Inet4AddressImpl.c jdk/src/share/native/java/net/Inet6Address.c jdk/src/solaris/native/java/net/Inet6AddressImpl.c jdk/src/share/native/java/net/InetAddress.c jdk/src/solaris/native/java/net/InetAddressImplFactory.c jdk/src/share/native/java/io/io_util.c jdk/src/solaris/native/sun/nio/ch/IOUtil.c jdk/src/share/native/java/io/io_util.h jdk/src/solaris/native/java/io/io_util_md.c jdk/src/solaris/native/java/io/io_util_md.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/java_io_FileDescriptor.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileInputStream.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileOutputStream.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileSystem.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_ObjectStreamClass.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_UnixFileSystem.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Double.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Float.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Integer.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Long.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Runtime.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Shutdown.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_StrictMath.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_String.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_System.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Thread.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Throwable.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_DatagramPacket.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4Address.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4AddressImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6Address.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6AddressImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddress.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddressImplFactory.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_NetworkInterface.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainDatagramSocketImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainSocketImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketInputStream.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOptions.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOutputStream.h jdk/src/share/native/java/lang/java_props.h jdk/src/solaris/native/java/lang/java_props_md.c jdk/src/share/native/java/util/zip/Adler32.c as java_util_zip_Adler32.c jdk/src/share/native/java/util/zip/CRC32.c as java_util_zip_CRC32.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_CRC32.h jdk/src/share/native/java/util/zip/Deflater.c as java_util_zip_Deflater.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Deflater.h jdk/src/share/native/java/util/zip/Inflater.c as java_util_zip_Inflater.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Inflater.h jdk/src/share/native/java/util/zip/ZipFile.c as java_util_zip_ZipFile.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_ZipFile.h jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h jdk/src/share/native/common/jlong.h jdk/src/solaris/native/common/jlong_md.h jdk/src/share/native/common/jni_util.c jdk/src/share/native/common/jni_util.h jdk/src/solaris/native/common/jni_util_md.c jdk/src/share/javavm/export/jvm.h jdk/src/solaris/javavm/export/jvm_md.h jdk/src/solaris/native/java/net/linux_close.c jdk/src/share/native/sun/misc/NativeSignalHandler.c jdk/src/solaris/native/sun/nio/ch/NativeThread.c jdk/src/share/native/java/net/net_util.c jdk/src/share/native/java/net/net_util.h jdk/src/solaris/native/java/net/net_util_md.c jdk/src/solaris/native/java/net/net_util_md.h jdk/src/solaris/native/java/net/NetworkInterface.c jdk/src/share/native/sun/nio/ch/nio.h jdk/src/solaris/native/sun/nio/ch/nio_util.h jdk/src/share/native/java/io/ObjectStreamClass.c jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c jdk/src/solaris/native/java/net/PlainSocketImpl.c jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c jdk/src/share/native/java/lang/Runtime.c jdk/src/share/native/java/lang/Shutdown.c jdk/src/share/native/sun/misc/Signal.c jdk/src/solaris/native/java/net/SocketInputStream.c jdk/src/solaris/native/java/net/SocketOutputStream.c jdk/src/share/native/java/lang/StrictMath.c jdk/src/share/native/java/lang/String.c build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_NativeSignalHandler.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_Signal.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/sun_net_spi_DefaultProxySelector.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileChannelImpl.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileDispatcherImpl.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileKey.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOStatus.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOUtil.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_NativeThread.h jdk/src/share/native/java/lang/System.c jdk/src/share/native/java/lang/Thread.c jdk/src/share/native/java/lang/Throwable.c jdk/src/solaris/native/java/io/UnixFileSystem_md.c jdk/src/solaris/native/java/lang/UNIXProcess_md.c jdk/src/share/native/java/util/zip/zip_util.c jdk/src/share/native/java/util/zip/zip_util.h Change-Id: Ib237df4e1b7b5b4d9f12e74d189e6ec9eed3c31d
|