eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

Fix `ClassNotFoundException` handling in `ServiceConfigurations` #4068

Closed MDeLuise closed 1 month ago

MDeLuise commented 1 month ago

Description

This pull request addresses an issue in the ServiceConfigurations class where ClassNotFoundException was being thrown by the following methods:

These exceptions were not user-friendly and have now been replaced with KapuaIllegalArgumentException to provide a better user experience since the affected values are user-provided values.

Note

Please merge this pull request after eclipse/kapua#4064 is merged.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 16.80%. Comparing base (646e283) to head (05fe2ce).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4068/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/4068?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4068 +/- ## ============================================= - Coverage 16.81% 16.80% -0.01% Complexity 22 22 ============================================= Files 2008 2008 Lines 52167 52177 +10 Branches 4398 4398 ============================================= Hits 8770 8770 - Misses 43001 43011 +10 Partials 396 396 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4068?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [.../resources/v1/resources/ServiceConfigurations.java](https://app.codecov.io/gh/eclipse/kapua/pull/4068?src=pr&el=tree&filepath=rest-api%2Fresources%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fapp%2Fapi%2Fresources%2Fv1%2Fresources%2FServiceConfigurations.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-cmVzdC1hcGkvcmVzb3VyY2VzL3NyYy9tYWluL2phdmEvb3JnL2VjbGlwc2Uva2FwdWEvYXBwL2FwaS9yZXNvdXJjZXMvdjEvcmVzb3VyY2VzL1NlcnZpY2VDb25maWd1cmF0aW9ucy5qYXZh) | `0.00% <0.00%> (ø)` | |