Skip to content

Commit

Permalink
SubstituteLoggingEvent.getMarkers can return null
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Nov 10, 2023
1 parent c90ecc3 commit 85db354
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private[pekko] final class FunctionRef[-T](override val path: ActorPath, send: (
try {
val method = classOf[SubstituteLoggingEvent].getMethod("getMarkers")
val markers = method.invoke(evt).asInstanceOf[java.util.List[Marker]]
if (markers.isEmpty) None else Some(markers.get(0))
if (markers == null || markers.isEmpty) None else Some(markers.get(0))
} catch {
case _: NoSuchMethodException => None
}
Expand Down

0 comments on commit 85db354

Please sign in to comment.