Skip to content

Commit

Permalink
Fix feature resolution
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo committed Oct 16, 2024
1 parent df9aad5 commit b60e729
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -75,6 +76,10 @@ public AnnotationActionModuleTypeHelper(final @Reference ActionInputsHelper acti
this.actionInputsHelper = actionInputsHelper;
}

@Deactivate
protected void deactivate() {
}

public Collection<ModuleInformation> parseAnnotations(Object actionProvider) {
Class<?> clazz = actionProvider.getClass();
if (clazz.isAnnotationPresent(ActionScope.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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]+\\.)*(?<dimension>[A-Z][a-zA-Z0-9]*)>");
Expand All @@ -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.
*
Expand Down

0 comments on commit b60e729

Please sign in to comment.