Skip to content

Commit a989fa1

Browse files
committed
refactor: remove usage of lombok
1 parent cffd21a commit a989fa1

File tree

1 file changed

+8
-6
lines changed
  • airbyte-commons-with-dependencies/src/main/java/io/airbyte/commons/workers/config

1 file changed

+8
-6
lines changed

airbyte-commons-with-dependencies/src/main/java/io/airbyte/commons/workers/config/EnvUtils.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@
44

55
package io.airbyte.commons.workers.config;
66

7+
import org.slf4j.Logger;
8+
import org.slf4j.LoggerFactory;
9+
710
import java.util.Collections;
811
import java.util.HashMap;
912
import java.util.Map;
1013
import java.util.regex.Matcher;
1114
import java.util.regex.Pattern;
12-
import lombok.AccessLevel;
13-
import lombok.NoArgsConstructor;
14-
import lombok.extern.slf4j.Slf4j;
1515

16-
@Slf4j
17-
@NoArgsConstructor(access = AccessLevel.PRIVATE)
1816
class EnvUtils {
1917

18+
private static final Logger LOGGER = LoggerFactory.getLogger(EnvUtils.class);
19+
2020
private static final Pattern KEY_JSON_VALUE_PATTERN = Pattern.compile("(?<key>[^=]+)\\s*?=\\s*?(?<value>\\{[^=]+})\\s*,?\\s*");
2121
private static final Pattern KEY_VALUE_PATTERN = Pattern.compile("(?<key>[^=]+)=(?<value>[^=,]+),?");
2222
private static final String KEY_GROUP_ALIAS = "key";
2323
private static final String VALUE_GROUP_ALIAS = "value";
2424

25+
private EnvUtils() {}
26+
2527
/**
2628
* Splits key value pairs from the input string into a map. Each kv-pair is separated by a ','.
2729
* </br>
@@ -58,7 +60,7 @@ private static Map<String, String> match(final String input, final Pattern patte
5860
private static Map<String, String> getKVPairsMatchedWithSimplePattern(final String input) {
5961
final Map<String, String> stringMatchResult = match(input, KEY_VALUE_PATTERN);
6062
if (stringMatchResult.isEmpty()) {
61-
log.warn("No valid key value pairs found in the input string: {}", input);
63+
LOGGER.warn("No valid key value pairs found in the input string: {}", input);
6264
return Collections.emptyMap();
6365
}
6466
return stringMatchResult;

0 commit comments

Comments
 (0)