You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by va...@apache.org on 2017/09/27 20:40:27 UTC

spark git commit: [HOTFIX][BUILD] Fix finalizer checkstyle error and re-disable checkstyle

Repository: spark
Updated Branches:
  refs/heads/master 09cbf3df2 -> 9b98aef6a


[HOTFIX][BUILD] Fix finalizer checkstyle error and re-disable checkstyle

## What changes were proposed in this pull request?

Fix finalizer checkstyle violation by just turning it off; re-disable checkstyle as it won't be run by SBT PR builder. See https://github.com/apache/spark/pull/18887#issuecomment-332580700

## How was this patch tested?

`./dev/lint-java` runs successfully

Author: Sean Owen <so...@cloudera.com>

Closes #19371 from srowen/HotfixFinalizerCheckstlye.


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

Branch: refs/heads/master
Commit: 9b98aef6a39a5a9ea9fc5481b5a0d92620ba6347
Parents: 09cbf3d
Author: Sean Owen <so...@cloudera.com>
Authored: Wed Sep 27 13:40:21 2017 -0700
Committer: Marcelo Vanzin <va...@cloudera.com>
Committed: Wed Sep 27 13:40:21 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/spark/io/NioBufferedFileInputStream.java  | 2 --
 dev/checkstyle-suppressions.xml                                    | 2 --
 dev/checkstyle.xml                                                 | 1 -
 pom.xml                                                            | 1 +
 4 files changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/9b98aef6/core/src/main/java/org/apache/spark/io/NioBufferedFileInputStream.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/spark/io/NioBufferedFileInputStream.java b/core/src/main/java/org/apache/spark/io/NioBufferedFileInputStream.java
index ea5f1a9..f6d1288 100644
--- a/core/src/main/java/org/apache/spark/io/NioBufferedFileInputStream.java
+++ b/core/src/main/java/org/apache/spark/io/NioBufferedFileInputStream.java
@@ -130,10 +130,8 @@ public final class NioBufferedFileInputStream extends InputStream {
     StorageUtils.dispose(byteBuffer);
   }
 
-  //checkstyle.off: NoFinalizer
   @Override
   protected void finalize() throws IOException {
     close();
   }
-  //checkstyle.on: NoFinalizer
 }

http://git-wip-us.apache.org/repos/asf/spark/blob/9b98aef6/dev/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/dev/checkstyle-suppressions.xml b/dev/checkstyle-suppressions.xml
index 6e15f69..bbda824 100644
--- a/dev/checkstyle-suppressions.xml
+++ b/dev/checkstyle-suppressions.xml
@@ -40,8 +40,6 @@
               files="src/main/java/org/apache/hive/service/*"/>
     <suppress checks="MethodName"
               files="src/main/java/org/apache/hive/service/auth/PasswdAuthenticationProvider.java"/>
-    <suppress checks="NoFinalizer"
-              files="src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java"/>
     <suppress checks="MethodName"
               files="sql/catalyst/src/main/java/org/apache/spark/sql/streaming/OutputMode.java"/>
     <suppress checks="MethodName"

http://git-wip-us.apache.org/repos/asf/spark/blob/9b98aef6/dev/checkstyle.xml
----------------------------------------------------------------------
diff --git a/dev/checkstyle.xml b/dev/checkstyle.xml
index 68aee4d..53c2848 100644
--- a/dev/checkstyle.xml
+++ b/dev/checkstyle.xml
@@ -131,7 +131,6 @@
             <message key="name.invalidPattern"
              value="Method type name ''{0}'' must match pattern ''{1}''."/>
         </module>
-        <module name="NoFinalizer"/>
         <module name="GenericWhitespace">
             <message key="ws.followed"
              value="GenericWhitespace ''{0}'' is followed by whitespace."/>

http://git-wip-us.apache.org/repos/asf/spark/blob/9b98aef6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b0408ec..83a3500 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2488,6 +2488,7 @@
         <artifactId>maven-checkstyle-plugin</artifactId>
         <version>2.17</version>
         <configuration>
+          <failOnViolation>false</failOnViolation>
           <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <sourceDirectories>${basedir}/src/main/java,${basedir}/src/main/scala</sourceDirectories>
           <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org