Version Comparator fehlerhaft
Description of the bug
MetadataBuilder.determineMetadataVersion(requestedVersion, destination) liefert bei identischen Eingaben nicht-deterministische Ergebnisse. Bei mehrfacher Ausführung mit derselben requestedVersion und denselben metadataVersions der Destination werden unterschiedliche Metadata-Versionen zurückgegeben.
- PublicDestination mit folgenden unterstützten Metadata-Versionen erstellen: metadataVersions = Set.of("1.0.0", "1.5.0")
- Als requested Version 1.3.0 verwenden
- MetadataBuilder.determineMetadataVersion(requestedVersion, destination) mehrfach aufrufen.
Current behavior:
Die Rückgabe ist nicht deterministisch: je nach Iterationsreihenfolge des Sets wird entweder 1.0.0 oder 1.5.0 gewählt. Ursache ist die der Comparator in Version.compareTo, der nur 0 oder 1 zurückgibt
Expected behavior:
Immer deterministische Auswahl der höchsten unterstützten Version im Set
Environments: Java SDK ab 3.0.0
Checklist:
- Add Severity label
- Add team label
- Related/affected issues/stories/epics linked and explained in the bug issue
- Creation of an automated test
- Bugfix deployed on DEV
- Bugfix tested on DEV
- Bugfix deployed on TEST
- Bugfix tested on TEST (possibly also by the connection project itself)
- Successful fix reported to Team Operations (Teams channel)
- Bugfix deployed on STAGE
- Bugfix tested on STAGE if necessary
- Bugfix deployed on PROD
- Bugfix tested on PROD (possibly also by the connection project itself)
- Final communication by Team Operations if necessary
- Internal documentation was checked and updated if necessary
- External documentation has been checked and updated if necessary
- Updated changelog if necessary
Approach/Solution:
Release version of the artifact:
Edited by Martin Vogel