From f7b9df8805dc11e029513f37ebe0b4c33871d91d Mon Sep 17 00:00:00 2001 From: Andrei Rybak Date: Wed, 13 Apr 2022 16:51:20 +0200 Subject: [PATCH] GuiSettings: suppress ClassCanBeRecord inspection Class GuiSettings cannot be converted into a record at this time due to lack of support for records in Gson library, which is used for serialization and deserialization to/from JSON. https://github.com/google/gson/issues/1794 So mark it with @SuppressWarnings annotation to make the code green in IntelliJ IDEA. --- src/main/java/dev/andrybak/resoday/settings/gui/GuiSettings.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/dev/andrybak/resoday/settings/gui/GuiSettings.java b/src/main/java/dev/andrybak/resoday/settings/gui/GuiSettings.java index 4ecbffb..c81ec3c 100644 --- a/src/main/java/dev/andrybak/resoday/settings/gui/GuiSettings.java +++ b/src/main/java/dev/andrybak/resoday/settings/gui/GuiSettings.java @@ -12,6 +12,7 @@ import java.nio.file.Paths; import java.util.Objects; +@SuppressWarnings("ClassCanBeRecord") // cannot be a record due to Gson limitations public final class GuiSettings { public static final GuiSettings DEFAULT = new GuiSettings(CalendarLayoutSetting.COLUMNS_SIMONE_GIERTZ); private static final Path GUI_SETTINGS_FILE = Paths.get("gui_settings.json");