Skip to content

Commit

Permalink
Merge branch 'main' into agp-8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethshackleton authored Feb 4, 2024
2 parents 851daae + 43b9628 commit 5704770
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ internal fun libraryResourceNames(

@Throws(IOException::class)
fun loadEmbeddedLibrary(loader: ClassLoader, parentDirectory: String, name: String) {
val url = checkNotNull(libraryResourceNames(parentDirectory, name).mapNotNull {
val url = checkNotNull(libraryResourceNames(parentDirectory, name).firstNotNullOfOrNull {
loader.getResource(it)
}.firstOrNull()) { "Failed to find resource with name: $name" }
}) { "Failed to find resource with name: $name" }
@Suppress("NewApi") // Not used by Android.
val file = createTempFile("lib$name", "lib").toFile().apply { deleteOnExit() }
try {
Expand Down

0 comments on commit 5704770

Please sign in to comment.