|
4 | 4 |
|
5 | 5 | import com.ctc.wstx.evt.CompactStartElement; |
6 | 6 | import com.ctc.wstx.stax.WstxInputFactory; |
| 7 | +import com.ctc.wstx.stax.WstxOutputFactory; |
7 | 8 | import java.io.ByteArrayInputStream; |
8 | 9 | import java.io.IOException; |
9 | 10 | import java.io.InputStream; |
@@ -43,7 +44,7 @@ class FormatCommand extends AbstractCommand { |
43 | 44 | private XMLInputFactory inputFactory = WstxInputFactory.newInstance(); |
44 | 45 |
|
45 | 46 | /** StAX OutputFactory */ |
46 | | - private XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); |
| 47 | + private XMLOutputFactory outputFactory = WstxOutputFactory.newInstance(); |
47 | 48 |
|
48 | 49 | private List<MatchData> singleElementsWithAttributes = new ArrayList<>(); |
49 | 50 |
|
@@ -272,10 +273,6 @@ private void parseXmlAndCharset(POMDocument pomFile) throws XMLStreamException, |
272 | 273 | int elementStart = 0; |
273 | 274 | List<XMLEvent> prevEvents = new ArrayList<>(); |
274 | 275 |
|
275 | | - System.out.println("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); |
276 | | - System.out.println(inputFactory.getClass()); |
277 | | - System.out.println(eventReader.getClass()); |
278 | | - System.out.println("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); |
279 | 276 | while (eventReader.hasNext()) { |
280 | 277 | XMLEvent event = eventReader.nextEvent(); |
281 | 278 |
|
@@ -331,7 +328,7 @@ private void parseXmlAndCharset(POMDocument pomFile) throws XMLStreamException, |
331 | 328 | new String(pomFile.getOriginalPom(), pomFile.getCharset()); |
332 | 329 |
|
333 | 330 | String untrimmedOriginalContent = ""; |
334 | | - // is self closing element, tag is contained within the offset of the next element |
| 331 | + // is self-closing element, tag is contained within the offset of the next element |
335 | 332 | if (prevEvents.get(prevEvents.size() - 1) instanceof CompactStartElement) { |
336 | 333 | untrimmedOriginalContent = |
337 | 334 | originalPomCharsetString.substring( |
|
0 commit comments