Skip to content

Commit 476b78c

Browse files
committed
fix
1 parent ad8e582 commit 476b78c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

instrumentation/ratpack/ratpack-1.4/testing/src/main/java/io/opentelemetry/instrumentation/ratpack/client/AbstractRatpackHttpClientTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ protected boolean useNettyClientAttributes() {
178178
private static Throwable nettyClientSpanErrorMapper(URI uri, Throwable exception) {
179179
// On Windows, Netty wraps exceptions in AbstractChannel.AnnotatedConnectException
180180
// Unwrap to get the actual exception type
181-
if (exception != null
181+
if (OS.WINDOWS.isCurrentOs()
182+
&& exception != null
182183
&& exception.getClass().getName().contains("AnnotatedConnectException")
183184
&& exception.getCause() != null) {
184185
exception = exception.getCause();

instrumentation/ratpack/ratpack-1.7/library/src/test/java/io/opentelemetry/instrumentation/ratpack/v1_7/AbstractRatpackHttpClientTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ protected void configure(HttpClientTestOptions.Builder optionsBuilder) {
142142
(uri, exception) -> {
143143
// On Windows, Netty wraps exceptions in AbstractChannel.AnnotatedConnectException
144144
// Unwrap to get the actual exception type
145-
if (exception != null
145+
if (OS.WINDOWS.isCurrentOs()
146+
&& exception != null
146147
&& exception.getClass().getName().contains("AnnotatedConnectException")
147148
&& exception.getCause() != null) {
148149
exception = exception.getCause();

0 commit comments

Comments
 (0)