Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-1775

Increase robustness of SolrServiceImpl date format guessing

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0
    • Component/s: Discovery
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      7
    • Documentation Status:
      Complete or Committed

      Description

      When looking at:
      https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/discovery/SolrServiceImpl.java#L1439

      It seems like the date is guessed purely on String length. Maybe this date guessing can be made more robust by doing proper regex matching, like the example here:

      http://stackoverflow.com/a/3390252

      Note that this example code also requires some additional matches to add timezone support.

        Attachments

          Activity

            People

            Assignee:
            mwood Mark H. Wood
            Reporter:
            bram Bram Luyten (Atmire)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: