@Test(expected = IllegalArgumentException.class) public void testEncodedSizeNegativeValueFails() throws Exception { VLQ.encodedSize(-1); }
public static int encodedSize(int value) { if (value < 0) { throw new IllegalArgumentException("Cannot encode negative values"); } int i = 1; while ((value & 0xFFFFFF80) != 0L) { value >>>= 7; i++; } return i; }
VLQ { public static int encodedSize(int value) { if (value < 0) { throw new IllegalArgumentException("Cannot encode negative values"); } int i = 1; while ((value & 0xFFFFFF80) != 0L) { value >>>= 7; i++; } return i; } }
VLQ { public static int encodedSize(int value) { if (value < 0) { throw new IllegalArgumentException("Cannot encode negative values"); } int i = 1; while ((value & 0xFFFFFF80) != 0L) { value >>>= 7; i++; } return i; }  }
VLQ { public static int encodedSize(int value) { if (value < 0) { throw new IllegalArgumentException("Cannot encode negative values"); } int i = 1; while ((value & 0xFFFFFF80) != 0L) { value >>>= 7; i++; } return i; }  static void encode(int value, ByteBuffer out); static int decode(ReadBuffer in); static int encodedSize(int value); }
VLQ { public static int encodedSize(int value) { if (value < 0) { throw new IllegalArgumentException("Cannot encode negative values"); } int i = 1; while ((value & 0xFFFFFF80) != 0L) { value >>>= 7; i++; } return i; }  static void encode(int value, ByteBuffer out); static int decode(ReadBuffer in); static int encodedSize(int value);  }