move unused @SuppressWarnings one level up

This commit is contained in:
Uwe Schindler 2016-05-20 00:46:05 +02:00
parent afa9ebad28
commit cfe555d216
1 changed files with 1 additions and 10 deletions

View File

@ -55,6 +55,7 @@ public final class Def {
* (to emulate a "arraystore" bytecode using MethodHandles). * (to emulate a "arraystore" bytecode using MethodHandles).
* This should really be a method in {@link MethodHandles} class! * 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 class ArrayLengthHelper {
private static final Lookup PRIV_LOOKUP = MethodHandles.lookup(); 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); 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; } static int getArrayLength(final boolean[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final byte[] array) { return array.length; } static int getArrayLength(final byte[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final short[] array) { return array.length; } static int getArrayLength(final short[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final int[] array) { return array.length; } static int getArrayLength(final int[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final long[] array) { return array.length; } static int getArrayLength(final long[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final char[] array) { return array.length; } static int getArrayLength(final char[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final float[] array) { return array.length; } static int getArrayLength(final float[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final double[] array) { return array.length; } static int getArrayLength(final double[] array) { return array.length; }
@SuppressWarnings("unused")
static int getArrayLength(final Object[] array) { return array.length; } static int getArrayLength(final Object[] array) { return array.length; }
static MethodHandle arrayLengthGetter(Class<?> arrayType) { static MethodHandle arrayLengthGetter(Class<?> arrayType) {