Validate sourceUrl parameters
@@ -3,6 +3,7 @@ package com.yahoo.vespa.hosted.controller.api.integration.deployment;
import com.yahoo.component.Version;
+import java.net.URI;
import java.time.Instant;
import java.util.Objects;
import java.util.Optional;
@@ -50,6 +51,8 @@ public class ApplicationVersion implements Comparable<ApplicationVersion> {
if (commit.isPresent() && commit.get().length() > 128)
throw new IllegalArgumentException("Commit may not be longer than 128 characters");
+ sourceUrl.map(URI::create);
+
if (authorEmail.isPresent() && ! authorEmail.get().matches("[^@]+@[^@]+"))
throw new IllegalArgumentException("Invalid author email '" + authorEmail.get() + "'.");
