From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/java-ebuilder:master commit in: src/main/java/org/gentoo/java/ebuilder/portage/
Date: Mon, 6 Jul 2020 10:56:08 +0000 (UTC) [thread overview]
Message-ID: <1594028907.a1b98fecda5e9d9c832b73305fb47edc604dd06d.fordfrog@gentoo> (raw)
commit: a1b98fecda5e9d9c832b73305fb47edc604dd06d
Author: zongyu <zzy2529420793 <AT> gmail <DOT> com>
AuthorDate: Fri Jun 19 05:37:34 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=a1b98fec
MavenVersion.class enhancement:
make MavenVersion.class able to compare incremental version
make it convert qualifier to lowercase to avoid the situation when
maintainer mixes uppercase and lowercase
Signed-off-by: zongyu <zzy2529420793 <AT> gmail.com>
src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java b/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java
index 71da8a6..42cd9cd 100644
--- a/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java
+++ b/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java
@@ -70,7 +70,7 @@ public class MavenVersion implements Comparable<MavenVersion> {
? 0 : Integer.parseInt(matcher.group(2), 10);
incrementalVersion = matcher.group(3) == null
? 0 : Integer.parseInt(matcher.group(3), 10);
- qualifier = matcher.group(4) == null ? "" : matcher.group(4);
+ qualifier = matcher.group(4) == null ? "" : matcher.group(4).toLowerCase();
}
@Override
@@ -81,6 +81,8 @@ public class MavenVersion implements Comparable<MavenVersion> {
return Integer.valueOf(majorVersion).compareTo(o.getMajorVersion());
} else if (minorVersion != o.getMinorVersion()) {
return Integer.valueOf(minorVersion).compareTo(o.getMinorVersion());
+ } else if (incrementalVersion != o.getIncrementalVersion()) {
+ return Integer.valueOf(incrementalVersion).compareTo(o.getIncrementalVersion());
} else {
return qualifier.compareTo(o.getQualifier());
}
next reply other threads:[~2020-07-06 10:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 10:56 Miroslav Šulc [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-15 8:14 [gentoo-commits] proj/java-ebuilder:master commit in: src/main/java/org/gentoo/java/ebuilder/portage/ Miroslav Šulc
2023-04-15 8:14 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2019-11-03 13:54 Miroslav Šulc
2019-10-30 19:26 Miroslav Šulc
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1594028907.a1b98fecda5e9d9c832b73305fb47edc604dd06d.fordfrog@gentoo \
--to=fordfrog@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox