You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2026/03/22 18:01:24 UTC
(couchdb) 02/11: use StandardCharsets.UTF_8
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch nouveau-update-bundle
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit c13bb23bfb572f7987f1842ca74cf33c934d9559
Author: Robert Newson <rn...@apache.org>
AuthorDate: Sat Mar 21 09:46:33 2026 +0000
use StandardCharsets.UTF_8
---
.../main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java b/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java
index e62ffdb5a..9d28072df 100644
--- a/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java
+++ b/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java
@@ -20,8 +20,8 @@ import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
-import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
+import java.nio.charset.StandardCharsets;
import java.nio.file.NoSuchFileException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -414,7 +414,7 @@ public class LuceneIndex extends Index {
result.add(new org.apache.lucene.document.StringField("_partition", request.getPartition(), Store.NO));
}
- final CharsetDecoder utf8Decoder = Charset.forName("UTF-8").newDecoder();
+ final CharsetDecoder utf8Decoder = StandardCharsets.UTF_8.newDecoder();
for (Field field : request.getFields()) {
// Underscore-prefix is reserved.
@@ -475,7 +475,7 @@ public class LuceneIndex extends Index {
}
private PrimitiveWrapper<?>[] toAfter(final FieldDoc fieldDoc) {
- final CharsetDecoder utf8Decoder = Charset.forName("UTF-8").newDecoder();
+ final CharsetDecoder utf8Decoder = StandardCharsets.UTF_8.newDecoder();
final PrimitiveWrapper<?>[] fields = new PrimitiveWrapper<?>[fieldDoc.fields.length];
for (int i = 0; i < fields.length; i++) {
if (fieldDoc.fields[i] instanceof String) {