Update to work with Aluminium GA
[l2switch.git] / packethandler / implementation / src / main / java / org / opendaylight / l2switch / packethandler / decoders / utils / BitBufferHelper.java
index f0d6699b11374310100700970b89b31499df5fc5..f1d57db5d826b1045e5d31ce1bb8085d04cc6e56 100644 (file)
@@ -5,11 +5,10 @@
  * 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.l2switch.packethandler.decoders.utils;
 
 import java.util.Arrays;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,13 +19,13 @@ import org.slf4j.LoggerFactory;
  * convert primitive data types to stream of bits.
  */
 public final class BitBufferHelper {
-    private BitBufferHelper() {
-    }
-
     private static final Logger LOG = LoggerFactory.getLogger(BitBufferHelper.class);
 
     public static final long BYTE_MASK = 0xFF;
 
+    private BitBufferHelper() {
+    }
+
     // Getters
     // data: array where data are stored
     // startOffset: bit from where to start reading
@@ -333,7 +332,7 @@ public final class BitBufferHelper {
      * @param numBits the number of bits
      * @return numerical value of byte array passed
      */
-    public static long toNumber(@Nonnull byte[] array, int numBits) {
+    public static long toNumber(byte @NonNull [] array, int numBits) {
         int length = numBits / NetUtils.NUM_BITS_IN_A_BYTE;
         int bitsRest = numBits % NetUtils.NUM_BITS_IN_A_BYTE;
         int startOffset = array.length - length;