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(" ");