mirror of https://github.com/apache/ant-ivy
tersify logic ;->
This commit is contained in:
parent
a123650842
commit
14bdf34a9b
|
|
@ -571,14 +571,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
|
|||
return false;
|
||||
}
|
||||
DefaultModuleDescriptor other = (DefaultModuleDescriptor) obj;
|
||||
if (revId == null) {
|
||||
if (other.revId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!revId.equals(other.revId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return revId == null ? other.revId == null : revId.equals(other.revId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -189,14 +189,7 @@ public class ArtifactDownloadReport {
|
|||
return true;
|
||||
}
|
||||
ArtifactDownloadReport other = (ArtifactDownloadReport) obj;
|
||||
if (artifact == null) {
|
||||
if (other.artifact != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!artifact.equals(other.artifact)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return artifact == null ? other.artifact == null : artifact.equals(other.artifact);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,14 +79,7 @@ public class BundleCapability {
|
|||
} else if (!name.equals(other.name)) {
|
||||
return false;
|
||||
}
|
||||
if (version == null) {
|
||||
if (other.version != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!version.equals(other.version)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return version == null ? other.version == null : version.equals(other.version);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,17 +325,8 @@ public class BundleInfo {
|
|||
} else if (!versionTarget.equals(other.versionTarget)) {
|
||||
return false;
|
||||
}
|
||||
if (hasInnerClasspath != other.hasInnerClasspath) {
|
||||
return false;
|
||||
}
|
||||
if (classpath == null) {
|
||||
if (other.classpath != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!classpath.equals(other.classpath)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return hasInnerClasspath == other.hasInnerClasspath
|
||||
&& (classpath == null ? other.classpath == null : classpath.equals(other.classpath));
|
||||
}
|
||||
|
||||
public Set<BundleRequirement> getRequires() {
|
||||
|
|
|
|||
|
|
@ -99,13 +99,6 @@ public class BundleRequirement {
|
|||
} else if (!resolution.equals(other.resolution)) {
|
||||
return false;
|
||||
}
|
||||
if (version == null) {
|
||||
if (other.version != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!version.equals(other.version)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return version == null ? other.version == null : version.equals(other.version);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,14 +64,7 @@ public class ExecutionEnvironmentProfile {
|
|||
} else if (!name.equals(other.name)) {
|
||||
return false;
|
||||
}
|
||||
if (pkgNames == null) {
|
||||
if (other.pkgNames != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!pkgNames.equals(other.pkgNames)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return pkgNames == null ? other.pkgNames == null : pkgNames.equals(other.pkgNames);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
|
|
|||
|
|
@ -57,14 +57,7 @@ public class ExportPackage extends BundleCapability {
|
|||
return false;
|
||||
}
|
||||
ExportPackage other = (ExportPackage) obj;
|
||||
if (uses == null) {
|
||||
if (other.uses != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!uses.equals(other.uses)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return uses == null ? other.uses == null : uses.equals(other.uses);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,13 +144,6 @@ public class CompareFilter extends OSGiFilter {
|
|||
} else if (!operator.equals(other.operator)) {
|
||||
return false;
|
||||
}
|
||||
if (rightValue == null) {
|
||||
if (other.rightValue != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!rightValue.equals(other.rightValue)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return rightValue == null ? other.rightValue == null : rightValue.equals(other.rightValue);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,14 +73,8 @@ public abstract class MultiOperatorFilter extends OSGiFilter {
|
|||
return false;
|
||||
}
|
||||
MultiOperatorFilter other = (MultiOperatorFilter) obj;
|
||||
if (subFilters == null) {
|
||||
if (other.subFilters != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (other.subFilters == null || subFilters.size() != other.subFilters.size()
|
||||
|| !subFilters.containsAll(other.subFilters)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return subFilters == null ? other.subFilters == null
|
||||
: other.subFilters != null && subFilters.size() == other.subFilters.size()
|
||||
&& subFilters.containsAll(other.subFilters);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,13 +59,6 @@ public abstract class UniOperatorFilter extends OSGiFilter {
|
|||
return false;
|
||||
}
|
||||
UniOperatorFilter other = (UniOperatorFilter) obj;
|
||||
if (subFilter == null) {
|
||||
if (other.subFilter != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!subFilter.equals(other.subFilter)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return subFilter == null ? other.subFilter == null : subFilter.equals(other.subFilter);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,14 +157,7 @@ public class EditableRepoDescriptor extends RepoDescriptor {
|
|||
return true;
|
||||
}
|
||||
EditableRepoDescriptor other = (EditableRepoDescriptor) obj;
|
||||
if (modules == null) {
|
||||
if (other.modules != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!modules.equals(other.modules)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return modules == null ? other.modules == null : modules.equals(other.modules);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,17 +151,8 @@ public class Version implements Comparable<Version> {
|
|||
Version other = (Version) obj;
|
||||
ensureSplit();
|
||||
other.ensureSplit();
|
||||
if (major != other.major || minor != other.minor || patch != other.patch) {
|
||||
return false;
|
||||
}
|
||||
if (qualifier == null) {
|
||||
if (other.qualifier != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!qualifier.equals(other.qualifier)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return major == other.major && minor == other.minor && patch == other.patch
|
||||
&& (qualifier == null ? other.qualifier == null : qualifier.equals(other.qualifier));
|
||||
}
|
||||
|
||||
public Version withNudgedPatch() {
|
||||
|
|
|
|||
|
|
@ -340,17 +340,8 @@ public class VersionRange {
|
|||
} else if (!endVersion.equals(other.endVersion)) {
|
||||
return false;
|
||||
}
|
||||
if (startExclusive != other.startExclusive) {
|
||||
return false;
|
||||
}
|
||||
if (startVersion == null) {
|
||||
if (other.startVersion != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!startVersion.equals(other.startVersion)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return startExclusive == other.startExclusive
|
||||
&& (startVersion == null ? other.startVersion == null : startVersion.equals(other.startVersion));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,10 +150,8 @@ public class SFTPRepository extends AbstractSshBasedRepository {
|
|||
private void mkdirs(String directory, ChannelSftp c) throws SftpException {
|
||||
try {
|
||||
SftpATTRS att = c.stat(directory);
|
||||
if (att != null) {
|
||||
if (att.isDir()) {
|
||||
return;
|
||||
}
|
||||
if (att != null && att.isDir()) {
|
||||
return;
|
||||
}
|
||||
} catch (SftpException ex) {
|
||||
if (directory.indexOf('/') != -1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue