Skip to content

Commit ac52a00

Browse files
committed
Added range validation to copy existing configuration
KAFKA-22 / KAFKA-65
1 parent be6fd75 commit ac52a00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/mongodb/kafka/connect/source/MongoSourceConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ public Map<String, ConfigValue> validateAll(final Map<String, String> props) {
230230
configDef.define(COPY_EXISTING_MAX_THREADS_CONFIG,
231231
Type.INT,
232232
COPY_EXISTING_MAX_THREADS_DEFAULT,
233+
ConfigDef.Range.atLeast(1),
233234
Importance.MEDIUM,
234235
COPY_EXISTING_MAX_THREADS_DOC,
235236
group,
@@ -240,6 +241,7 @@ public Map<String, ConfigValue> validateAll(final Map<String, String> props) {
240241
configDef.define(COPY_EXISTING_QUEUE_SIZE_CONFIG,
241242
Type.INT,
242243
COPY_EXISTING_QUEUE_SIZE_DEFAULT,
244+
ConfigDef.Range.atLeast(1),
243245
Importance.MEDIUM,
244246
COPY_EXISTING_QUEUE_SIZE_DOC,
245247
group,

0 commit comments

Comments
 (0)