diff --git a/addons/binding/org.openhab.binding.network/src/main/java/org/openhab/binding/network/internal/NetworkHandlerFactory.java b/addons/binding/org.openhab.binding.network/src/main/java/org/openhab/binding/network/internal/NetworkHandlerFactory.java index e52192c02d5a8..cdcb0eb4a4c2e 100644 --- a/addons/binding/org.openhab.binding.network/src/main/java/org/openhab/binding/network/internal/NetworkHandlerFactory.java +++ b/addons/binding/org.openhab.binding.network/src/main/java/org/openhab/binding/network/internal/NetworkHandlerFactory.java @@ -14,11 +14,17 @@ import org.eclipse.jdt.annotation.NonNull; import org.eclipse.smarthome.config.core.Configuration; -import org.eclipse.smarthome.core.thing.*; -import org.eclipse.smarthome.core.thing.binding.*; +import org.eclipse.smarthome.core.thing.Thing; +import org.eclipse.smarthome.core.thing.ThingTypeUID; +import org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory; +import org.eclipse.smarthome.core.thing.binding.ThingHandler; +import org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory; import org.openhab.binding.network.handler.NetworkHandler; import org.osgi.service.component.ComponentContext; -import org.osgi.service.component.annotations.*; +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.Modified; /** * The handler factory retrieves the binding configuration and is responsible for creating @@ -38,14 +44,15 @@ public boolean supportsThingType(ThingTypeUID thingTypeUID) { // The activate component call is used to access the bindings configuration @Activate - protected void activate(ComponentContext componentContext, Map config) { + protected void activate(@NonNull ComponentContext componentContext, Map config) { super.activate(componentContext); modified(config); }; + @Override @Deactivate - protected void deactivate() { - super.deactivate(null); + protected void deactivate(ComponentContext componentContext) { + super.deactivate(componentContext); } @Modified