Permalink
Browse files

Use weasel words to cover changed behavior around END_DOCUMENT.

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
  • Loading branch information...
1 parent d71c847 commit f1a7fc1453676af318ce11fed9616cbb090b83ae Jesse Wilson committed May 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 xml/src/main/java/org/xmlpull/v1/XmlPullParser.java
@@ -161,9 +161,9 @@
* Logical end of the xml document. Returned from getEventType, next()
* and nextToken()
* when the end of the input document has been reached.
- * <p><strong>NOTE:</strong> calling again
+ * <p><strong>NOTE:</strong> subsequent calls to
* <a href="#next()">next()</a> or <a href="#nextToken()">nextToken()</a>
- * will result in exception being thrown.
+ * may result in exception being thrown.
*
* @see #next
* @see #nextToken

0 comments on commit f1a7fc1

Please sign in to comment.