java sona 插件 提示 整理

Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed
重构此方法以将其认知复杂度从17降低到15Remove this assignment of "dataSource".Rename this field "format_insert_error" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.Remove this expression which always evaluates to "true"
删除该表达式,该表达式总是求值为“true”。Merge this if statement with the enclosing one.
将此if语句与封闭语句合并。Invoke method(s) only conditionally.
仅条件地调用方法。Add a private constructor to hide the implicit public one.
添加一个私有构造函数来隐藏隐含的公共构造函数Format specifiers should be used instead of string concatenation.
应该使用格式说明符来代替字符串连接。Replace the type specification in this constructor call with the diamond operator ("<>").
用菱形运算符(“< >”)替换此构造函数调用中的类型规范。Extract this nested try block into a separate method.
将这个嵌套的试块提取成一个单独的方法。Remove this redundant jump.
删除此冗余跳转。Replace this lambda with a method reference.
用方法引用替换这个lambda。Define a constant instead of duplicating this literal "SendBatchNo" 3 times.
定义一个常量,而不是复制这个字面“StBaBeNeNo”3次。Rename field "SENDBATCHNO" to prevent any misunderstanding/clash with field "sendBatchNo" defined on line 22
重命名字段“SENDBATCHNO”以防止与第22行定义的字段“sendBatchNo”发生任何误解/冲突Replace this if-then-else statement by a single return statement.
用一个返回语句替换这个IF THEAR语句。Either re-interrupt this method or rethrow the "InterruptedException".Use "java.nio.Files#delete" here for better messages on error conditions.Use isEmpty() to check whether the collection is empty or not.A "NullPointerException" could be thrown; "columns" is nullable here.Reduce the total number of break and continue statements in this loop to use at most one.
在这个循环中减少break和continue语句的总数,最多使用一个。Merge this if statement with the enclosing one.
将该if语句与附带的if语句合并。Remove useless curly braces around statement
删除语句周围无用的花括号Lower the visibility of this setter or remove it altogether.
降低此setter的可见性或将其完全删除。Make this final field static too.Remove the "connector" field and declare it as a local variable in the relevant methods.Immediately return this expression instead of assigning it to the temporary variable "ss".
立即返回此表达式,而不是将其分配给临时变量“ss”。Use isEmpty() to check whether the collection is empty or not.
使用isEmpty()检查集合是否为空。Use a variable binding mechanism to construct this query instead of concatenation.
使用变量绑定机制来构造此查询,而不是连接String sql = "select column_name from user_col_comments where table_name='" + tableName + "'";
修改成
String sql = "select column_name from user_col_comments where table_name=?";
pstm = conn.prepareStatement(sql);
pstm.setString(1, tableName);Remove this hard-coded password.
移除代码里硬编码的密码信息。Remove this hard-coded path-delimiter.
删除此硬编码路径分隔符。Remove useless curly braces around statement and then remove useless return keyword
移除语句周围无用的花括号,然后移除无用的返回不符合代码示例
x -> {System.out.println(x+1);}
(a, b) -> { return a+b; }
解决方案
x -> System.out.println(x+1)
(a, b) -> a+b Reorder the modifiers to comply with the Java Language Specification.问题代码
public final static String BOOLEAN = "Boolean";
解决方案
public static final String BOOLEAN = "Boolean";Add a call to "setComplete()" on the SessionStatus object in a "@RequestMapping" method.
提示添加sessionStatus.setComplete();
解决方案
@PostMapping
public String processOrder(Taco taco, SessionStatus sessionStatus) {...sessionStatus.setComplete();
}

java sona 插件 提示 整理相关推荐

  1. 在vscode里java插件无法编译和运行java源代码,提示找不到符号踩坑记录

    如果不配置source path 会导致vscode的java插件无法编译和运行java源代码,提示找不到符号. 接下来配置source path 点击这里选择源码最外面的src目录,这样我们的pac ...

  2. 扩展阿里巴巴 Java 开发规约插件,打造团队专属风格!

    关注不迷路 1.前言 工作中难免会遇到维护别人代码的情况,那么首先就得看懂别人写的代码.如果对方写的代码混乱臃肿,维护成本必然很高,如果对方写的代码优雅清晰,那维护的人看起来必然心情愉悦.正所谓&qu ...

  3. IDEA阿里巴巴Java开发规约插件使用

    IDEA阿里巴巴Java开发规约插件使用 在 10月14日上午9:00  阿里巴巴于在杭州云栖大会<研发效能峰会>上,正式发布<阿里巴巴Java开发手册>扫描插件,该插件在扫描 ...

  4. java面试基础题整理(二)

    java面试基础题整理 文章目录 java面试基础题整理 前端技术(HTML.CSS.JS.JQuery等) 在js中怎么样验证数字? js中如何给string这个类型加方法? 谈谈js的定时器? 请 ...

  5. Beyond Compare反编译插件提示转换错误

    Beyond Compare反编译插件提示转换错误 一.问题 二.解决办法 2.1 下载配置文件 2.2 配置到BC 三.效果 一.问题 Beyond Compare是一款文件差异比较软件,java开 ...

  6. Java登录QQ邮箱整理邮件的58的简历(一)

    Java登录QQ邮箱整理邮件的58的简历 实习期间给公司做的第一个小工具,只需下载jxl.jar和mail.jar的第三方那个类库,就可以着手敲代码了: 1.此次是使用POP3协议登录的邮箱,使用了手 ...

  7. ECharts 图表插件使用整理(图表配置实现)

    ECharts 图表插件使用整理 说明 ECharts 是一个 JavaScript 实现的开源可视化库,兼容当前绝大部分浏览器 IE 8 以上,是一个可高度个性化定制的数据可视化图表 ECharts ...

  8. Java工程师笔试题整理[校招篇]

    Java工程师笔试题整理[校招篇] 阿里巴巴 2016 阿里巴巴2016研发工程师笔试题(四) 阿里巴巴2016研发工程师笔试题(三) 阿里巴巴2016研发工程师笔试题(二) 2015 阿里巴巴201 ...

  9. 零基础快速学习Java技术的方法整理

    在学习java技术这条道路上,有很多都是零基础学员,他们对于java的学习有着很多的不解,不知怎么学习也不知道如何下手,其实Java编程涉及到的知识点还是非常多的,我们需要制定java学习路线图这样才 ...

最新文章

  1. GDI+ 学习记录(27): Bitmap
  2. (1)变量、常量、程序交互、数据类型、bool、基本运算符
  3. 用vs命令提示符来使用 Installutil.exe来安装和卸载Windows服务
  4. 190629每日一句
  5. USB无线网卡的Linux驱动移植
  6. 计算机win加r,快捷键win+r是什么意思_打开运行快捷键win+r怎么按
  7. 爬取图片和查询ip地址归属地
  8. 会计中阿拉伯数字变数字繁体大写
  9. linux防火墙之firewalld
  10. SpringBoot引入第三方SDK以及打包
  11. PowerApps 连接Azure Sql
  12. Java中带返回值的线程池Future
  13. 21 个好用的持续集成工具,总有一款适合你
  14. PLC控制技术与组态技术实训装置
  15. 计算机专业考博入学考试科目,北京航空航天大学计算机应用技术考博考试科目.doc...
  16. 为什么SHL和SAL相同
  17. YesDev项目管理,专注研发产能提升。从现在起,走向卓越
  18. 简单卷、跨区卷、带区卷、镜像卷和 RAID-5 卷 区别
  19. Diffie-Hellman Key Agreement Protocol 资源管理错误漏洞(CVE-2002-20001)(原理扫描)
  20. 论文代码细读(初学者入门,两张图看懂塔克融合论文代码)MUTAN: Multimodal Tucker Fusion for Visual Question Answering

热门文章

  1. java url地址编码转换_java url编码转换
  2. vue-ssr的使用方法
  3. 跳蚤市场手绘海报模板
  4. 一对一直播源码Flutter Text 去掉黄色下划线
  5. 2008年05月15日
  6. Python 3、selenium/执行js命令显示隐藏元素,封装js工具类
  7. android 手柄sdk,android studio 手柄接入
  8. DDD与微服务架构浅析
  9. 人到中年混得再差,也别做这10件荒唐事,年龄越大,越会被人欺
  10. python 黎曼猜想_Atiyah证明黎曼猜想的基本思想与价值