Skip to content

Commit

Permalink
fix unchecked NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
PranavPurwar committed Apr 19, 2024
1 parent e63373e commit 4678783
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import kotlin.time.measureTime

@OptIn(ExperimentalTime::class)
suspend fun main() {
val artifact = getArtifact("com.google.android.material", "material", "1.12.0-beta01")
val artifact = getArtifact("dev.kord", "kord-core", "0.13.1")
val dir = File("test")
dir.deleteRecursively()
dir.mkdir()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ suspend fun InputStream.resolvePOM(resolved: ConcurrentLinkedQueue<Artifact>): C
if (scopeItem != null) {
val scope = scopeItem.textContent
if (scope.isNotEmpty() && (scope == "test" || scope == "provided")) {
eventReciever.onInvalidScope(Artifact(dependencyElement.getElementsByTagName("groupId").item(0).textContent, dependencyElement.getElementsByTagName("artifactId").item(0).textContent, dependencyElement.getElementsByTagName("version").item(0).textContent), scope)
eventReciever.onInvalidScope(Artifact(dependencyElement.getElementsByTagName("groupId").item(0)?.textContent ?: "", dependencyElement.getElementsByTagName("artifactId").item(0)?.textContent ?: "", dependencyElement.getElementsByTagName("version").item(0)?.textContent ?: ""), scope)
return@async
}
}
Expand Down

0 comments on commit 4678783

Please sign in to comment.