move unused @SuppressWarnings one level up
This commit is contained in:
parent
afa9ebad28
commit
cfe555d216
|
@ -55,6 +55,7 @@ public final class Def {
|
|||
* (to emulate a "arraystore" bytecode using MethodHandles).
|
||||
* This should really be a method in {@link MethodHandles} class!
|
||||
*/
|
||||
@SuppressWarnings("unused") // getArrayLength() methods are are actually used, javac just does not know :)
|
||||
private static final class ArrayLengthHelper {
|
||||
private static final Lookup PRIV_LOOKUP = MethodHandles.lookup();
|
||||
|
||||
|
@ -72,24 +73,14 @@ public final class Def {
|
|||
|
||||
private static final MethodHandle OBJECT_ARRAY_MH = ARRAY_TYPE_MH_MAPPING.get(Object[].class);
|
||||
|
||||
// NOTE: the following are actually used, javac just does not know :)
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final boolean[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final byte[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final short[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final int[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final long[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final char[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final float[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final double[] array) { return array.length; }
|
||||
@SuppressWarnings("unused")
|
||||
static int getArrayLength(final Object[] array) { return array.length; }
|
||||
|
||||
static MethodHandle arrayLengthGetter(Class<?> arrayType) {
|
||||
|
|
Loading…
Reference in New Issue