Closed MDeLuise closed 2 months ago
Attention: Patch coverage is 0%
with 6 lines
in your changes missing coverage. Please review.
Project coverage is 16.81%. Comparing base (
c2f4542
) to head (09ac94c
). Report is 3 commits behind head on develop.
Description
This pull request addresses a potential
NullPointerException
(NPE) in theServiceConfigurations
resource of the Kapua REST API. The issue arises when thescopeId
provided does not match any existing account.Details
Currently, the
ServiceConfigurations
resource performs the following operation:If the
accountService.find(scopeId)
method returnsnull
, attempting to callaccount.getScopeId()
will result in aNullPointerException
.The problem occurs specifically with the following calls:
PUT v1/{non-existing-scope-id}/serviceConfigurations
PUT v1/{non-existing-scope-id}/serviceConfigurations/{dummy-component-id}
Changes
accountService.find(scopeId)
returnsnull
.KapuaEntityNotFoundException
if the account is not found for the givenscopeId
.