Uploaded image for project: 'Opencast'
  1. MH-11391

Improve Flavor creation and parsing

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed and reviewed
    • Affects Version/s: 1.6.3, 2.0.2, 2.1.0, 2.1.1, 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: Backend Software

      Description

      Two "surprising" behaviours have been found in the MediaPackageElementFlavor class. They are not particularly serious in that they have not caused any issues (yet!), but it is good to fix them, so that the flavor handling and parsing is a little more predictable.

      1. The way the constructor is written, empty flavors are allowed. That is, it is admissible that either part, or both, are empty. This means that /subtype, type/ and even / are valid flavors.
      2. The parseFlavor method receives a string representing a flavor and returns an object. However, it is a little shocking that a string with more than one separator, such as flavor/with/an/unbounded/amount/of/separators can be successfully parsed, returning just the two first elements (flavors/with in the previous example). The class should fail for any String that does not represent a valid flavor as a whole.

        TestRail: Results

          Attachments

            Activity

              People

              • Assignee:
                ruben.perez Rubén Pérez
                Reporter:
                ruben.perez Rubén Pérez
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  TestRail: Cases