-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improved code readbility for hosting checks #4023
base: master
Are you sure you want to change the base?
Improved code readbility for hosting checks #4023
Conversation
That's also include a transformation of calls into a java record class
Java has some function interfaces that can the same and java 21 has some smart casts to handle some extra functionality
…ldVerifierConsumer,HostingChecker message into resource bundle
|
||
// check list of users | ||
if (users.isEmpty()) { | ||
hostingIssues.add(new VerificationMessage(VerificationMessage.Severity.REQUIRED, HostingConfig.RESOURCE_BUNDLE.getString("MISSING_LIST_OF_USERS"))); |
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.
what's the reasoning for this? we aren't likely to internationalise these so imo its just adding a layer of indirection.
Also I suspect a number of the messages are missing escaping for e.g. ' in a number of places its adding complexity
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 boiler code that may affect the readability of other developers, especially the messages, was simply moved to a file. With Intellij I can jump from string to resource bundle and back again, the complexity is reduced in this case with the code.
This PR cleans up code and changes existing code to Java 21 functions to make it more readable. Code optimizations and readability improvements were attempted.
Unfortunately I am not able to test this because I am still working my way through it