-
Notifications
You must be signed in to change notification settings - Fork 94
Refactoring the code #677
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
base: main
Are you sure you want to change the base?
Refactoring the code #677
Conversation
@mosabua please review. |
[INFO] ------------------------------------------------------------------------ |
@GET | ||
@Path("logo.svg") | ||
public Response getLogo(@Context ServletContext servletContext) | ||
throws IOException | ||
{ | ||
String fullPath = "/static/logo.svg"; | ||
String fullPath = LOGO_PATH; |
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.
This change reduces readability because we have to look up the constants.
message.append("=========="); | ||
logger.error("%s", message); | ||
System.exit(100); | ||
handleConfigurationException(e); |
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 is the motivation of this change?
@@ -94,6 +86,18 @@ private void start(List<Module> additionalModules, HaGatewayConfiguration config | |||
logger.info("======== SERVER STARTED ========"); | |||
} | |||
|
|||
private void handleConfigurationException(ApplicationConfigurationException e) |
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.
It's hard to imagine what happens from this method name. We could rename it to logConfigurationException
and move System.exit(100)
to the caller.
Please follow the commit message guideline https://trino.io/development/process.html#pull-request-and-commit-guidelines-
|
Description
Refactoring the code.
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: