aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2023-08-23 14:23:13 +0200
committerjonmv <venstad@gmail.com>2023-08-23 14:23:13 +0200
commit69f547d7370020f3d7222c993e68ff178a8733a5 (patch)
tree7219733207c7c3ce5344ae2991c3b07d6ec88604 /controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
parentd4ffa9cc1f32fa2024e13f5ee7f1d515f071aa87 (diff)
Return build number with submit response
Diffstat (limited to 'controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
index 29e1d494ffc..7303320a4f7 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
@@ -95,8 +95,8 @@ public class ApplicationVersion implements Comparable<ApplicationVersion> {
public String stringId() {
return source.map(SourceRevision::commit).map(ApplicationVersion::abbreviateCommit)
.or(this::commit)
- .map(commit -> String.format("%s.%d-%s", majorVersion, buildNumber().getAsLong(), commit))
- .orElseGet(() -> majorVersion + "." + buildNumber().getAsLong());
+ .map(commit -> String.format("%s.%d-%s", majorVersion, buildNumber(), commit))
+ .orElseGet(() -> majorVersion + "." + buildNumber());
}
/**
@@ -105,8 +105,8 @@ public class ApplicationVersion implements Comparable<ApplicationVersion> {
*/
public Optional<SourceRevision> source() { return source; }
- /** Returns the build number that built this version */
- public OptionalLong buildNumber() { return OptionalLong.of(id.number()); }
+ /** Returns the build number of this version */
+ public long buildNumber() { return id.number(); }
/** Returns the email of the author of commit of this version, if known */
public Optional<String> authorEmail() { return authorEmail; }