mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 06:58:54 +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:
+3
-3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user