Skip to content

Commit

Permalink
refactor(bower): Prefer isNotEmpty() over !isEmpty()
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau authored and sschuberth committed Jul 19, 2024
1 parent 0de5f6e commit b848267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/package-managers/bower/src/main/kotlin/Bower.kt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private fun parsePackages(info: PackageInfo): Map<String, Package> {
val stack = Stack<PackageInfo>()
stack += getDependencyInfos(info)

while (!stack.empty()) {
while (stack.isNotEmpty()) {
val currentInfo = stack.pop()
val pkg = currentInfo.toPackage()
result["${pkg.id.name}:${pkg.id.version}"] = pkg
Expand Down Expand Up @@ -182,7 +182,7 @@ private fun getPackageInfosWithCompleteDependencies(info: PackageInfo): Map<Stri
val result = mutableMapOf<String, PackageInfo>()

val stack = Stack<PackageInfo>().apply { push(info) }
while (!stack.empty()) {
while (stack.isNotEmpty()) {
val currentInfo = stack.pop()

currentInfo.key?.let { key ->
Expand Down

0 comments on commit b848267

Please sign in to comment.