From d7858d2e8f5f73797976e456ec20e2047ecaa36e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 18 Oct 2024 15:44:51 +0200 Subject: [PATCH] [sinttest] Reject empty string values for enabled/disabled tests configuration --- .../org/igniterealtime/smack/inttest/Configuration.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java index fab1e00c9..3cad302cb 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java @@ -392,12 +392,12 @@ public final class Configuration { } public Builder setEnabledTests(String enabledTestsString) { - enabledTests = getTestSetFrom(enabledTestsString); + enabledTests = getTestSetFrom(enabledTestsString, "enabled"); return this; } public Builder setDisabledTests(String disabledTestsString) { - disabledTests = getTestSetFrom(disabledTestsString); + disabledTests = getTestSetFrom(disabledTestsString, "disabled"); return this; } @@ -625,7 +625,8 @@ public final class Configuration { return res; } - private static Set getTestSetFrom(String input) { + private static Set getTestSetFrom(String input, String name) { + StringUtils.requireNullOrNotEmpty(input, "Most provide a value for " + name + " tests"); return split(input, s -> { s = s.trim(); if (s.startsWith("smackx.") || s.startsWith("smack.")) {