summaryrefslogtreecommitdiffstats
path: root/xml/src/main/native
Commit message (Collapse)AuthorAgeFilesLines
* Merge awt-kernel, icu, luni-kernel, prefs, security-kernel, x-net into luniPeter Hallam2010-05-042-1558/+0
| | | | Merge xml except xmlpull and kxml into luni
* Move the libcore registration out of libnativehelpers and into libcore.Elliott Hughes2010-04-161-5/+1
| | | | | Bug: 754114 Change-Id: Iaa03def509c10cbaa12fd2128584b93d4be4a6b7
* Fix a bug, and protect against an unrelated class of bugs.Elliott Hughes2010-03-291-0/+4
| | | | | | | | | | | | If the Java array allocation in InetAddress.cpp failed, we'd free NULL instead of the previously-allocated structure. This is a new bug in froyo, but only happens in out of memory situations, so doesn't seem worth fixing there. Unrelatedly, let's disallow assignment and copying of all our RAII classes. This isn't a mistake I've seen made, but it's easy to protect against, so we may as well do so consistently. Change-Id: I2433b31ff983d388788b09e59e08d661f1725ecd
* Fixing namespace+prefix mode in Expat and removing optional fields from ↵Jesse Wilson2010-03-191-2/+2
| | | | | | | | | | | | | | | | | | | callbacks. The first part is related to bug 6632: http://code.google.com/p/android/issues/detail?id=6632 I added these optional fields back when I was originally updating the XML parser for Froyo. I've decided to remove them to simplify migrating between Android and the RI. It should also save some object allocations. Note that the RI v5 and the RI v6 behave differently for optional values on attributes; this motivated me to add the otherwise unfortunate assertOneOf() method to the testcase. (We behave more like RI v6, which is to supply the values upon request) Change-Id: Icfa5d29976a86bf194b3ed7c0d9e2275c3bff9dd
* Fixing a critical regression in our SAX parsing.Jesse Wilson2010-01-291-22/+13
| | | | | We weren't correctly covering the case where namespaces were off, but elements contained namespaces. See bug 2400596.
* Including proper prefixes and qualified names in the Expat parser.Jesse Wilson2010-01-261-133/+161
| | | | | | | | | | | | | | | | | | | Also changing our SAX codepath to always include values for optional parameters. In testing Xalan's javax.xml.transform packages with the Expat source code, the emitted documents were malformed. The underlying problem was that Xalan was expecting optional parameters to be populated, but Expat was not populating them. The spec says, "Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties: * the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be); * the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default). Although Xalan is technically at fault here, it may take forever to find all of the places where these optional parameters are assumed to be present. Instead, I'll just supply them which adds little overhead anyway. See http://code.google.com/p/android/issues/detail?id=990
* Implement DTDHandler support for ExpatParser.Elliott Hughes2009-12-091-31/+89
| | | | | | | | | | | Every time a third-party developer gets their DefaultHandler method signatures wrong (making it impossible for us to call them), they see this in the log and complain that SAX parsing is broken on Android: WARN/ExpatReader(704): DTD handlers aren't supported. This patch adds that support -- even though no-one wants it -- so we can get rid of the irrelevant log message.
* Don't allocate arbitrary-length buffers on the stack.Elliott Hughes2009-11-131-20/+15
| | | | | | | | | | | | A new LocalArray C++ class lets us specify a "reasonable" amount of stack to use, but transparently fall back to using the heap if we need more space. The three places I've chosen to use LocalArray in this patch are fairly random; all they have in common is that they're the places where we call GetStringUTFRegion. There are more places LocalArray will be useful: the java.io.File JNI in particular. Bug: 2257819
* JNI Delete* and Release* _are_ allowed while an exception is pending.Elliott Hughes2009-10-071-41/+3
| | | | | | | | | See "Exceptions" in our own documentation: http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/jni-tips.html;hb=HEAD This is also true of the RI, though the spec sometimes implies otherwise. Here's the canonical reference: http://java.sun.com/docs/books/jni/html/design.html#2193
* Use jniThrowException instead of FindClass/ThrowNew.Elliott Hughes2009-10-011-18/+6
| | | | | | Always use our best-of-breed code for throwing exceptions. The remaining callers of Throw have good reason, and the only caller of ThrowNew is now JNIHelp.c (jniThrowException) itself.
* Use GetStringRegion/GetStringUTFRegion where appropriate.Elliott Hughes2009-09-101-20/+6
| | | | | | | | | | | Note that the changes to DecimalFormatInterface.cpp and RBNFInterface.cpp are just minor tidy-ups, fixing an issue where the early error exit wouldn't call ReleaseStringChars to undo the earlier call to GetStringChars. Also remove a dead function and fix a comment in ExpatParser.cpp. Tested on sapphire-eng. Bug: 1639287
* libcore/.../rg_apache_harmony_xml_ExpatParser: in C++, the return typeScott Tsai2009-03-241-1/+1
| | | | | | | | of strchr(const char*) is 'const char*' instead of 'char *'. C++ overloads string functions so that strchr(char*) returns 'char*' and strchr(const char*) returns 'const char*'. This patch fixes an "invalid conversion from ‘const char*’ to ‘char*’" error when building with gcc-4.4.
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-2/+2
|
* Initial ContributionThe Android Open Source Project2008-10-212-0/+1550