From 22c79e29a29a89f622dde92300dd0770d57bde5f Mon Sep 17 00:00:00 2001 From: CesarCoelho Date: Thu, 19 Oct 2023 17:25:16 +0200 Subject: [PATCH] Code cleanup --- .../main/java/esa/mo/mal/impl/Address.java | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/mal-impl/src/main/java/esa/mo/mal/impl/Address.java b/mal-impl/src/main/java/esa/mo/mal/impl/Address.java index 944457b84..2cccbe715 100644 --- a/mal-impl/src/main/java/esa/mo/mal/impl/Address.java +++ b/mal-impl/src/main/java/esa/mo/mal/impl/Address.java @@ -22,7 +22,6 @@ import org.ccsds.moims.mo.mal.provider.MALInteractionHandler; import org.ccsds.moims.mo.mal.structures.Blob; -import org.ccsds.moims.mo.mal.structures.URI; import org.ccsds.moims.mo.mal.transport.MALEndpoint; /** @@ -34,10 +33,6 @@ public final class Address { * The endpoint to use with this Address. */ private final MALEndpoint endpoint; - /** - * The URI that this Address represents. - */ - private final URI uri; /** * The authentication Id of this Address. */ @@ -51,41 +46,19 @@ public final class Address { * Constructor. * * @param endpoint Endpoint. - * @param uri URI. * @param authenticationId Authentication identifier. * @param handler Interaction handler. */ - public Address(final MALEndpoint endpoint, - final URI uri, - final Blob authenticationId, - final MALInteractionHandler handler) { + public Address(MALEndpoint endpoint, Blob authenticationId, MALInteractionHandler handler) { this.endpoint = endpoint; - this.uri = uri; this.authenticationId = authenticationId; this.handler = handler; } - /** - * Constructor. - * - * @param endpoint Endpoint. - * @param authenticationId Authentication identifier. - * @param handler Interaction handler. - */ - public Address(final MALEndpoint endpoint, - final Blob authenticationId, - final MALInteractionHandler handler) { - this(endpoint, endpoint.getURI(), authenticationId, handler); - } - public MALEndpoint getEndpoint() { return endpoint; } - public URI getURI() { - return uri; - } - public Blob getAuthenticationId() { return authenticationId; } @@ -93,9 +66,9 @@ public Blob getAuthenticationId() { public MALInteractionHandler getHandler() { return handler; } - + @Override public String toString() { - return "Address(uri=" + uri + " - authenticationId=" + authenticationId + ")"; + return "Address(uri=" + endpoint.getURI() + " - authenticationId=" + authenticationId + ")"; } }