We're updating the issue view to help you get more done. 

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

Status

Assignee

Yoann Rodière

Reporter

Tomáš Tomek

Labels

None

Suitable for new contributors

Yes, likely

Feedback Requested

None

Time Tracking

1h

Fix versions

Affects versions

5.7.2.Final

Priority

Major