summaryrefslogtreecommitdiffstats
path: root/xml/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix KXmlSerializer so it won't generate invalid XML.Elliott Hughes2009-11-183-36/+135
| | | | | | | | | | | | We were allowing arbitrary characters to be output (which, surprisingly, XML does not), and we weren't correctly escaping CDATA sections that contained "]]>". Pull out some of my test helpers from DocumentBuilderTest into Support_Xml, because they're more generally useful when writing tests involving XML. Also correct a bunch of spelling mistakes in XmlSerializer's javadoc, since I happened to be reading through.
* Various XML fixes.Elliott Hughes2009-11-175-29/+52
| | | | | | | | | | | | | | | | | | | Add tests for bug 2487, exploring the situations where "]]>" is and isn't allowed. Fix the bug by changing KXmlParser so it pays attention to whether it's dealing with normal text or text in an attribute value and reports errors appropriately. In order to pass the new tests, we also need to fix DocumentBuilder to pay attention to its DocumentBuilderFactory's "coalescing" setting: whether or not adjacent text/CDATA nodes should be coalesced. This in turn fixes a @KnownFailure in DocumentBuilderFactoryTest: previously we didn't allow the caller to turn "coalescing" off (though until my previous patch, we didn't actually coalesce anyway). Now we support both, and I've made coalescing the default, because bug reports tell us that's what users want. It's how the RI behaves, too. Bug: 2487
* Merge change If8e2929aAndroid (Google) Code Review2009-11-161-20/+15
|\ | | | | | | | | * changes: Don't allocate arbitrary-length buffers on the stack.
| * 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
* | Remove org.kxml2.wap.Elliott Hughes2009-11-136-2701/+0
|/ | | | | | (Not to be submitted before d2944c35 in packages/apps/Email.) Bug: 2249953
* Fix typos in the XmlPullParser documentation.Elliott Hughes2009-11-111-26/+25
|
* Fix DOM parsing of character references/entities.Elliott Hughes2009-11-101-5/+41
| | | | | | | | | | | Our DOM parser didn't support { or š character references, and didn't merge adjacent text nodes into one (so "a&b" would be three text nodes rather than one; SAX allows the former, but DOM guarantees the latter). This patch fixes both bugs, and adds tests. Bug: 2607 (and duplicates)
* Bring our kxml2 up to date with upstream.Elliott Hughes2009-11-092-262/+319
| | | | | | | | | | Much of this is spurious whitespace changes, but there's some increased "relaxation". I deliberately lost the Android-specific change that was avoiding Runtime, since we do now have Runtime. I've added an Android-specific change to comment out some System.out logging that's been added upstream. I'd tell you the upstream revision number, but they're still using CVS, so there isn't one.
* Our XML serializer permits \0, resulting in malformed documents.Jesse Wilson2009-11-064-1/+111
| | | | | This failing test demonstrates the problem. It also adds AllTests plumbing for this test and some missing ones.
* Fix a few FindBugs warnings in code that isn't upstream.Elliott Hughes2009-10-271-3/+1
| | | | Bugs: 2099642, 2099637
* A new hygenic way for tests to clean up before or after execution.Jesse Wilson2009-10-256-12/+38
| | | | This replaces PrefsTester and is more general purpose.
* 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.
* Fix Node.getNextSibling bounds checking.Elliott Hughes2009-09-255-3/+50
| | | | | | | | | | | Obvious copy & paste error in InnerNodeImpl compared to LeafNodeImpl, plus new test. I've also fixed a typo that annoys me whenever I look at the XML test results, and removed a KnownFailure for a test that passes (and has been passing for some time). Bug: 779
* 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
* Merge change 9368Android Code Review2009-08-281-1/+1
|\ | | | | | | | | * changes: libcore/.../rg_apache_harmony_xml_ExpatParser: in C++, the return type of strchr(const char*) is 'const char*' instead of 'char *'.
| * 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.
* | AI 147687: Several fixes for failing tests in the cts host. also tests that ↵Urs Grob2009-04-242-49/+62
| | | | | | | | | | | | | | | | | | | | timeout are now marked with BrokenTest to exclude them for the time being until we have a way to execute them. BUG=1285921 Automated import of CL 147687
* | AI 146132: Fixes from the review of 'Bringing XML down to one broken test.'Urs Grob2009-04-142-26/+33
| | | | | | | | | | | | BUG=1285921 Automated import of CL 146132
* | AI 144822: Bringing XML down to one broken test.Jorg Pleumann2009-04-072-38/+36
| | | | | | | | | | | | BUG=1285921 Automated import of CL 144822
* | AI 143454: Temporarily removing the Expat test from the XMLJorg Pleumann2009-03-301-1/+2
| | | | | | | | | | | | | | test suite, so it can be run on the RI as well. BUG=1285921 Automated import of CL 143454
* | auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-03261-0/+55775
| |
* | auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-03261-55775/+0
|/
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-152-15/+9
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-09110-3282/+9644
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-1794-944/+4224
|
* Initial ContributionThe Android Open Source Project2008-10-21224-0/+46139