JDK 17 ea build download fails on mac with NPE.
sureshg opened this issue · comments
Sample workflow file
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Run JMH Benchmark.
timeout-minutes: 15
continue-on-error: false
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 17 ]
outputs:
sha-version: ${{ steps.sha-version.outputs.version }}
steps:
- name: Check out the source code
uses: actions/checkout@v2
- name: Download JDK ${{ matrix.jdk }}
id: download-jdk
uses: sormuras/download-jdk@v1
with:
feature: ${{ matrix.jdk }}
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
distribution: jdkfile
java-version: ${{ env.JDK_VERSION }}
jdkFile: ${{ env.JDK_FILE }}
Throwing NPE on mac.
Run sormuras/download-jdk@v1
Download JDK 17 (osx-x64)
Exception in thread "main" java.net.MalformedURLException
at java.base/java.net.URL.<init>(URL.java:679)
at java.base/java.net.URL.<init>(URL.java:541)
at java.base/java.net.URL.<init>(URL.java:488)
at DownloadJDK.download(DownloadJDK.java:91)
at DownloadJDK.main(DownloadJDK.java:29)
Caused by: java.lang.NullPointerException
at java.base/java.net.URL.<init>(URL.java:585)
at java.base/java.net.URL.<init>(URL.java:541)
at java.base/java.net.URL.<init>(URL.java:488)
at DownloadJDK.download(DownloadJDK.java:91)
at DownloadJDK.main(DownloadJDK.java:29)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:404)
at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:179)
at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:119)
Error: Process completed with exit code 1.
Fixed and updated sormuras/download-jdk@v1
to point to current main
commit.
Awesome..thanks for the quick fix.
You're welcome, Suresh.