mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-25 15:52:06 +01:00
Catch IllegalArgumentException in XmlUtil clinit
Fixes SMACK-833.
This commit is contained in:
parent
ec982f65e2
commit
cf22371d3e
1 changed files with 5 additions and 1 deletions
|
@ -35,7 +35,11 @@ public class XmlUtil {
|
||||||
private static final TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
private static final TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
try {
|
||||||
transformerFactory.setAttribute("indent-number", 2);
|
transformerFactory.setAttribute("indent-number", 2);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
LOGGER.log(Level.INFO, "XML TransformerFactory does not support indent-number attribute", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String prettyFormatXml(CharSequence xml) {
|
public static String prettyFormatXml(CharSequence xml) {
|
||||||
|
|
Loading…
Reference in a new issue