From 4d7457c2d3950850c00b3fb0f44d7d4f31cf29f6 Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Thu, 19 Sep 2019 11:37:42 -0700 Subject: [PATCH] [MINOR][BUILD] Fix about 15 misc build warnings This addresses about 15 miscellaneous warnings that appear in the current build. No functional changes, it just slightly reduces the amount of extra warning output. No. Existing tests, run manually. Closes #25852 from srowen/BuildWarnings. Authored-by: Sean Owen Signed-off-by: Dongjoon Hyun --- .../java/org/apache/spark/util/kvstore/InMemoryStore.java | 2 +- .../main/java/org/apache/spark/util/kvstore/KVTypeInfo.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/kvstore/src/main/java/org/apache/spark/util/kvstore/InMemoryStore.java b/common/kvstore/src/main/java/org/apache/spark/util/kvstore/InMemoryStore.java index 6af45aec3c7b2..b33c53871c32f 100644 --- a/common/kvstore/src/main/java/org/apache/spark/util/kvstore/InMemoryStore.java +++ b/common/kvstore/src/main/java/org/apache/spark/util/kvstore/InMemoryStore.java @@ -252,7 +252,7 @@ private static Predicate getPredicate( return (value) -> set.contains(indexValueForEntity(getter, value)); } else { - HashSet set = new HashSet<>(values.size()); + HashSet> set = new HashSet<>(values.size()); for (Object key : values) { set.add(asKey(key)); } diff --git a/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java b/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java index b8c5fab8709ed..d2a26982d8703 100644 --- a/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java +++ b/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java @@ -124,7 +124,7 @@ interface Accessor { Object get(Object instance) throws ReflectiveOperationException; - Class getType(); + Class getType(); } private class FieldAccessor implements Accessor { @@ -141,7 +141,7 @@ public Object get(Object instance) throws ReflectiveOperationException { } @Override - public Class getType() { + public Class getType() { return field.getType(); } } @@ -160,7 +160,7 @@ public Object get(Object instance) throws ReflectiveOperationException { } @Override - public Class getType() { + public Class getType() { return method.getReturnType(); } }