提交 769b0537 编写于 作者: L lamber-ken 提交者: qiaozhanwei

[checkstyle] optimize java code checkstyle for LeftCurly rule (#1375)

上级 e6395d0e
......@@ -156,8 +156,7 @@ public class ServiceModelToSwagger2MapperImpl extends ServiceModelToSwagger2Mapp
List<String> list = new ArrayList<String>(tagsSet.size());
Iterator<String> it = from.getTags().iterator();
while(it.hasNext())
{
while(it.hasNext()){
String tag = it.next();
list.add(StringUtils.isNotBlank(tag) ? messageSource.getMessage(tag, null, tag, locale) : " ");
}
......
......@@ -451,8 +451,7 @@ public class ResourcesController extends BaseController{
@GetMapping(value = "/udf-func/update-ui")
@ResponseStatus(HttpStatus.OK)
public Result viewUIUdfFunction(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("id") int id)
{
@RequestParam("id") int id) {
logger.info("login user {}, query udf{}",
loginUser.getUserName(), id);
try {
......
......@@ -45,8 +45,7 @@ public class FourLetterWordMain {
* @throws java.io.IOException io exceptions
*/
public static String send4LetterWord(String host, int port, String cmd)
throws IOException
{
throws IOException {
return send4LetterWord(host, port, cmd, DEFAULT_SOCKET_TIMEOUT);
}
/**
......@@ -59,8 +58,7 @@ public class FourLetterWordMain {
* @throws java.io.IOException io exceptions
*/
public static String send4LetterWord(String host, int port, String cmd, int timeout)
throws IOException
{
throws IOException {
LOG.info("connecting to " + host + " " + port);
Socket sock = new Socket();
InetSocketAddress hostaddress= host != null ? new InetSocketAddress(host, port) :
......
......@@ -119,7 +119,9 @@ public enum ExecutionStatus {
* status is cancel
* @return status
*/
public boolean typeIsCancel(){ return this == KILL || this == STOP ;}
public boolean typeIsCancel(){
return this == KILL || this == STOP ;
}
}
......@@ -419,13 +419,17 @@ public abstract class AbstractZKClient {
*
* @return get worker node parent path
*/
protected String getWorkerZNodeParentPath(){return conf.getString(Constants.ZOOKEEPER_DOLPHINSCHEDULER_WORKERS);};
protected String getWorkerZNodeParentPath(){
return conf.getString(Constants.ZOOKEEPER_DOLPHINSCHEDULER_WORKERS);
}
/**
*
* @return get master node parent path
*/
protected String getMasterZNodeParentPath(){return conf.getString(Constants.ZOOKEEPER_DOLPHINSCHEDULER_MASTERS);}
protected String getMasterZNodeParentPath(){
return conf.getString(Constants.ZOOKEEPER_DOLPHINSCHEDULER_MASTERS);
}
/**
*
......
......@@ -94,8 +94,7 @@ public class TaskQueueImplTest extends StandaloneZKServerForTest {
public void extremeTest(){
int total = 30 * 10000;
for(int i = 0; i < total; i++)
{
for(int i = 0; i < total; i++) {
for(int j = 0; j < total; j++) {
//${processInstancePriority}_${processInstanceId}_${taskInstancePriority}_${taskId}
//format ${processInstancePriority}_${processInstanceId}_${taskInstancePriority}_${taskId}
......
......@@ -93,8 +93,7 @@ public class TaskRecordDao {
* @param filterMap filterMap
* @return sql string
*/
private static String getWhereString(Map<String, String> filterMap)
{
private static String getWhereString(Map<String, String> filterMap) {
if(filterMap.size() ==0){
return "";
}
......
......@@ -37,16 +37,25 @@
</module>
<module name="TreeWalker">
<module name="OuterTypeFilename">
<property name="severity" value="error"/>
</module>
<module name="OuterTypeFilename"/>
<module name="OneTopLevelClass"/>
<module name="OneTopLevelClass">
<property name="severity" value="error"/>
</module>
<module name="NoLineWrap"/>
<module name="NoLineWrap">
<property name="severity" value="error"/>
</module>
<module name="NeedBraces"/>
<module name="NeedBraces">
<property name="severity" value="error"/>
</module>
<module name="LeftCurly"/>
<module name="LeftCurly">
<property name="severity" value="error"/>
</module>
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册