When BP_JAVA_VERSION is set to an exact patch version like 17.0.13, the Go buildpack does not resolve it correctly.
Root cause: normalizeVersionPattern() in src/java/jres/jre.go appends .* to any string that contains neither + nor *, so "17.0.13" becomes "17.0.13.*". libbuildpack.FindMatchingVersion finds no match for a 4-part wildcard against a 3-part version string, causing an error.
Ruby buildpack behaviour: 17.0.13 was treated as an exact pin and resolved directly.
Affected patterns:
| Input |
Normalized |
Result |
17 |
17.* |
✅ works |
17.* |
17.* |
✅ works |
17.0.+ |
17.0.* |
✅ works |
17.0.13 |
17.0.13.* |
❌ no match → error |
Fix: In normalizeVersionPattern, detect a fully-qualified version (e.g. 3-part semver with no wildcards) and return it unchanged, or append .* only when the version has fewer than 3 parts.
When
BP_JAVA_VERSIONis set to an exact patch version like17.0.13, the Go buildpack does not resolve it correctly.Root cause:
normalizeVersionPattern()insrc/java/jres/jre.goappends.*to any string that contains neither+nor*, so"17.0.13"becomes"17.0.13.*".libbuildpack.FindMatchingVersionfinds no match for a 4-part wildcard against a 3-part version string, causing an error.Ruby buildpack behaviour:
17.0.13was treated as an exact pin and resolved directly.Affected patterns:
1717.*17.*17.*17.0.+17.0.*17.0.1317.0.13.*Fix: In
normalizeVersionPattern, detect a fully-qualified version (e.g. 3-part semver with no wildcards) and return it unchanged, or append.*only when the version has fewer than 3 parts.