ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Bartenstein <er...@personeta.com>
Subject Ivy VersionRangeMatcher lower range bug [4.2.0.3,4.2.+]
Date Sun, 11 Nov 2007 09:27:42 GMT
Hi,

In my version it seems that there is a bug in the VersionRangeMatcher.
In case the found version is identical to the lower version it is being
discarded by the matcher and the jar is not found.
I checked in the code and it seems that there is a bug in the following
code:

In VersionRangeMatcher (L:83)

The following code doesn't return 0 in case the modules (art1,art2) are
identical in content but not in instances:

	private final Comparator COMPARATOR = new Comparator() {
		public int compare(Object o1, Object o2) {
			if (o1.equals(o2)) {
				return 0;
			}
			ArtifactInfo art1 = new
MRIDArtifactInfo((ModuleRevisionId)o1);
			ArtifactInfo art2 = new
MRIDArtifactInfo((ModuleRevisionId)o2);
			ArtifactInfo art =
getLatestStrategy().findLatest(new ArtifactInfo[] {art1,art2}, null);
			return art == art1 ? -1 : 1;
		}
	};
	

Eran Bartenstein
SCE Team leader


	1 Hanagar Street
	P.O.B. 7188
	Hod Hasharon 45241 Israel
*  	Phone : 972 9 7627734
7  	Fax     : 972 9 7412060
*  	Eranb@personeta.com
      www.personeta.com <http://www.personeta.com/> 


Always look on the bright side of life, for: 
'you come from nothing,
you go back to nothing,
what did you lose ?
NOTHING'
(Monty Python)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message