Browse Source

fix self-comparision

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

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

@@ -343,29 +343,31 @@ public final class Specification {
}

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

// Implementation Vendor ID must match
final String implementationVendor = other.getImplementationVendor();
final String otherImplementationVendor
= other.getImplementationVendor();
if (null != implementationVendor) {
if (null == implementationVendor
|| !implementationVendor.equals(implementationVendor)) {
if (null == otherImplementationVendor
|| !implementationVendor.equals(otherImplementationVendor)) {
return REQUIRE_VENDOR_SWITCH;
}
}

// Implementation version must be >= required
final String implementationVersion = other.getImplementationVersion();
final String otherImplementationVersion
= other.getImplementationVersion();
if (null != implementationVersion) {
if (null == implementationVersion
|| !implementationVersion.equals(implementationVersion)) {
if (null == otherImplementationVersion
|| !implementationVersion.equals(otherImplementationVersion)) {
return REQUIRE_IMPLEMENTATION_CHANGE;
}
}


Loading…
Cancel
Save