From 32f77f7437a0f3d2016ea9e145459135c9d54ac2 Mon Sep 17 00:00:00 2001 From: 0108maeda Date: Thu, 18 Jun 2026 07:17:23 +0000 Subject: [PATCH] 8385987: CheckReleaseFile.java fails for the build using the source code without .git Reviewed-by: erikj, syan --- test/jdk/build/releaseFile/CheckReleaseFile.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/jdk/build/releaseFile/CheckReleaseFile.java b/test/jdk/build/releaseFile/CheckReleaseFile.java index 1160b616223..7a48ea530e3 100644 --- a/test/jdk/build/releaseFile/CheckReleaseFile.java +++ b/test/jdk/build/releaseFile/CheckReleaseFile.java @@ -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(" ");