Merge change 4261 into donut
* changes: SDK Updater: addon id is name+vendor, lower case
This commit is contained in:
@@ -206,7 +206,8 @@ public class AddonPackage extends Package {
|
|||||||
/**
|
/**
|
||||||
* Computes whether the given addon package is a suitable update for the current package.
|
* Computes whether the given addon package is a suitable update for the current package.
|
||||||
* The base method checks the class type.
|
* The base method checks the class type.
|
||||||
* The addon package also tests that the name is the same and the revision number is greater.
|
* The addon package also tests that the name+vendor is the same and
|
||||||
|
* the revision number is greater.
|
||||||
* <p/>
|
* <p/>
|
||||||
* An update is just that: a new package that supersedes the current one. If the new
|
* An update is just that: a new package that supersedes the current one. If the new
|
||||||
* package has the same revision as the current one, it's not an update.
|
* package has the same revision as the current one, it's not an update.
|
||||||
@@ -221,7 +222,11 @@ public class AddonPackage extends Package {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AddonPackage newPkg = (AddonPackage) replacementPackage;
|
AddonPackage newPkg = (AddonPackage) replacementPackage;
|
||||||
return newPkg.getName().equalsIgnoreCase(this.getName()) &&
|
|
||||||
newPkg.getRevision() > this.getRevision();
|
String thisId = getName() + "+" + getVendor(); //$NON-NLS-1$
|
||||||
|
String newId = newPkg.getName() + "+" + newPkg.getVendor(); //$NON-NLS-1$
|
||||||
|
|
||||||
|
return thisId.equalsIgnoreCase(newId) &&
|
||||||
|
newPkg.getRevision() > this.getRevision();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ public class LocalSdkParser {
|
|||||||
SdkRepository.NS_SDK_REPOSITORY.equals(child.getNamespaceURI()) &&
|
SdkRepository.NS_SDK_REPOSITORY.equals(child.getNamespaceURI()) &&
|
||||||
elementFilter.equals(child.getLocalName())) {
|
elementFilter.equals(child.getLocalName())) {
|
||||||
String name = child.getLocalName();
|
String name = child.getLocalName();
|
||||||
Package p = null;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (SdkRepository.NODE_ADD_ON.equals(name)) {
|
if (SdkRepository.NODE_ADD_ON.equals(name)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user