Skip to content

Commit

Permalink
One more small fix to FilteringGeneratorDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 2, 2020
1 parent 2baf031 commit f90ccdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ public void writeRaw(String text) throws IOException
public void writeRaw(String text, int offset, int len) throws IOException
{
if (_checkRawValueWrite()) {
delegate.writeRaw(text);
delegate.writeRaw(text, offset, len);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,13 @@ public void testRawValueDelegation() throws Exception

gen.writeStartArray();
gen.writeRawValue(new char[] { '1'}, 0, 1);
gen.writeRawValue(new char[] { '2'}, 0, 1);
gen.writeRawValue("123", 2, 1);
gen.writeRaw(',');
gen.writeRaw("/* comment */");
gen.writeRaw(" ,42", 1, 3);
gen.writeEndArray();

gen.close();
assertEquals("[1,2]", w.toString());
assertEquals("[1,3,/* comment */,42]", w.toString());
}
}

0 comments on commit f90ccdf

Please sign in to comment.