org.owasp.dependencycheck.data.nvd.json.DefCpeName Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-check-core Show documentation
Show all versions of dependency-check-core Show documentation
dependency-check-core is the engine and reporting tool used to identify and report if there are any known, publicly disclosed vulnerabilities in the scanned project's dependencies. The engine extracts meta-data from the dependencies and uses this to do fuzzy key-word matching against the Common Platfrom Enumeration (CPE), if any CPE identifiers are found the associated Common Vulnerability and Exposure (CVE) entries are added to the generated report.
package org.owasp.dependencycheck.data.nvd.json;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* CPE name
*
*/
public class DefCpeName {
@SerializedName("cpe22Uri")
@Expose
private String cpe22Uri;
/**
*
* (Required)
*
*/
@SerializedName("cpe23Uri")
@Expose
private String cpe23Uri;
public String getCpe22Uri() {
return cpe22Uri;
}
public void setCpe22Uri(String cpe22Uri) {
this.cpe22Uri = cpe22Uri;
}
/**
*
* (Required)
*
*/
public String getCpe23Uri() {
return cpe23Uri;
}
/**
*
* (Required)
*
*/
public void setCpe23Uri(String cpe23Uri) {
this.cpe23Uri = cpe23Uri;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(DefCpeName.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("cpe22Uri");
sb.append('=');
sb.append(((this.cpe22Uri == null)?"":this.cpe22Uri));
sb.append(',');
sb.append("cpe23Uri");
sb.append('=');
sb.append(((this.cpe23Uri == null)?"":this.cpe23Uri));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.cpe22Uri == null)? 0 :this.cpe22Uri.hashCode()));
result = ((result* 31)+((this.cpe23Uri == null)? 0 :this.cpe23Uri.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof DefCpeName) == false) {
return false;
}
DefCpeName rhs = ((DefCpeName) other);
return (((this.cpe22Uri == rhs.cpe22Uri)||((this.cpe22Uri!= null)&&this.cpe22Uri.equals(rhs.cpe22Uri)))&&((this.cpe23Uri == rhs.cpe23Uri)||((this.cpe23Uri!= null)&&this.cpe23Uri.equals(rhs.cpe23Uri))));
}
}