Skip to content

Commit e76661e

Browse files
committed
Add javadocs
1 parent 568ea68 commit e76661e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/tck-build-logic/src/main/java/org/graalvm/internal/tck/TestedVersionUpdaterTask.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ void run() throws IllegalStateException, IOException {
8686
Files.writeString(coordinatesMetadataIndex.toPath(), json, java.nio.charset.StandardCharsets.UTF_8);
8787
}
8888

89+
/**
90+
* Handles pre-release versions when adding a new version to a metadata entry.
91+
* <p>
92+
* Rules applied by this method:
93+
* <ul>
94+
* <li>If the newly added version is a full release (no pre-release label, or ends with ".Final"),
95+
* all old pre-releases of the same base version are removed from {@code testedVersions}.</li>
96+
* <li>If the newly added version is itself a pre-release, no versions are removed.</li>
97+
* <li>If the {@code metadataVersion} of the entry is a pre-release of the same base version,
98+
* it is updated to the new full release version and the corresponding directory is renamed.</li>
99+
* <li>Pre-release detection uses {@link #PRE_RELEASE_PATTERN} and respects ".Final" suffixes.</li>
100+
* </ul>
101+
*/
89102
private MetadataVersionsIndexEntry handlePreReleases(MetadataVersionsIndexEntry entry, String newVersion, Path baseDir) throws IOException {
90103
// strip .Final if present
91104
String cleanedNewVersion = FINAL_PATTERN.matcher(newVersion).replaceAll("");

0 commit comments

Comments
 (0)