< prev index next >
jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -434,17 +434,18 @@
// so no point in doing a buffering here.
if(encoding.equals("UTF-8")) {
Encoded[] table = context.getUTF8NameTable();
final UTF8XmlOutput out;
+ CharacterEscapeHandler ceh = createEscapeHandler(encoding);
if(isFormattedOutput())
- out = new IndentingUTF8XmlOutput(os, indent, table, escapeHandler);
+ out = new IndentingUTF8XmlOutput(os, indent, table, ceh);
else {
if(c14nSupport)
- out = new C14nXmlOutput(os, table, context.c14nSupport, escapeHandler);
+ out = new C14nXmlOutput(os, table, context.c14nSupport, ceh);
else
- out = new UTF8XmlOutput(os, table, escapeHandler);
+ out = new UTF8XmlOutput(os, table, ceh);
}
if(header!=null)
out.setHeader(header);
return out;
}
< prev index next >