Merge pull request #468 from tfriem/master

Fix null reference when no JVM was found
This commit is contained in:
Martin Lippert
2020-05-25 07:35:00 +02:00
committed by GitHub

View File

@@ -76,6 +76,9 @@ export function findJvm(javaHome?: string) : Promise<JVM | null> {
*/
export function findJdk(javaHome?: string) : Promise<JVM | null> {
return findJvm(javaHome).then(jvm => {
if(!jvm) {
return null;
}
if (!jvm.isJdk()) {
console.log("found jvm is not a JDK");