Skip to content

Commit

Permalink
Fixed #228
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 7, 2017
1 parent 7ebf8cd commit 6586006
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
5 changes: 5 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Project: jackson-dataformat-xml

2.9.0 (not yet released)

2.8.9 (not yet released)

#228: `XmlReadContext` should hold current value
(suggested by kfypmqqw@github)

2.8.8 (05-Apr-2017)
2.8.7 (21-Feb-2017)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ public final class XmlReadContext

protected String _currentName;

/**
* @since 2.9
*/
protected Object _currentValue;

protected Set<String> _namesToWrap;

/**
* Name of property that requires wrapping
*/
protected String _wrappedName;

/*
/**********************************************************
/* Simple instance reuse slots; speeds up things
Expand Down Expand Up @@ -70,10 +75,25 @@ protected final void reset(int type, int lineNr, int colNr)
_lineNr = lineNr;
_columnNr = colNr;
_currentName = null;
_currentValue = null;
_namesToWrap = null;
}

// // // Factory methods

@Override
public Object getCurrentValue() {
return _currentValue;
}

@Override
public void setCurrentValue(Object v) {
_currentValue = v;
}

/*
/**********************************************************
/* Factory methods
/**********************************************************
*/

public static XmlReadContext createRootContext(int lineNr, int colNr) {
return new XmlReadContext(null, TYPE_ROOT, lineNr, colNr);
Expand Down

0 comments on commit 6586006

Please sign in to comment.