Hello fellow developers!
I’ve got an issue with my bundle
Synology Surveillance Station Binding and the latest 3.3.0-STABLE
There is a config parameter, defined as integer:
with its corresponding group:
Normally I’m parsing this value using:
int streamId = Integer.parseInt(thing.getConfiguration().get("snapshot-stream-id").toString());
If I’m looking into
I see my parameter properly set:
This value stays persisted upon OH restart.
Until 3.3.0RC it worked as intended, now I’m observing a different behavior.
The creation of this Thing seems to work as intended, json file looks proper…
but after OH restart all entries are changed into decimal values:
As expected, it causes an exception upon parsing:
java.lang.NumberFormatException: For input string: “1.0”
Now I could use
Float.parseFloat instead or try/catch this error but it’s a dirty solution and I’m still wondering how could it be possible and whether it’s a bug or a feature
Thanks in advance!