garydgregory commented on PR #921:
URL: https://github.com/apache/commons-io/pull/921#issuecomment-6925989259

   Hello @sofialuiza15 
   
   The PR is a reasonable idea in principle but the implementation needs a 
slightly better approach which I committed in 
a0a81f8d556c6f2939fc943213b91ae891e1ab8c. You are credited in `changes.xml`.
   
   In commit a0a81f8d556c6f2939fc943213b91ae891e1ab8c, with the local variable, 
reaper stays null until configuration succeeds. If configuration throws, a 
later `track()` call can attempt initialization again. That preserves the 
original constructor’s behavior.
   
   This is exception safety: only store the thread in the field once 
configuration succeeds. Successful initialization behaves the same either way. 
The practical benefit concerns rare configuration failures, such as those 
caused by a legacy `SecurityManager`.
   
   Closing.
   


-- 
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