eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 787 forks source link

Fixing NPE before activating DefaultScriptScopeProvider #6819

Closed sprehn closed 5 years ago

sprehn commented 5 years ago

Signed-off-by: Sebastian Prehn sebastian.prehn@gmx.de (github: sprehn)

sprehn commented 5 years ago
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE)
    void addThingActions(ThingActions thingActions) {
        this.thingActions.addThingActions(thingActions); // <-- NPE here
        elements.put(thingActions.getClass().getSimpleName(), thingActions.getClass());
    }

    @Activate
    protected void activate() {
        busEvent = new ScriptBusEvent(itemRegistry, eventPublisher);
        thingActions = new ScriptThingActions(thingRegistry) // <-- thingActions initialized here
kaikreuzer commented 5 years ago

@sprehn It seems you have not signed the ECA yet - this would be required for the merge. See https://github.com/eclipse/smarthome/blob/master/CONTRIBUTING.md#legal-considerations.

sprehn commented 5 years ago

Signed it now. Can I trigger re-evaluation ip-validation check somehow, or do I need to commit sth again?

kaikreuzer commented 5 years ago

No need, I have manually verified your ECA and can confirm that it is signed. So good to merge, thanks!

sprehn commented 5 years ago

I don’t mind whatever is more preferred

sprehn commented 5 years ago

Raised PR #6827 to discuss futher. it is a bit simpler