Skip to content

Commit e7761be

Browse files
committed
add nullaway
1 parent 0f65b13 commit e7761be

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/semconv/http/HttpServerRoute.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private HttpServerRoute() {}
5858
* is non-null.
5959
*/
6060
public static void update(
61-
Context context, HttpServerRouteSource source, @Nullable String httpRoute) {
61+
Context context, HttpServerRouteSource source, String httpRoute) {
6262
update(context, source, ConstantAdapter.INSTANCE, httpRoute);
6363
}
6464

@@ -76,7 +76,7 @@ public static <T> void update(
7676
Context context,
7777
HttpServerRouteSource source,
7878
HttpServerRouteGetter<T> httpRouteGetter,
79-
@Nullable T arg1) {
79+
T arg1) {
8080
update(context, source, OneArgAdapter.getInstance(), arg1, httpRouteGetter);
8181
}
8282

instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTelemetry.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class KtorServerTelemetry private constructor(
161161
pipeline.environment.monitor.subscribe(Routing.RoutingCallStarted) { call ->
162162
val context = call.attributes.getOrNull(contextKey)
163163
if (context != null) {
164-
HttpServerRoute.update(context, HttpServerRouteSource.SERVER, { _, arg -> arg.route.parent.toString() }, call)
164+
HttpServerRoute.update(context, HttpServerRouteSource.SERVER, { _, arg -> arg!!.route.parent.toString() }, call)
165165
}
166166
}
167167

instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/KtorServerTelemetryBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ val KtorServerTelemetry = createRouteScopedPlugin("OpenTelemetry", { KtorServerT
2424
KtorServerTelemetryUtil.configureTelemetry(pluginConfig, application)
2525

2626
application.environment.monitor.subscribe(Routing.RoutingCallStarted) { call ->
27-
HttpServerRoute.update(Context.current(), HttpServerRouteSource.SERVER, { _, arg -> arg.route.parent.toString() }, call)
27+
HttpServerRoute.update(Context.current(), HttpServerRouteSource.SERVER, { _, arg -> arg!!.route.parent.toString() }, call)
2828
}
2929
}

instrumentation/ktor/ktor-3.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v3_0/KtorServerTelemetryBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ val KtorServerTelemetry = createRouteScopedPlugin("OpenTelemetry", { KtorServerT
2424
KtorServerTelemetryUtil.configureTelemetry(pluginConfig, application)
2525

2626
application.monitor.subscribe(RoutingRoot.RoutingCallStarted) { call ->
27-
HttpServerRoute.update(Context.current(), HttpServerRouteSource.SERVER, { _, arg -> arg.route.parent.toString() }, call)
27+
HttpServerRoute.update(Context.current(), HttpServerRouteSource.SERVER, { _, arg -> arg!!.route.parent.toString() }, call)
2828
}
2929
}

0 commit comments

Comments
 (0)