When using CalendarBridge annotation with encoding = EncodingType.STRING and whatever resolution, the CalendarBridgeProvider doesn't provide instances of StringEncodingCalendarBridge as expected. It instead provides instances of StringEncodingDateBridge. The reason is that CalendarBridgeProvider::getDateFieldBridge() in the case of STRING uses the properties inherited from StringEncodingDateBridge, not the ones present in StringEncodingCalendarBridge (e.g. StringEncodingCalendarBridge.DATE_YEAR instead of StringEncodingCalendarBridge.CALENDAR_YEAR). Everything works fine for the case of NumericEncodingCalendarBridge because it uses the same names for the constants as NumericEncodingDateBridge and thus is shadowing them. |