From 402a8f55342c4565431c2a2e7287a70592f3fe33 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 12:51:27 +0200 Subject: style: Eliminate use of wildcard imports This change updates the repository to remove the use of wildcard imports everywhere. Wildcard imports are not allowed by default by Ktlint as well as Google's Java style guide. --- .../main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt | 8 ++++++-- .../main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'opendc-trace/opendc-trace-testkit/src/main') diff --git a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt index 291ca2b1..dc0f3198 100644 --- a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt +++ b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt @@ -22,11 +22,15 @@ package org.opendc.trace.testkit -import org.junit.jupiter.api.* -import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.AfterEach +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Assertions.assertNotEquals import org.junit.jupiter.api.Assumptions.assumeTrue +import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertAll import org.junit.jupiter.api.assertDoesNotThrow +import org.junit.jupiter.api.assertThrows import org.opendc.trace.TableColumn import org.opendc.trace.TableColumnType import org.opendc.trace.TableReader diff --git a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt index fab992f0..34bcbaf3 100644 --- a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt +++ b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt @@ -23,7 +23,8 @@ package org.opendc.trace.testkit import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNotEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertAll import org.junit.jupiter.api.assertThrows @@ -32,7 +33,7 @@ import org.opendc.trace.TableColumnType import org.opendc.trace.TableWriter import java.time.Duration import java.time.Instant -import java.util.* +import java.util.UUID /** * A test suite for implementations of the [TableWriter] interface. -- cgit v1.2.3 From 47357afd16f928260db34d4dd3e686fb9ee7c5ff Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 13:13:10 +0200 Subject: build: Switch to Spotless for formatting This change updates the build configuration to use Spotless for code formating of both Kotlin and Java. --- .../src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt | 2 +- .../src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc-trace/opendc-trace-testkit/src/main') diff --git a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt index dc0f3198..4624cba0 100644 --- a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt +++ b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableReaderTestKit.kt @@ -89,7 +89,7 @@ public abstract class TableReaderTestKit { { assertThrows { reader.getDuration(-1) } }, { assertThrows { reader.getList(-1, Any::class.java) } }, { assertThrows { reader.getSet(-1, Any::class.java) } }, - { assertThrows { reader.getMap(-1, Any::class.java, Any::class.java) } }, + { assertThrows { reader.getMap(-1, Any::class.java, Any::class.java) } } ) } diff --git a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt index 34bcbaf3..3cd05f50 100644 --- a/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt +++ b/opendc-trace/opendc-trace-testkit/src/main/kotlin/org/opendc/trace/testkit/TableWriterTestKit.kt @@ -88,7 +88,7 @@ public abstract class TableWriterTestKit { { assertThrows { writer.setDuration(-1, Duration.ofMinutes(5)) } }, { assertThrows { writer.setList(-1, listOf("test")) } }, { assertThrows { writer.setSet(-1, setOf("test")) } }, - { assertThrows { writer.setMap(-1, mapOf("test" to "test")) } }, + { assertThrows { writer.setMap(-1, mapOf("test" to "test")) } } ) } -- cgit v1.2.3