Improper varargs check in KeyValues and Tags #3851
Labels
bug
A general bug
module: micrometer-common
An issue that is related to our common module
module: micrometer-core
An issue that is related to our core module
Milestone
If I do this:
I get an NPE since in case of varargs:
this is not a proper check:
KeyValues.of(null)
will result in an emptykeyValues
array that has onenull
element in theand
method which passes the check.Maybe this can be just a documentation issue and we should state that null elements are not allowed without checking.
Since
KeyValues
is basically a copy ofTags
,Tags
has the same issue.Discovered based on #3849 by @dietzsch
The text was updated successfully, but these errors were encountered: