Skip to content

Commit b112493

Browse files
authored
Indentation disapears with custom escape handler
If a custom escape handler is set in combination with the JAXB_FORMATTED_OUTPUT option, the tabs are not printed as the tab() call expects the escaped value in the os stream. I haven't done any significant testing with this fix.
1 parent 83e58aa commit b112493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/record/OutputStreamRecord.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ protected void writeValue(String value, boolean escapeChars, boolean isAttribute
292292
CharArrayWriter out = new CharArrayWriter();
293293
escapeHandler.escape(value.toCharArray(), 0, value.length(), isAttribute, out);
294294
byte[] bytes = out.toString().getBytes();
295-
outputStreamWrite(bytes);
295+
outputStreamWrite(bytes, os);
296296
out.close();
297297
} catch (IOException e) {
298298
throw XMLMarshalException.marshalException(e);

0 commit comments

Comments
 (0)