bug5791: fixed test for non-empty variables in env-default-rules.sh; fixed test for empty chargebee values in ChargebeeConfiguration

This commit is contained in:
Axel Uhl
2024-06-05 15:45:05 +02:00
parent e7a9839240
commit 22e3624a72
2 changed files with 14 additions and 12 deletions
@@ -2,6 +2,8 @@ package com.sap.sse.security.subscription.chargebee;
import java.util.logging.Logger;
import com.sap.sse.common.Util;
/**
* Subscription configuration. The system will get these information from server application startup arguments:
* {@code chargebee.site}, {@code chargebee.apikey}
@@ -29,7 +31,7 @@ public class ChargebeeConfiguration {
String site = System.getProperty(CHARGEBEE_SITE);
String apiKey = System.getProperty(CHARGEBEE_APIKEY);
logger.info("Chargebee site: " + site);
if (site != null && apiKey != null) {
if (Util.hasLength(site) && Util.hasLength(apiKey)) {
instance = new ChargebeeConfiguration(site, apiKey);
logger.info("Activating Chargebee Configuration and service");
} else {