mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-04 08:13:20 +00:00
Code cleanup (#1461)
* Code cleanup * Fix flux tests * Fix checkstyle errors * Fix compile error
This commit is contained in:
1 parent
5381387026
commit
417f21ed3d
243 files changed
+1154
-1162
No files matched your search
@@ -30,7 +30,7 @@ public enum Fatigue {
|
||||
|
||||
ALERT("alert"), TIRED("tired"), SLEEPING("sleeping");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Fatigue(String title) {
|
||||
this.title = title;
|
||||
|
||||
+2
-2
@@ -28,8 +28,8 @@ package com.iluwatar.model.view.controller;
|
||||
*/
|
||||
public class GiantController {
|
||||
|
||||
private GiantModel giant;
|
||||
private GiantView view;
|
||||
private final GiantModel giant;
|
||||
private final GiantView view;
|
||||
|
||||
public GiantController(GiantModel giant, GiantView view) {
|
||||
this.giant = giant;
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum Health {
|
||||
|
||||
HEALTHY("healthy"), WOUNDED("wounded"), DEAD("dead");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Health(String title) {
|
||||
this.title = title;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ public enum Nourishment {
|
||||
|
||||
SATURATED("saturated"), HUNGRY("hungry"), STARVING("starving");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Nourishment(String title) {
|
||||
this.title = title;
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class GiantViewTest {
|
||||
* Logging Appender Implementation
|
||||
*/
|
||||
public class InMemoryAppender extends AppenderBase<ILoggingEvent> {
|
||||
private List<ILoggingEvent> log = new LinkedList<>();
|
||||
private final List<ILoggingEvent> log = new LinkedList<>();
|
||||
|
||||
public InMemoryAppender(Class clazz) {
|
||||
((Logger) LoggerFactory.getLogger(clazz)).addAppender(this);
|
||||
|
||||
Reference in new issue
Block a user