Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-8766: Pass BytesRef offset/length when decoding from input stream

Alan Woodwardb8c299640d91
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 c86dfcaa4f1..292a647cb52 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();