Sonar/Checkstyle in service/plugins
[policy/apex-pdp.git] / plugins / plugins-context / plugins-context-schema / plugins-context-schema-avro / src / main / java / org / onap / policy / apex / plugins / context / schema / avro / AvroBytesObjectMapper.java
index 20e701b..bee2f59 100644 (file)
@@ -43,7 +43,7 @@ public class AvroBytesObjectMapper implements AvroObjectMapper {
     private Type avroType;
 
     // The Apex compatible class
-    private final Class<Byte[]> schemaClass = Byte[].class;
+    private static final Class<Byte[]> schemaClass = Byte[].class;
 
     /*
      * (non-Javadoc)
@@ -142,8 +142,6 @@ public class AvroBytesObjectMapper implements AvroObjectMapper {
         }
 
         // Create a ByteBuffer object to serialize the bytes
-        final ByteBuffer byteBuffer = ByteBuffer.wrap((byte[]) object);
-
-        return byteBuffer;
+        return ByteBuffer.wrap((byte[]) object);
     }
 }