Skip to content

Commit

Permalink
Merge pull request #940 from MarathonLabs/fix/android-dex-parser-empt…
Browse files Browse the repository at this point in the history
…y-package

fix(android): DexTestParser should support empty package
  • Loading branch information
Malinskiy authored May 31, 2024
2 parents 8af0974 + e55d7b9 commit 6d154d7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DexTestParser(
val packageAndClassName = split[0]

val lastDotIndex = packageAndClassName.indexOfLast { c -> c == '.' }
val packageName = packageAndClassName.substring(0 until lastDotIndex)
val packageName = if (lastDotIndex == -1) "" else packageAndClassName.substring(0 until lastDotIndex)

val className = packageAndClassName.substring(lastDotIndex + 1 until packageAndClassName.length)

val test = Test(packageName, className, methodName, annotations)
Expand Down

0 comments on commit 6d154d7

Please sign in to comment.