Skip to content

Commit 201a92c

Browse files
committed
Remove unsafe cast from throwable to exception.
1 parent 47d55c3 commit 201a92c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/PollingBase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ protected CompletableFuture<FDv2SourceResult> poll(Selector selector, boolean on
6666
);
6767
return oneShot ? FDv2SourceResult.terminalError(info) : FDv2SourceResult.interrupted(info);
6868
}
69-
Exception e = (Exception) ex;
70-
logger.error("Polling request failed with an unknown error: {}", e.toString());
69+
String msg = ex.toString();
70+
logger.error("Polling request failed with an unknown error: {}", msg);
7171
DataSourceStatusProvider.ErrorInfo info = new DataSourceStatusProvider.ErrorInfo(
7272
DataSourceStatusProvider.ErrorKind.UNKNOWN,
7373
0,
74-
e.toString(),
74+
msg,
7575
new Date().toInstant()
7676
);
7777
return oneShot ? FDv2SourceResult.terminalError(info) : FDv2SourceResult.interrupted(info);

0 commit comments

Comments
 (0)