Upgrade Tool: Fix NPE (#4128)

This commit is contained in:
jimtng 2024-03-04 16:19:51 +10:00 committed by GitHub
parent f4d6089eb0
commit fc2d5375b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -260,7 +260,7 @@ public class Upgrader {
ItemChannelLink link = Objects.requireNonNull(linkStorage.get(linkUid));
Configuration configuration = link.getConfiguration();
String profileName = (String) configuration.get(ItemChannelLinkConfigDescriptionProvider.PARAM_PROFILE);
if (profileName.matches("^transform:*")) {
if (profileName != null && profileName.startsWith("transform:")) {
String toHandlerScript = (String) configuration.get("toHandlerScript");
if (toHandlerScript != null) {
configuration.put("commandFromItemScript", toHandlerScript);