CreateReviewNotes: Use UTF_8 constant from StandardCharsets
Change-Id: Ice5c61b77b8cd2c86201746560d160736550260f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
index d2a8c1d..cd08f65 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
@@ -14,6 +14,8 @@
package com.googlesource.gerrit.plugins.reviewnotes;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.common.data.LabelType;
import com.google.gerrit.common.data.LabelTypes;
@@ -229,7 +231,7 @@
if (ps != null) {
try {
createCodeReviewNote(notes, ps, fmt);
- return getInserter().insert(Constants.OBJ_BLOB, fmt.toString().getBytes("UTF-8"));
+ return getInserter().insert(Constants.OBJ_BLOB, fmt.toString().getBytes(UTF_8));
} catch (NoSuchChangeException e) {
throw new IOException(e);
}