mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 12:59:00 +00:00
📍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:
@@ -25,8 +25,7 @@ package com.iluwatar.tls;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.Executors;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* ThreadLocal pattern
|
||||
@@ -58,10 +57,9 @@ import org.slf4j.LoggerFactory;
|
||||
*
|
||||
* @author Thomas Bauer, 2017
|
||||
*/
|
||||
@Slf4j
|
||||
public class App {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
/**
|
||||
* Program entry point.
|
||||
*
|
||||
|
||||
@@ -27,8 +27,7 @@ import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.stream.IntStream;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* DateFormatCallable converts string dates to a date format using SimpleDateFormat. The date format
|
||||
@@ -42,9 +41,9 @@ import org.slf4j.LoggerFactory;
|
||||
*
|
||||
* @author Thomas Bauer, 2017
|
||||
*/
|
||||
@Slf4j
|
||||
public class DateFormatCallable implements Callable<Result> {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DateFormatCallable.class);
|
||||
// class variables (members)
|
||||
private final ThreadLocal<DateFormat> df; //TLTL
|
||||
// private DateFormat df; //NTLNTL
|
||||
@@ -86,7 +85,7 @@ public class DateFormatCallable implements Callable<Result> {
|
||||
}
|
||||
});
|
||||
|
||||
LOGGER.info(Thread.currentThread() + " finished processing part of the thread");
|
||||
LOGGER.info("{} finished processing part of the thread", Thread.currentThread());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user