wu-sheng commented on a change in pull request #4247: fix thread unsafe problem in server-alarm-plugin (#4230) URL: https://github.com/apache/skywalking/pull/4247#discussion_r368267823
########## File path: oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RunningRule.java ########## @@ -290,28 +278,28 @@ private boolean isMatch() { switch (valueType) { case LONG: - long lvalue = ((LongValueHolder)metrics).getValue(); + long lvalue = ((LongValueHolder) metrics).getValue(); long lexpected = RunningRule.this.threshold.getLongThreshold(); if (op.test(lexpected, lvalue)) { matchCount++; } break; case INT: - int ivalue = ((IntValueHolder)metrics).getValue(); + int ivalue = ((IntValueHolder) metrics).getValue(); int iexpected = RunningRule.this.threshold.getIntThreshold(); if (op.test(iexpected, ivalue)) { matchCount++; } break; case DOUBLE: - double dvalue = ((DoubleValueHolder)metrics).getValue(); + double dvalue = ((DoubleValueHolder) metrics).getValue(); double dexpected = RunningRule.this.threshold.getDoubleThreshold(); if (op.test(dexpected, dvalue)) { matchCount++; } break; case MULTI_INTS: - int[] ivalueArray = ((MultiIntValuesHolder)metrics).getValues(); + int[] ivalueArray = ((MultiIntValuesHolder) metrics).getValues(); Review comment: What change the format of all these cases? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services