Bug 4518: Ensuring encapsulation

This commit is contained in:
Steffen Schaefer committed 2018-04-23 09:54:17 +02:00
1 parent 26bd6e4f7a
commit 3577d2aa86
2 files changed
+6 -6

No files matched your search

@@ -7,10 +7,10 @@ import com.sap.sse.common.settings.generic.IntegerSetting;
public class AutoplayPerspectiveOwnSettings extends AbstractGenericSerializableSettings {
private static final long serialVersionUID = -9013901094746556797L;
BooleanSetting fullscreen;
BooleanSetting switchToLive;
IntegerSetting timeToSwitchBeforeRaceStartInSeconds;
IntegerSetting waitTimeAfterRaceEndInSeconds;
private BooleanSetting fullscreen;
private BooleanSetting switchToLive;
private IntegerSetting timeToSwitchBeforeRaceStartInSeconds;
private IntegerSetting waitTimeAfterRaceEndInSeconds;
public AutoplayPerspectiveOwnSettings() {
}
@@ -64,8 +64,8 @@ public class AutoplaySettingsDialogComponent implements SettingsDialogComponent<
return new Validator<AutoplayPerspectiveOwnSettings>() {
@Override
public String getErrorMessage(AutoplayPerspectiveOwnSettings valueToValidate) {
if (valueToValidate.timeToSwitchBeforeRaceStartInSeconds.getValue() < 0
|| valueToValidate.waitTimeAfterRaceEndInSeconds.getValue() < 0) {
if (valueToValidate.getTimeToSwitchBeforeRaceStartInSeconds() < 0
|| valueToValidate.getWaitTimeAfterRaceEndInSeconds() < 0) {
return stringMessages.delaysMustNotBeNegative();
} else {
return null;