diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlUtil.java index 7fc081b43..b55297d6e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlUtil.java @@ -35,7 +35,11 @@ public class XmlUtil { private static final TransformerFactory transformerFactory = TransformerFactory.newInstance(); static { - transformerFactory.setAttribute("indent-number", 2); + try { + 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) {