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.
- 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.
- 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.