Skip to content

Commit

Permalink
Don't fail on incorrect service loader, just revert back to the other
Browse files Browse the repository at this point in the history
code.
  • Loading branch information
pdvrieze committed May 19, 2024
1 parent adde85f commit 83790b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public actual object XmlStreaming : XmlStreamingJavaCommon(), IXmlStreaming {

if (f != null) return f

f = serviceLoader.firstOrNull()
// Ignore errors in the service loader, but fall back instead
f = try { serviceLoader.firstOrNull() } catch (e: ServiceConfigurationError) { null }

if (f == null) {
f = try {
Expand Down

0 comments on commit 83790b1

Please sign in to comment.