First, images are arranged by image-version. If image-version is same,
image-type (standard or not) is used as secondary criteria.
Change-Id: I6e905625ac371b327bfce7a8f7e52d9c23983724
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
BaseImage src = this.prop;
BaseImage target = ((ImagePair)o).prop;
- // 1. check type. ("default" > others.. )
+ // 1. check version (descending order)
+ int order = target.getVersion().compareTo(src.getVersion());
+ if (order != 0) {
+ return order;
+ }
+
+ // 2. check type. ("default" > others.. )
if (target.getType().equals("default")) {
if (!src.getType().equals("default")) {
return 1;
}
}
- // 2. check version (descending order)
- int order = target.getVersion().compareTo(src.getVersion());
- if (order != 0) {
- return order;
- }
-
// 3. check cpu type (32bit > 64bit)
if (target.getCpuType().isPriorInList(src.getCpuType())) {
return 1;