Skip to content

Commit

Permalink
fixed passing of null argument (openhab#2749)
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Kreuzer <kai@openhab.org>
  • Loading branch information
kaikreuzer authored and aogorek committed Jan 14, 2018
1 parent 0221458 commit d9cf11f
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<String, Object> config) {
protected void activate(@NonNull ComponentContext componentContext, Map<String, Object> config) {
super.activate(componentContext);
modified(config);
};

@Override
@Deactivate
protected void deactivate() {
super.deactivate(null);
protected void deactivate(ComponentContext componentContext) {
super.deactivate(componentContext);
}

@Modified
Expand Down

0 comments on commit d9cf11f

Please sign in to comment.