@@ -468,7 +468,7 @@ private void write() {
468
468
// store the node id
469
469
int nodeIdLen = pending .getNodeId ().size ();
470
470
byte [] data = new byte [nodeIdLen + 2 ];
471
- ByteConversion .shortToByte ((short ) pending .getNodeId ().units (), data , 0 );
471
+ ByteConversion .shortToByteH ((short ) pending .getNodeId ().units (), data , 0 );
472
472
pending .getNodeId ().serialize (data , 2 );
473
473
fNodeId .setBytesValue (data );
474
474
doc .add (fNodeId );
@@ -633,8 +633,8 @@ public void collect(int doc) throws IOException {
633
633
}
634
634
final BytesRef ref = this .nodeIdValues .get (doc );
635
635
636
- int units = ByteConversion .byteToShort (ref .bytes , ref .offset );
637
- NodeId nodeId = index .getBrokerPool ().getNodeFactory ().createFromData (units , ref .bytes , ref .offset + 2 );
636
+ final int units = ByteConversion .byteToShortH (ref .bytes , ref .offset );
637
+ final NodeId nodeId = index .getBrokerPool ().getNodeFactory ().createFromData (units , ref .bytes , ref .offset + 2 );
638
638
639
639
// if a context set is specified, we can directly check if the
640
640
// matching node is a descendant of one of the nodes
@@ -1019,7 +1019,7 @@ private void scan(DocumentSet docs, NodeSet nodes, String start, String end, lon
1019
1019
NodeId nodeId = null ;
1020
1020
if (nodes != null ) {
1021
1021
final BytesRef nodeIdRef = nodeIdValues .get (docsEnum .docID ());
1022
- int units = ByteConversion .byteToShort (nodeIdRef .bytes , nodeIdRef .offset );
1022
+ final int units = ByteConversion .byteToShortH (nodeIdRef .bytes , nodeIdRef .offset );
1023
1023
nodeId = index .getBrokerPool ().getNodeFactory ().createFromData (units , nodeIdRef .bytes , nodeIdRef .offset + 2 );
1024
1024
}
1025
1025
if (nodeId == null || nodes .get (storedDocument , nodeId ) != null ) {
0 commit comments