flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject incubator-flink git commit: Minor code clean up to get rid of IntelliJ IDEA warnings
Date Wed, 19 Nov 2014 10:59:12 GMT
Repository: incubator-flink
Updated Branches:
  refs/heads/master 1ecacf0e7 -> f84e4ecdf


Minor code clean up to get rid of IntelliJ IDEA warnings

This closes #214.


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

Branch: refs/heads/master
Commit: f84e4ecdfb3d981ae51370c33b98380cd0f75ba0
Parents: 1ecacf0
Author: Suneel Marthi <suneel.marthi@gmail.com>
Authored: Tue Nov 18 23:12:16 2014 -0500
Committer: uce <uce@apache.org>
Committed: Wed Nov 19 11:56:56 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/flink/types/ByteValue.java |  4 +---
 .../java/aggregation/SumAggregationFunction.java    | 12 ++++++------
 .../api/java/functions/SelectByMinFunction.java     |  4 +---
 .../flink/api/java/record/io/CsvInputFormat.java    |  2 +-
 .../java/record/io/ExternalProcessInputFormat.java  |  4 ++--
 .../api/java/record/operators/ReduceOperator.java   |  5 ++---
 .../flink/api/java/typeutils/TypeExtractor.java     |  6 +++---
 .../flink/api/java/typeutils/TypeInfoParser.java    | 14 ++++++--------
 .../flink/api/java/typeutils/WritableTypeInfo.java  |  8 ++------
 .../org/apache/flink/runtime/jobgraph/JobGraph.java |  9 ++++-----
 .../apache/flink/runtime/jobgraph/JobStatus.java    |  2 +-
 .../flink/test/cancelling/CancellingTestBase.java   |  1 -
 .../test/exampleJavaPrograms/PageRankITCase.java    |  9 +++------
 .../test/iterative/IterationWithChainingITCase.java |  3 +--
 .../test/iterative/IterationWithUnionITCase.java    |  2 +-
 .../apache/flink/test/operators/UnionITCase.java    | 16 +++++++---------
 .../flink/test/recordJobs/graph/PairwiseSP.java     |  4 ++--
 .../util/InfiniteIntegerInputFormatWithDelay.java   |  4 +++-
 18 files changed, 46 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-core/src/main/java/org/apache/flink/types/ByteValue.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/types/ByteValue.java b/flink-core/src/main/java/org/apache/flink/types/ByteValue.java
index ab0882a..c2f1f10 100644
--- a/flink-core/src/main/java/org/apache/flink/types/ByteValue.java
+++ b/flink-core/src/main/java/org/apache/flink/types/ByteValue.java
@@ -131,9 +131,7 @@ public class ByteValue implements NormalizableKey<ByteValue>, ResettableValue<By
 			highByte -= Byte.MIN_VALUE;
 			target.put(offset, (byte) highByte);
 		}
-		else if (len <= 0) {
-		}
-		else {
+		else if (len > 1) {
 			int highByte = this.value & 0xff;
 			highByte -= Byte.MIN_VALUE;
 			target.put(offset, (byte) highByte);

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/aggregation/SumAggregationFunction.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/aggregation/SumAggregationFunction.java
b/flink-java/src/main/java/org/apache/flink/api/java/aggregation/SumAggregationFunction.java
index 2d3d43f..24e8f31 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/aggregation/SumAggregationFunction.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/aggregation/SumAggregationFunction.java
@@ -42,7 +42,7 @@ public abstract class SumAggregationFunction<T> extends AggregationFunction<T>
{
 
 		@Override
 		public void aggregate(Byte value) {
-			agg += value.byteValue();
+			agg += value;
 		}
 
 		@Override
@@ -63,7 +63,7 @@ public abstract class SumAggregationFunction<T> extends AggregationFunction<T>
{
 
 		@Override
 		public void aggregate(Short value) {
-			agg += value.shortValue();
+			agg += value;
 		}
 
 		@Override
@@ -84,7 +84,7 @@ public abstract class SumAggregationFunction<T> extends AggregationFunction<T>
{
 
 		@Override
 		public void aggregate(Integer value) {
-			agg += value.intValue();
+			agg += value;
 		}
 
 		@Override
@@ -105,7 +105,7 @@ public abstract class SumAggregationFunction<T> extends AggregationFunction<T>
{
 
 		@Override
 		public void aggregate(Long value) {
-			agg += value.longValue();
+			agg += value;
 		}
 
 		@Override
@@ -126,7 +126,7 @@ public abstract class SumAggregationFunction<T> extends AggregationFunction<T>
{
 
 		@Override
 		public void aggregate(Float value) {
-			agg += value.floatValue();
+			agg += value;
 		}
 
 		@Override
@@ -147,7 +147,7 @@ public abstract class SumAggregationFunction<T> extends AggregationFunction<T>
{
 
 		@Override
 		public void aggregate(Double value) {
-			agg += value.doubleValue();
+			agg += value;
 		}
 
 		@Override

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/functions/SelectByMinFunction.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/functions/SelectByMinFunction.java
b/flink-java/src/main/java/org/apache/flink/api/java/functions/SelectByMinFunction.java
index eb6bc9c..096175b 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/functions/SelectByMinFunction.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/functions/SelectByMinFunction.java
@@ -68,10 +68,8 @@ public class SelectByMinFunction<T extends Tuple> implements ReduceFunction<T>
{
 	@Override
 	public T reduce(T value1, T value2) throws Exception {
 
-		for (int index = 0; index < fields.length; index++) {
+		for (int position : fields) {
 			// Save position of compared key
-			int position = this.fields[index];
-
 			// Get both values - both implement comparable
 			Comparable comparable1 = value1.getFieldNotNull(position);
 			Comparable comparable2 = value2.getFieldNotNull(position);

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/record/io/CsvInputFormat.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/record/io/CsvInputFormat.java
b/flink-java/src/main/java/org/apache/flink/api/java/record/io/CsvInputFormat.java
index e3ad06f..3e06fb5 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/record/io/CsvInputFormat.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/record/io/CsvInputFormat.java
@@ -269,7 +269,7 @@ public class CsvInputFormat extends GenericCsvInputFormat<Record>
{
 		 * Fix to support windows line endings in CSVInputFiles with standard delimiter setup =
\n
 		 */
 		//Find windows end line, so find carriage return before the newline
-		if(this.lineDelimiterIsLinebreak == true && bytes[offset + numBytes -1] == '\r')
{
+		if(this.lineDelimiterIsLinebreak && bytes[offset + numBytes -1] == '\r') {
 			//reduce the number of bytes so that the Carriage return is not taken as data
 			numBytes--;
 		}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/record/io/ExternalProcessInputFormat.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/record/io/ExternalProcessInputFormat.java
b/flink-java/src/main/java/org/apache/flink/api/java/record/io/ExternalProcessInputFormat.java
index 05054fe..b1f7ffc 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/record/io/ExternalProcessInputFormat.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/record/io/ExternalProcessInputFormat.java
@@ -90,8 +90,8 @@ public abstract class ExternalProcessInputFormat<T extends ExternalProcessInputS
 			int exitCode = this.extProc.exitValue();
 			// check whether exit code is allowed
 			boolean exitCodeOk = false;
-			for(int i=0; i<this.allowedExitCodes.length; i++) {
-				if(this.allowedExitCodes[i] == exitCode) {
+			for (int allowedExitCode : this.allowedExitCodes) {
+				if (allowedExitCode == exitCode) {
 					exitCodeOk = true;
 					break;
 				}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/record/operators/ReduceOperator.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/record/operators/ReduceOperator.java
b/flink-java/src/main/java/org/apache/flink/api/java/record/operators/ReduceOperator.java
index d09c2dc..ff1bd28 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/record/operators/ReduceOperator.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/record/operators/ReduceOperator.java
@@ -26,6 +26,7 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -308,9 +309,7 @@ public class ReduceOperator extends GroupReduceOperatorBase<Record,
Record, Grou
 		 */
 		public Builder input(Operator<Record>...inputs) {
 			this.inputs.clear();
-			for (Operator<Record> c : inputs) {
-				this.inputs.add(c);
-			}
+			Collections.addAll(this.inputs, inputs);
 			return this;
 		}
 		

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
index 33750b5..cf3751c 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
@@ -209,7 +209,7 @@ public class TypeExtractor {
 		ArrayList<Type> typeHierarchy = new ArrayList<Type>();
 		Type returnType = getParameterType(baseClass, typeHierarchy, clazz, returnParamPos);
 		
-		TypeInformation<OUT> typeInfo = null;
+		TypeInformation<OUT> typeInfo;
 		
 		// return type is a variable -> try to get the type info from the input directly
 		if (returnType instanceof TypeVariable<?>) {
@@ -377,7 +377,7 @@ public class TypeExtractor {
 					className = "L" + componentClass.getName() + ";";
 				}
 				
-				Class<OUT> classArray = null;
+				Class<OUT> classArray;
 				try {
 					classArray = (Class<OUT>) Class.forName("[" + className);
 				} catch (ClassNotFoundException e) {
@@ -706,7 +706,7 @@ public class TypeExtractor {
 					throw new InvalidTypesException("Value type expected.");
 				}
 				
-				TypeInformation<?> actual = null;
+				TypeInformation<?> actual;
 				// check value type contents
 				if (!((ValueTypeInfo<?>) typeInfo).equals(actual = ValueTypeInfo.getValueTypeInfo((Class<?
extends Value>) type))) {
 					throw new InvalidTypesException("Value type '" + typeInfo + "' expected but was '" +
actual + "'.");

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeInfoParser.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeInfoParser.java
b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeInfoParser.java
index 953b69c..d088d16 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeInfoParser.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeInfoParser.java
@@ -120,7 +120,7 @@ public class TypeInfoParser {
 			sb.delete(0, className.length() + 1);
 			int arity = Integer.parseInt(className.replaceAll("\\D", ""));
 
-			Class<?> clazz = null;
+			Class<?> clazz;
 			// check if fully qualified
 			if (className.startsWith(TUPLE_PACKAGE)) {
 				clazz = Class.forName(className);
@@ -144,7 +144,7 @@ public class TypeInfoParser {
 			// tuple arrays
 			if (sb.length() > 0) {
 				if (sb.length() >= 2 && sb.charAt(0) == '[' && sb.charAt(1) == ']')
{
-					Class<?> arrayClazz = null;
+					Class<?> arrayClazz;
 					// check if fully qualified
 					if (className.startsWith(TUPLE_PACKAGE)) {
 						arrayClazz = Class.forName("[L" + className + ";");
@@ -152,9 +152,7 @@ public class TypeInfoParser {
 						arrayClazz = Class.forName("[L" + TUPLE_PACKAGE + "." + className + ";");
 					}
 					returnType = ObjectArrayTypeInfo.getInfoFor(arrayClazz, new TupleTypeInfo(clazz, types));
-				} else if (sb.length() >= 1 && sb.charAt(0) == '[') {
-					// no return type -> exception instead
-				} else {
+				} else if (sb.length() < 1 || sb.charAt(0) != '[') {
 					returnType = new TupleTypeInfo(clazz, types);
 				}
 			} else {
@@ -179,7 +177,7 @@ public class TypeInfoParser {
 		else if (basicTypeMatcher.find()) {
 			String className = basicTypeMatcher.group(1);
 			sb.delete(0, className.length());
-			Class<?> clazz = null;
+			Class<?> clazz;
 			// check if fully qualified
 			if (className.startsWith("java.lang")) {
 				clazz = Class.forName(className);
@@ -218,7 +216,7 @@ public class TypeInfoParser {
 			String className = valueTypeMatcher.group(1);
 			sb.delete(0, className.length() + 5);
 
-			Class<?> clazz = null;
+			Class<?> clazz;
 			// check if fully qualified
 			if (className.startsWith(VALUE_PACKAGE)) {
 				clazz = Class.forName(className + "Value");
@@ -232,7 +230,7 @@ public class TypeInfoParser {
 			String className = basicArrayTypeMatcher.group(1);
 			sb.delete(0, className.length() + 2);
 
-			Class<?> clazz = null;
+			Class<?> clazz;
 			if (className.startsWith("java.lang")) {
 				clazz = Class.forName("[L" + className + ";");
 			} else {

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-java/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java
b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java
index 8c9e948..195ce25 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java
@@ -100,16 +100,12 @@ public class WritableTypeInfo<T extends Writable> extends TypeInformation<T>
imp
 	
 	@Override
 	public boolean equals(Object obj) {
-		if (obj.getClass() == WritableTypeInfo.class) {
-			return typeClass == ((WritableTypeInfo<?>) obj).typeClass;
-		} else {
-			return false;
-		}
+		return obj.getClass() == WritableTypeInfo.class && typeClass == ((WritableTypeInfo<?>)
obj).typeClass;
 	}
 	
 	// --------------------------------------------------------------------------------------------
 	
-	static final <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T>
typeClass) {
+	static <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T>
typeClass) {
 		if (Writable.class.isAssignableFrom(typeClass) && !typeClass.equals(Writable.class))
{
 			return new WritableTypeInfo<T>(typeClass);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
index 4a8ca11..be691f0 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
@@ -102,7 +102,7 @@ public class JobGraph implements IOReadableWritable {
 	 * @param jobName The name of the job
 	 */
 	public JobGraph(JobID jobId, String jobName) {
-		this.jobID = jobId == null ? new JobID() : jobId;;
+		this.jobID = jobId == null ? new JobID() : jobId;
 		this.jobName = jobName == null ? "(unnamed job)" : jobName;
 	}
 	
@@ -405,8 +405,8 @@ public class JobGraph implements IOReadableWritable {
 
 		out.writeInt(this.userJarBlobKeys.size());
 
-		for (final Iterator<BlobKey> it = this.userJarBlobKeys.iterator(); it.hasNext();)
{
-			it.next().write(out);
+		for (BlobKey userJarBlobKey : this.userJarBlobKeys) {
+			userJarBlobKey.write(out);
 		}
 	}
 
@@ -480,9 +480,8 @@ public class JobGraph implements IOReadableWritable {
 
 			bc = new BlobClient(serverAddress);
 
-			for (final Iterator<Path> it = this.userJars.iterator(); it.hasNext();) {
+			for (final Path jar : this.userJars) {
 
-				final Path jar = it.next();
 				final FileSystem fs = jar.getFileSystem();
 				FSDataInputStream is = null;
 				try {

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobStatus.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobStatus.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobStatus.java
index 3722945..542620e 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobStatus.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobStatus.java
@@ -58,4 +58,4 @@ public enum JobStatus {
 	public boolean isTerminalState() {
 		return terminalState;
 	}
-};
+}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
b/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
index bc40df6..15eca67 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
@@ -221,7 +221,6 @@ public abstract class CancellingTestBase {
 		} catch (Exception e) {
 			LOG.error("Exception while running runAndCancelJob.", e);
 			Assert.fail(StringUtils.stringifyException(e));
-			return;
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/exampleJavaPrograms/PageRankITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/exampleJavaPrograms/PageRankITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/exampleJavaPrograms/PageRankITCase.java
index a362a68..3409c17 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/exampleJavaPrograms/PageRankITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/exampleJavaPrograms/PageRankITCase.java
@@ -18,11 +18,9 @@
 
 package org.apache.flink.test.exampleJavaPrograms;
 
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.LinkedList;
-
 import org.apache.flink.configuration.Configuration;
 import org.apache.flink.examples.java.graph.PageRankBasic;
 import org.apache.flink.test.testdata.PageRankData;
@@ -33,9 +31,7 @@ import org.junit.runners.Parameterized.Parameters;
 
 @RunWith(Parameterized.class)
 public class PageRankITCase extends JavaProgramTestBase {
-	
-	private static int NUM_PROGRAMS = 2;
-	
+
 	private int curProgId = config.getInteger("ProgramId", -1);
 	
 	private String verticesPath;
@@ -65,10 +61,11 @@ public class PageRankITCase extends JavaProgramTestBase {
 	}
 	
 	@Parameters
-	public static Collection<Object[]> getConfigurations() throws FileNotFoundException,
IOException {
+	public static Collection<Object[]> getConfigurations() throws IOException {
 
 		LinkedList<Configuration> tConfigs = new LinkedList<Configuration>();
 
+		int NUM_PROGRAMS = 2;
 		for(int i=1; i <= NUM_PROGRAMS; i++) {
 			Configuration config = new Configuration();
 			config.setInteger("ProgramId", i);

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithChainingITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithChainingITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithChainingITCase.java
index ef8f343..f626b75 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithChainingITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithChainingITCase.java
@@ -68,8 +68,7 @@ public class IterationWithChainingITCase extends RecordAPITestBase {
 
 	@Override
 	protected Plan getTestJob() {
-		Plan plan = getTestPlan(config.getInteger("ChainedMapperITCase#NoSubtasks", 1), dataPath,
resultPath);
-		return plan;
+		return getTestPlan(config.getInteger("ChainedMapperITCase#NoSubtasks", 1), dataPath, resultPath);
 	}
 
 	@Parameters

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithUnionITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithUnionITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithUnionITCase.java
index f0e1360..2a4a4b7 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithUnionITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/iterative/IterationWithUnionITCase.java
@@ -74,7 +74,7 @@ public class IterationWithUnionITCase extends JavaProgramTestBase {
 		}
 	}
 
-	static final class DummyReducer implements GroupReduceFunction<Record, Record>, Serializable
{
+	static class DummyReducer implements GroupReduceFunction<Record, Record>, Serializable
{
 		private static final long serialVersionUID = 1L;
 
 		@Override

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java b/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
index 93661a0..e2a6078 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
@@ -19,8 +19,10 @@
 
 package org.apache.flink.test.operators;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.LinkedList;
 import org.apache.flink.api.common.Plan;
 import org.apache.flink.api.java.record.functions.MapFunction;
 import org.apache.flink.api.java.record.io.DelimitedInputFormat;
@@ -38,12 +40,8 @@ import org.apache.flink.util.Collector;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.LinkedList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @RunWith(Parameterized.class)
 public class UnionITCase extends RecordAPITestBase {
@@ -141,7 +139,7 @@ public class UnionITCase extends RecordAPITestBase {
 	}
 
 	@Parameters
-	public static Collection<Object[]> getConfigurations() throws FileNotFoundException,
IOException {
+	public static Collection<Object[]> getConfigurations() throws IOException {
 		LinkedList<Configuration> testConfigs = new LinkedList<Configuration>();
 
 		//second input empty

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/recordJobs/graph/PairwiseSP.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/recordJobs/graph/PairwiseSP.java
b/flink-tests/src/test/java/org/apache/flink/test/recordJobs/graph/PairwiseSP.java
index a0cc376..0886dbb 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/recordJobs/graph/PairwiseSP.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/recordJobs/graph/PairwiseSP.java
@@ -199,7 +199,7 @@ public class PairwiseSP implements Program, ProgramDescription {
 			line.append(record.getField(4, StringValue.class).toString());
 			line.append("|");
 			line.append("\n");
-			
+
 			stream.write(line.toString().getBytes());
 		}
 	}
@@ -392,7 +392,7 @@ public class PairwiseSP implements Program, ProgramDescription {
 		int numSubTasks   = (args.length > 0 ? Integer.parseInt(args[0]) : 1);
 		String paths     = (args.length > 1 ? args[1] : "");
 		String output    = (args.length > 2 ? args[2] : "");
-		boolean rdfInput = (args.length > 3 ? Boolean.parseBoolean(args[3]) : false);
+		boolean rdfInput = (args.length > 3 && Boolean.parseBoolean(args[3]));
 
 		FileDataSource pathsInput;
 		

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f84e4ecd/flink-tests/src/test/java/org/apache/flink/test/recordJobs/util/InfiniteIntegerInputFormatWithDelay.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/recordJobs/util/InfiniteIntegerInputFormatWithDelay.java
b/flink-tests/src/test/java/org/apache/flink/test/recordJobs/util/InfiniteIntegerInputFormatWithDelay.java
index 870dcc8..4140b48 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/recordJobs/util/InfiniteIntegerInputFormatWithDelay.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/recordJobs/util/InfiniteIntegerInputFormatWithDelay.java
@@ -48,7 +48,9 @@ public class InfiniteIntegerInputFormatWithDelay extends GenericInputFormat
{
 		
 		try {
 			Thread.sleep(DELAY);
-		} catch (InterruptedException iex) {}
+		} catch (InterruptedException iex) {
+			// do nothing
+		}
 		
 		return record;
 	}


Mime
View raw message