mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 11:45:49 +01:00
Upgrade Tool: Fix NPE (#4128)
This commit is contained in:
parent
f4d6089eb0
commit
fc2d5375b7
@ -260,7 +260,7 @@ public class Upgrader {
|
|||||||
ItemChannelLink link = Objects.requireNonNull(linkStorage.get(linkUid));
|
ItemChannelLink link = Objects.requireNonNull(linkStorage.get(linkUid));
|
||||||
Configuration configuration = link.getConfiguration();
|
Configuration configuration = link.getConfiguration();
|
||||||
String profileName = (String) configuration.get(ItemChannelLinkConfigDescriptionProvider.PARAM_PROFILE);
|
String profileName = (String) configuration.get(ItemChannelLinkConfigDescriptionProvider.PARAM_PROFILE);
|
||||||
if (profileName.matches("^transform:*")) {
|
if (profileName != null && profileName.startsWith("transform:")) {
|
||||||
String toHandlerScript = (String) configuration.get("toHandlerScript");
|
String toHandlerScript = (String) configuration.get("toHandlerScript");
|
||||||
if (toHandlerScript != null) {
|
if (toHandlerScript != null) {
|
||||||
configuration.put("commandFromItemScript", toHandlerScript);
|
configuration.put("commandFromItemScript", toHandlerScript);
|
||||||
|
Loading…
Reference in New Issue
Block a user