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 throw Exception in case of error in LPVSWebhookUtil class #384

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

o-kopysov
Copy link
Collaborator

@o-kopysov o-kopysov commented Jan 2, 2024

Pull Request

Description

Current pull request provides correct processing of exceptions in LPVSWebhookUtil class.
Also, it contains corresponding updates in unit tests.

Fixes #301

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • Documentation update
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

Checklist:

  • My code follows the style guidelines of this project
  • My code meets the required code coverage for lines (90% and above)
  • My code meets the required code coverage for branches (80% and above)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@o-kopysov o-kopysov added the fix label Jan 2, 2024
@o-kopysov o-kopysov added this to the v1.4.0 milestone Jan 2, 2024
@o-kopysov o-kopysov self-assigned this Jan 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (6e4e613) 91.54% compared to head (c7f6a31) 90.97%.
Report is 1 commits behind head on main.

Files Patch % Lines
.../main/java/com/lpvs/service/LPVSGitHubService.java 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #384      +/-   ##
============================================
- Coverage     91.54%   90.97%   -0.58%     
+ Complexity      495      493       -2     
============================================
  Files            48       48              
  Lines          1703     1706       +3     
  Branches        206      206              
============================================
- Hits           1559     1552       -7     
- Misses           86       97      +11     
+ Partials         58       57       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@o-kopysov
Copy link
Collaborator Author

JaCoCo Test Coverage Summary

  • Coverage: 92.880%
  • Branches: 80.822%

@o-kopysov o-kopysov marked this pull request as ready for review January 2, 2024 19:14
Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that some lines of code from catch like this link should be updated in terms of IllegalArgumentException too. What do you think?

Copy link
Collaborator

@m-rudyk m-rudyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@o-kopysov o-kopysov requested a review from tiokim January 3, 2024 14:42
Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@o-kopysov o-kopysov merged commit 2c54b3c into Samsung:main Jan 4, 2024
7 checks passed
@o-kopysov o-kopysov deleted the fix-301 branch January 4, 2024 02:35
rnd4you pushed a commit to rnd4you/LPVS that referenced this pull request Jan 5, 2024
Samsung#384)

* fix: Add throw Exception in case of error for LPVSWebhookUtil class

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

* fix: Update catch code to process IllegalArgumentException

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

---------

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
rnd4you pushed a commit to rnd4you/LPVS that referenced this pull request Jan 5, 2024
Samsung#384)

* fix: Add throw Exception in case of error for LPVSWebhookUtil class

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

* fix: Update catch code to process IllegalArgumentException

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

---------

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
rnd4you pushed a commit to rnd4you/LPVS that referenced this pull request Jan 5, 2024
Samsung#384)

* fix: Add throw Exception in case of error for LPVSWebhookUtil class

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

* fix: Update catch code to process IllegalArgumentException

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

---------

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
rnd4you pushed a commit to rnd4you/LPVS that referenced this pull request Jan 5, 2024
Samsung#384)

* fix: Add throw Exception in case of error for LPVSWebhookUtil class

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

* fix: Update catch code to process IllegalArgumentException

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>

---------

Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add throw Exception in case of error
5 participants