You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2019/06/13 15:40:18 UTC

[lucene-solr] branch master updated: LUCENE-8766: Pass BytesRef offset/length when decoding from input stream

This is an automated email from the ASF dual-hosted git repository.

romseygeek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new b8c2996  LUCENE-8766: Pass BytesRef offset/length when decoding from input stream
b8c2996 is described below

commit b8c299640d91becccdf9d8d15ea29003d7b4cc12
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Thu Jun 13 16:22:58 2019 +0100

    LUCENE-8766: Pass BytesRef offset/length when decoding from input stream
---
 .../src/java/org/apache/lucene/monitor/MonitorQuerySerializer.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/monitor/src/java/org/apache/lucene/monitor/MonitorQuerySerializer.java b/lucene/monitor/src/java/org/apache/lucene/monitor/MonitorQuerySerializer.java
index c86dfca..292a647 100644
--- a/lucene/monitor/src/java/org/apache/lucene/monitor/MonitorQuerySerializer.java
+++ b/lucene/monitor/src/java/org/apache/lucene/monitor/MonitorQuerySerializer.java
@@ -55,7 +55,7 @@ public interface MonitorQuerySerializer {
     return new MonitorQuerySerializer() {
       @Override
       public MonitorQuery deserialize(BytesRef binaryValue) {
-        ByteArrayInputStream is = new ByteArrayInputStream(binaryValue.bytes);
+        ByteArrayInputStream is = new ByteArrayInputStream(binaryValue.bytes, binaryValue.offset, binaryValue.length);
         try (InputStreamDataInput data = new InputStreamDataInput(is)) {
           String id = data.readString();
           String query = data.readString();