Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix add input validation to KapuaConfigurableServiceBase #4069

Merged

Conversation

MDeLuise
Copy link
Contributor

@MDeLuise MDeLuise commented Jul 1, 2024

Description

This pull request addresses an issue in the KapuaConfigurableServiceBase where input data was not being validated. The lack of validation could cause NullPointerExceptions (NPEs) for scopeId and configValues.

Changes Made

  • Added validation to ensure scopeId is not null.
  • Added validation to ensure configValues is not null or empty.

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

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

Project coverage is 16.80%. Comparing base (2349705) to head (62635ce).
Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4069      +/-   ##
=============================================
- Coverage      16.81%   16.80%   -0.01%     
  Complexity        22       22              
=============================================
  Files           2008     2008              
  Lines          52164    52182      +18     
  Branches        4398     4398              
=============================================
  Hits            8770     8770              
- Misses         42998    43016      +18     
  Partials         396      396              
Files Coverage Δ
...ns/configuration/KapuaConfigurableServiceBase.java 31.81% <0.00%> (-9.36%) ⬇️

... and 1 file with indirect coverage changes

@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Jul 1, 2024
@MDeLuise MDeLuise force-pushed the fix-validateKapuaConfigurableServiceBase branch from 39e6353 to e9cb74f Compare July 1, 2024 09:51
Added validation for scopeId and configValues in KapuaConfigurableServiceBase to prevent NullPointerExceptions. Ensured configValues is checked for null and emptiness.
@MDeLuise MDeLuise force-pushed the fix-validateKapuaConfigurableServiceBase branch from e9cb74f to 62635ce Compare July 1, 2024 13:27
@Coduz Coduz merged commit 1e2c8ad into eclipse:develop Jul 2, 2024
34 of 35 checks passed
@MDeLuise MDeLuise deleted the fix-validateKapuaConfigurableServiceBase branch July 16, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it!
Projects
Development

Successfully merging this pull request may close these issues.

2 participants