当前位置:网站首页>Use try-with-resources or close this
Use try-with-resources or close this
2022-07-28 02:27:00 【51CTO】
Use try-with-resources or close this "FileOutputStream" in a "finally" clause.

Original code :
Use sonar Scanned out bug Need repair . The result after modification is :
After scanning

Prompt no problem , The result is perfect !
The modification opinions given by the audit tool are :
try(){
}catch (Exception e) {
}
Written in try() It will automatically close the flow, and there is no need to continue other operations , as for try What is defined inside needs to be redefined finally Shut down
边栏推荐
- 小程序毕设作品之微信校园维修报修小程序毕业设计成品(4)开题报告
- Four common post data submission methods
- Network must know topics
- Flume (5 demos easy to get started)
- 考研数学一元微分学证明题常见题型方法
- Codeworks round 810 (Div. 2) a~c problem solution
- MySQL的pymysql操作
- MySQL create stored procedure ------ [hy000][1418] this function has none of deterministic, no SQL
- 剑指offer专项突击版第12天
- 小程序毕设作品之微信校园浴室预约小程序毕业设计成品(2)小程序功能
猜你喜欢

54: Chapter 5: develop admin management services: 7: face warehousing process; Face login process; The browser turns on the video debugging mode (so that the camera can also be turned on in the case o

Ceresdao: new endorsement of ventures Dao

CeresDAO:全球首个基于DAO赋能Web3.0的去中心化数字资产管理协议

小米网站主页面大模块——小模块+导航(浮动案例)

产品解读丨MeterSphere UI测试模块的设计与分布式扩展

How to evaluate the effectiveness of R & D personnel? Software Engineer reports help you see everyone's contribution

Common problem types and methods of mathematical univariate differential proof problems in postgraduate entrance examination
![53: Chapter 5: develop admin management service: 6: develop [admin administrator exit login, interface]; (one point: when we want to modify a value with a certain coding method, the new value should b](/img/9a/674308c7a21fa2be0943ca7967e274.png)
53: Chapter 5: develop admin management service: 6: develop [admin administrator exit login, interface]; (one point: when we want to modify a value with a certain coding method, the new value should b

MySQL高可用和主从同步

Important arrangements - the follow-up live broadcast of dx12 engine development course will be held at station B
随机推荐
Unity 保存图片到相册以及权限管理
Promise从入门到精通(第4章 async 和 await)
Digital empowerment and innovation in the future: hese eredi appears at the 5th Digital China Construction Summit
MySQL数据库InnoDB存储引擎中的锁机制(荣耀典藏版)
Software test interview questions: common post data submission methods
剑指offer专项突击版第12天
What is eplato cast by Plato farm on elephant swap?
APP如何上架App Store?
Day6 函数和模块的使用
软考 --- 数据库(2)关系模型
Read Plato & nbsp; Eplato of farm and the reasons for its high premium
Under the new retail format, retail e-commerce RPA helps reshape growth
Wechat campus bathroom reservation applet graduation design finished product (1) development outline
This operation may not be worth money, but it is worth learning | [batch cutting of pictures]
Synchronized details
Feign calls get and post records
How to evaluate the effectiveness of R & D personnel? Software Engineer reports help you see everyone's contribution
正则表达式
借助Elephant Swap打造的ePLATO,背后的高溢价解析
Promise from introduction to mastery (Chapter 2 understanding and use of promise)