You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/01/28 21:17:24 UTC

[GitHub] [lucene-solr] madrob commented on a change in pull request #2252: SOLR-15111: Use JDK8 Base64 instead of own implementation

madrob commented on a change in pull request #2252:
URL: https://github.com/apache/lucene-solr/pull/2252#discussion_r566409696



##########
File path: solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
##########
@@ -298,7 +299,7 @@ private static String getFieldFlags( SchemaField f )
 
       BytesRef bytes = field.binaryValue();
       if (bytes != null) {
-        f.add( "binary", Base64.byteArrayToBase64(bytes.bytes, bytes.offset, bytes.length));
+        f.add( "binary", StandardCharsets.ISO_8859_1.decode(Base64.getEncoder().encode(bytes.wrapToByteBuffer())).toString());

Review comment:
       I don't think this is correct, why are we decoding something that we just encoded?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org