Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d88068

Browse files
committed
Review comments++
1 parentf67d2fd commit5d88068

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎module/src/main/java/com/iluwatar/module/App.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,8 @@ public final class App {
4545
publicstaticvoidprepare()throwsFileNotFoundException {
4646

4747
/* Create new singleton objects and prepare their modules */
48-
fileLoggerModule =FileLoggerModule.getSingleton();
49-
consoleLoggerModule =ConsoleLoggerModule.getSingleton();
50-
51-
/* Prepare modules */
52-
fileLoggerModule.prepare();
53-
consoleLoggerModule.prepare();
48+
fileLoggerModule =FileLoggerModule.getSingleton().prepare();
49+
consoleLoggerModule =ConsoleLoggerModule.getSingleton().prepare();
5450
}
5551

5652
/**

‎module/src/main/java/com/iluwatar/module/ConsoleLoggerModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ public static ConsoleLoggerModule getSingleton() {
5656
/**
5757
* Following method performs the initialization
5858
*/
59-
publicvoidprepare() {
59+
publicConsoleLoggerModuleprepare() {
6060

6161
LOGGER.debug("ConsoleLoggerModule::prepare();");
6262

6363
this.output =newPrintStream(System.out);
6464
this.error =newPrintStream(System.err);
65+
66+
returnthis;
6567
}
6668

6769
/**

‎module/src/main/java/com/iluwatar/module/FileLoggerModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ public static FileLoggerModule getSingleton() {
6464
* @throws FileNotFoundException if program is not able to find log files (output.txt and
6565
* error.txt)
6666
*/
67-
publicvoidprepare()throwsFileNotFoundException {
67+
publicFileLoggerModuleprepare()throwsFileNotFoundException {
6868

6969
LOGGER.debug("FileLoggerModule::prepare();");
7070

7171
this.output =newPrintStream(newFileOutputStream(OUTPUT_FILE));
7272
this.error =newPrintStream(newFileOutputStream(ERROR_FILE));
73+
74+
returnthis;
7375
}
7476

7577
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp