This is an automated email from the ASF dual-hosted git repository.

iwasakims pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-2.10 by this push:
     new ba86e01  HADOOP-17897. Allow nested blocks in switch case in 
checkstyle settings. (#3394)
ba86e01 is described below

commit ba86e013360641137c12e1be0ad26e7eaad9c7ec
Author: Masatake Iwasaki <[email protected]>
AuthorDate: Wed Sep 8 13:55:48 2021 +0900

    HADOOP-17897. Allow nested blocks in switch case in checkstyle settings. 
(#3394)
    
    (cherry picked from commit e183ec8998d0272884b73df7eb1a6da5adf1040a)
---
 hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml 
b/hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml
index 5445b5d..1093984 100644
--- a/hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml
+++ b/hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml
@@ -153,7 +153,9 @@
 
         <!-- Checks for blocks. You know, those {}'s         -->
         <!-- See http://checkstyle.sf.net/config_blocks.html -->
-        <module name="AvoidNestedBlocks"/>
+        <module name="AvoidNestedBlocks">
+          <property name="allowInSwitchCase" value="true"/>
+        </module>
         <module name="EmptyBlock"/>
         <module name="LeftCurly"/>
         <module name="NeedBraces"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to