-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix: No exception if file is not within a git repository #13839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
|
@trag-bot didn't find any issues in the code! ✅✨ |
|
@trag-bot didn't find any issues in the code! ✅✨ |
| @Inject | ||
| private GitHandlerRegistry gitHandlerRegistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field injection should be avoided in favor of constructor injection to ensure proper initialization and make dependencies explicit. This also improves testability and makes the class immutable.
| private TaskExecutor taskExecutor; | ||
|
|
||
| @Inject | ||
| private GitHandlerRegistry gitHandlerRegistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field should be marked as final since it's injected in the constructor and never reassigned, following the principles of immutability from Effective Java.
Steps to test
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)