Apache Felix Configuration Admin and collections

16 Feb
2022

A long time ago I wrote an post about Configuration Admin and Arrays. Recently I attempted to use this feature with openHAB and I found that it doesn’t work with its configuration framework.

Locating issue was rather fast as I got HTTP 500 while retrieving configuration through openHAB rest API. After implementing a basic patch to properly map parameter values which come as an array I attempted modification through openHAB user interface. I found that reading works, however what I wrote initially as an array:

periods=["DAY", "MONTH", "YEAR"]

Was later stored as an list:

periods = ( \
  "YEAR", \
  "MONTH", \
  "DAY", \
  "HOUR", \
)

Turns out that my code modifications are not needed. It is sufficient to keep configuration input properly formatted. Keep in mind that () allows to bring an collections. The prefix syntax described in earlier post, which determine type of contained elements, should still apply!

Comment Form

top