Removed some sonar warnings from pcep.
[bgpcep.git] / pcep / impl / src / main / java / org / opendaylight / protocol / pcep / impl / PCEPByteToMessageDecoder.java
index 995b372425e7edd42413f332b207562620eea6bd..6a8f930a775eb7e46d82da13888f6154fc7bd19b 100644 (file)
@@ -15,8 +15,8 @@ import io.netty.handler.codec.ByteToMessageDecoder;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.opendaylight.protocol.pcep.PCEPDeserializerException;
 import org.opendaylight.protocol.pcep.spi.MessageHandlerRegistry;
+import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
 import org.opendaylight.protocol.util.ByteArray;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
 import org.slf4j.Logger;
@@ -29,11 +29,11 @@ import com.google.common.primitives.UnsignedBytes;
  * A PCEP message parser which also does validation.
  */
 public final class PCEPByteToMessageDecoder extends ByteToMessageDecoder {
-       private final static Logger LOG = LoggerFactory.getLogger(PCEPByteToMessageDecoder.class);
+       private static final Logger LOG = LoggerFactory.getLogger(PCEPByteToMessageDecoder.class);
 
-       private final static int TYPE_SIZE = 1; // bytes
+       private static final int TYPE_SIZE = 1;
 
-       private final static int LENGTH_SIZE = 2; // bytes
+       private static final int LENGTH_SIZE = 2;
 
        private final MessageHandlerRegistry registry;
 
@@ -57,7 +57,7 @@ public final class PCEPByteToMessageDecoder extends ByteToMessageDecoder {
 
                try {
                        out.add(parse(bytes, errors));
-               } catch (PCEPDeserializerException e) {
+               } catch (final PCEPDeserializerException e) {
                        LOG.debug("Failed to decode protocol message", e);
                        this.exceptionCaught(ctx, e);
                }