Skip to content

Commit

Permalink
Fix #47, attributes of the first list value element were ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 7, 2013
1 parent c57a1cb commit cf1fa0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions release-notes/VERSION
Expand Up @@ -5,6 +5,9 @@ New minor version.

Fixes:

* [Issue#47]: First attribute of list value elements ignored
(reported by dewthefifth@github)

------------------------------------------------------------------------
=== History: ===
------------------------------------------------------------------------
Expand Down
Expand Up @@ -245,11 +245,17 @@ protected void repeatStartElement()
*/
protected void skipAttributes()
{
if (_currentState == XML_START_ELEMENT) {
_attributeCount = 0;
} else if (_currentState == XML_ATTRIBUTE_NAME) {
if (_currentState == XML_ATTRIBUTE_NAME) {
_attributeCount = 0;
_currentState = XML_START_ELEMENT;
} else if (_currentState == XML_START_ELEMENT) {
/* 06-Jan-2012, tatu: As per [#47] it looks like we should NOT do anything
* in this particular case, because it occurs when original element had
* no attributes and we now point to the first child element.
*/
// _attributeCount = 0;
} else if (_currentState == XML_TEXT) {
; // nothing to do... is it even legal?
} else {
throw new IllegalStateException("Current state not XML_START_ELEMENT or XML_ATTRIBUTE_NAME ("
+XML_START_ELEMENT+") but "+_currentState);
Expand Down

0 comments on commit cf1fa0b

Please sign in to comment.