JSONRestconfServiceRfc8040Impl is not AutoCloseable 97/90997/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 8 Jul 2020 13:39:12 +0000 (15:39 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 8 Jul 2020 13:47:24 +0000 (15:47 +0200)
This service has no cleanup, remove useless @PreDestroy method.

Change-Id: I113e0a08e301b9d4eae6b6706d3ce45bb8086002
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/JSONRestconfServiceRfc8040Impl.java

index b33d21971a0603c4f743ee0dcabca12a61b0a056..cf6752f5ba75a72e90ee874d11824fd8b1ef5285 100644 (file)
@@ -18,7 +18,6 @@ import java.lang.annotation.Annotation;
 import java.nio.charset.StandardCharsets;
 import java.util.List;
 import java.util.Optional;
-import javax.annotation.PreDestroy;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import javax.ws.rs.core.MediaType;
@@ -54,12 +53,12 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Implementation of the JSONRestconfService interface using the restconf Draft18 implementation.
+ * Implementation of the JSONRestconfService interface using the RFC8040 implementation.
  *
  * @author Thomas Pantelis
  */
 @Singleton
-public class JSONRestconfServiceRfc8040Impl implements JSONRestconfService, AutoCloseable {
+public final class JSONRestconfServiceRfc8040Impl implements JSONRestconfService {
     private static final Logger LOG = LoggerFactory.getLogger(JSONRestconfServiceRfc8040Impl.class);
 
     private static final Annotation[] EMPTY_ANNOTATIONS = new Annotation[0];
@@ -217,11 +216,6 @@ public class JSONRestconfServiceRfc8040Impl implements JSONRestconfService, Auto
         return Optional.ofNullable(output);
     }
 
-    @Override
-    @PreDestroy
-    public void close() {
-    }
-
     private NormalizedNodeContext toNormalizedNodeContext(final String uriPath, final @Nullable String payload,
             final boolean isPost) throws OperationFailedException {
         final InstanceIdentifierContext<?> instanceIdentifierContext = ParserIdentifier.toInstanceIdentifier(