Skip to content

Commit f6ef43c

Browse files
committed
Revert "fix(model): Return empty PURL when package name is empty"
This reverts commit 4af9208. It is not needed anymore as Pub SDK packages are being filtered out before PURL construction. Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
1 parent cbdb85b commit f6ef43c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

model/src/main/kotlin/utils/PurlExtensions.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ fun Identifier.toPurl(qualifiers: Map<String, String> = emptyMap(), subpath: Str
9090
val namespace = combined.substringBeforeLast('/').trim('/').takeIf { it.isNotEmpty() }
9191
val name = combined.substringAfterLast('/').trim('/')
9292

93-
// Avoid a `MalformedPackageURLException` and behave like for `Identifier.EMPTY` in case of exotic packages like
94-
// Pub SDK packages (e.g., sky_engine) where the name is not explicitly set.
95-
if (name.isEmpty()) return ""
96-
9793
val normalizedSubpath = if (subpath.isNotEmpty()) {
9894
subpath.trim('/').split('/')
9995
.filter { it.isNotEmpty() }

0 commit comments

Comments
 (0)