flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/2] flink git commit: [hotfix] [tests] Fix warnings and casts in AbstractGenericArraySerializerTest
Date Fri, 11 Sep 2015 11:48:26 GMT
[hotfix] [tests] Fix warnings and casts in AbstractGenericArraySerializerTest


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/a492ed92
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/a492ed92
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/a492ed92

Branch: refs/heads/master
Commit: a492ed922efd53c7f0545faf597ebf4cd291085f
Parents: 407d74f
Author: Stephan Ewen <sewen@apache.org>
Authored: Thu Sep 10 19:40:30 2015 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Fri Sep 11 12:52:54 2015 +0200

----------------------------------------------------------------------
 .../runtime/AbstractGenericArraySerializerTest.java      | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/a492ed92/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/AbstractGenericArraySerializerTest.java
----------------------------------------------------------------------
diff --git a/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/AbstractGenericArraySerializerTest.java
b/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/AbstractGenericArraySerializerTest.java
index cd91d17..307a3d2 100644
--- a/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/AbstractGenericArraySerializerTest.java
+++ b/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/AbstractGenericArraySerializerTest.java
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.flink.api.java.typeutils.runtime;
 
 import java.lang.reflect.Array;
@@ -36,7 +35,7 @@ import org.apache.flink.api.java.typeutils.runtime.AbstractGenericTypeSerializer
 import org.apache.flink.api.java.typeutils.runtime.AbstractGenericTypeSerializerTest.SimpleTypes;
 import org.apache.flink.util.StringUtils;
 
-abstract public class AbstractGenericArraySerializerTest {
+public abstract class AbstractGenericArraySerializerTest {
 	
 	private final Random rnd = new Random(349712539451944123L);
 	
@@ -144,7 +143,8 @@ abstract public class AbstractGenericArraySerializerTest {
 		}
 	}
 
-	private <T> void runTests(T[]... instances) {
+	@SafeVarargs
+	private final <T> void runTests(T[]... instances) {
 		try {
 			@SuppressWarnings("unchecked")
 			Class<T> type = (Class<T>) instances[0][0].getClass();
@@ -158,14 +158,15 @@ abstract public class AbstractGenericArraySerializerTest {
 		}
 	}
 	
-	private <T> void runTests(Class<T> type, TypeSerializer<T> componentSerializer,
T[]... instances) {
+	@SafeVarargs
+	private final <T> void runTests(Class<T> type, TypeSerializer<T> componentSerializer,
T[]... instances) {
 		try {
 			if (type == null || componentSerializer == null || instances == null || instances.length
== 0) {
 				throw new IllegalArgumentException();
 			}
 			
 			@SuppressWarnings("unchecked")
-			Class<T[]> arrayClass = (Class<T[]>) Array.newInstance(type, 0).getClass();
+			Class<T[]> arrayClass = (Class<T[]>) (Class<?>) Array.newInstance(type,
0).getClass();
 			
 			GenericArraySerializer<T> serializer = createSerializer(type, componentSerializer);
 			SerializerTestInstance<T[]> test = new SerializerTestInstance<T[]>(serializer,
arrayClass, -1, instances);


Mime
View raw message