-
Notifications
You must be signed in to change notification settings - Fork 1k
Labels
breaking-changebugA general bugA general bugmodule: micrometer-commonAn issue that is related to our common moduleAn issue that is related to our common module
Milestone
Description
I agree. Since
ValueResolver
has a pair:ValueExpressionResolver
I think we should keep the two in-sync but since they are different now, we should change one of them:
- Mark
ValueResolver#resolve
@Nullable
, likeValueExpressionResolver#resolve
is also@Nullable
. We already do a null-check here:but we need to verify this across the codebase.micrometer/micrometer-core/src/main/java/io/micrometer/core/aop/MeterTagSupport.java
Line 52 in 6c7cf24
return value == null ? "" : value; - Keep
ValueResolver#resolve
@NonNull
but maybe we should also markValueExpressionResolver#resolve
@NonNull
(right now it's@Nullable
).If we decide to keep them out of sync as they are now returning
""
instead ofnull
should not cause an issue in Micrometer's codebase since we are already mappingnull
to""
(see above) andNoOpValueResolver
is more like a "marker", it should not be called but we need to verify this across the codebase.
Originally posted by @jonatan-ivanov in #6270 (comment)
Metadata
Metadata
Assignees
Labels
breaking-changebugA general bugA general bugmodule: micrometer-commonAn issue that is related to our common moduleAn issue that is related to our common module