Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/scala/kafka/server/ConfigHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ object ThrottledReplicaListValidator extends Validator {
override def ensureValid(name: String, value: Any): Unit = {
def check(proposed: Seq[Any]): Unit = {
if (!(proposed.forall(_.toString.trim.matches("([0-9]+:[0-9]+)?"))
|| proposed.headOption.exists(_.toString.trim.equals("*"))))
|| proposed.mkString.trim.equals("*")))
throw new ConfigException(name, value,
s"$name must be the literal '*' or a list of replicas in the following format: [partitionId]:[brokerId],[partitionId]:[brokerId],...")
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/test/scala/unit/kafka/log/LogConfigTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ class LogConfigTest {
assertFalse(isValid("100 :0,10: "))
assertFalse(isValid("100: 0,10: "))
assertFalse(isValid("100:0,10 : "))
assertFalse(isValid("*,100:10"))
assertFalse(isValid("* ,100:10"))
}

/* Sanity check that toHtmlTable produces one of the expected configs */
Expand Down