You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by "AetherRadar (via GitHub)" <gi...@apache.org> on 2025/04/26 03:09:50 UTC
[PR] Fix redundant Optional check in DefaultHashService [shiro]
AetherRadar opened a new pull request, #2088:
URL: https://github.com/apache/shiro/pull/2088
## Issue Description
Found a redundant Optional check in DefaultHashService class. The current implementation checks if Optional is present (isPresent()) before accessing its value, which is unnecessary as the subsequent method already safely handles null values.
## Changes Made
- Removed redundant isPresent() check in DefaultHashService
- Simplified code flow while maintaining the same functionality
## Rationale
This change improves code readability by avoiding unnecessary conditional checks without changing the behavior. Redundant Optional checks make the code more complex and potentially misleading.
## Testing
Ran `mvn verify` to ensure basic checks pass. This change does not affect existing functionality, and all tests continue to pass.
--
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: commits-unsubscribe@shiro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix redundant Optional check in DefaultHashService [shiro]
Posted by "lprimak (via GitHub)" <gi...@apache.org>.
lprimak commented on PR #2088:
URL: https://github.com/apache/shiro/pull/2088#issuecomment-2831803701
Hi,
Can you restore the issue template that includes the checklist and CLA please
Thank you for your contribution!
--
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: commits-unsubscribe@shiro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix redundant Optional check in DefaultHashService [shiro]
Posted by "lprimak (via GitHub)" <gi...@apache.org>.
lprimak merged PR #2088:
URL: https://github.com/apache/shiro/pull/2088
--
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: commits-unsubscribe@shiro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix redundant Optional check in DefaultHashService [shiro]
Posted by "lprimak (via GitHub)" <gi...@apache.org>.
lprimak commented on PR #2088:
URL: https://github.com/apache/shiro/pull/2088#issuecomment-2832523800
Merged, thank you!
--
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: commits-unsubscribe@shiro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org