use newInstance() instead of newFactory()

This commit is contained in:
Dmitry Batkovich
2018-10-05 15:42:11 +03:00
parent 8056530998
commit 6aa5193be5
@@ -270,7 +270,7 @@ public class DefaultInspectionToolPresentation implements InspectionToolPresenta
FileUtil.createParentDirs(file);
try (PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), CharsetToolkit.UTF8_CHARSET)))) {
XMLStreamWriter xmlWriter = XMLOutputFactory.newFactory().createXMLStreamWriter(writer);
XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
if (!exists) {
xmlWriter.writeStartElement(GlobalInspectionContextBase.PROBLEMS_TAG_NAME);
xmlWriter.writeAttribute(GlobalInspectionContextBase.LOCAL_TOOL_ATTRIBUTE, Boolean.toString(myToolWrapper instanceof LocalInspectionToolWrapper));