8385987: CheckReleaseFile.java fails for the build using the source code without .git

Reviewed-by: erikj, syan
This commit is contained in:
0108maeda 2026-06-18 07:17:23 +00:00 committed by Erik Joelsson
parent 915efc5064
commit 32f77f7437

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -112,6 +112,11 @@ public class CheckReleaseFile {
}
String valueString = valueMatcher.group(1);
if ("".equals(valueString)) {
throw new RuntimeException("The test failed, SOURCE value was empty." +
" The JDK workspace used for building might not have a .git directory or generated .src-rev file." +
" Verify that either .git was removed intentionally or generating .src-rev was intentionally omitted");
}
String[] values = valueString.split(" ");