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

Comma-separated configurations now need to be loaded via getArrayProperty()

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Complete or Committed

      Description

      After seeing several other tickets related to comma-separated values in configurations (DS-3026, DS-3054, DS-3059), I've decided to do a deeper search of comma-separated configurations.

      In DSpace 5.x, these configs were often simply loaded into a String (via "getProperty()") and then "split(",")" was called to get the Array of values.

      In DSpace 6.x,, with the changes in DS-2654, we now must call "configurationService.getArrayProperty(key)", which will return the Array of values. Now, if "getProperty(key)" is used on a comma-separated list of values, only the first value will be returned. This is because commas are a special character, see the 6.x documentation at:
      https://wiki.duraspace.org/display/DSDOC6x/Configuration+Reference#ConfigurationReference-SpecialCharacters

      I've begun a deeper search into our code for examples of where we used to perform a "split(",")" on comma-separated configuration settings. I've discovered that a number of these scenarios still exist and need to be fixed to use "configurationService.getArrayProperty(key)".

      I'm working on a PR to correct these issues. This ticket is a placeholder for that general cleanup work.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tdonohue Tim Donohue
                Reporter:
                tdonohue Tim Donohue
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: