core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/binary/impl/OLinkSerializer.java
@Override
  public void serializeInByteBufferObject(OIdentifiable object, ByteBuffer buffer, Object... hints) {
    final ORID r = object.getIdentity();

    buffer.putShort((short) r.getClusterId());
    // Wrong implementation but needed for binary compatibility
    byte[] stream = new byte[OLongSerializer.LONG_SIZE];
    OLongSerializer.INSTANCE.serialize(r.getClusterPosition(), stream, 0);
    buffer.put(stream);
  }
@Override
  public void serializeInByteBufferObject(OIdentifiable object, ByteBuffer buffer, Object... hints) {
    final ORID r = object.getIdentity();

    buffer.putShort((short) r.getClusterId());
    // Wrong implementation but needed for binary compatibility
    byte[] stream = new byte[OLongSerializer.LONG_SIZE];
    OLongSerializer.INSTANCE.serialize(r.getClusterPosition(), stream, 0);
    buffer.put(stream);
  }
{@inheritDoc}