Skip to content

Commit e48a5f6

Browse files
committed
update columnScheme
1 parent 6de8410 commit e48a5f6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core-kotlin-modules/core-kotlin-collections-6/src/test/kotlin/com/baeldung/parallelOperationsCollections/ParallelOperationCollectionsUnitTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ class ParallelOperationCollectionsUnitTest {
4040
Person("Ahmad", 42, true)
4141
)
4242
}
43-
44-
private val columnScheme = "%-25s %-45s %-40s"
4543

4644
private fun Person.setAdultStatus(){
4745
this.isAdult = this.age >= 18
4846

4947
println(
50-
columnScheme.format(
48+
"%-25s %-45s %-40s".format(
5149
SimpleDateFormat("yyyy-MM-dd:HH:mm:ss:SSS").format(Date.from(Instant.now())),
5250
this.toString(),
5351
Thread.currentThread().name
@@ -56,7 +54,7 @@ class ParallelOperationCollectionsUnitTest {
5654
}
5755

5856
private fun String.printAsHeader() {
59-
println("$this ${"-".repeat(100 - this.length)}\n${columnScheme.format("Time", "Operation", "Thread name")}")
57+
println("$this ${"-".repeat(100 - this.length)}\n${"%-25s %-45s %-40s".format("Time", "Operation", "Thread name")}")
6058
}
6159

6260
private fun Instant.printTotalTime() {

0 commit comments

Comments
 (0)