Skip to content

Commit f90ccdf

Browse files
committed
One more small fix to FilteringGeneratorDelegate
1 parent 2baf031 commit f90ccdf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/main/java/com/fasterxml/jackson/core/filter/FilteringGeneratorDelegate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public void writeRaw(String text) throws IOException
521521
public void writeRaw(String text, int offset, int len) throws IOException
522522
{
523523
if (_checkRawValueWrite()) {
524-
delegate.writeRaw(text);
524+
delegate.writeRaw(text, offset, len);
525525
}
526526
}
527527

src/test/java/com/fasterxml/jackson/core/filter/BasicGeneratorFilteringTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,13 @@ public void testRawValueDelegation() throws Exception
347347

348348
gen.writeStartArray();
349349
gen.writeRawValue(new char[] { '1'}, 0, 1);
350-
gen.writeRawValue(new char[] { '2'}, 0, 1);
350+
gen.writeRawValue("123", 2, 1);
351+
gen.writeRaw(',');
352+
gen.writeRaw("/* comment */");
353+
gen.writeRaw(" ,42", 1, 3);
351354
gen.writeEndArray();
352355

353356
gen.close();
354-
assertEquals("[1,2]", w.toString());
357+
assertEquals("[1,3,/* comment */,42]", w.toString());
355358
}
356359
}

0 commit comments

Comments
 (0)