From 573df300b06ea130e8d4762c71f4072ab0cfd81c Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Sun, 12 Nov 2023 09:00:56 -0700 Subject: [PATCH] Fix indentation issues --- .../atomicinteger/Employee.java | 3 +- .../synchronizestatic/none/Employee.java | 3 +- .../reentrantlock/Employee.java | 3 +- .../synchronizedblock/Employee.java | 3 +- .../synchronizedclass/Employee.java | 3 +- .../SychronizeStaticDataUnitTest.java | 38 ++++++++----------- 6 files changed, 21 insertions(+), 32 deletions(-) diff --git a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/atomicinteger/Employee.java b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/atomicinteger/Employee.java index 9c3c9b987c..bb7c1c6b4c 100644 --- a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/atomicinteger/Employee.java +++ b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/atomicinteger/Employee.java @@ -13,8 +13,7 @@ public class Employee { String name; String title; - public Employee(int id, String name, String title) - { + public Employee(int id, String name, String title) { incrementCount(); this.id = id; this.name = name; diff --git a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/none/Employee.java b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/none/Employee.java index f050a68be4..ba722e15e9 100644 --- a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/none/Employee.java +++ b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/none/Employee.java @@ -10,8 +10,7 @@ public class Employee { String name; String title; - public Employee(int id, String name, String title) - { + public Employee(int id, String name, String title) { incrementCount(); this.id = id; this.name = name; diff --git a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/reentrantlock/Employee.java b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/reentrantlock/Employee.java index 2ac0b0d3f2..e74013ad0e 100644 --- a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/reentrantlock/Employee.java +++ b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/reentrantlock/Employee.java @@ -14,8 +14,7 @@ public class Employee { String name; String title; - public Employee(int id, String name, String title) - { + public Employee(int id, String name, String title) { incrementCount(); this.id = id; this.name = name; diff --git a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedblock/Employee.java b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedblock/Employee.java index 9c078e7abe..4cf04e5b06 100644 --- a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedblock/Employee.java +++ b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedblock/Employee.java @@ -12,8 +12,7 @@ public class Employee { String name; String title; - public Employee(int id, String name, String title) - { + public Employee(int id, String name, String title) { incrementCount(); this.id = id; this.name = name; diff --git a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedclass/Employee.java b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedclass/Employee.java index a69b633f3b..627040e88c 100644 --- a/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedclass/Employee.java +++ b/core-java-modules/core-java-concurrency-basic-3/src/main/java/com/baeldung/concurrent/synchronizestatic/synchronizedclass/Employee.java @@ -10,8 +10,7 @@ public class Employee String name; String title; - public Employee(int id, String name, String title) - { + public Employee(int id, String name, String title) { incrementCount(); this.id = id; this.name = name; diff --git a/core-java-modules/core-java-concurrency-basic-3/src/test/java/com/baeldung/concurrent/synchronizestatic/SychronizeStaticDataUnitTest.java b/core-java-modules/core-java-concurrency-basic-3/src/test/java/com/baeldung/concurrent/synchronizestatic/SychronizeStaticDataUnitTest.java index e633005c6f..b4e03673a1 100644 --- a/core-java-modules/core-java-concurrency-basic-3/src/test/java/com/baeldung/concurrent/synchronizestatic/SychronizeStaticDataUnitTest.java +++ b/core-java-modules/core-java-concurrency-basic-3/src/test/java/com/baeldung/concurrent/synchronizestatic/SychronizeStaticDataUnitTest.java @@ -11,8 +11,7 @@ import java.util.concurrent.Executors; * package. When not synchronized the out will not be sequential; * when it is synchronized the output will be in sequential. */ -public class SychronizeStaticDataUnitTest -{ +public class SychronizeStaticDataUnitTest { private final Executor pool = Executors.newFixedThreadPool(4); private final int numberToTest = 100; @@ -24,10 +23,9 @@ public class SychronizeStaticDataUnitTest for(int i = 0; i < numberToTest; i++) { int finalI = i; - pool.execute(() -> - { - new com.baeldung.concurrent.synchronizestatic.none.Employee(finalI, "John", "Smith"); - }); + pool.execute(() -> { + new com.baeldung.concurrent.synchronizestatic.none.Employee(finalI, "John", "Smith"); + }); } } @@ -38,10 +36,9 @@ public class SychronizeStaticDataUnitTest for(int i = 0; i < numberToTest; i++) { int finalI = i; - pool.execute(() -> - { - new com.baeldung.concurrent.synchronizestatic.synchronizedmethod.Employee(finalI, "John", "Smith"); - }); + pool.execute(() -> { + new com.baeldung.concurrent.synchronizestatic.synchronizedmethod.Employee(finalI, "John", "Smith"); + }); } } @@ -52,10 +49,9 @@ public class SychronizeStaticDataUnitTest for(int i = 0; i < numberToTest; i++) { int finalI = i; - pool.execute(() -> - { - new com.baeldung.concurrent.synchronizestatic.synchronizedclass.Employee(finalI, "John", "Smith"); - }); + pool.execute(() -> { + new com.baeldung.concurrent.synchronizestatic.synchronizedclass.Employee(finalI, "John", "Smith"); + }); } } @@ -66,10 +62,9 @@ public class SychronizeStaticDataUnitTest for(int i = 0; i < numberToTest; i++) { int finalI = i; - pool.execute(() -> - { - new com.baeldung.concurrent.synchronizestatic.synchronizedblock.Employee(finalI, "John", "Smith"); - }); + pool.execute(() -> { + new com.baeldung.concurrent.synchronizestatic.synchronizedblock.Employee(finalI, "John", "Smith"); + }); } } @@ -87,10 +82,9 @@ public class SychronizeStaticDataUnitTest for(int i = 0; i < numberToTest; i++) { int finalI = i; - pool.execute(() -> - { - new com.baeldung.concurrent.synchronizestatic.reentrantlock.Employee(finalI, "John", "Smith"); - }); + pool.execute(() -> { + new com.baeldung.concurrent.synchronizestatic.reentrantlock.Employee(finalI, "John", "Smith"); + }); } } }