mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
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:
parent
ed2f197c60
commit
b0c45bf657
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user