Code cleanup: remove Boolean constructor calls.
@@ -222,7 +222,7 @@ public class LocalPreferences {
*/
public boolean isUseAdHocRoom() {
String adhoc = PluginRes.getPreferenceRes("useAdHocRoom");
- return getBoolean("useAdHocRoom", adhoc != null ? new Boolean(adhoc) : true);
+ return getBoolean("useAdHocRoom", adhoc == null || Boolean.parseBoolean(adhoc));
}
/**
@@ -692,7 +692,7 @@ public class LocalPreferences {
public boolean isTypingNotificationShown() {
String showTypingNotification = PluginRes.getPreferenceRes("showTypingNotification");
- return getBoolean("showTypingNotification", showTypingNotification != null ? new Boolean(showTypingNotification) : false);
+ return getBoolean("showTypingNotification", Boolean.parseBoolean(showTypingNotification));
}
public void setSystemTrayNotificationEnabled(boolean shown) {
@@ -701,7 +701,7 @@ public class LocalPreferences {
public boolean isSystemTrayNotificationEnabled() {
String SystemTrayNotificationEnabled = PluginRes.getPreferenceRes("SystemTrayNotificationEnabled");
- return getBoolean("SystemTrayNotificationEnabled", SystemTrayNotificationEnabled != null ? new Boolean(SystemTrayNotificationEnabled) : false);
+ return getBoolean("SystemTrayNotificationEnabled", Boolean.parseBoolean(SystemTrayNotificationEnabled));
}
public void setTypingNotificationOn(boolean shown) {
@@ -744,7 +744,7 @@ public class LocalPreferences {
public boolean getShowToasterPopup() {
String toasterPopup = PluginRes.getPreferenceRes("toasterPopup");
- return getBoolean("toasterPopup", toasterPopup != null ? new Boolean(toasterPopup) : false);
+ return getBoolean("toasterPopup", Boolean.parseBoolean(toasterPopup));
}
public void setDisableAsteriskToasterPopup(boolean disable) {
@@ -831,7 +831,7 @@ public class LocalPreferences {
public boolean isOfflineNotificationsOn() {
String notifyOnOffline = PluginRes.getPreferenceRes("notifyOnOffline");
- return getBoolean("notifyOnOffline", notifyOnOffline != null ? new Boolean(notifyOnOffline) : false);
+ return getBoolean("notifyOnOffline", Boolean.parseBoolean(notifyOnOffline));
}
public void setOnlineNotifications(boolean notify) {
@@ -840,7 +840,7 @@ public class LocalPreferences {
public boolean isOnlineNotificationsOn() {
String notifyOnOnline = PluginRes.getPreferenceRes("notifyOnOnline");
- return getBoolean("notifyOnOnline", notifyOnOnline != null ? new Boolean(notifyOnOnline) : false);
+ return getBoolean("notifyOnOnline", Boolean.parseBoolean(notifyOnOnline));
}
public void setDockingEnabled(boolean dockingEnabled) {
