From b60e7290007412e49c9e7fac47c1ec42b9d75f79 Mon Sep 17 00:00:00 2001 From: Laurent Garnier Date: Wed, 16 Oct 2024 22:33:11 +0200 Subject: [PATCH] Fix feature resolution Signed-off-by: Laurent Garnier --- .../module/provider/AnnotationActionModuleTypeHelper.java | 7 ++++++- .../openhab/core/automation/util/ActionInputsHelper.java | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/module/provider/AnnotationActionModuleTypeHelper.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/module/provider/AnnotationActionModuleTypeHelper.java index 8c6666aabe5..fd88c3560bf 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/module/provider/AnnotationActionModuleTypeHelper.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/module/provider/AnnotationActionModuleTypeHelper.java @@ -47,6 +47,7 @@ import org.openhab.core.config.core.ParameterOption; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; import org.osgi.service.component.annotations.Reference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -59,7 +60,7 @@ * @author Laurent Garnier - Injected component ActionInputsHelper */ @NonNullByDefault -@Component +@Component(service = AnnotationActionModuleTypeHelper.class) public class AnnotationActionModuleTypeHelper { private final Logger logger = LoggerFactory.getLogger(AnnotationActionModuleTypeHelper.class); @@ -75,6 +76,10 @@ public AnnotationActionModuleTypeHelper(final @Reference ActionInputsHelper acti this.actionInputsHelper = actionInputsHelper; } + @Deactivate + protected void deactivate() { + } + public Collection parseAnnotations(Object actionProvider) { Class clazz = actionProvider.getClass(); if (clazz.isAnnotationPresent(ActionScope.class)) { diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/util/ActionInputsHelper.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/util/ActionInputsHelper.java index 620e51c34e6..05fd256a090 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/util/ActionInputsHelper.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/util/ActionInputsHelper.java @@ -45,6 +45,7 @@ import org.openhab.core.types.util.UnitUtils; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; import org.osgi.service.component.annotations.Reference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +57,7 @@ * @author Laurent Garnier & Florian Hotze - Initial contribution */ @NonNullByDefault -@Component +@Component(service = ActionInputsHelper.class) public class ActionInputsHelper { private static final Pattern QUANTITY_TYPE_PATTERN = Pattern .compile("([a-z0-9]+\\.)*QuantityType<([a-z0-9]+\\.)*(?[A-Z][a-zA-Z0-9]*)>"); @@ -70,6 +71,10 @@ public ActionInputsHelper(final @Reference UnitProvider unitProvider) { this.unitProvider = unitProvider; } + @Deactivate + protected void deactivate() { + } + /** * Maps a list of {@link Input}s to a list of {@link ConfigDescriptionParameter}s. *