Browse Source

Make getCompatibilityWith actually compare two different values.

PR: 31360
Submitted by:	David G�rtner <david dot gaertner at syngenio dot de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277000 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
1700aa0b9e
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      src/main/org/apache/tools/ant/taskdefs/optional/extension/Extension.java

+ 9
- 9
src/main/org/apache/tools/ant/taskdefs/optional/extension/Extension.java View File

@@ -444,31 +444,31 @@ public final class Extension {
}

// Available specification version must be >= required
final DeweyDecimal specificationVersion
final DeweyDecimal requiredSpecificationVersion
= required.getSpecificationVersion();
if (null != specificationVersion) {
if (null != requiredSpecificationVersion) {
if (null == specificationVersion
|| !isCompatible(specificationVersion, specificationVersion)) {
|| !isCompatible(specificationVersion, requiredSpecificationVersion)) {
return REQUIRE_SPECIFICATION_UPGRADE;
}
}

// Implementation Vendor ID must match
final String implementationVendorId
final String requiredImplementationVendorID
= required.getImplementationVendorID();
if (null != implementationVendorId) {
if (null != requiredImplementationVendorID) {
if (null == implementationVendorID
|| !implementationVendorID.equals(implementationVendorId)) {
|| !implementationVendorID.equals(requiredImplementationVendorID)) {
return REQUIRE_VENDOR_SWITCH;
}
}

// Implementation version must be >= required
final DeweyDecimal implementationVersion
final DeweyDecimal requiredImplementationVersion
= required.getImplementationVersion();
if (null != implementationVersion) {
if (null != requiredImplementationVersion) {
if (null == implementationVersion
|| !isCompatible(implementationVersion, implementationVersion)) {
|| !isCompatible(implementationVersion, requiredImplementationVersion)) {
return REQUIRE_IMPLEMENTATION_UPGRADE;
}
}


Loading…
Cancel
Save