gdziadkiewicz commented on PR #199:
URL: https://github.com/apache/logging-log4net/pull/199#issuecomment-2436449916

   @FreeAndNil I'm wondering about two parts of the code. One is the:
   ```csharp
       catch
       {
         return null;
       }
   ```
   Should it really be the only place that doesn't fail back to 
`Environment.User`
   
   and the second is the first if utilizing the flag:
   ```csharp
       if (_platformDoesNotSupportWindowsIdentity)
       {
         // we've already received one PlatformNotSupportedException or null 
from TryReadWindowsIdentityUserName
         // and it's highly unlikely that will change
         return Environment.UserName;
       }
   ```
    It is the only piece of code outside of the try block. It would be highly 
unfortunate to get an unhandled exception from it(based on impl details 
`Environment.UserName` can throw ). WDYT?


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