Fix indentation issues
This commit is contained in:
parent
159461815d
commit
573df300b0
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,8 +23,7 @@ public class SychronizeStaticDataUnitTest
|
|||
|
||||
for(int i = 0; i < numberToTest; i++) {
|
||||
int finalI = i;
|
||||
pool.execute(() ->
|
||||
{
|
||||
pool.execute(() -> {
|
||||
new com.baeldung.concurrent.synchronizestatic.none.Employee(finalI, "John", "Smith");
|
||||
});
|
||||
}
|
||||
|
@ -38,8 +36,7 @@ public class SychronizeStaticDataUnitTest
|
|||
|
||||
for(int i = 0; i < numberToTest; i++) {
|
||||
int finalI = i;
|
||||
pool.execute(() ->
|
||||
{
|
||||
pool.execute(() -> {
|
||||
new com.baeldung.concurrent.synchronizestatic.synchronizedmethod.Employee(finalI, "John", "Smith");
|
||||
});
|
||||
}
|
||||
|
@ -52,8 +49,7 @@ public class SychronizeStaticDataUnitTest
|
|||
|
||||
for(int i = 0; i < numberToTest; i++) {
|
||||
int finalI = i;
|
||||
pool.execute(() ->
|
||||
{
|
||||
pool.execute(() -> {
|
||||
new com.baeldung.concurrent.synchronizestatic.synchronizedclass.Employee(finalI, "John", "Smith");
|
||||
});
|
||||
}
|
||||
|
@ -66,8 +62,7 @@ public class SychronizeStaticDataUnitTest
|
|||
|
||||
for(int i = 0; i < numberToTest; i++) {
|
||||
int finalI = i;
|
||||
pool.execute(() ->
|
||||
{
|
||||
pool.execute(() -> {
|
||||
new com.baeldung.concurrent.synchronizestatic.synchronizedblock.Employee(finalI, "John", "Smith");
|
||||
});
|
||||
}
|
||||
|
@ -87,8 +82,7 @@ public class SychronizeStaticDataUnitTest
|
|||
|
||||
for(int i = 0; i < numberToTest; i++) {
|
||||
int finalI = i;
|
||||
pool.execute(() ->
|
||||
{
|
||||
pool.execute(() -> {
|
||||
new com.baeldung.concurrent.synchronizestatic.reentrantlock.Employee(finalI, "John", "Smith");
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue