Skip to content
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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

TheMeinerLP
Copy link
Contributor

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


// check list of users
if (users.isEmpty()) {
hostingIssues.add(new VerificationMessage(VerificationMessage.Severity.REQUIRED, HostingConfig.RESOURCE_BUNDLE.getString("MISSING_LIST_OF_USERS")));
Copy link
Member

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

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants