Code cleanup (#1461)
* Code cleanup * Fix flux tests * Fix checkstyle errors * Fix compile error
This commit is contained in:
		| @@ -79,7 +79,7 @@ public class CakeViewImpl implements View { | ||||
|  | ||||
|   private static final Logger LOGGER = LoggerFactory.getLogger(CakeViewImpl.class); | ||||
|  | ||||
|   private CakeBakingService cakeBakingService; | ||||
|   private final CakeBakingService cakeBakingService; | ||||
|  | ||||
|   public CakeViewImpl(CakeBakingService cakeBakingService) { | ||||
|     this.cakeBakingService = cakeBakingService; | ||||
|   | ||||
| @@ -80,7 +80,7 @@ import java.util.List; | ||||
|  */ | ||||
| public class App { | ||||
|  | ||||
|   private static CakeBakingService cakeBakingService = new CakeBakingServiceImpl(); | ||||
|   private static final CakeBakingService cakeBakingService = new CakeBakingServiceImpl(); | ||||
|  | ||||
|   /** | ||||
|    * Application entry point. | ||||
|   | ||||
| @@ -52,7 +52,7 @@ import org.springframework.transaction.annotation.Transactional; | ||||
| @Transactional | ||||
| public class CakeBakingServiceImpl implements CakeBakingService { | ||||
|  | ||||
|   private AbstractApplicationContext context; | ||||
|   private final AbstractApplicationContext context; | ||||
|  | ||||
|   public CakeBakingServiceImpl() { | ||||
|     this.context = new ClassPathXmlApplicationContext("applicationContext.xml"); | ||||
|   | ||||
| @@ -34,7 +34,7 @@ public class CakeViewImpl implements View { | ||||
|  | ||||
|   private static final Logger LOGGER = LoggerFactory.getLogger(CakeViewImpl.class); | ||||
|  | ||||
|   private CakeBakingService cakeBakingService; | ||||
|   private final CakeBakingService cakeBakingService; | ||||
|  | ||||
|   public CakeViewImpl(CakeBakingService cakeBakingService) { | ||||
|     this.cakeBakingService = cakeBakingService; | ||||
|   | ||||
| @@ -90,7 +90,7 @@ public class CakeViewImplTest { | ||||
|  | ||||
|   private 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