eclipse / kapua

Eclipse Public License 2.0
227 stars 160 forks source link

:sparkles: [REST-API] - restore possibility to update service/device configuration properties using a "default" value #4127

Closed Agnul97 closed 3 weeks ago

Agnul97 commented 1 month ago

Right now, if we try to update a service/device configuration property with a value equal to ““ we get an error from the back-end. In an earlier change I broke this behavior and now I want to restore it being able to set a property to the default value

In detail, the problem was caused by a known bug in the Collectors.toMap method https://stackoverflow.com/questions/24630963/nullpointerexception-in-collectors-tomap-with-null-entry-values

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 16.80%. Comparing base (2e475a1) to head (fa0d73d). Report is 4 commits behind head on develop.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4127/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4127?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4127 +/- ## ========================================== Coverage 16.80% 16.80% Complexity 22 22 ========================================== Files 2021 2021 Lines 52468 52468 Branches 4425 4425 ========================================== + Hits 8815 8819 +4 + Misses 43255 43251 -4 Partials 398 398 ``` | [Files with missing lines](https://app.codecov.io/gh/eclipse/kapua/pull/4127?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [...kapua/model/xml/adapters/XmlPropertiesAdapter.java](https://app.codecov.io/gh/eclipse/kapua/pull/4127?src=pr&el=tree&filepath=service%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fmodel%2Fxml%2Fadapters%2FXmlPropertiesAdapter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9hcGkvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9tb2RlbC94bWwvYWRhcHRlcnMvWG1sUHJvcGVydGllc0FkYXB0ZXIuamF2YQ==) | `94.87% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/eclipse/kapua/pull/4127/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)