CalendarBridgeProvider creates StringEncodingDateBridge

Description

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.

Environment

None

Activity

Show:
Yoann Rodière
August 29, 2017, 11:11 AM

Thank you for your report! I managed to reproduce and fix the problem, and we should merge the fix soon.

Assignee

Yoann Rodière

Reporter

Tomáš Tomek

Labels

None

Suitable for new contributors

Yes, likely

Feedback Requested

None

Time tracking

0m

Time remaining

1h

Fix versions

Affects versions

Priority

Major
Configure