gxt 1.2.3
JDK 1.6
IDEA 8.01
WindowsXP
I could reproduce the infinite loop in com.extjs.gxt.ui.client.widget.form.TimeField#initList() method yesterday. And can't reproduce it now. Do you have any idea what could be wrong? GXT doesn't like March 29? 
Sample code that eats 100% of CPU:
Code:
import com.extjs.gxt.ui.client.widget.form.TimeField;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
public class TimeFieldSample implements EntryPoint {
public void onModuleLoad() {
RootPanel.get().add(new TimeField());
}
}
I was debugging com.extjs.gxt.ui.client.widget.form.TimeField#initList
Code:
@Override
protected void initList() {
initialized = true;
DateWrapper min = minValue != null ? new DateWrapper(minValue) : new DateWrapper();
if (minValue == null) {
min = min.clearTime();
}
DateWrapper max = maxValue != null ? new DateWrapper(maxValue) : new DateWrapper();
if (maxValue == null) {
max = max.clearTime().addMinutes((24 * 60) - 1);
}
List times = new ArrayList();
while (min.before(max)) {
Time r = new Time(min.asDate());
r.set("text", getFormat().format(min.asDate()));
times.add(r);
min = min.addMinutes(increment);
}
ListStore store = new ListStore();
store.add(times);
setStore(store);
setDisplayField("text");
super.initList();
}
and found that min = min.addMinutes(increment); was looping around 2AM: 2:00AM -> 2:15AM -> 2:30AM -> 2:45AM -> 2:00AM
So the code can't exit from the 'while' loop.
That bug broke our application on March 29'th so I was looking for any workaround. And the following code worked fine:
Code:
@Override
protected void initList() {
initialized = true;
DateWrapper min = minValue != null ? new DateWrapper(minValue) : new DateWrapper();
if (minValue == null) {
min = min.clearTime();
}
DateWrapper max = maxValue != null ? new DateWrapper(maxValue) : new DateWrapper();
if (maxValue == null) {
max = max.clearTime().addMinutes((24 * 60) - 1);
}
List times = new ArrayList();
int count = 0;
while (min.before(max)) {
Time r = new Time(min.asDate());
r.set("text", getFormat().format(min.asDate()));
times.add(r);
min = min.clearTime().addMinutes(count*increment);
count++;
}
ListStore store = new ListStore();
store.add(times);
setStore(store);
setDisplayField("text");
super.initList();
}
Any ideas?
I live in Ukraine. And yesterday we switched to the Summer time. Probably these 2 days when we switch to Summer/Winter time are not good days for GXT...
As I know we switch to Summer time at 2:00AM!