CR-IC-3403#CFR-62470 leads to changes between IDEA versions and we try to avoid this as much as possible

This commit is contained in:
Vladimir Krivosheev
2013-11-26 18:12:49 +01:00
parent 95c72cb1e5
commit 3656e43728
@@ -164,13 +164,13 @@ public class CopyrightManager extends AbstractProjectComponent implements Persis
state.addContent(map);
}
if (myDefaultCopyright != null) {
state.setAttribute(DEFAULT, myDefaultCopyright.getName());
}
boolean hasAttributes = myDefaultCopyright != null;
// CR-IC-3403#CFR-62470, idea <= 12 compatibility
state.setAttribute(DEFAULT, hasAttributes ? myDefaultCopyright.getName() : "");
myOptions.writeExternal(state);
return state.getChildren().isEmpty() && state.getAttributes().isEmpty() ? null : state;
return !hasAttributes && state.getChildren().isEmpty() ? null : state;
}
catch (WriteExternalException e) {
LOG.error(e);