private static @NotNull Element loadUsingStaX(@NotNull InputStream stream) throws JDOMException {
    try {
      XMLStreamReader2 xmlStreamReader = StaxFactory.createXmlStreamReader(stream, null);
      try {
        return SafeStAXStreamBuilderKt.buildJdom(xmlStreamReader, true);
      }
      finally {
        xmlStreamReader.close();
      }
    }
    catch (XMLStreamException | UncheckedStreamException | IllegalNameException e) {
      throw new JDOMException(e.getMessage(), e);
    }
  }
private static @NotNull Element loadUsingStaX(@NotNull InputStream stream)