未验证 提交 718e4b15 编写于 作者: G gabry.wu 提交者: GitHub

Adapting partial code(file name start with O) to the sonar cloud rule (#2259)

* Adapting partial code(file name start with O) to the sonar cloud rule

* resolve conflict with dev branch
Co-authored-by: Ndailidong <dailidong66@gmail.com>
上级 2b174353
......@@ -352,13 +352,7 @@ public class OSUtils {
return sb.toString();
} finally {
if (br != null) {
try {
br.close();
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
IOUtils.closeQuietly(br);
}
}
......@@ -408,7 +402,7 @@ public class OSUtils {
* whether is windows
* @return true if windows
*/
public static boolean isWindows() { ;
public static boolean isWindows() {
return getOSName().startsWith("Windows");
}
......
......@@ -67,7 +67,7 @@ public class OSUtilsTest {
@Test
public void cpuUsage() throws Exception {
logger.info("cpuUsage : {}", OSUtils.cpuUsage());
Thread.sleep(1000l);
Thread.sleep(1000L);
logger.info("cpuUsage : {}", OSUtils.cpuUsage());
double cpuUsage = OSUtils.cpuUsage();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册