📍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
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
/**
* @author hongshuwei@gmail.com
*/
public class ReaderAndWriterTest {
class ReaderAndWriterTest {
private InMemoryAppender appender;
@@ -57,7 +57,7 @@ public class ReaderAndWriterTest {
* Verify reader and writer can only get the lock to read and write orderly
*/
@Test
public void testReadAndWrite() throws Exception {
void testReadAndWrite() throws Exception {
var lock = new ReaderWriterLock();
@@ -87,7 +87,7 @@ public class ReaderAndWriterTest {
* Verify reader and writer can only get the lock to read and write orderly
*/
@Test
public void testWriteAndRead() throws Exception {
void testWriteAndRead() throws Exception {
var executeService = Executors.newFixedThreadPool(2);
var lock = new ReaderWriterLock();
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
/**
* @author hongshuwei@gmail.com
*/
public class ReaderTest {
class ReaderTest {
private InMemoryAppender appender;
@@ -58,7 +58,7 @@ public class ReaderTest {
* Verify that multiple readers can get the read lock concurrently
*/
@Test
public void testRead() throws Exception {
void testRead() throws Exception {
var executeService = Executors.newFixedThreadPool(2);
var lock = new ReaderWriterLock();
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
/**
* @author hongshuwei@gmail.com
*/
public class WriterTest {
class WriterTest {
private InMemoryAppender appender;
@@ -58,7 +58,7 @@ public class WriterTest {
* Verify that multiple writers will get the lock in order.
*/
@Test
public void testWrite() throws Exception {
void testWrite() throws Exception {
var executeService = Executors.newFixedThreadPool(2);
var lock = new ReaderWriterLock();