Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
In several methods, parameter validation is done after calling acquireAndEnsureOpen() :
public void seek(TopicPartition partition, long offset) { acquireAndEnsureOpen(); try { if (offset < 0) throw new IllegalArgumentException("seek offset must not be a negative number");
Since the value of parameter would not change per invocation, it seems performing validation ahead of acquireAndEnsureOpen() call would be better.