openhab-core/bundles/org.openhab.core/src
Cody Cutrer d8a2c19609
Prevent a provider from removing elements added by another provider (#3301)
* prevent a provider from removing an element from another provider

if multiple providers provide the same element, the added callback
simply ignores the duplicates. but the provider has no idea its element
was ignored, so it may try to remove it in the future, and things will
get all out of whack if the element is removed from the registry even
if another provider thinks it's still there

this is easily reproducible by creating an item in the UI, then
creating the same item via a .items file, and then removing the item
from the .items file. The item will seem like it is gone to most
of openHAB, but will come back after reboot when the managed
provider re-adds.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-09 19:29:14 +01:00
..
main Prevent a provider from removing elements added by another provider (#3301) 2023-01-09 19:29:14 +01:00
test QuantityType.as(PercentType.class) fixes with dimensionless units (#3297) 2023-01-05 18:51:58 +01:00