Repository: reef Updated Branches: refs/heads/master f92218572 -> d6b56c6f6
[REEF-1360] Enforce comment style for license headers in Java This change enforces /* style in Java license headers and fixes several violations. JIRA: [REEF-1360](https://issues.apache.org/jira/browse/REEF-1360) Pull request: This closes #992 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/d6b56c6f Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/d6b56c6f Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/d6b56c6f Branch: refs/heads/master Commit: d6b56c6f6af72108ff7543a17a6818213777626c Parents: f922185 Author: Mariia Mykhailova <[email protected]> Authored: Thu May 5 15:20:50 2016 -0700 Committer: Markus Weimer <[email protected]> Committed: Fri May 6 11:01:29 2016 -0700 ---------------------------------------------------------------------- .../driver/api/ResourceManagerStartHandler.java | 2 +- .../driver/api/ResourceManagerStopHandler.java | 2 +- .../src/main/resources/checkstyle-strict.xml | 26 ++++++-------------- .../src/main/resources/checkstyle.xml | 25 ++++++------------- .../impl/NetworkConnectionServiceImpl.java | 4 +-- .../LocalResourceManagerStartHandler.java | 4 +-- .../driver/LocalResourceManagerStopHandler.java | 4 +-- ...MultiRuntimeResourceManagerStartHandler.java | 4 +-- .../MultiRuntimeResourceManagerStopHandler.java | 4 +-- 9 files changed, 26 insertions(+), 49 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStartHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStartHandler.java b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStartHandler.java index 0744ded..e7b56d5 100644 --- a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStartHandler.java +++ b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStartHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStopHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStopHandler.java b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStopHandler.java index 896e904..022b7cb 100644 --- a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStopHandler.java +++ b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceManagerStopHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-common/src/main/resources/checkstyle-strict.xml ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/resources/checkstyle-strict.xml b/lang/java/reef-common/src/main/resources/checkstyle-strict.xml index 98a8bd2..8738feb 100644 --- a/lang/java/reef-common/src/main/resources/checkstyle-strict.xml +++ b/lang/java/reef-common/src/main/resources/checkstyle-strict.xml @@ -72,6 +72,13 @@ <!-- not a check --> <module name="SuppressWarningsFilter"/> + <!-- Checks for Headers --> + <!-- See http://checkstyle.sf.net/config_header.html --> + <module name="RegexpHeader"> + <property name="header" value="^/\*$"/> + <property name="fileExtensions" value="java"/> + </module> + <module name="TreeWalker"> <!-- not a check --> <module name="SuppressWarningsHolder"/> @@ -96,25 +103,6 @@ <module name="StaticVariableName"/> <module name="TypeName"/> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- The follow property value demonstrates the ability --> - <!-- to have access to ANT properties. In this case it uses --> - <!-- the ${basedir} property to allow Checkstyle to be run --> - <!-- from any directory within a project. See property --> - <!-- expansion, --> - <!-- http://checkstyle.sf.net/config.html#properties --> - <!-- <property --> - <!-- name="headerFile" --> - <!-- value="${basedir}/java.header"/> --> - <!-- </module> --> - - <!-- Following interprets the header file as regular expressions. --> - <!-- <module name="RegexpHeader"/> --> - - <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="IllegalImport"/> http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-common/src/main/resources/checkstyle.xml ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/resources/checkstyle.xml b/lang/java/reef-common/src/main/resources/checkstyle.xml index 6499ff4..8a2beed 100644 --- a/lang/java/reef-common/src/main/resources/checkstyle.xml +++ b/lang/java/reef-common/src/main/resources/checkstyle.xml @@ -72,6 +72,13 @@ <!-- not a check --> <module name="SuppressWarningsFilter"/> + <!-- Checks for Headers --> + <!-- See http://checkstyle.sf.net/config_header.html --> + <module name="RegexpHeader"> + <property name="header" value="^/\*$"/> + <property name="fileExtensions" value="java"/> + </module> + <module name="TreeWalker"> <!-- not a check --> <module name="SuppressWarningsHolder"/> @@ -98,24 +105,6 @@ <module name="TypeName"/> - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- The follow property value demonstrates the ability --> - <!-- to have access to ANT properties. In this case it uses --> - <!-- the ${basedir} property to allow Checkstyle to be run --> - <!-- from any directory within a project. See property --> - <!-- expansion, --> - <!-- http://checkstyle.sf.net/config.html#properties --> - <!-- <property --> - <!-- name="headerFile" --> - <!-- value="${basedir}/java.header"/> --> - <!-- </module> --> - - <!-- Following interprets the header file as regular expressions. --> - <!-- <module name="RegexpHeader"/> --> - - <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="IllegalImport"/> http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-io/src/main/java/org/apache/reef/io/network/impl/NetworkConnectionServiceImpl.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-io/src/main/java/org/apache/reef/io/network/impl/NetworkConnectionServiceImpl.java b/lang/java/reef-io/src/main/java/org/apache/reef/io/network/impl/NetworkConnectionServiceImpl.java index 6e63f30..a249ebd 100644 --- a/lang/java/reef-io/src/main/java/org/apache/reef/io/network/impl/NetworkConnectionServiceImpl.java +++ b/lang/java/reef-io/src/main/java/org/apache/reef/io/network/impl/NetworkConnectionServiceImpl.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -253,4 +253,4 @@ public final class NetworkConnectionServiceImpl implements NetworkConnectionServ this.transport.close(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStartHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStartHandler.java b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStartHandler.java index ace2736..b216b72 100644 --- a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStartHandler.java +++ b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStartHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -36,4 +36,4 @@ final class LocalResourceManagerStartHandler implements ResourceManagerStartHand public void onNext(final RuntimeStart value) { this.containerManager.start(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStopHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStopHandler.java b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStopHandler.java index a30eaa2..6e00642 100644 --- a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStopHandler.java +++ b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/LocalResourceManagerStopHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -36,4 +36,4 @@ final class LocalResourceManagerStopHandler implements ResourceManagerStopHandle public void onNext(final RuntimeStop value) { this.containerManager.close(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStartHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStartHandler.java b/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStartHandler.java index aea6b3b..d63cd86 100644 --- a/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStartHandler.java +++ b/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStartHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -39,4 +39,4 @@ final class MultiRuntimeResourceManagerStartHandler implements ResourceManagerSt public void onNext(final RuntimeStart value) { this.runtimesHost.onRuntimeStart(value); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/reef/blob/d6b56c6f/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStopHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStopHandler.java b/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStopHandler.java index 1343410..f96799e 100644 --- a/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStopHandler.java +++ b/lang/java/reef-runtime-multi/src/main/java/org/apache/reef/runtime/multi/driver/MultiRuntimeResourceManagerStopHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -39,4 +39,4 @@ final class MultiRuntimeResourceManagerStopHandler implements ResourceManagerSto public void onNext(final RuntimeStop value) { this.runtimesHost.onRuntimeStop(value); } -} \ No newline at end of file +}
