@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ModuleVersionNumber other = (ModuleVersionNumber) obj; if (this.delegate == null) { if (other.delegate != null) return false; } else if (!this.delegate.equals(other.delegate)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ModuleVersionNumber other = (ModuleVersionNumber) obj; if (this.delegate == null) { if (other.delegate != null) return false; } else if (!this.delegate.equals(other.delegate)) return false; return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final NBVersionInfo other = (NBVersionInfo) obj; if ((this.groupId == null) ? (other.groupId != null) : !this.groupId.equals(other.groupId)) { return false; } if ((this.artifactId == null) ? (other.artifactId != null) : !this.artifactId.equals(other.artifactId)) { return false; } if ((this.comparableVersion == null) ? (other.comparableVersion != null) : !this.comparableVersion.equals(other.comparableVersion)) { return false; } if ((this.type == null) ? (other.type != null) : !this.type.equals(other.type)) { return false; } if ((this.classifier == null) ? (other.classifier != null) : !this.classifier.equals(other.classifier)) { return false; } if ((this.repoId == null) ? (other.repoId != null) : !this.repoId.equals(other.repoId)) { return false; } return true; }
@ExcludeDefaultInterceptors public AgentVersionCheckResults isAgentVersionSupported(AgentVersion agentVersionInfo) { try { Properties properties = getAgentUpdateVersionFileContent(); String supportedAgentBuilds = properties.getProperty(RHQ_AGENT_SUPPORTED_BUILDS); // this is optional String latestAgentVersion = properties.getProperty(RHQ_AGENT_LATEST_VERSION); String latestAgentBuild = properties.getProperty(RHQ_AGENT_LATEST_BUILD_NUMBER); if (latestAgentVersion == null) { throw new NullPointerException("no agent version in file"); } boolean isSupported; //if no list of supportedBuilds provident then, if (supportedAgentBuilds == null || supportedAgentBuilds.isEmpty()) { // we weren't given a regex of supported versions, make a simple string equality test on latest agent version ComparableVersion agent = new ComparableVersion(agentVersionInfo.getVersion()); ComparableVersion server = new ComparableVersion(latestAgentVersion); isSupported = agent.equals(server); } else { // we were given a regex of supported builds, check the agent build to see if it matches the regex isSupported = agentVersionInfo.getBuild().matches(supportedAgentBuilds); } return new AgentVersionCheckResults(isSupported, new AgentVersion(latestAgentVersion, latestAgentBuild)); } catch (Exception e) { LOG.warn("Cannot determine if agent version [" + agentVersionInfo + "] is supported. Cause: " + e); return new AgentVersionCheckResults(false, null); // assume we can't talk to it } }
ComparableVersion plugin1Version = new ComparableVersion((version1Str != null) ? version1Str : "0"); ComparableVersion plugin2Version = new ComparableVersion((version2Str != null) ? version2Str : "0"); if (plugin1Version.equals(plugin2Version)) { if (plugin1.getMtime() == plugin2.getMtime()) { LOG.info("Plugins [" + plugin1 + ", " + plugin2