From issues-return-133407-archive-asf-public=cust-asf.ponee.io@maven.apache.org Thu May 31 16:43:08 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A5307180632 for ; Thu, 31 May 2018 16:43:07 +0200 (CEST) Received: (qmail 419 invoked by uid 500); 31 May 2018 14:43:06 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 408 invoked by uid 99); 31 May 2018 14:43:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2018 14:43:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2F03FC0346 for ; Thu, 31 May 2018 14:43:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id r4sJw0eDFTHl for ; Thu, 31 May 2018 14:43:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 520625FAEB for ; Thu, 31 May 2018 14:43:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4EAD4E062E for ; Thu, 31 May 2018 14:43:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6B6FC210A0 for ; Thu, 31 May 2018 14:43:00 +0000 (UTC) Date: Thu, 31 May 2018 14:43:00 +0000 (UTC) From: "Ross Goldberg (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MNG-6420) ComparableVersion incorrectly parses certain version strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MNG-6420?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Ross Goldberg updated MNG-6420: ------------------------------- Attachment: (was: MavenVersionCoordinate.java) > ComparableVersion incorrectly parses certain version strings > ------------------------------------------------------------ > > Key: MNG-6420 > URL: https://issues.apache.org/jira/browse/MNG-6420 > Project: Maven > Issue Type: Bug > Components: core > Affects Versions: 3.5.3 > Reporter: Ross Goldberg > Priority: Major > Attachments: MavenVersionCoordinate.java > > > For certain version strings, ComparableVersion doesn't follow the Maven v= ersion order spec (https://maven.apache.org/pom.html#Version_Order_Specific= ation). > To improve the code & fix the following bugs, I completely rewrote the ve= rsion parser (using Java 10 & Google Guava 25.1). It is attached & passes = all of the tests from ComparableVersionTest. > Bug 1: > =C2=A0 > java -jar /usr/local/Cellar/maven/3.5.3/libexec/lib/maven-artifact-3.5.3.= jar 1-0.3 1 > =C2=A0 > Outputs: > =C2=A0 > 1. 1-0.3 =3D=3D 1-0.3 > =C2=A0 =C2=A01-0.3 =3D=3D 1 > 2. 1 =3D=3D 1 > =C2=A0 > This probleem stems from: > =C2=A0 > [https://github.com/apache/maven/blob/b8c06e61ab73cd9e25a5b2c93d9e5077b21= 96751/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Com= parableVersion.java#L295-L296] > =C2=A0 > =C2=A0 > =C2=A0 > Bug 2: > =C2=A0 > java -jar /usr/local/Cellar/maven/3.5.3/libexec/lib/maven-artifact-3.5.3.= jar 1-0-2 1-0.1 > =C2=A0 > 1. 1-0-2 =3D=3D 1-2 > =C2=A0 =C2=A01-0-2 < 1-0.1 > 2. 1-0.1 =3D=3D 1-0.1 > =C2=A0 > This problem stems from retaining ListItems that, after normalization, ha= ve no children other than the subsequent ListItem.=C2=A0 Removing the unnec= essary ListItem should fix this (i.e. remove the extraneous ListItem (named= extraneous) from its parent ListItem (named parent), then add the only chi= ld of extraneous to parent). -- This message was sent by Atlassian JIRA (v7.6.3#76005)