There is an off-by-one error in these, fix that up.
Change-Id: I7031e8b59bc2c35741d53d663aba3951f6ee2862
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
/**
* Cache of first 256 values.
*/
- private static final Uint16[] CACHE = new Uint16[Uint8.MAX_VALUE_SHORT];
+ private static final Uint16[] CACHE = new Uint16[256];
/**
* Commonly encountered values.
/**
* Cache of first 256 values.
*/
- private static final Uint32[] CACHE = new Uint32[Uint8.MAX_VALUE_SHORT];
+ private static final Uint32[] CACHE = new Uint32[256];
/**
* Commonly encountered values.
*/
/**
* Cache of first 256 values.
*/
- private static final Uint64[] CACHE = new Uint64[Uint8.MAX_VALUE_SHORT];
+ private static final Uint64[] CACHE = new Uint64[256];
/**
* Commonly encountered values.
*/
private static final CanonicalValueSupport<Uint8> SUPPORT = new Support();
- static final short MIN_VALUE_SHORT = 0;
- static final short MAX_VALUE_SHORT = 255;
+ private static final short MIN_VALUE_SHORT = 0;
+ private static final short MAX_VALUE_SHORT = 255;
private static final long serialVersionUID = 1L;
private static final Uint8[] CACHE = new Uint8[MAX_VALUE_SHORT + 1];