Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3846 from kaikreuzer/rrd4j
Browse files Browse the repository at this point in the history
ignoring component.name service property
  • Loading branch information
teichsta committed Jan 27, 2016
2 parents dd51e81 + f8519a6 commit bdfd41e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.2.0" activate="activate" name="org.openhab.persistence.rrd4j" immediate="true" configuration-pid="org.openhab.rrd4j" configuration-policy="optional">
<implementation class="org.openhab.persistence.rrd4j.internal.RRD4jService"/>
<service>
<provide interface="org.openhab.core.persistence.PersistenceService"/>
<provide interface="org.openhab.core.persistence.PersistenceService"/>
</service>
<reference bind="setItemRegistry" cardinality="0..1" interface="org.openhab.core.items.ItemRegistry" name="ItemRegistry" policy="dynamic" unbind="unsetItemRegistry"/>
</scr:component>
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.openhab.core.persistence.PersistenceService;
import org.openhab.core.persistence.QueryablePersistenceService;
import org.openhab.core.types.State;
import org.osgi.framework.BundleContext;
import org.rrd4j.ConsolFun;
import org.rrd4j.DsType;
import org.rrd4j.core.FetchData;
Expand Down Expand Up @@ -339,7 +338,7 @@ static private String getUserPersistenceDataFolder() {
/**
* @{inheritDoc
*/
public void activate(final BundleContext bundleContext, final Map<String, Object> config) {
public void activate(final Map<String, Object> config) {

// add default configurations
RrdDefConfig defaultNumeric = new RrdDefConfig("default_numeric");
Expand All @@ -364,7 +363,7 @@ public void activate(final BundleContext bundleContext, final Map<String, Object

String key = keys.next();

if (key.equals("service.pid")) { // ignore servioce.pid
if (key.equals("service.pid") || key.equals("component.name")) { // ignore service.pid and name
continue;
}

Expand Down Expand Up @@ -413,7 +412,7 @@ public void activate(final BundleContext bundleContext, final Map<String, Object
if (rrdDef.isValid()) {
logger.debug("Created {}", rrdDef.toString());
} else {
logger.info("Removing invalid defintion {}", rrdDef.toString());
logger.info("Removing invalid definition {}", rrdDef.toString());
rrdDefs.remove(rrdDef.name);
}
}
Expand Down

0 comments on commit bdfd41e

Please sign in to comment.