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/simulator/network/SimNetworkSink.kt | 6 +++++- .../org/opendc/simulator/network/SimNetworkSwitchVirtual.kt | 4 +++- .../kotlin/org/opendc/simulator/network/SimNetworkLinkTest.kt | 4 +++- .../kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt | 10 ++++++++-- .../opendc/simulator/network/SimNetworkSwitchVirtualTest.kt | 5 ++++- 5 files changed, 23 insertions(+), 6 deletions(-) (limited to 'opendc-simulator/opendc-simulator-network/src') diff --git a/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSink.kt b/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSink.kt index 675ac1c3..684b4a14 100644 --- a/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSink.kt +++ b/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSink.kt @@ -22,7 +22,11 @@ package org.opendc.simulator.network -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowConnection +import org.opendc.simulator.flow.FlowConsumer +import org.opendc.simulator.flow.FlowEngine +import org.opendc.simulator.flow.FlowSink +import org.opendc.simulator.flow.FlowSource /** * A network sink which discards all received traffic and does not generate any traffic itself. diff --git a/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtual.kt b/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtual.kt index 6667c80c..c59c44f1 100644 --- a/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtual.kt +++ b/opendc-simulator/opendc-simulator-network/src/main/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtual.kt @@ -22,7 +22,9 @@ package org.opendc.simulator.network -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowConsumer +import org.opendc.simulator.flow.FlowEngine +import org.opendc.simulator.flow.FlowSource import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer /** diff --git a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkLinkTest.kt b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkLinkTest.kt index 3480c9df..9863507d 100644 --- a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkLinkTest.kt +++ b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkLinkTest.kt @@ -23,7 +23,9 @@ package org.opendc.simulator.network import io.mockk.mockk -import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows diff --git a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt index 944c4d6a..78bd533d 100644 --- a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt +++ b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt @@ -26,11 +26,17 @@ import io.mockk.every import io.mockk.mockk import io.mockk.spyk import io.mockk.verify -import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowConsumer +import org.opendc.simulator.flow.FlowEngine +import org.opendc.simulator.flow.FlowSink +import org.opendc.simulator.flow.FlowSource import org.opendc.simulator.flow.source.FixedFlowSource import org.opendc.simulator.kotlin.runSimulation diff --git a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt index ff6cb66e..ecf80818 100644 --- a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt +++ b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt @@ -27,7 +27,10 @@ import io.mockk.verify import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowConsumer +import org.opendc.simulator.flow.FlowEngine +import org.opendc.simulator.flow.FlowSink +import org.opendc.simulator.flow.FlowSource import org.opendc.simulator.flow.source.FixedFlowSource import org.opendc.simulator.kotlin.runSimulation -- cgit v1.2.3