Fix indentation issues

This commit is contained in:
Michael Pratt 2023-11-12 09:00:56 -07:00
parent 159461815d
commit 573df300b0
6 changed files with 21 additions and 32 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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");
});
}
}
}