I got two checkstyle warning for the style of switch-case statements:
./hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AddColumnFamilyProcedure.java:386:
cpHost.preAddColumnFamilyAction(tableName, cfDescriptor);:
error: 'block' child have incorrect indentation level 12, expected
level should be one of the following: 14, 16.
./hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AddColumnFamilyProcedure.java:386:
cpHost.preAddColumnFamilyAction(tableName, cfDescriptor);:
error: 'method call' child have incorrect indentation level 12,
expected level should be one of the following: 14, 16.
To me, the 2-space indentation looks correct. What is wrong for this style
(switch and case are in the same level, is this wrong? I set up HBASE
coding style in eclipse and it automatically did it this way)?
switch (state) {
case ADD_COLUMN_FAMILY_PRE_OPERATION:
cpHost.preAddColumnFamilyAction(tableName, cfDescriptor);
break;
case ADD_COLUMN_FAMILY_POST_OPERATION:
cpHost.postCompletedAddColumnFamilyAction(tableName,
cfDescriptor);
break;
default:
throw new UnsupportedOperationException(this + " unhandled
state=" + state);
}
Any insight would be helpful.
Thanks
Stephen