commit: 22dd78f39f031a7c5a410ffacabae75e1ff04f91 Author: zongyu <zzy2529420793 <AT> gmail <DOT> com> AuthorDate: Thu Jun 18 07:10:50 2020 +0000 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> CommitDate: Mon Jul 6 09:48:27 2020 +0000 URL: https://gitweb.gentoo.org/proj/java-ebuilder.git/commit/?id=22dd78f3
compare maven version and required maven version correctly Signed-off-by: zongyu <zzy2529420793 <AT> gmail.com> src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java index 19e40f9..45ff1d9 100644 --- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java +++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java @@ -57,7 +57,7 @@ public class MavenCache { for (final CacheItem curCacheItem : versions) { if (curCacheItem.getParsedMavenVersion().compareTo(mavenVersion) - <= 0) { + >= 0) { cacheItem = curCacheItem; break; @@ -65,7 +65,7 @@ public class MavenCache { } if (cacheItem == null) { - cacheItem = versions.get(versions.size() - 1); + return "!!!suitble-avenVersion-not-found!!!"; } final StringBuilder sbDependency = new StringBuilder(50);