Commit 5cf2c9a9 authored by Thomas Huster's avatar Thomas Huster

[15019] ported compatibility code for changed enum constants

parent 505edae6
Pipeline #12064 passed with stages
in 4 minutes and 42 seconds
......@@ -73,8 +73,15 @@ public class BillingSystemService implements IBillingSystemService {
public Optional<IBillingSystem> getBillingSystem(String name){
String billingSystemName = getConfigurationValue(name, "name", null);
if (billingSystemName != null) {
BillingLaw law =
BillingLaw.valueOf(getConfigurationValue(name, CFG_KEY_BILLINGLAW, null));
String configuredLaw = getConfigurationValue(name, CFG_KEY_BILLINGLAW, null);
// compatibility with changed BillingLaw enum (ticket #15019)
if ("MVG".equals(configuredLaw)) {
configuredLaw = "MV";
}
if ("IVG".equals(configuredLaw)) {
configuredLaw = "IV";
}
BillingLaw law = BillingLaw.valueOf(configuredLaw);
BillingSystem billingSystem = new BillingSystem(name, law);
// TODO more attributes
return Optional.of(billingSystem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment