akof1314 / CoolFormat

CoolFormat Source Code Formatter
http://blog.csdn.net/akof1314/article/details/5355948
539 stars 147 forks source link

java 格式化代码问题 #25

Open fine1021 opened 8 years ago

fine1021 commented 8 years ago

`public class Utils {

public static int parseInt(String value, int defValue)               {
    try {
        return Integer.parseInt(value);
    } catch (Exception e) {
        return defValue;
    }
}

}`

java代码中函数或者类的左括号和名字在同一行,不会对左括号进行格式化,上面的就是测试代码。 如果括号和名字不在同一行就可以格式化了,我用的是 V3.4 版本,命令行方式 -f

akof1314 commented 6 years ago

使用3.5版本试下,另外参数也使用默认