flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [14/23] flink git commit: [FLINK-6107] Enable WhitespaceAfter check in streaming checkstyle
Date Wed, 26 Apr 2017 10:07:36 GMT
[FLINK-6107] Enable WhitespaceAfter check in streaming checkstyle


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

Branch: refs/heads/master
Commit: 226aebc8c67a6da478f256341677f1959295c716
Parents: 922352a
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Sun Mar 19 14:54:35 2017 +0100
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Wed Apr 26 10:36:50 2017 +0200

----------------------------------------------------------------------
 .../api/datastream/IterativeStream.java         | 16 ++++++++---
 .../streaming/api/datastream/KeyedStream.java   |  2 +-
 .../functions/aggregation/SumAggregator.java    |  2 +-
 .../source/TimestampedFileInputSplit.java       |  2 +-
 .../flink/streaming/api/graph/StreamConfig.java |  2 +-
 .../flink/streaming/api/graph/StreamEdge.java   |  2 +-
 .../flink/streaming/api/graph/StreamNode.java   |  4 +--
 .../api/windowing/evictors/CountEvictor.java    |  6 ++--
 .../api/windowing/evictors/TimeEvictor.java     |  6 ++--
 .../windowing/EvictingWindowOperator.java       |  6 ++--
 .../runtime/operators/windowing/KeyMap.java     |  2 +-
 .../operators/windowing/WindowOperator.java     |  2 +-
 .../tasks/TestProcessingTimeService.java        |  2 +-
 .../streaming/util/typeutils/FieldAccessor.java | 30 ++++++++++----------
 .../util/typeutils/FieldAccessorFactory.java    |  2 +-
 tools/maven/strict-checkstyle.xml               | 12 ++++----
 16 files changed, 53 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
index 75699ae..b0be71f 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
@@ -187,16 +187,24 @@ public class IterativeStream<T> extends SingleOutputStreamOperator<T>
{
 						"feedback streams instead.");
 
 		@Override
-		public ConnectedStreams<I, F> keyBy(int[] keyPositions1, int[] keyPositions2) {throw
groupingException;}
+		public ConnectedStreams<I, F> keyBy(int[] keyPositions1, int[] keyPositions2) {
+			throw groupingException;
+		}
 
 		@Override
-		public ConnectedStreams<I, F> keyBy(String field1, String field2) {throw groupingException;}
+		public ConnectedStreams<I, F> keyBy(String field1, String field2) {
+			throw groupingException;
+		}
 
 		@Override
-		public ConnectedStreams<I, F> keyBy(String[] fields1, String[] fields2) {throw groupingException;}
+		public ConnectedStreams<I, F> keyBy(String[] fields1, String[] fields2) {
+			throw groupingException;
+		}
 
 		@Override
-		public ConnectedStreams<I, F> keyBy(KeySelector<I, ?> keySelector1,KeySelector<F,
?> keySelector2) {throw groupingException;}
+		public ConnectedStreams<I, F> keyBy(KeySelector<I, ?> keySelector1, KeySelector<F,
?> keySelector2) {
+			throw groupingException;
+		}
 
 	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
index c042f2f..9334c66 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
@@ -226,7 +226,7 @@ public class KeyedStream<T, KEY> extends DataStream<T> {
 	public <R> SingleOutputStreamOperator<R> transform(String operatorName,
 			TypeInformation<R> outTypeInfo, OneInputStreamOperator<T, R> operator) {
 
-		SingleOutputStreamOperator<R> returnStream = super.transform(operatorName, outTypeInfo,operator);
+		SingleOutputStreamOperator<R> returnStream = super.transform(operatorName, outTypeInfo,
operator);
 
 		// inject the key selector and key type
 		OneInputTransformation<T, R> transform = (OneInputTransformation<T, R>) returnStream.getTransformation();

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/aggregation/SumAggregator.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/aggregation/SumAggregator.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/aggregation/SumAggregator.java
index 86d91d0..7fa5690 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/aggregation/SumAggregator.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/aggregation/SumAggregator.java
@@ -67,7 +67,7 @@ public class SumAggregator<T> extends AggregationFunction<T>
{
 	@SuppressWarnings("unchecked")
 	public T reduce(T value1, T value2) throws Exception {
 		if (isTuple) {
-			Tuple result = ((Tuple)value1).copy();
+			Tuple result = ((Tuple) value1).copy();
 			return fieldAccessor.set((T) result, adder.add(fieldAccessor.get(value1), fieldAccessor.get(value2)));
 		} else {
 			T result = serializer.copy(value1);

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/TimestampedFileInputSplit.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/TimestampedFileInputSplit.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/TimestampedFileInputSplit.java
index 9a679b9..28432c5 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/TimestampedFileInputSplit.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/TimestampedFileInputSplit.java
@@ -127,7 +127,7 @@ public class TimestampedFileInputSplit extends FileInputSplit implements
Compara
 
 	@Override
 	public int hashCode() {
-		int res = 37 * (int)(this.modificationTime ^ (this.modificationTime >>> 32));
+		int res = 37 * (int) (this.modificationTime ^ (this.modificationTime >>> 32));
 		return 37 * res + super.hashCode();
 	}
 

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java
index f43b95a..d5ee13a 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java
@@ -411,7 +411,7 @@ public class StreamConfig implements Serializable {
 	}
 
 	public void setOperatorName(String name) {
-		this.config.setString(OPERATOR_NAME,name);
+		this.config.setString(OPERATOR_NAME, name);
 	}
 
 	public String getOperatorName() {

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamEdge.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamEdge.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamEdge.java
index f7c1919..b82dc39 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamEdge.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamEdge.java
@@ -96,7 +96,7 @@ public class StreamEdge implements Serializable {
 		return selectedNames;
 	}
 
-	public OutputTag getOutputTag() {return this.outputTag;}
+	public OutputTag getOutputTag() { return this.outputTag; }
 
 	public StreamPartitioner<?> getPartitioner() {
 		return outputPartitioner;

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamNode.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamNode.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamNode.java
index 4320e62..5c421aa 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamNode.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamNode.java
@@ -53,8 +53,8 @@ public class StreamNode implements Serializable {
 	private Long bufferTimeout = null;
 	private final String operatorName;
 	private String slotSharingGroup;
-	private KeySelector<?,?> statePartitioner1;
-	private KeySelector<?,?> statePartitioner2;
+	private KeySelector<?, ?> statePartitioner1;
+	private KeySelector<?, ?> statePartitioner2;
 	private TypeSerializer<?> stateKeySerializer;
 
 	private transient StreamOperator<?> operator;

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java
index 5f10286..53ef759 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java
@@ -34,7 +34,7 @@ public class CountEvictor<W extends Window> implements Evictor<Object,
W> {
 	private final long maxCount;
 	private final boolean doEvictAfter;
 
-	private CountEvictor(long count,boolean doEvictAfter) {
+	private CountEvictor(long count, boolean doEvictAfter) {
 		this.maxCount = count;
 		this.doEvictAfter = doEvictAfter;
 	}
@@ -53,7 +53,7 @@ public class CountEvictor<W extends Window> implements Evictor<Object,
W> {
 
 
 	@Override
-	public void evictAfter(Iterable<TimestampedValue<Object>> elements, int size,W
window, EvictorContext ctx) {
+	public void evictAfter(Iterable<TimestampedValue<Object>> elements, int size,
W window, EvictorContext ctx) {
 		if (doEvictAfter) {
 			evict(elements, size, ctx);
 		}
@@ -94,6 +94,6 @@ public class CountEvictor<W extends Window> implements Evictor<Object,
W> {
 	 * @param doEvictAfter Whether to do eviction after the window function.
      */
 	public static <W extends Window> CountEvictor<W> of(long maxCount, boolean doEvictAfter)
{
-		return new CountEvictor<>(maxCount,doEvictAfter);
+		return new CountEvictor<>(maxCount, doEvictAfter);
 	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/TimeEvictor.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/TimeEvictor.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/TimeEvictor.java
index ba00403..393a56b 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/TimeEvictor.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/TimeEvictor.java
@@ -52,14 +52,14 @@ public class TimeEvictor<W extends Window> implements Evictor<Object,
W> {
 	@Override
 	public void evictBefore(Iterable<TimestampedValue<Object>> elements, int size,
W window, EvictorContext ctx) {
 		if(!doEvictAfter) {
-			evict(elements,size,ctx);
+			evict(elements, size, ctx);
 		}
 	}
 
 	@Override
 	public void evictAfter(Iterable<TimestampedValue<Object>> elements, int size,
W window, EvictorContext ctx) {
 		if(doEvictAfter) {
-			evict(elements,size,ctx);
+			evict(elements, size, ctx);
 		}
 	}
 
@@ -131,6 +131,6 @@ public class TimeEvictor<W extends Window> implements Evictor<Object,
W> {
 	 * @param doEvictAfter Whether eviction is done after window function.
      */
 	public static <W extends Window> TimeEvictor<W> of(Time windowSize, boolean
doEvictAfter) {
-		return new TimeEvictor<>(windowSize.toMilliseconds(),doEvictAfter);
+		return new TimeEvictor<>(windowSize.toMilliseconds(), doEvictAfter);
 	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java
index edf4f25..3c98223 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java
@@ -410,11 +410,11 @@ public class EvictingWindowOperator<K, IN, OUT, W extends Window>
 		}
 
 		void evictBefore(Iterable<TimestampedValue<IN>> elements, int size) {
-			evictor.evictBefore((Iterable)elements, size, window, this);
+			evictor.evictBefore((Iterable) elements, size, window, this);
 		}
 
 		void evictAfter(Iterable<TimestampedValue<IN>>  elements, int size) {
-			evictor.evictAfter((Iterable)elements, size, window, this);
+			evictor.evictAfter((Iterable) elements, size, window, this);
 		}
 	}
 
@@ -422,7 +422,7 @@ public class EvictingWindowOperator<K, IN, OUT, W extends Window>
 	public void open() throws Exception {
 		super.open();
 
-		evictorContext = new EvictorContext(null,null);
+		evictorContext = new EvictorContext(null, null);
 		evictingWindowState = (InternalListState<W, StreamRecord<IN>>)
 				getOrCreateKeyedState(windowSerializer, evictingWindowStateDescriptor);
 	}

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
index c69b6dc..86cbee5 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
@@ -231,7 +231,7 @@ public class KeyMap<K, V> implements Iterable<KeyMap.Entry<K,
V>> {
 	}
 
 	private void insertNewEntry(int hashCode, K key, V value, int position) {
-		Entry<K,V> e = table[position];
+		Entry<K, V> e = table[position];
 		table[position] = new Entry<>(key, value, hashCode, e);
 		numElements++;
 

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
index 317fc9f..c87ac63 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
@@ -274,7 +274,7 @@ public class WindowOperator<K, IN, ACC, OUT, W extends Window>
 				getInternalTimerService("window-timers", windowSerializer, this);
 
 		triggerContext = new Context(null, null);
-		processContext = new WindowContext( null);
+		processContext = new WindowContext(null);
 
 		windowAssignerContext = new WindowAssigner.WindowAssignerContext() {
 			@Override

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java
index 53b4dda..7beba5c 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java
@@ -66,7 +66,7 @@ public class TestProcessingTimeService extends ProcessingTimeService {
 					callbackTask.onProcessingTime(entry.f0);
 
 					if (callbackTask instanceof PeriodicCallbackTask) {
-						priorityQueue.offer(Tuple2.of(((PeriodicCallbackTask)callbackTask).nextTimestamp(entry.f0),
callbackTask));
+						priorityQueue.offer(Tuple2.of(((PeriodicCallbackTask) callbackTask).nextTimestamp(entry.f0),
callbackTask));
 					}
 				}
 			}

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java
index c013799..c087e70 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java
@@ -155,7 +155,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 
 		SimpleTupleFieldAccessor(int pos, TypeInformation<T> typeInfo) {
 			checkNotNull(typeInfo, "typeInfo must not be null.");
-			int arity = ((TupleTypeInfo)typeInfo).getArity();
+			int arity = ((TupleTypeInfo) typeInfo).getArity();
 			if(pos < 0 || pos >= arity) {
 				throw new CompositeType.InvalidFieldReferenceException(
 					"Tried to select " + ((Integer) pos).toString() + ". field on \"" +
@@ -163,7 +163,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 			}
 
 			this.pos = pos;
-			this.fieldType = ((TupleTypeInfo)typeInfo).getTypeAt(pos);
+			this.fieldType = ((TupleTypeInfo) typeInfo).getTypeAt(pos);
 		}
 
 		@SuppressWarnings("unchecked")
@@ -195,7 +195,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 			checkNotNull(typeInfo, "typeInfo must not be null.");
 			checkNotNull(innerAccessor, "innerAccessor must not be null.");
 
-			int arity = ((TupleTypeInfo)typeInfo).getArity();
+			int arity = ((TupleTypeInfo) typeInfo).getArity();
 			if(pos < 0 || pos >= arity) {
 				throw new CompositeType.InvalidFieldReferenceException(
 					"Tried to select " + ((Integer) pos).toString() + ". field on \"" +
@@ -250,7 +250,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 		public F get(T pojo) {
 			try {
 				@SuppressWarnings("unchecked")
-				final R inner = (R)field.get(pojo);
+				final R inner = (R) field.get(pojo);
 				return innerAccessor.get(inner);
 			} catch (IllegalAccessException iaex) {
 				// The Field class is transient and when deserializing its value we also make it accessible
@@ -263,7 +263,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 		public T set(T pojo, F valueToSet) {
 			try {
 				@SuppressWarnings("unchecked")
-				final R inner = (R)field.get(pojo);
+				final R inner = (R) field.get(pojo);
 				field.set(pojo, innerAccessor.set(inner, valueToSet));
 				return pojo;
 			} catch (IllegalAccessException iaex) {
@@ -301,7 +301,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 
 		SimpleProductFieldAccessor(int pos, TypeInformation<T> typeInfo, ExecutionConfig
config) {
 			checkNotNull(typeInfo, "typeInfo must not be null.");
-			int arity = ((TupleTypeInfoBase)typeInfo).getArity();
+			int arity = ((TupleTypeInfoBase) typeInfo).getArity();
 			if(pos < 0 || pos >= arity) {
 				throw new CompositeType.InvalidFieldReferenceException(
 					"Tried to select " + ((Integer) pos).toString() + ". field on \"" +
@@ -309,8 +309,8 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 			}
 
 			this.pos = pos;
-			this.fieldType = ((TupleTypeInfoBase<T>)typeInfo).getTypeAt(pos);
-			this.serializer = (TupleSerializerBase<T>)typeInfo.createSerializer(config);
+			this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos);
+			this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config);
 			this.length = this.serializer.getArity();
 			this.fields = new Object[this.length];
 		}
@@ -318,13 +318,13 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 		@SuppressWarnings("unchecked")
 		@Override
 		public F get(T record) {
-			Product prod = (Product)record;
+			Product prod = (Product) record;
 			return (F) prod.productElement(pos);
 		}
 
 		@Override
 		public T set(T record, F fieldValue) {
-			Product prod = (Product)record;
+			Product prod = (Product) record;
 			for (int i = 0; i < length; i++) {
 				fields[i] = prod.productElement(i);
 			}
@@ -345,7 +345,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 		private final FieldAccessor<R, F> innerAccessor;
 
 		RecursiveProductFieldAccessor(int pos, TypeInformation<T> typeInfo, FieldAccessor<R,
F> innerAccessor, ExecutionConfig config) {
-			int arity = ((TupleTypeInfoBase)typeInfo).getArity();
+			int arity = ((TupleTypeInfoBase) typeInfo).getArity();
 			if(pos < 0 || pos >= arity) {
 				throw new CompositeType.InvalidFieldReferenceException(
 					"Tried to select " + ((Integer) pos).toString() + ". field on \"" +
@@ -355,8 +355,8 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 			checkNotNull(innerAccessor, "innerAccessor must not be null.");
 
 			this.pos = pos;
-			this.fieldType = ((TupleTypeInfoBase<T>)typeInfo).getTypeAt(pos);
-			this.serializer = (TupleSerializerBase<T>)typeInfo.createSerializer(config);
+			this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos);
+			this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config);
 			this.length = this.serializer.getArity();
 			this.fields = new Object[this.length];
 			this.innerAccessor = innerAccessor;
@@ -365,7 +365,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 		@SuppressWarnings("unchecked")
 		@Override
 		public F get(T record) {
-			return innerAccessor.get((R)((Product)record).productElement(pos));
+			return innerAccessor.get((R) ((Product) record).productElement(pos));
 		}
 
 		@SuppressWarnings("unchecked")
@@ -375,7 +375,7 @@ public abstract class FieldAccessor<T, F> implements Serializable
{
 			for (int i = 0; i < length; i++) {
 				fields[i] = prod.productElement(i);
 			}
-			fields[pos] = innerAccessor.set((R)fields[pos], fieldValue);
+			fields[pos] = innerAccessor.set((R) fields[pos], fieldValue);
 			return serializer.createInstance(fields);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java
index cca9121..893c640 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java
@@ -71,7 +71,7 @@ public class FieldAccessorFactory implements Serializable {
 		} else if (typeInfo.isTupleType() && ((TupleTypeInfoBase) typeInfo).isCaseClass())
{
 			TupleTypeInfoBase tupleTypeInfo = (TupleTypeInfoBase) typeInfo;
 			@SuppressWarnings("unchecked")
-			TypeInformation<F> fieldTypeInfo = (TypeInformation<F>)tupleTypeInfo.getTypeAt(pos);
+			TypeInformation<F> fieldTypeInfo = (TypeInformation<F>) tupleTypeInfo.getTypeAt(pos);
 			return new FieldAccessor.RecursiveProductFieldAccessor<>(
 				pos, typeInfo, new FieldAccessor.SimpleFieldAccessor<>(fieldTypeInfo), config);
 

http://git-wip-us.apache.org/repos/asf/flink/blob/226aebc8/tools/maven/strict-checkstyle.xml
----------------------------------------------------------------------
diff --git a/tools/maven/strict-checkstyle.xml b/tools/maven/strict-checkstyle.xml
index 9473b8a..48cb511 100644
--- a/tools/maven/strict-checkstyle.xml
+++ b/tools/maven/strict-checkstyle.xml
@@ -493,12 +493,12 @@ This file is based on the checkstyle file of Apache Beam.
       <!--<property name="severity" value="error"/>-->
     <!--</module>-->
 
-    <!--<module name="WhitespaceAfter">-->
-      <!--&lt;!&ndash; Checks that commas, semicolons and typecasts are followed
by-->
-           <!--whitespace.-->
-      <!--&ndash;&gt;-->
-      <!--<property name="tokens" value="COMMA, SEMI, TYPECAST"/>-->
-    <!--</module>-->
+    <module name="WhitespaceAfter">
+      <!-- Checks that commas, semicolons and typecasts are followed by
+           whitespace.
+      -->
+      <property name="tokens" value="COMMA, SEMI, TYPECAST"/>
+    </module>
 
     <module name="NoWhitespaceAfter">
       <!-- Checks that there is no whitespace after various unary operators.


Mime
View raw message