diff --git a/lib/jul b/lib/jul index 8ea0c36959..27863c3ee9 160000 --- a/lib/jul +++ b/lib/jul @@ -1 +1 @@ -Subproject commit 8ea0c36959889f30103c10d90759ba801d3a5d77 +Subproject commit 27863c3ee905a333fcdc3fd44b09b6c0eea1d7cb diff --git a/module/app/influxdbconnector/src/main/java/org/openbase/bco/app/influxdbconnector/InfluxDbconnectorApp.java b/module/app/influxdbconnector/src/main/java/org/openbase/bco/app/influxdbconnector/InfluxDbconnectorApp.java index cff6cb98a3..343703718c 100644 --- a/module/app/influxdbconnector/src/main/java/org/openbase/bco/app/influxdbconnector/InfluxDbconnectorApp.java +++ b/module/app/influxdbconnector/src/main/java/org/openbase/bco/app/influxdbconnector/InfluxDbconnectorApp.java @@ -349,8 +349,13 @@ private void storeServiceState(final Unit unit, final ServiceTemplateType.Ser point.addTag(entry.getKey(), entry.getValue()); } } + List entryList = unit.getConfig().getLabel().getEntryList(); for (LabelType.Label.MapFieldEntry entry : entryList) { + // skip entries that offer a language key but do not provide any label. + if(entry.getValueList().isEmpty()) { + continue; + } point.addTag("label_" + entry.getKey(), entry.getValue(0)); } diff --git a/module/registry/util/src/main/java/org/openbase/bco/registry/print/BCOQueryLabelPrinter.kt b/module/registry/util/src/main/java/org/openbase/bco/registry/print/BCOQueryLabelPrinter.kt index ae40819826..7f12a40c85 100644 --- a/module/registry/util/src/main/java/org/openbase/bco/registry/print/BCOQueryLabelPrinter.kt +++ b/module/registry/util/src/main/java/org/openbase/bco/registry/print/BCOQueryLabelPrinter.kt @@ -123,7 +123,7 @@ object BCOQueryLabelPrinter { fun printUnit(unitConfig: UnitConfig) { // calculate max unit label length - val maxUnitLabelLength = LabelProcessor.getBestMatch(unitConfig.label).length + val maxUnitLabelLength = LabelProcessor.getBestMatch(unitConfig.label)?.length?:0 val maxLocationUnitLabelLength = getLocationLabel(unitConfig).length // print @@ -157,13 +157,8 @@ object BCOQueryLabelPrinter { ) } - private fun getLocationLabel(unitConfig: UnitConfig): String { - return try { - LabelProcessor.getBestMatch( - Registries.getUnitRegistry().getUnitConfigById(unitConfig.placementConfig.locationId).label - ) - } catch (ex: CouldNotPerformException) { - "?" - } - } + private fun getLocationLabel(unitConfig: UnitConfig): String = + Registries.getUnitRegistry().getUnitConfigById(unitConfig.placementConfig.locationId).label + ?.let { LabelProcessor.getBestMatch(it) } + ?: "?" }