You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/09/05 14:48:39 UTC
[flink] 06/07: [hotfix][checkstyle] Remove suppression for
runtime/network.serialization
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit b53a333c1701fb616c9e0adb36b44cfbd0af7a4c
Author: zentol <ch...@apache.org>
AuthorDate: Wed Sep 5 16:34:23 2018 +0200
[hotfix][checkstyle] Remove suppression for runtime/network.serialization
---
.../network/serialization/types/LargeObjectType.java | 18 ++++++++++--------
tools/maven/suppressions-runtime.xml | 4 ++--
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/serialization/types/LargeObjectType.java b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/serialization/types/LargeObjectType.java
index 8efd2bb..dfea937 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/serialization/types/LargeObjectType.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/serialization/types/LargeObjectType.java
@@ -16,20 +16,22 @@
* limitations under the License.
*/
-
package org.apache.flink.runtime.io.network.serialization.types;
-import java.io.IOException;
-import java.util.Random;
-
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.testutils.serialization.types.SerializationTestType;
+import java.io.IOException;
+import java.util.Random;
+
+/**
+ * A large {@link SerializationTestType}.
+ */
public class LargeObjectType implements SerializationTestType {
private static final int MIN_LEN = 12 * 1000 * 1000;
-
+
private static final int MAX_LEN = 40 * 1000 * 1000;
private int len;
@@ -68,13 +70,13 @@ public class LargeObjectType implements SerializationTestType {
public void read(DataInputView in) throws IOException {
final int len = in.readInt();
this.len = len;
-
+
for (int i = 0; i < len / 8; i++) {
if (in.readLong() != i) {
throw new IOException("corrupt serialization");
}
}
-
+
for (int i = 0; i < len % 8; i++) {
if (in.readByte() != i) {
throw new IOException("corrupt serialization");
@@ -91,7 +93,7 @@ public class LargeObjectType implements SerializationTestType {
public boolean equals(Object obj) {
return (obj instanceof LargeObjectType) && ((LargeObjectType) obj).len == this.len;
}
-
+
@Override
public String toString() {
return "Large Object " + len;
diff --git a/tools/maven/suppressions-runtime.xml b/tools/maven/suppressions-runtime.xml
index 641c73a..c145d9b 100644
--- a/tools/maven/suppressions-runtime.xml
+++ b/tools/maven/suppressions-runtime.xml
@@ -87,11 +87,11 @@ under the License.
files="(.*)test[/\\](.*)runtime[/\\]io[/\\]disk[/\\](.*)"
checks="AvoidStarImport|UnusedImports"/>
<suppress
- files="(.*)runtime[/\\]io[/\\]network[/\\](netty|partition|serialization|util)[/\\](.*)"
+ files="(.*)runtime[/\\]io[/\\]network[/\\](netty|partition|util)[/\\](.*)"
checks="NewlineAtEndOfFile|RegexpSingleline|TodoComment|RedundantImport|ImportOrder|RedundantModifier|JavadocMethod|JavadocParagraph|JavadocType|JavadocStyle|PackageName|TypeNameCheck|ConstantNameCheck|StaticVariableNameCheck|MemberNameCheck|MethodNameCheck|ParameterName|LocalFinalVariableName|LocalVariableName|LeftCurly|UpperEll|FallThrough|reliefPattern|SimplifyBooleanExpression|EmptyStatement|ModifierOrder|EmptyLineSeparator|WhitespaceAround|WhitespaceAfter|NoWhitespaceAfter|NoWhite [...]
<!--Only additional checks for test sources. Those checks were present in the "pre-strict" checkstyle but were not applied to test sources. We do not want to suppress them for sources directory-->
<suppress
- files="(.*)test[/\\](.*)runtime[/\\]io[/\\]network[/\\](netty|partition|serialization|util)[/\\](.*)"
+ files="(.*)test[/\\](.*)runtime[/\\]io[/\\]network[/\\](netty|partition|util)[/\\](.*)"
checks="AvoidStarImport|UnusedImports"/>
<!--Test class copied from the netty project-->
<suppress