Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing equals in some domain objects #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package net.ripe.rpki.commons.ta.domain.request;


import lombok.EqualsAndHashCode;
import lombok.Getter;
import net.ripe.ipresource.IpResourceSet;
import net.ripe.rpki.commons.crypto.x509cert.X509CertificateInformationAccessDescriptor;
import net.ripe.rpki.commons.util.EqualsSupport;

import javax.security.auth.x500.X500Principal;
import java.io.Serializable;
import java.security.PublicKey;

public class ResourceCertificateRequestData extends EqualsSupport implements Serializable {
@Getter
@EqualsAndHashCode
public class ResourceCertificateRequestData implements Serializable {

private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -46,24 +49,4 @@ public ResourceCertificateRequestData(String resourceClassName, X500Principal su
this.subjectInformationAccess = subjectInformationAccess;
this.ipResourceSet = ipResourceSet;
}

public String getResourceClassName() {
return resourceClassName;
}

public X500Principal getSubjectDN() {
return subjectDN;
}

public byte[] getEncodedSubjectPublicKey() {
return encodedSubjectPublicKey;
}

public X509CertificateInformationAccessDescriptor[] getSubjectInformationAccess() {
return subjectInformationAccess;
}

public IpResourceSet getIpResourceSet() {
return ipResourceSet;
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package net.ripe.rpki.commons.ta.domain.request;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

/**
* Ask Trust Anchor to revoke all certificates that use the provided public key.
*/
@Getter
@EqualsAndHashCode(callSuper = true)

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
TaRequest.canEqual
; it is advisable to add an Override annotation.
public class RevocationRequest extends TaRequest {

private static final long serialVersionUID = 1L;
Expand All @@ -15,12 +20,4 @@
this.resourceClassName = resourceClassName;
this.encodedPublicKey = encodedPublicKey;
}

public String getEncodedPublicKey() {
return encodedPublicKey;
}

public String getResourceClassName() {
return resourceClassName;
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package net.ripe.rpki.commons.ta.domain.request;



import lombok.EqualsAndHashCode;
import lombok.Getter;
import org.apache.commons.lang3.Validate;

@Getter
@EqualsAndHashCode(callSuper = true)

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
TaRequest.canEqual
; it is advisable to add an Override annotation.
public class SigningRequest extends TaRequest {

private static final long serialVersionUID = 1L;
Expand All @@ -14,8 +16,4 @@
Validate.notNull(resourceCertificateRequest, "resourceCertificateRequest is required");
this.resourceCertificateRequest = resourceCertificateRequest;
}

public ResourceCertificateRequestData getResourceCertificateRequest() {
return resourceCertificateRequest;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package net.ripe.rpki.commons.ta.domain.request;


import net.ripe.rpki.commons.util.EqualsSupport;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.UUID;

public abstract class TaRequest extends EqualsSupport implements Serializable {
@EqualsAndHashCode
public abstract class TaRequest implements Serializable {

private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package net.ripe.rpki.commons.ta.domain.request;


import lombok.EqualsAndHashCode;
import lombok.Getter;
import net.ripe.rpki.commons.crypto.x509cert.X509CertificateInformationAccessDescriptor;
import org.joda.time.DateTimeUtils;

import java.io.Serializable;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Getter
@EqualsAndHashCode
public class TrustAnchorRequest implements Serializable {

private static final long serialVersionUID = 1L;
Expand All @@ -25,20 +27,4 @@ public TrustAnchorRequest(URI taCertificatePublicationUri, X509CertificateInform
this.taRequests = taRequests;
this.siaDescriptors = siaDescriptors;
}

public Long getCreationTimestamp() {
return creationTimestamp;
}

public URI getTaCertificatePublicationUri() {
return taCertificatePublicationUri;
}

public List<TaRequest> getTaRequests() {
return taRequests;
}

public X509CertificateInformationAccessDescriptor[] getSiaDescriptors() {
return siaDescriptors;
}
}
Loading