Skip to content

Commit 19d4646

Browse files
Fix exact version for BP_JAVA_VERSION
1 parent 336de41 commit 19d4646

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/java/jres/jre.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ func normalizeVersionPattern(version string) string {
317317
if strings.Contains(version, "*") {
318318
return version
319319
}
320+
// Exact patch version (e.g. "17.0.13") — already fully specified, don't append ".*"
321+
// which would produce an unmatchable pattern like "17.0.13.*".
322+
exactVersionRegex := regexp.MustCompile(`^\d+\.\d+\.\d+$`)
323+
if exactVersionRegex.MatchString(version) {
324+
return version
325+
}
320326
return version + ".*"
321327
}
322328

0 commit comments

Comments
 (0)