CoolFormat icon indicating copy to clipboard operation
CoolFormat copied to clipboard

java 格式化代码问题

Open fine1021 opened this issue 9 years ago • 1 comments

`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

fine1021 avatar Apr 06 '16 06:04 fine1021

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

akof1314 avatar Jun 30 '18 04:06 akof1314