From 97c5405d4621e58398f95a52261e186e50be796c Mon Sep 17 00:00:00 2001 From: hkosim Date: Thu, 11 Dec 2025 12:09:59 +0100 Subject: [PATCH 1/3] #1645: Hotfix for the NullPointerException --- .../java/com/devonfw/tools/ide/tool/ToolCommandlet.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java b/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java index 2d80702b3..d266ca309 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java @@ -400,7 +400,14 @@ protected void postInstallOnNewInstallation(ToolInstallRequest request) { protected ToolInstallation createExistingToolInstallation(ToolInstallRequest request) { ToolEditionAndVersion installed = request.getInstalled(); - return createExistingToolInstallation(installed.getEdition().edition(), installed.getResolvedVersion(), request.getProcessContext(), + + ToolEdition toolEdition = installed.getEdition(); + String edition = this.tool; + if (toolEdition != null) { + edition = toolEdition.edition(); + } + + return createExistingToolInstallation(edition, installed.getResolvedVersion(), request.getProcessContext(), request.isAdditionalInstallation()); } From da56a9746a1765fe26007fc02bc955eaa3ac9bec Mon Sep 17 00:00:00 2001 From: hkosim Date: Fri, 12 Dec 2025 16:10:51 +0100 Subject: [PATCH 2/3] #1645: Added more robust check on installed Object and added this issue to CHANGELOG --- CHANGELOG.adoc | 1 + .../com/devonfw/tools/ide/tool/ToolCommandlet.java | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 520d4885b..280cbbc1e 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -13,6 +13,7 @@ Release with new features and bugfixes: * https://github.com/devonfw/IDEasy/issues/1633[#1633]: CVE suggestions show unstable versions * https://github.com/devonfw/IDEasy/issues/1636[#1636]: CVE suggestion scoring more reasonable * https://github.com/devonfw/IDEasy/issues/1640[#1640]: StackOverflowError: Infinity loop whilst installing terraform +* https://github.com/devonfw/IDEasy/issues/1645[#1645]: Fix for the NullPointerException while installing docker / kubectl The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/38?closed=1[milestone 2025.12.001]. diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java b/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java index d266ca309..1ab1686b6 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java @@ -401,13 +401,15 @@ protected ToolInstallation createExistingToolInstallation(ToolInstallRequest req ToolEditionAndVersion installed = request.getInstalled(); - ToolEdition toolEdition = installed.getEdition(); String edition = this.tool; - if (toolEdition != null) { - edition = toolEdition.edition(); + VersionIdentifier resolvedVersion = VersionIdentifier.LATEST; + + if (!"".equals(installed.toString()) && installed.getEdition() != null && installed.getResolvedVersion() != null) { + edition = installed.getEdition().edition(); + resolvedVersion = installed.getResolvedVersion(); } - return createExistingToolInstallation(edition, installed.getResolvedVersion(), request.getProcessContext(), + return createExistingToolInstallation(edition, resolvedVersion, request.getProcessContext(), request.isAdditionalInstallation()); } From 3e9742d9c6fa42e04330628f24b6a91f1110a0fe Mon Sep 17 00:00:00 2001 From: hkosim Date: Mon, 15 Dec 2025 11:44:13 +0100 Subject: [PATCH 3/3] #1645: Restructured the conditions of 'installed'. --- .../com/devonfw/tools/ide/tool/ToolCommandlet.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java b/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java index 1ab1686b6..173ad57ca 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java @@ -404,9 +404,13 @@ protected ToolInstallation createExistingToolInstallation(ToolInstallRequest req String edition = this.tool; VersionIdentifier resolvedVersion = VersionIdentifier.LATEST; - if (!"".equals(installed.toString()) && installed.getEdition() != null && installed.getResolvedVersion() != null) { - edition = installed.getEdition().edition(); - resolvedVersion = installed.getResolvedVersion(); + if (installed != null) { + if (installed.getEdition() != null) { + edition = installed.getEdition().edition(); + } + if (installed.getResolvedVersion() != null) { + resolvedVersion = installed.getResolvedVersion(); + } } return createExistingToolInstallation(edition, resolvedVersion, request.getProcessContext(),