diff --git a/plugins/copyright/src/com/maddyhome/idea/copyright/CopyrightManager.java b/plugins/copyright/src/com/maddyhome/idea/copyright/CopyrightManager.java index 278a1f254b16..7eff178c58e3 100644 --- a/plugins/copyright/src/com/maddyhome/idea/copyright/CopyrightManager.java +++ b/plugins/copyright/src/com/maddyhome/idea/copyright/CopyrightManager.java @@ -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);