flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [03/23] flink git commit: [FLINK-6107] Enable import order check in streaming checkstyle
Date Wed, 26 Apr 2017 10:07:25 GMT
http://git-wip-us.apache.org/repos/asf/flink/blob/922352ac/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 aef87d9..c013799 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
@@ -17,6 +17,14 @@
 
 package org.apache.flink.streaming.util.typeutils;
 
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
 import org.apache.flink.annotation.Internal;
 import org.apache.flink.api.common.ExecutionConfig;
 import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
@@ -29,15 +37,6 @@ import org.apache.flink.api.java.typeutils.runtime.FieldSerializer;
 import org.apache.flink.api.java.typeutils.runtime.TupleSerializerBase;
 import scala.Product;
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-
-import static org.apache.flink.util.Preconditions.checkNotNull;
-
 
 /**
  * These classes encapsulate the logic of accessing a field specified by the user as either
an index

http://git-wip-us.apache.org/repos/asf/flink/blob/922352ac/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 1bfce5b..cca9121 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
@@ -17,6 +17,9 @@
 
 package org.apache.flink.streaming.util.typeutils;
 
+import java.io.Serializable;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 import org.apache.flink.annotation.Internal;
 import org.apache.flink.api.common.ExecutionConfig;
 import org.apache.flink.api.common.operators.Keys;
@@ -30,10 +33,6 @@ import org.apache.flink.api.java.typeutils.PojoTypeInfo;
 import org.apache.flink.api.java.typeutils.TupleTypeInfo;
 import org.apache.flink.api.java.typeutils.TupleTypeInfoBase;
 
-import java.io.Serializable;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 
 /**
  * Static factories for the {@link FieldAccessor} utilities.

http://git-wip-us.apache.org/repos/asf/flink/blob/922352ac/tools/maven/strict-checkstyle.xml
----------------------------------------------------------------------
diff --git a/tools/maven/strict-checkstyle.xml b/tools/maven/strict-checkstyle.xml
index 3285e5c..9473b8a 100644
--- a/tools/maven/strict-checkstyle.xml
+++ b/tools/maven/strict-checkstyle.xml
@@ -194,16 +194,16 @@ This file is based on the checkstyle file of Apache Beam.
                value="Redundant import {0}."/>
     </module>
 
-    <!--<module name="ImportOrder">-->
-      <!--&lt;!&ndash; Checks for out of order import statements. &ndash;&gt;-->
-      <!--<property name="severity" value="error"/>-->
-      <!--&lt;!&ndash; This ensures that static imports go first. &ndash;&gt;-->
-      <!--<property name="option" value="top"/>-->
-      <!--<property name="sortStaticImportsAlphabetically" value="true"/>-->
-      <!--<property name="tokens" value="STATIC_IMPORT, IMPORT"/>-->
-      <!--<message key="import.ordering"-->
-               <!--value="Import {0} appears after other imports that it should precede"/>-->
-    <!--</module>-->
+    <module name="ImportOrder">
+      <!-- Checks for out of order import statements. -->
+      <property name="severity" value="error"/>
+      <!-- This ensures that static imports go first. -->
+      <property name="option" value="top"/>
+      <property name="sortStaticImportsAlphabetically" value="true"/>
+      <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
+      <message key="import.ordering"
+               value="Import {0} appears after other imports that it should precede"/>
+    </module>
 
     <module name="AvoidStarImport">
       <property name="severity" value="error"/>


Mime
View raw message