You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/04/11 17:29:55 UTC
[commons-bcel] branch master updated: Account for GitHub Actions env in finding JDK on Windows.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
The following commit(s) were added to refs/heads/master by this push:
new 10a5f30a Account for GitHub Actions env in finding JDK on Windows.
10a5f30a is described below
commit 10a5f30ae2aca4f467aa6689b723f8e3f431ba67
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Apr 11 13:29:50 2022 -0400
Account for GitHub Actions env in finding JDK on Windows.
---
src/test/java/org/apache/bcel/generic/JdkGenericDumpTestCase.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/bcel/generic/JdkGenericDumpTestCase.java b/src/test/java/org/apache/bcel/generic/JdkGenericDumpTestCase.java
index 021d472e..4f06180b 100644
--- a/src/test/java/org/apache/bcel/generic/JdkGenericDumpTestCase.java
+++ b/src/test/java/org/apache/bcel/generic/JdkGenericDumpTestCase.java
@@ -144,7 +144,11 @@ public class JdkGenericDumpTestCase {
public static Stream<String> findJavaHomes() {
if (SystemUtils.IS_OS_WINDOWS) {
- return findJavaHomesOnWindows();
+ final Stream<String> stream = findJavaHomesOnWindows();
+ if (stream.count() > 0) {
+ return findJavaHomesOnWindows();
+ }
+ // Falls back here on CI env like GitHub Actions.
}
return Stream.of(SystemUtils.JAVA_HOME);
}