adaptris / interlok

The Adaptris Interlok Framework
http://interlok.adaptris.net
Apache License 2.0
19 stars 10 forks source link

INTERLOK-4422 Fix potential NPE when numRetries is not set #1630

Closed sebastien-belin-adp closed 2 months ago

sebastien-belin-adp commented 2 months ago

Motivation

We get a NPE when numRetries is not set in the RetryingServiceWrapper

Modification

Don't use numRetries property directly but used the method numRetries() that return the default value if null.

PR Checklist

Result

numRetries can be left empty without causing a NPE

Testing

Configure the RetryingServiceWrapper and leave numRetries. Then, run that service and make sure it works fine.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.41%. Comparing base (29cd900) to head (dcd0a34). Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...adaptris/core/services/RetryingServiceWrapper.java 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1630 +/- ## ============================================= - Coverage 89.49% 89.41% -0.09% + Complexity 11773 11765 -8 ============================================= Files 1209 1209 Lines 33701 33701 Branches 2341 2341 ============================================= - Hits 30162 30135 -27 - Misses 3063 3086 +23 - Partials 476 480 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.