diff --git a/src/main/java/jpo/sdw/depositor/DepositorProperties.java b/src/main/java/jpo/sdw/depositor/DepositorProperties.java index 5e9d060..f657948 100644 --- a/src/main/java/jpo/sdw/depositor/DepositorProperties.java +++ b/src/main/java/jpo/sdw/depositor/DepositorProperties.java @@ -68,11 +68,12 @@ void initialize() { if (getSubscriptionTopics() == null || getSubscriptionTopics().length == 0) { // get environment variable SDW_SUBSCRIPTION_TOPIC String topics = System.getenv("SDW_SUBSCRIPTION_TOPIC"); - subscriptionTopics = topics.split(","); if (topics == null || topics.isEmpty()) { topics = String.join(",", DEFAULT_SUBSCRIPTION_TOPICS); logger.info("No Kafka subscription topics specified in configuration, defaulting to {}", topics); subscriptionTopics = DEFAULT_SUBSCRIPTION_TOPICS; + } else { + subscriptionTopics = topics.split(","); } }