publicclass Bug6178071 { publicstaticvoid main(String[] args) {
GregorianCalendar cal = new GregorianCalendar(2004, JANUARY, 1);
cal.set(HOUR, 1); if (cal.get(HOUR_OF_DAY) != 1 ||
cal.get(HOUR) != 1 || cal.get(AM_PM) != AM) { thrownew RuntimeException("Unexpected hour of day: " + cal.getTime());
}
// Test case for 6440854
GregorianCalendar gc = new GregorianCalendar(2006,5,16);
gc.setLenient(false);
gc.set(HOUR_OF_DAY, 10); // The following line shouldn't throw an IllegalArgumentException.
gc.get(YEAR);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.