asalamon74 commented on a change in pull request #24:
URL: https://github.com/apache/solr/pull/24#discussion_r600478496



##########
File path: 
solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
##########
@@ -298,7 +300,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", new 
String(Base64.getEncoder().encode(ByteBuffer.wrap(bytes.bytes, bytes.offset, 
bytes.length)).array(), StandardCharsets.ISO_8859_1));

Review comment:
       I'm afraid that's not exactly the same. ByteBuffer's `array()` method 
returns the full array and ignores the offset and the length. 




-- 
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:
[email protected]


Reply via email to