Skip to content

Commit 9db6481

Browse files
committed
minor rename
1 parent 7108ebc commit 9db6481

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/dynamok/source/TaskConfig.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,30 @@ enum Keys {
4949
TaskConfig(Map<String, String> props) {
5050
this.props = props;
5151

52-
region = Regions.fromName(getConfig(Keys.REGION));
53-
accessKeyId = getConfig(Keys.ACCESS_KEY_ID, "");
54-
secretKey = getConfig(Keys.SECRET_KEY, "");
55-
topicFormat = getConfig(Keys.TOPIC_FORMAT);
56-
shards = Arrays.stream(getConfig(Keys.SHARDS).split(",")).filter(shardId -> !shardId.isEmpty()).collect(Collectors.toList());
52+
region = Regions.fromName(getValue(Keys.REGION));
53+
accessKeyId = getValue(Keys.ACCESS_KEY_ID, "");
54+
secretKey = getValue(Keys.SECRET_KEY, "");
55+
topicFormat = getValue(Keys.TOPIC_FORMAT);
56+
shards = Arrays.stream(getValue(Keys.SHARDS).split(",")).filter(shardId -> !shardId.isEmpty()).collect(Collectors.toList());
5757
}
5858

5959
String tableForShard(String shardId) {
60-
return getConfig(shardId + "." + Keys.TABLE);
60+
return getValue(shardId + "." + Keys.TABLE);
6161
}
6262

6363
String streamArnForShard(String shardId) {
64-
return getConfig(shardId + "." + Keys.STREAM_ARN);
64+
return getValue(shardId + "." + Keys.STREAM_ARN);
6565
}
6666

67-
private String getConfig(String key) {
67+
private String getValue(String key) {
6868
final String value = props.get(key);
6969
if (value == null) {
7070
throw new ConfigException(key, "Missing task configuration");
7171
}
7272
return value;
7373
}
7474

75-
private String getConfig(String key, String defaultValue) {
75+
private String getValue(String key, String defaultValue) {
7676
return props.getOrDefault(key, defaultValue);
7777
}
7878

0 commit comments

Comments
 (0)