Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Considering the following configurations:

  1. follower.replication.throttled.replicas

  2. leader.replication.throttled.replicas

  3. client.id

  4. access.control.allow.methods

  5. access.control.allow.origin

  6. metric.reporters

  7. rest.extension.classes

All of the above contain default empty string values and there is nothing prevent them to be set to null. Having read the documentation the caller might easily think that the value of the above configuration can't be null given it's initial value is empty string. Consequently, they forget the null check and hit NullPointerException when these configuration are indeed `null`. The users can write code like `leaderConfig.value().length() == 0` which throws a NullPointerException in execution. 

...