Element () { Element result = new Element("state"); try { //noinspection deprecation DefaultJDOMExternalizer.write(this, result, new DifferenceFilter<>(this, new CodeStyleSettingsManager()) { @Override public boolean test(@NotNull Field field) { return !isIgnoredOnSave(field.getName()) && super.test(field); } }); } catch (WriteExternalException e) { LOG.error(e); } return result; }