Skip to content

Commit

Permalink
GuiSettings: suppress ClassCanBeRecord inspection
Browse files Browse the repository at this point in the history
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.
google/gson#1794
So mark it with @SuppressWarnings annotation to make the code green in
IntelliJ IDEA.
  • Loading branch information
rybak committed Apr 13, 2022
1 parent d67d406 commit f7b9df8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f7b9df8

Please sign in to comment.