Remove MessageBodyWriter.getSize() implementations 49/96849/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 9 Jul 2021 09:44:22 +0000 (11:44 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 9 Jul 2021 12:24:38 +0000 (14:24 +0200)
getSize() is documented legacy method which has a default implementation
and does nothing. Remove unneeded implementations.

JIRA: NETCONF-773
Change-Id: I1e1a9310f3ad78fe684de02fbaec5035bd1fcb90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/NormalizedNodeJsonBodyWriter.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/NormalizedNodeXmlBodyWriter.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/patch/PatchJsonBodyWriter.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/patch/PatchXmlBodyWriter.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/schema/SchemaExportContentYangBodyWriter.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/schema/SchemaExportContentYinBodyWriter.java

index 0a040f44fb0037bff91d00901c89296e716a900f..1ef78bfdee05a468c0dae319464a40a4b194dcb8 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.restconf.nb.rfc8040.jersey.providers;
 
 import com.google.gson.stream.JsonWriter;
@@ -60,15 +59,6 @@ public class NormalizedNodeJsonBodyWriter implements MessageBodyWriter<Normalize
         return type.equals(NormalizedNodeContext.class);
     }
 
-    @Override
-    public long getSize(final NormalizedNodeContext context,
-                        final Class<?> type,
-                        final Type genericType,
-                        final Annotation[] annotations,
-                        final MediaType mediaType) {
-        return -1;
-    }
-
     @Override
     public void writeTo(final NormalizedNodeContext context,
                         final Class<?> type,
index ef0bfd992ed314dae3174a38c5a6264babe20b26..768a0a8287fffdaa1dc8c4991f7f6c61577c9d93 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.restconf.nb.rfc8040.jersey.providers;
 
 import java.io.IOException;
@@ -47,7 +46,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 @Provider
 @Produces({ MediaTypes.APPLICATION_YANG_DATA_XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
 public class NormalizedNodeXmlBodyWriter implements MessageBodyWriter<NormalizedNodeContext> {
-
     private static final XMLOutputFactory XML_FACTORY;
 
     static {
@@ -63,15 +61,6 @@ public class NormalizedNodeXmlBodyWriter implements MessageBodyWriter<Normalized
         return type.equals(NormalizedNodeContext.class);
     }
 
-    @Override
-    public long getSize(final NormalizedNodeContext context,
-                        final Class<?> type,
-                        final Type genericType,
-                        final Annotation[] annotations,
-                        final MediaType mediaType) {
-        return -1;
-    }
-
     @Override
     public void writeTo(final NormalizedNodeContext context,
                         final Class<?> type,
index 682d08f246279d681458124dbaa58e516994b6a4..00b0a9995ce0fa1e8c0b661238032766ff0239ae 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.restconf.nb.rfc8040.jersey.providers.patch;
 
 import com.google.gson.stream.JsonWriter;
@@ -38,12 +37,6 @@ public class PatchJsonBodyWriter implements MessageBodyWriter<PatchStatusContext
         return type.equals(PatchStatusContext.class);
     }
 
-    @Override
-    public long getSize(final PatchStatusContext patchStatusContext, final Class<?> type, final Type genericType,
-                        final Annotation[] annotations, final MediaType mediaType) {
-        return -1;
-    }
-
     @Override
     public void writeTo(final PatchStatusContext patchStatusContext, final Class<?> type, final Type genericType,
                         final Annotation[] annotations, final MediaType mediaType,
index 0623dc7f6bffbe60f725fda13911e622e824c5d4..74cdb810c56d9b4ce0ccf21d0f1ede4061102e9c 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.restconf.nb.rfc8040.jersey.providers.patch;
 
 import java.io.OutputStream;
@@ -45,12 +44,6 @@ public class PatchXmlBodyWriter implements MessageBodyWriter<PatchStatusContext>
         return type.equals(PatchStatusContext.class);
     }
 
-    @Override
-    public long getSize(final PatchStatusContext patchStatusContext, final Class<?> type, final Type genericType,
-                        final Annotation[] annotations, final MediaType mediaType) {
-        return -1;
-    }
-
     @Override
     public void writeTo(final PatchStatusContext patchStatusContext, final Class<?> type, final Type genericType,
                         final Annotation[] annotations, final MediaType mediaType,
index 5438d1e221e04d6de8560c9a0384d64a0c8a38fa..06f666c237f47bef3a3f80c4a6789b334026fd19 100644 (file)
@@ -33,12 +33,6 @@ public class SchemaExportContentYangBodyWriter implements MessageBodyWriter<Sche
         return type.equals(SchemaExportContext.class);
     }
 
-    @Override
-    public long getSize(final SchemaExportContext context, final Class<?> type, final Type genericType,
-            final Annotation[] annotations, final MediaType mediaType) {
-        return -1;
-    }
-
     @Override
     public void writeTo(final SchemaExportContext context, final Class<?> type, final Type genericType,
             final Annotation[] annotations, final MediaType mediaType,
index d9b1ca4ff532015639393d29cb59496c81aeb5d4..1013d1e17d505ae79d73fd6aeb4f44f814306c6a 100644 (file)
@@ -31,12 +31,6 @@ public class SchemaExportContentYinBodyWriter implements MessageBodyWriter<Schem
         return type.equals(SchemaExportContext.class);
     }
 
-    @Override
-    public long getSize(final SchemaExportContext context, final Class<?> type, final Type genericType,
-            final Annotation[] annotations, final MediaType mediaType) {
-        return -1;
-    }
-
     @Override
     public void writeTo(final SchemaExportContext context, final Class<?> type, final Type genericType,
             final Annotation[] annotations, final MediaType mediaType,