Refactor code for clarity and consistent formatting:

- Added missing braces in the shutdown hook.
- Removed unnecessary empty lines.
- Streamlined `try` block indentation in `loadConfiguration()`.
This commit is contained in:
Gustavo Henrique Santos Souza de Miranda 2025-11-13 05:58:57 -03:00
parent ed2f197c60
commit b0c45bf657
1 changed files with 2 additions and 3 deletions

View File

@ -35,6 +35,7 @@ public class MediaManagerApplication {
logger.info("Shutting down MediaManager Core...");
if (databaseManager != null) {
databaseManager.close();
}
// TODO: Cleanup resources
@ -43,7 +44,6 @@ public class MediaManagerApplication {
Thread.sleep(500);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}));
logger.info("Application is running");
@ -64,8 +64,7 @@ public class MediaManagerApplication {
private static void loadConfiguration() throws IOException {
config = new Properties();
try (InputStream input = MediaManagerApplication.class.getClassLoader()
.getResourceAsStream("config.properties")) {
try (InputStream input = MediaManagerApplication.class.getClassLoader().getResourceAsStream("config.properties")) {
if (input == null) {
throw new IOException("Unable to find config.properties");
}