Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2863

CalendarBridgeProvider creates StringEncodingDateBridge

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.7.2.Final
    • Component/s: None
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              tomas.tomek333 Tomáš Tomek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified