From 8ca49be0ea34e92792e98247b67a5ba842fe925b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bigourdan Date: Wed, 17 Jul 2024 15:51:30 +0200 Subject: [PATCH] Switch to flush to persist preferences --- .../eclipse_solargraph/preferences/BooleanPreferences.java | 2 +- .../eclipse_solargraph/preferences/StringPreferences.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/BooleanPreferences.java b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/BooleanPreferences.java index 1d31b44..657c83c 100644 --- a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/BooleanPreferences.java +++ b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/BooleanPreferences.java @@ -57,7 +57,7 @@ public Boolean getDef() { public void setValue(Boolean value) { PREFERENCES.putBoolean(key, value); try { - PREFERENCES.sync(); + PREFERENCES.flush(); } catch (BackingStoreException e) { LogHelper.error("Exception whilst persisting preference " + this.getKey(), e); } diff --git a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/StringPreferences.java b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/StringPreferences.java index 65d73af..79a7828 100644 --- a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/StringPreferences.java +++ b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/preferences/StringPreferences.java @@ -59,7 +59,7 @@ public String getDef() { public void setValue(String value) { PREFERENCES.put(key, value); try { - PREFERENCES.sync(); + PREFERENCES.flush(); } catch (BackingStoreException e) { LogHelper.error("Exception whilst persisting preference " + this.getKey(), e); }