Skip to content

Commit

Permalink
#43 Rename canSkip to isAlreadyLatestVersion
Browse files Browse the repository at this point in the history
- also use filterNot instead of negation in method
  • Loading branch information
georgberky authored and Georg Berky committed Jul 7, 2022
1 parent a3dad58 commit 3245fcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class UpdateMojo : AbstractMojo() {
)
.updates
.onEach { println("execute im mojo: latestVersion: '${it.latestVersion}' / version:'${it.version}'") }
.filter(VersionUpdate::canSkip)
.filterNot (VersionUpdate::isAlreadyLatestVersion)
.onEach { println("execute im mojo canSkip: ${it.latestVersion}") }
.map { it to "dependency-update/${it.groupId}-${it.artifactId}-${it.latestVersion}" }
.onEach { println("execute im mojo canSkip (nach map): ${it.second} ${it.first}") }
Expand All @@ -70,4 +70,4 @@ class UpdateMojo : AbstractMojo() {
val git = gitProvider.createProvider(mavenProject.basedir.toPath(), settings, connection);
git.use(f)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ abstract class VersionUpdate(
) {
abstract fun updatedPom() : Document

fun canSkip() : Boolean {
fun isAlreadyLatestVersion() : Boolean {
println("canSkip: ${latestVersion} compare to ${version}")
println("latestVersion.equals(version) = ${latestVersion.equals(version)}")
return !latestVersion.equals(version)
return latestVersion.equals(version)
}

}
}

0 comments on commit 3245fcf

Please sign in to comment.