Skip to content
Snippets Groups Projects

feat: Add Jacoco and Sonar support+ eliminate code smell

6 files
+ 43
83
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -12,6 +12,7 @@
package org.eclipsefoundation.downloads.dto;
import java.util.Date;
import java.util.Objects;
import javax.inject.Inject;
import javax.inject.Singleton;
@@ -130,6 +131,32 @@ public class Downloads extends BareNode {
this.ccode = ccode;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ Objects.hash(fileId, downloadDate, remoteHost, remoteAddr, mirrorId, ccode);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Downloads other = (Downloads) obj;
return Objects.equals(fileId, other.fileId) && Objects.equals(downloadDate, other.downloadDate)
&& Objects.equals(remoteHost, other.remoteHost) && Objects.equals(remoteAddr, other.remoteAddr)
&& Objects.equals(mirrorId, other.mirrorId) && Objects.equals(ccode, other.ccode);
}
@Singleton
public static class DownloadsFilter implements DtoFilter<Downloads> {
@Inject
Loading