Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12586

Replace use of Joda Time with Java 8 java.time

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.0
    • Component/s: None
    • Labels:
      None

      Description

      We're using Joda Time, a dependency in a couple places.  Now that we are on Java 8, we ought to drop the dependency, using the equivalent java.time package instead.  As I understand it, Joda time more or less was incorporated to Java as java.time with some fairly minor differences.

      Usages:

      • ConfigSetService
      • ParseDateFieldUpdateProcessorFactory

      And some related tests.


      Note this is a fairly impactful change due to a change in the pattern language. Here are the "upgrade notes" in changes.txt:

      The date format patterns used by ParseDateFieldUpdateProcessorFactory (present in "schemaless mode")
      are now interpreted by Java 8's java.time.DateTimeFormatter instead of Joda Time. The pattern language is very
      similar but not the same. Typically, simply update the pattern by changing an uppercase 'Z' to lowercase 'z' and
      that's it. For the current recommended set of patterns in schemaless mode, see "Schemaless Mode" in the ref guide.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                dsmiley David Smiley
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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