You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cleanup: restore the interrupt flag in email providers #255
Part of the cleanup cycle from #251. SonarCloud rule java:S2142 flags these spots.
These places catch InterruptedException (often inside catch (Exception e)) and carry on without restoring the thread's interrupt flag. Anything further up that checks Thread.interrupted() (a parallel runner shutting down, a timeout) never sees the interrupt.
Fix: restore the flag and keep the existing behaviour. For a combined catch, split it out:
} catch (InterruptedExceptione) {
Thread.currentThread().interrupt();
// then the same handling the old catch did (log / wrap / return)
} catch (Exceptione) {
...
}
Done when: the listed spots restore the interrupt flag, the behaviour is otherwise unchanged, and mvn test passes. Keep this PR to this package. SonarCloud reruns on the PR.
Activity
PUSHPAK-JAISWAL commentedon Nov 22, 2026
@shossain786 i will take this.