From fb755f557ad7f444d151a34d08606a6790427232 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 28 Dec 2023 15:30:22 +0100 Subject: [PATCH] Improved nullability annotations on ValueExpressionResolver; fixes gh-4094 --- .../micrometer/common/annotation/ValueExpressionResolver.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/micrometer-commons/src/main/java/io/micrometer/common/annotation/ValueExpressionResolver.java b/micrometer-commons/src/main/java/io/micrometer/common/annotation/ValueExpressionResolver.java index 6bb642bc8e..bf7bf850c8 100644 --- a/micrometer-commons/src/main/java/io/micrometer/common/annotation/ValueExpressionResolver.java +++ b/micrometer-commons/src/main/java/io/micrometer/common/annotation/ValueExpressionResolver.java @@ -16,6 +16,7 @@ package io.micrometer.common.annotation; import io.micrometer.common.KeyValue; +import io.micrometer.common.lang.Nullable; /** * Resolves the {@link KeyValue} value for the given parameter and the provided @@ -33,6 +34,7 @@ public interface ValueExpressionResolver { * @param parameter parameter annotated with a {@link KeyValue} related annotation * @return the value of the {@link KeyValue} */ - String resolve(String expression, Object parameter); + @Nullable + String resolve(String expression, @Nullable Object parameter); }