AmarGhugare opened a new pull request, #1879:
URL: https://github.com/apache/commons-lang/pull/1879

   `BackgroundInitializer.isInitialized()` catches `InterruptedException` 
without restoring the caller's interrupt status. This can lose a cancellation 
signal when an external executor supplies futures whose `get()` checks 
interruption even after completion, as [Guava's 
AbstractFuture](https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/AbstractFuture.java)
 does.
   
   Handle `InterruptedException` separately and restore the flag, consistent 
with `BackgroundInitializer.get()`. The existing false return value and 
handling of cancelled or failed initialization are preserved.
   
   The regression uses an external executor with an interrupt-checking future, 
without adding a dependency. It fails before the fix for both method-backed and 
supplier-backed initializers, and verifies that a later query succeeds after 
clearing the flag.
   
   Validation: all 63 focused initializer tests and Checkstyle pass. The full 
default Maven build (`mvn -o -B -ntp`) also passes: 119,330 tests, zero 
failures/errors, 18 skipped, including coverage, license, Checkstyle, binary 
compatibility, SpotBugs, PMD, and Javadoc checks.
   
   Jira ticket filing is pending approval of my Apache Jira account.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to