From 4a068230579e1f78b2239c36231da4fb65d09807 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 13 Apr 2019 00:50:37 +0200 Subject: [PATCH] Balance some synchronized Balance synchronized used on getters and not setters as well as the other way around. --- .../java/org/airsonic/player/domain/TransferStatus.java | 2 +- .../java/org/airsonic/player/service/SettingsService.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airsonic-main/src/main/java/org/airsonic/player/domain/TransferStatus.java b/airsonic-main/src/main/java/org/airsonic/player/domain/TransferStatus.java index ee58dcae..a21e6792 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/domain/TransferStatus.java +++ b/airsonic-main/src/main/java/org/airsonic/player/domain/TransferStatus.java @@ -230,7 +230,7 @@ public class TransferStatus { * * @param active Whether this transfer is active. */ - public void setActive(boolean active) { + public synchronized void setActive(boolean active) { this.active = active; if (active) { diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/SettingsService.java b/airsonic-main/src/main/java/org/airsonic/player/service/SettingsService.java index 027c5e79..4d6760ee 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/SettingsService.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/SettingsService.java @@ -415,7 +415,7 @@ public class SettingsService { setProperty(KEY_PLAYLIST_FOLDER, playlistFolder); } - public String getMusicFileTypes() { + public synchronized String getMusicFileTypes() { return getProperty(KEY_MUSIC_FILE_TYPES, DEFAULT_MUSIC_FILE_TYPES); } @@ -431,7 +431,7 @@ public class SettingsService { return cachedMusicFileTypesArray; } - public String getVideoFileTypes() { + public synchronized String getVideoFileTypes() { return getProperty(KEY_VIDEO_FILE_TYPES, DEFAULT_VIDEO_FILE_TYPES); } @@ -447,7 +447,7 @@ public class SettingsService { return cachedVideoFileTypesArray; } - public String getCoverArtFileTypes() { + public synchronized String getCoverArtFileTypes() { return getProperty(KEY_COVER_ART_FILE_TYPES, DEFAULT_COVER_ART_FILE_TYPES); }