Skip to content

Commit

Permalink
cosmetic: do not use deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Oct 17, 2023
1 parent 04b387b commit c4102af
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package io.wcm.devops.conga.generator.util;

import java.util.Map;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -186,7 +187,7 @@ private Object resolveSingle(Matcher matcher, Map<String, Object> variables, int
// resolve variable
if (variableMatcher.matches()) {
String valueProviderName = variableMatcher.group(VARIABLE_POS_VALUE_PROVIDER_NAME);
String variable = StringUtils.defaultString(variableMatcher.group(VARIABLE_POS_VARIABLE_1), variableMatcher.group(VARIABLE_POS_VARIABLE_2));
String variable = Objects.toString(variableMatcher.group(VARIABLE_POS_VARIABLE_1), variableMatcher.group(VARIABLE_POS_VARIABLE_2));
String defaultValueString = variableMatcher.group(VARIABLE_POS_DEFAULT_VALUE);

Object valueObject = variableResolver.resolve(valueProviderName, variable, defaultValueString, variables);
Expand Down Expand Up @@ -241,7 +242,7 @@ private Object resolveMulti(Matcher matcher, Map<String, Object> variables, int
// resolve variable
if (variableMatcher.matches()) {
String valueProviderName = variableMatcher.group(VARIABLE_POS_VALUE_PROVIDER_NAME);
String variable = StringUtils.defaultString(variableMatcher.group(VARIABLE_POS_VARIABLE_1), variableMatcher.group(VARIABLE_POS_VARIABLE_2));
String variable = Objects.toString(variableMatcher.group(VARIABLE_POS_VARIABLE_1), variableMatcher.group(VARIABLE_POS_VARIABLE_2));
String defaultValueString = variableMatcher.group(VARIABLE_POS_DEFAULT_VALUE);

Object valueObject = variableResolver.resolve(valueProviderName, variable, defaultValueString, variables);
Expand Down

0 comments on commit c4102af

Please sign in to comment.