From 00f11b3d20cc7415f057b8230222308437ed8a1b Mon Sep 17 00:00:00 2001 From: Ghareeb Falazi Date: Tue, 3 Sep 2024 19:55:49 +0200 Subject: [PATCH] Update TestLoadAdapter.java --- .../iaas/uni/stuttgart/de/adaptation/TestLoadAdapter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/java/blockchains/iaas/uni/stuttgart/de/adaptation/TestLoadAdapter.java b/src/test/java/blockchains/iaas/uni/stuttgart/de/adaptation/TestLoadAdapter.java index 8dc3c42..4da4726 100644 --- a/src/test/java/blockchains/iaas/uni/stuttgart/de/adaptation/TestLoadAdapter.java +++ b/src/test/java/blockchains/iaas/uni/stuttgart/de/adaptation/TestLoadAdapter.java @@ -15,7 +15,6 @@ import blockchains.iaas.uni.stuttgart.de.api.connectionprofiles.AbstractConnectionProfile; import blockchains.iaas.uni.stuttgart.de.api.interfaces.BlockchainAdapter; import blockchains.iaas.uni.stuttgart.de.connectionprofiles.ConnectionProfilesManager; -import blockchains.iaas.uni.stuttgart.de.management.BlockchainManager; import blockchains.iaas.uni.stuttgart.de.management.BlockchainPluginManager; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.*; @@ -132,7 +131,11 @@ public void testLoadConnectionProfile() throws IOException, URISyntaxException, private void clearPluginDirectory() { Path path = pluginManager.getPluginsPath(); final File[] files = path.toFile().listFiles(); - for (File f : files) f.delete(); + if (files != null) { + for (File f : files) { + f.delete(); + } + } } }