📍Use lombok, reformat, and optimize the code (#1560)

* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions
@@ -41,24 +41,24 @@ import org.slf4j.LoggerFactory;
/**
* Test for Delegation Pattern
*/
public class DelegateTest {
class DelegateTest {
private InMemoryAppender appender;
@BeforeEach
public void setUp() {
void setUp() {
appender = new InMemoryAppender();
}
@AfterEach
public void tearDown() {
void tearDown() {
appender.stop();
}
private static final String MESSAGE = "Test Message Printed";
@Test
public void testCanonPrinter() throws Exception {
void testCanonPrinter() throws Exception {
var printerController = new PrinterController(new CanonPrinter());
printerController.print(MESSAGE);
@@ -66,7 +66,7 @@ public class DelegateTest {
}
@Test
public void testHpPrinter() throws Exception {
void testHpPrinter() throws Exception {
var printerController = new PrinterController(new HpPrinter());
printerController.print(MESSAGE);
@@ -74,7 +74,7 @@ public class DelegateTest {
}
@Test
public void testEpsonPrinter() throws Exception {
void testEpsonPrinter() throws Exception {
var printerController = new PrinterController(new EpsonPrinter());
printerController.print(MESSAGE);
@@ -84,7 +84,7 @@ public class DelegateTest {
/**
* Logging Appender
*/
private class InMemoryAppender extends AppenderBase<ILoggingEvent> {
private static class InMemoryAppender extends AppenderBase<ILoggingEvent> {
private final List<ILoggingEvent> log = new LinkedList<>();