Skip to content

Commit fb5743a

Browse files
committed
fix PMD warnings
Signed-off-by: neo <[email protected]>
1 parent 6af8f3c commit fb5743a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/monitor/src/main/java/app/monitor/channel/SlackClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
public class SlackClient implements Channel {
2323
private static final String SLACK_API_URL = "https://slack.com/api/chat.postMessage";
24-
private final String[][] colors = {
24+
private static final String[][] COLORS = {
2525
{"#ff5c33", "#ff9933"}, // 2 colors for warn, change color for weekly review of every week
2626
{"#a30101", "#e62a00"} // 2 colors for error
2727
};
@@ -89,6 +89,6 @@ String message(Alert alert, int alertCountSinceLastSent) {
8989
String color(Severity severity, LocalDateTime date) {
9090
int week = date.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR);
9191
int colorIndex = severity == Severity.WARN ? 0 : 1;
92-
return colors[colorIndex][(week - 1) % 2];
92+
return COLORS[colorIndex][(week - 1) % 2];
9393
}
9494
}

0 commit comments

Comments
 (0)