moved null check; added synchronization to avoid concurrency issues when debugging in Java VM

This commit is contained in:
Axel Uhl committed 2012-02-28 18:16:44 +01:00
1 parent ba537b6f20
commit 9db11ef186
2 files changed
+4 -4

No files matched your search

@@ -523,7 +523,7 @@ implements CompetitorSelectionChangeListener, RaceSelectionChangeListener, TimeL
if (getChartData() != null) {
Date newestEvent = getChartData().getOldestDateOfNewestData();
if (hasVisibleCompetitors()
&& ((newestEvent.before(date) && (date.getTime() - newestEvent.getTime()) >= getStepSize()) || newestEvent == null)) {
&& (newestEvent == null || (newestEvent.before(date) && (date.getTime() - newestEvent.getTime()) >= getStepSize()))) {
loadData(false);
}
}
@@ -636,7 +636,7 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
* @param curValue
* the current value
*/
public void setCurrentValue(Double curValue) {
public synchronized void setCurrentValue(Double curValue) {
setCurrentValue(curValue, true);
}
@@ -648,7 +648,7 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
* @param fireEvent
* fire the onValue change event if true
*/
public void setCurrentValue(Double curValue, boolean fireEvent) {
public synchronized void setCurrentValue(Double curValue, boolean fireEvent) {
// Confine the value to the range
if (!isMinMaxInitialized() || curValue == null) {
return;
@@ -1088,7 +1088,7 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
/**
* Reset the progress to constrain the progress to the current range and redraw the knob as needed.
*/
private void resetCurrentValue() {
private synchronized void resetCurrentValue() {
setCurrentValue(getCurrentValue());
}