public static @NotNull List<Attribute> getAttributes(@NotNull Element e) {
    // avoid AttributeList creation if no attributes
    return e.hasAttributes() ? e.getAttributes() : Collections.emptyList();
  }
public static @NotNull List<Attribute> getAttributes(@NotNull Element e)