From e7201c48d16a845c7077cc37b28caafae3ab4994 Mon Sep 17 00:00:00 2001 From: Steve Riesenberg Date: Wed, 12 Jul 2023 15:59:51 -0500 Subject: [PATCH] Fix copy/paste from main Issue gh-13500 --- .../gradle/sagan/SaganCreateReleaseTask.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java index 55f4102d8b..0d1262a980 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java @@ -52,9 +52,9 @@ public class SaganCreateReleaseTask extends DefaultTask { if (this.version.endsWith("-SNAPSHOT")) { Matcher versionMatcher = VERSION_PATTERN.matcher(this.version); Assert.isTrue(versionMatcher.matches(), "Version " + this.version + " does not match expected pattern"); - var majorVersion = versionMatcher.group(1); - var minorVersion = versionMatcher.group(2); - var majorMinorVersion = "%s.%s-SNAPSHOT".formatted(majorVersion, minorVersion); + String majorVersion = versionMatcher.group(1); + String minorVersion = versionMatcher.group(2); + String majorMinorVersion = String.format("%s.%s-SNAPSHOT", majorVersion, minorVersion); referenceDocUrl = this.referenceDocUrl.replace("{version}", majorMinorVersion); }