This commit is contained in:
Andrea Cavalli 2023-01-22 00:55:37 +01:00
parent 7b32968fae
commit 9b3a9d7ebc
1 changed files with 9 additions and 0 deletions

View File

@ -89,6 +89,15 @@ public class DataModel {
.stream().map(Entry::getKey).collect(Collectors.joining(", ")));
});
// Check if the first version has no transformations
rawVersions
.values()
.stream()
.filter(v -> v.previousVersion == null && v.transformations != null && !v.transformations.isEmpty())
.forEach(v -> {
throw new IllegalArgumentException("First version must not have any transformation");
});
// Create the next versions map
Map<String, String> nextVersionMap = rawVersions.keySet().stream()
.map(version -> Map.entry(version, rawVersions