瀏覽代碼

dashboard: fix typo in SystemController (#700)

master
kexianjun Eric Zhao 5 年之前
父節點
當前提交
4819675f84
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/SystemController.java

+ 2
- 2
sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/SystemController.java 查看文件

@@ -78,7 +78,7 @@ public class SystemController {
} }
} }


private int countNotNullAndNotNegtive(Number... values) {
private int countNotNullAndNotNegative(Number... values) {
int notNullCount = 0; int notNullCount = 0;
for (int i = 0; i < values.length; i++) { for (int i = 0; i < values.length; i++) {
if (values[i] != null && values[i].doubleValue() >= 0) { if (values[i] != null && values[i].doubleValue() >= 0) {
@@ -103,7 +103,7 @@ public class SystemController {
if (port == null) { if (port == null) {
return Result.ofFail(-1, "port can't be null"); return Result.ofFail(-1, "port can't be null");
} }
int notNullCount = countNotNullAndNotNegtive(avgLoad, avgRt, maxThread, qps);
int notNullCount = countNotNullAndNotNegative(avgLoad, avgRt, maxThread, qps);
if (notNullCount != 1) { if (notNullCount != 1) {
return Result.ofFail(-1, "only one of [avgLoad, avgRt, maxThread, qps] " return Result.ofFail(-1, "only one of [avgLoad, avgRt, maxThread, qps] "
+ "value must be set >= 0, but " + notNullCount + " values get"); + "value must be set >= 0, but " + notNullCount + " values get");


Loading…
取消
儲存