| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This adds support for writing surrogate pairs out as entity references in
KXmlSerializer and for parsing non-BMP entity references in
DocumentBuilderImpl.
Emoji and XML. Two of my least favorite things together at last.
Bug: 17960630
Change-Id: If5e1001faf250e87e6eeebe3449a6ebc115789a1
|
|
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=68924
Change-Id: If687c3b02ae630097d5e4b9603acec19732a7dcc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We should set features on a parser only if the feature
value is true. I.e, we guarantee that we'll never call
XmlPullParser.setFeature(..., false).
- In change 0363556bad8930a, we didn't consider the fact
that apps could extend XmlPullParserFactory and modify
protected fields to change the parser / serializer that's
instantiated. I've reinstated this feature, despite the
fact that it's a particularly pointless feature on a
more-or-less pointless public API. Apps can and should
instantiate their own parser instances directly instead
of going through this factory.
bug: 12956724
Change-Id: I793eba335b5385eb641e023b3613bba4515a85bf
|
|
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=62919
Change-Id: Iadb85c25ec7e07ee245b009f5fb848c8228924a1
|
|
|
|
|
|
| |
Bring back fields that were never used but are public APIs.
Change-Id: I81d312f53745c03da450f599070ae0f5ddd5a81a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we're hard coding KXmlParser and KXmlSerializer
anyway, we might as well do it more directly.
Also add a trivial unit test for this method.
NOTE: This change preserves existing behaviour and doesn't
throw from #newInstance if the parser class couldn't be
found or instantiated. We instead throw from newPullParser or
newSerializer as appropriate.
Change-Id: Ic0c86e67691b8e662d95363bbe597d3abb7c3642
|
|
|
|
|
|
|
|
| |
Allow them only before we've started parsing any
XML elements.
bug: 3452274
Change-Id: I7b146e4dae8c7aa23a0a227538ec02604f828400
|
|
|
|
|
|
|
|
|
|
| |
Avoid read position slipping beyond limit on EOF, causing an
ArrayIndexOutOfBoundsException.
Also fix two incorrect checks whether to read more data.
Bug: 9012715
Change-Id: I40f60becd97eb4d9f33842bea2c19e9dc531d3b7
|
|
|
|
|
|
| |
Noticed during my recent Matcher change.
Change-Id: I415d911b26d0ee548ca04d56bba7fc3d4e6b3f88
|
|
|
|
| |
Change-Id: I5288c5c1f6ce094bcac2792f6fa7fc6a455f756a
|
|
|
|
|
|
|
|
|
| |
Delete some unused Kxml classes while I'm in the area, and
combine our two classes named KXmlSerializerTest.
(cherry-pick of 22a12704190060f74e308a5b5aa32d0b7f715183.)
Change-Id: Id8b3f72edc58547e49ad86c51a171dce3669be3f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to have 2 different implementations of XmlPullParser and
each of them behaved differently if you called next() after
receiving the END_DOCUMENT token:
- Parsers returned from XmlPullParserFactory didn't throw
- Parsers returned from android.util.Xml did throw
When we went to a single implementation the behavior changed for
android.util.Xml users. Unfortunately the change went from being
consistent-with-the-docs to not. Rather than changing the behavior
I'm being a weasel and changing the docs! That way we aren't
promising something we cannot deliver.
Bug: http://code.google.com/p/android/issues/detail?id=29931
Change-Id: I0e72e79270b92ecc0fdb5bf64c97fa50d2bdb81c
|
|
|
|
|
| |
Bug: http://code.google.com/p/android/issues/detail?id=29028
Change-Id: I25464730869499369fb7ec8e282ba5c67ebe909f
|
|
|
|
|
| |
Bug: http://code.google.com/p/android/issues/detail?id=21425
Change-Id: I4c69d67bb8bfdf3f78359d800860d5dc2e2e349f
|
|\
| |
| |
| |
| |
| |
| | |
explicit charset.
* commit '5d28419405d27a906426bb2a5a56a8ccdc2b38af':
Skip BOM characters even with an explicit charset.
|
| |
| |
| |
| |
| | |
Change-Id: I697448528324cd68196d00ebf82ee8eecb72148d
http://code.google.com/p/android/issues/detail?id=16892
|
| |
| |
| |
| |
| |
| | |
"Creating new instances of java.lang.Boolean wastes memory."
Change-Id: I954ea1497e924ae9008fe4e47762008f1d1c8561
|
| |
| |
| |
| | |
Change-Id: Ia2c621d8a9dfe04cd55aac652d1ac9ea4398afd1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
expectations/knownfailures.txt
Change-Id: Iee137d2c0c5e8bfa6994258f5fab8e07caeb86e1
|
| |
| |
| |
| |
| |
| |
| |
| | |
We have a similar bug for misplaced DTDs. This is tested
but not fixed by this change.
Change-Id: I8e06ec9197cb8c4135212056ab791c254c9dcc3d
http://b/3452274
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Change-Id: Ibef02ca759eb56a00f0f72f4063d129ef5350d21
http://b/3241492
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
With this change we should be able to drop the Expat pull parser
and use Kxml exclusively. I'm deferring that change until after
the current release.
Change-Id: I7c6d6dfe6c1e9ae9417c48603068ddd4ade78b76
http://b/3090550
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix KxmlParser to capture the DTD's root element name, system ID and
public ID. This is more robust than capturing the same in the pull-to-DOM
adapter.
Fix close guard warnings in XML tests. Close input streams of resource
files. Don't catch exceptions only to call fail().
http://b/3090550
Change-Id: I7cfafde58cc28af79c48386a4d124803c8791328
|
|
|
|
|
| |
Change-Id: Ib32040e0ebe8ef52e8d382fb65ab4d08779901b7
http://b/3090550
|
|
|
|
|
|
|
|
|
|
|
| |
This change still has some problems:
- default attribute values are not honored.
- the doctype token text is lost
- entity values are not reparsed
- use of parameter entities is ignored but should cause a failure
Change-Id: Idd543846840aea481730e690e63212164555cdf1
http://b/3090550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up some of the structural problems with the KxmlParser code.
It was unclear how different text tokens (text, CDATA and entity tokens)
were concatenated in next() but not nextToken(). This moves the token loop
from the next() method into the nextImpl() method, saving redundant calls
to peekNext().
The code also had an instance field 'token' that was only well-defined
during calls to next() and nextToken(). I've removed this field and passed
parameters instead.
This fixes some implementation bugs:
- empty CDATA blocks aren't reported
- empty entities aren't reported
- double dash in comments are forbidden in strict mode <!-- -- -->
Change-Id: I8c17b61d63e84622556f3751dbf8af282c601d09
http://b/3090550
|
|
|
|
|
| |
Change-Id: I5c19ad97c98e6276129ed7228cc38d414b9517db
http://b/3090550
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Originally reported here:
http://groups.google.com/group/android-platform/browse_thread/thread/6020aee5f01f21df/afac4ce1a0184788?show_docid=afac4ce1a0184788
Change-Id: I378a441117fdf41e74d91ba8fef8ac9abf5a5275
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I benchmarked this on four files:
size file
268 rhapsody authorization
29489 picasa sync (for gallery)
101129 amazon mp3 search results
103855 RSS feed
The performance regressed for the 268-byte file from 1.44ms to 1.56ms.
Small files are important and I intend to follow-up to bring this back
into line.
For the other files, the improvements for pull parsing were 22%, 34% and 29%.
Improvements for DOM parsing were 17%, 23% and 21%.
All but the 268-byte document now parse faster with Kxml than with Expat.
101129 byte amazon mp3 search results 29489 byte picasa sync dat 268 byte rhapsody authentication 103855 byte RSS feed
benchmark run us linear runtime us linear runtime us linear runtime us linear runtime
Dom ready to commit 174,580 ======================== 40,964 ======================= 1,968 =========================== 130,814 =======================
Dom baseline 210,256 ============================== 53,227 ============================== 2,183 ============================== 164,708 =============================
ExpatPull ready to commit 129,776 ================== 21,621 ============ 734 ========== 86,799 ===============
ExpatPull baseline 130,078 ================== 21,700 ============ 759 ========== 85,578 ===============
KxmlPull ready to commit 88,716 ============ 20,578 =========== 1,560 ===================== 58,567 ==========
KxmlPull baseline 114,317 ================ 31,040 ================= 1,443 =================== 82,478 ===============
Change-Id: I98b7f979c2f926e25c72541bf9f5036f097e8d91
http://b/3090550
|
|
|
|
|
|
|
|
|
| |
Motivation: in preparation to refactor the Kxml code I'd like
to bring this code to a style consistent with the rest of
Android. This code style currently disagrees with my toolchain.
Change-Id: Ibd24570c131e792532e46f7f44c64abac3a6979a
http://b/3090550
|
|\
| |
| |
| |
| |
| |
| | |
Merge commit '3d66704483f1b8ea8b6eea1939f02508c551fd62'
* commit '3d66704483f1b8ea8b6eea1939f02508c551fd62':
add meta-files about 3rd party projects
|
| |
| |
| |
| | |
Change-Id: Ib22265632a3be569eeab0320021365b2d80a805e
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
Gentlemen, you may now set your editors to "strip trailing whitespace"...
Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
|
| |
| |
| |
| | |
Change-Id: I16cfbd2faac6b565b78b5dd97e2345323a36f652
|
| |
| |
| |
| | |
Merge xml except xmlpull and kxml into luni
|
| |
| |
| |
| |
| |
| | |
Also fixing vogar to support a directory of test expectations, so we
can group them by file rather than colocating failures we want to fix
with those that we don't.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
| |
I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.
Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
See bug 2518858.
This makes our XPath implementation fail the exact same tests
as the RI's. (which we assume is also based on Apache Xalan)
Change-Id: I9a98323113c95609651e948ad11113f84ccd87ec
|
|
|
|
|
|
|
| |
The rename code required moving some behaviour from ElementImpl
and AttrImpl up to their common superclass, NodeImpl.
Change-Id: I30910de146f525a5ecc837895ce5808928b858a0
|
|
|
|
| |
Change-Id: I35e56ed989820df6b8fea36bbf81fe0314c76304
|
|
|
|
|
|
|
|
| |
The tests for this uncover problems with the RI's implementation.
It does bizarre things with hashes, trashing the absolute URI and
returning a page-relative one (like "#foo").
Change-Id: Ib8af163a7b359e3f72a9c94eb3dd7e81e3a9a95c
|