summaryrefslogtreecommitdiffstats
path: root/luni-kernel
Commit message (Collapse)AuthorAgeFilesLines
* Latest java.util.concurrent from the JSR 166 project.Jesse Wilson2010-04-091-0/+3
| | | | | | | 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.
* resolved conflicts for merge of 19252faf to dalvik-devElliott Hughes2010-04-081-32/+10
|\ | | | | | | Change-Id: Ibf429f9d9d048c01cb8f33b15e8b404d83138b74
| * Disable System.setSecurityManager.Elliott Hughes2010-04-081-34/+10
| | | | | | | | | | | | | | | | | | We plan on removing SecurityManager checks, which are expensive and non-useful, especially because Android doesn't use SecurityManager itself. As a first step, let's ship a release where it's no longer possible to set a SecurityManager. Bug: 1320501 Change-Id: I88664dbc1d8b087579d54003a1aaed7b3d8412be
* | Improve the ThreadGroup documentation.Elliott Hughes2010-03-241-128/+97
| | | | | | | | | | | | | | (Because I was asked a question about ThreadGroup today, and the answer is always "don't use ThreadGroup"...) Change-Id: Ibaa2f1830e1fe435c9712f3b08506639b9521b9e
* | Remove all remaining "@since Android" tags.Elliott Hughes2010-03-2219-494/+16
| | | | | | | | | | | | | | I've fixed a few typos, and removed a few of the more egregiously nonsensical or incorrect comments that were nearby. Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
* | Add Java 6's java.io.Console.Elliott Hughes2010-03-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | 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
* | Back out my droiddoc-breaking Object.getClass signature change.Elliott Hughes2010-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | I'll try again when I've got time to fix droiddoc (or we get an SET). This is a non-functional Java 5/Java 6 difference, so it isn't important. (Amusingly, there's no need to back out the corresponding api.xml change: it looks like droiddoc normalizes one but not the other.) Change-Id: I012ebeb199696d5bd16de63e657b15889d546c5e
* | Fix all instances of "new Integer" (et cetera).Elliott Hughes2010-03-111-5/+5
| | | | | | | | | | | | (This doesn't include libcore/xml/ because I don't want to get in the way there.) Change-Id: I46f638105d26e82d09128fca605117322229e146
* | Plug a resource leak with "finally" and make Object.getClass' return type ↵Elliott Hughes2010-03-112-6/+3
| | | | | | | | | | | | match Java 6. Change-Id: Ia8ae90634bfb3680c8e82e4e4cf7f7459263c3d3
* | Merge "Minor fixes." into dalvik-devAndy McFadden2010-03-101-1/+1
|\ \
| * | Minor fixes.Andy McFadden2010-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Quieted a couple of warnings about constness. Added "synchronized" to BootClassLoader.getInstance(), which creates the instance on first use. Change-Id: I4a521bb2c6853b1ad8a118aa53f697be18b69280
* | | Add Java 6 additions to Double, Enum, Float, and String.Elliott Hughes2010-03-102-4/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am f76b01c6: Merge "Document that Class.getSigners() always returns null."Elliott Hughes2010-02-281-60/+6
|\ \ | |/ | | | | | | | | | | Merge commit 'f76b01c6377ad4653dcdc37b2ca35db785219f80' into dalvik-dev * commit 'f76b01c6377ad4653dcdc37b2ca35db785219f80': Document that Class.getSigners() always returns null.
| * Document that Class.getSigners() always returns null.Elliott Hughes2010-02-251-60/+6
| | | | | | | | | | Bug: 1594865 Bug: http://code.google.com/p/android/issues/detail?id=1766
* | Remove more useless annotations: logging, luni-kernel, and math.Elliott Hughes2010-02-231-47/+0
| | | | | | | | (Plus a bonus item: one Android-written test under luni.)
* | Resync a load of tests with upstream, make our build faster.Elliott Hughes2010-02-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I started off with a mission to remove uses of dalvik.annotation.* (stuff like @TestTargetNew and other useless junk that just makes it harder to stay in sync with upstream). I wrote a script to go through tests showing me the diff between what we have and what upstream has, thinking that in cases where upstream has also added tests, I may as well pull them in at the same time... ...but I didn't realize how close we were to having dx fill its 1.5GiB heap. After trying various alternatives, I decided to bite the bullet and break core-tests up into one .jar per module. This adds parallelism back into this, the slowest part of our build. (I can do even better, but I'll do that in a separate patch, preferably after we've merged recent changes from master.) Only a couple of dependencies were problematic: the worthless TestSuiteFactory which already contained a comment suggesting we get rid of it, and the fact that some tests -- most notably the concurrent ones -- also contained main methods that started the JUnit tty-based TestRunner. (In the long run, we want to be running the harmony tests directly from a pristine "svn co" of upstream, using DalvikRunner. But this will be a big help in the meantime, and starts the work of getting our current copy of the tests into a state where we can start to extract any meaningful changes/additions we've made.)
* | Fix FindBugs' "high" warnings about java.lang.Class.Elliott Hughes2010-02-161-3/+5
|/
* Fix jniThrowRuntimeException for C callers, add jniThrowNullPointerException.Elliott Hughes2010-01-281-1/+1
| | | | ...and switch all NPE throwers over to the helper.
* The SecurityManager doesn't work, so advertise that shouldn't be used.Jesse Wilson2010-01-071-3/+7
|
* Implement ProcessBuilder.redirectErrorStream.Elliott Hughes2009-10-283-52/+57
| | | | | | | 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
* Switch ProcessManager and System over to C++.Elliott Hughes2009-10-233-71/+50
| | | | | Bug 2180063 will require changes to ProcessManager, so now's a good time to make the switch in this directory.
* Fix build.Elliott Hughes2009-10-143-0/+127
| | | | Add missing files from https://android-git.corp.google.com/g/29998.
* Fix Constructor and Method to not expose their internals.Elliott Hughes2009-10-133-9/+37
| | | | | | | | | We shouldn't expose internal arrays without copying. Behavior confirmed by testing against RI. Also connect up the dalvik ThreadsTest test that had fallen by the wayside. Bug: 2102273
* Throw meaningful IOException instances from native code.Elliott Hughes2009-09-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Java side of OSFileSystem was throwing IOExceptions with no detail message. If we throw from the native side instead, we can supply meaningful explanations. This turned up a couple of bugs: * read, readDirect, readv, writev, and ttyRead would only throw IOException if they returned < -1, which is impossible. (writev was probably a copy & paste from readv, and the reads were probably confused by the impedence mismatch between Unix's use of 0 to mean end of file and -1 to mean error, and Java's use of -1 for end of file.) * inconsistent checking for null byte[]s passed in. * read and write would retry on EINTR, but readDirect and writeDirect wouldn't. * we'd silently truncate seek/lock/truncate offsets that didn't fit in 32 bits; we now throw an IOException instead. It also means a few native functions become "void" because errors are now reported by throwing exceptions, and the Java functions that used to call them are no longer needed. Also change ProcessManager to use jniThrowIOException, remove the unused throwIOExceptionStr from OSNetworkSystem.cpp, and remove the KnownFailure from FileTest's test_delete, now we have a fixed version of yaffs that won't rmdir(2) non-empty directories. Bug: 1542253
* Phantom fun.Andy McFadden2009-09-101-4/+4
| | | | | | Mark PhantomReference fields as volatile, since the GC can alter them. Added a simple phantom reference exerciser.
* Fix Package.isCompatibleWith.Elliott Hughes2009-09-041-3/+2
| | | | | | | Note that this doesn't help us because to Dalvik, all packages have version "0.0". Bug: 2099697
* Merge change 23208 into eclairAndroid (Google) Code Review2009-09-031-5/+11
|\ | | | | | | | | * changes: Fix Class.getConstructor("whatever", (Class[]) null).
| * Fix Class.getConstructor("whatever", (Class[]) null).Elliott Hughes2009-09-031-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The RI treats null parameterTypes the same as an empty array. This behavior is specified for getMethod, but only implied for getConstructor. This patch: * Fixes getConstructor. * Improves javadoc for Class methods taking "Class... parameterTypes". * Adds tests for both getConstructor and getMethod (which was already correct). * Removes a line of debugging output to System.out. Bug: 1824973
* | DO NOT MERGE: Fix implementation of Thread.isAliveAndy McFadden2009-09-021-3/+1
|/ | | | | | | | | | | | | | | | | (Originally submitted to master, pulling over to eclair.) The implementation of Thread.isAlive() was changed a couple of years ago as part of the Harmony integration. The current version relies on the thread's state value to determine its liveness, but the VM was originally written to be like JamVM, which used GNU ClassPath, which uses the vmThread field instead. It looks like it's possible for Thread.join() to get stuck, though as far as I know this hasn't happened. We're essentially rolling back part of 27774-p9. For internal bug 1966734. Also: ran --update on test 044.
* Integrate luni module (but not tests) to Harmony r772995.Jesse Wilson2009-07-242-103/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixing wakeups caused by Thread.join() interacting with LockSupport.unpark.Jesse Wilson2009-07-161-11/+49
| | | | | | | | This caused several concurrency tests to fail when run with timeouts, since the tests cause park and unpark to happen frequently. Also fixing a tiny issue with CoreTestRunnable to use the proper tmp directory and to include the program of a failed external execution.
* am 4ce12e65: Fixes deadlock in Runtime.exec(). We can\'t malloc() or free() ↵crazybob2009-07-021-18/+14
|\ | | | | | | | | | | | | | | | | after fork() because the heap lock may be held by a thread that is no longer running. Merge commit '4ce12e65bb5fb7cb0eaa131e8b5c0b740e8e359e' * commit '4ce12e65bb5fb7cb0eaa131e8b5c0b740e8e359e': Fixes deadlock in Runtime.exec(). We can't malloc() or free() after fork() because the heap lock may be held by a thread that is no longer running.
| * Fixes deadlock in Runtime.exec(). We can't malloc() or free() after fork() ↵crazybob2009-07-011-18/+14
| | | | | | | | because the heap lock may be held by a thread that is no longer running.
* | am 5f9aa938: Merge change 4334 into donutAndroid (Google) Code Review2009-06-161-0/+2
|\ \ | |/ | | | | | | | | | | Merge commit '5f9aa93881e796a66c2a625ced1ee89292c2b570' * commit '5f9aa93881e796a66c2a625ced1ee89292c2b570': Modified Thread to copy the context class loader from parent to child threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check
| * Modified Thread to copy the context class loader from parent to child ↵crazybob2009-06-161-0/+2
| | | | | | | | | | | | threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check doesn't occur if the calling code's class loader is an ancestor of the context class loader).
* | am 4e3cc66: am 4645b7c: AI 147732: fix broken linksScott Main2009-04-293-3/+3
|\ \ | |/ | | | | | | | | | | Merge commit '4e3cc66298b8e6d97670d3ed0b4170fb161d36f3' * commit '4e3cc66298b8e6d97670d3ed0b4170fb161d36f3': AI 147732: fix broken links
| * am 4645b7c: AI 147732: fix broken linksScott Main2009-04-283-3/+3
| |\ | | | | | | | | | | | | | | | | | | Merge commit '4645b7c3a461769281a0b2b846a26c79e806aaa0' into donut * commit '4645b7c3a461769281a0b2b846a26c79e806aaa0': AI 147732: fix broken links
| | * AI 147732: fix broken linksScott Main2009-04-243-3/+3
| | | | | | | | | | | | | | | | | | BUG=1810005 Automated import of CL 147732
| | * AI 145288: Removing tabs from tests.Urs Grob2009-04-091-3/+4
| | | | | | | | | | | | | | | | | | BUG=1285921 Automated import of CL 145288
| | * AI 143453: Bringing the luni tests down to zero failures.Jorg Pleumann2009-03-301-0/+7
| | | | | | | | | | | | | | | | | | BUG=1285921 Automated import of CL 143453
* | | am 1c7ba87: Fix an infinite loop in ClassLoader.isAncestorOf()Urs Grob2009-04-291-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit '1c7ba87b216ec3de563ac4d70548313da9b9bc1b' * commit '1c7ba87b216ec3de563ac4d70548313da9b9bc1b': Fix an infinite loop in ClassLoader.isAncestorOf()
| * | Fix an infinite loop in ClassLoader.isAncestorOf()Urs Grob2009-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The current version loops endlessly if the callers ClassLoader is not the same as the system ClassLoader. The cause for this is a loop variable that is not changed during the loop. BUG=1732214
| * | AI 145612: am: CL 145288 Removing tabs from tests.Urs Grob2009-04-091-3/+4
| | | | | | | | | | | | | | | | | | | | | Original author: ursg Merged from: //branches/cupcake/... Automated import of CL 145612
| * | AI 143626: am: CL 143453 Bringing the luni tests down to zero failures.Jorg Pleumann2009-03-311-0/+7
| |/ | | | | | | | | | | | | Original author: jorgp Merged from: //branches/cupcake/... Automated import of CL 143626
* | AI 145649: am: CL 145612 am: CL 145288 Removing tabs from tests.Urs Grob2009-04-091-3/+4
| | | | | | | | | | | | | | | | Original author: ursg Merged from: //branches/cupcake/... Original author: android-build Automated import of CL 145649
* | AI 145086: Use process groups to avoid a collision between dexopt and ↵Andy McFadden2009-04-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessManager. If the ProcessManager thread was waiting for a child process to finish, it could inadvertently capture the exit status of dexopt. This confused the VM somewhat. With this change the dexopt child runs in its own process group, and the ProcessManager only waits for children in the parent's process group. I also now create a new process in the DexClassLoader test to check for clashes. (It's a race, but it nearly always hits on the device, and occasionally hits on desktop.) BUG=1777736 Automated import of CL 145086
* | AI 143657: am: CL 143626 am: CL 143453 Bringing the luni tests down to zero ↵Jorg Pleumann2009-03-311-0/+7
|/ | | | | | | | | | | failures. Original author: jorgp Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 143657
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0335-0/+15454
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0335-15454/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-106-44/+85
|