flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/5] flink git commit: [FLINK-2638] [core] Add @SafeVarargs to the ExecutionEnvironment's "fromElements(...)" method.
Date Wed, 09 Sep 2015 18:16:41 GMT
[FLINK-2638] [core] Add @SafeVarargs to the ExecutionEnvironment's "fromElements(...)" method.

This closes #1109


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

Branch: refs/heads/master
Commit: d0502e4fb9338c6ed44a2c0a925aa2f60ebeb7f2
Parents: 95d035a
Author: Stephan Ewen <sewen@apache.org>
Authored: Tue Sep 8 17:22:23 2015 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Wed Sep 9 19:10:51 2015 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/flink/api/java/ExecutionEnvironment.java | 3 ++-
 .../streaming/api/environment/StreamExecutionEnvironment.java     | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d0502e4f/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
b/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
index d3d8192..32049c4 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
@@ -703,7 +703,8 @@ public abstract class ExecutionEnvironment {
 	 * @param data The elements to make up the data set.
 	 * @return A DataSet representing the given list of elements.
 	 */
-	public <X> DataSource<X> fromElements(X... data) {
+	@SafeVarargs
+	public final <X> DataSource<X> fromElements(X... data) {
 		if (data == null) {
 			throw new IllegalArgumentException("The data must not be null.");
 		}

http://git-wip-us.apache.org/repos/asf/flink/blob/d0502e4f/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
b/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
index 2352623..f052389 100644
--- a/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
+++ b/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
@@ -553,7 +553,8 @@ public abstract class StreamExecutionEnvironment {
 	 * 		The type of the returned data stream
 	 * @return The data stream representing the given array of elements
 	 */
-	public <OUT> DataStreamSource<OUT> fromElements(OUT... data) {
+	@SafeVarargs
+	public final <OUT> DataStreamSource<OUT> fromElements(OUT... data) {
 		if (data.length == 0) {
 			throw new IllegalArgumentException("fromElements needs at least one element as argument");
 		}


Mime
View raw message