Uploaded image for project: 'Repository'
  1. Repository
  2. REPOSITORY-433

[DataHolder] getValue with a default value not consistent for string type

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.0
    • 4.3.0
    • None
    • None
    • 4.3 M5

      How to reproduce:

      • Set an empty long data in the repository
      • Get this data with a default value via the new API (dataHolder.getValue(dataPath,  defaultValue))
      • The retrieved value is the default one => OK
      • Set an empty string data in the repository
      • Get this data with a default value via the new API
      • The retrieved value is empty => KO

      With the old API (compositeMetadata.getString(dataPath, defaultValue)), the retrieved value was empty too. But the empty notion did not exist for other types.

      Look for all calls of the old or new API that really use the default value to choose the behavior of this method

          [REPOSITORY-433] [DataHolder] getValue with a default value not consistent for string type

          Caroline Bayle made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Cédric Damioli made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Functional review OK [ 10207 ] New: Resolved [ 5 ]
          Raphaël Franchet made changes -
          Assignee Original: Raphaël Franchet [ raphael ] New: Cédric Damioli [ cedric ]
          Raphaël Franchet made changes -
          Assignee New: Raphaël Franchet [ raphael ]
          Caroline Bayle made changes -
          Assignee Original: Caroline Bayle [ cbayle ]
          Caroline Bayle made changes -
          Status Original: Available for review [ 10005 ] New: Functional review OK [ 10207 ]
          Caroline Bayle made changes -
          Assignee New: Caroline Bayle [ cbayle ]
          Caroline Bayle made changes -
          Assignee Original: Caroline Bayle [ cbayle ]
          Caroline Bayle made changes -
          Status Original: In Progress [ 3 ] New: Available for review [ 10005 ]
          Caroline Bayle made changes -
          Description Original: How to reproduce:
           * Set an empty long data in the repository
           * Get this data with a default value via the new API (dataHolder.getValue(dataPath,  defaultValue))
           * The retrieved value is the default one => {color:#00875a}*OK*{color}
           * Set an empty string data in the repository
           * Get this data with a default value via the new API
           * The retrieved value is empty => *{color:#de350b}KO{color}*

          With the old API (compositeMetadata.getString(dataPath, defaultValue)), the retrieved value was empty too. But the empty notion did not exist for other types.

          Look for all calls of the old or new API that really use the default value to choose the behavior of this method

          Migrate all calls to the old API to the new one
          New: How to reproduce:
           * Set an empty long data in the repository
           * Get this data with a default value via the new API (dataHolder.getValue(dataPath,  defaultValue))
           * The retrieved value is the default one => {color:#00875a}*OK*{color}
           * Set an empty string data in the repository
           * Get this data with a default value via the new API
           * The retrieved value is empty => *{color:#de350b}KO{color}*

          With the old API (compositeMetadata.getString(dataPath, defaultValue)), the retrieved value was empty too. But the empty notion did not exist for other types.

          Look for all calls of the old or new API that really use the default value to choose the behavior of this method

            cedric Cédric Damioli
            cbayle Caroline Bayle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: