nuke eclipse warnings
This commit is contained in:
parent
a569130368
commit
0ee726ed0d
|
@ -72,14 +72,24 @@ 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) {
|
||||
|
|
|
@ -204,7 +204,7 @@ public final class PainlessScriptEngineService extends AbstractComponent impleme
|
|||
* Action taken when the engine is closed.
|
||||
*/
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
public void close() {
|
||||
// Nothing to do.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,6 @@ public final class EUnary extends AExpression {
|
|||
if (child.constant != null) {
|
||||
final Sort sort = promote.sort;
|
||||
|
||||
|
||||
if (sort == Sort.INT) {
|
||||
constant = -(int)child.constant;
|
||||
} else if (sort == Sort.LONG) {
|
||||
|
|
|
@ -60,6 +60,7 @@ public class NeedsScoreTests extends ESSingleNodeTestCase {
|
|||
ss = service.search(new CompiledScript(ScriptType.INLINE, "randomName", "painless", compiled),
|
||||
lookup, Collections.<String, Object>emptyMap());
|
||||
assertTrue(ss.needsScores());
|
||||
service.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue