core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/binary/impl/OLinkSerializer.java
@Override
  public OIdentifiable deserializeFromByteBufferObject(ByteBuffer buffer) {
    final int clusterId = buffer.getShort();

    final byte[] stream = new byte[OLongSerializer.LONG_SIZE];
    buffer.get(stream);
    // Wrong implementation but needed for binary compatibility
    final long clusterPosition = OLongSerializer.INSTANCE.deserialize(stream, 0);

    return new ORecordId(clusterId, clusterPosition);
  }
@Override
  public OIdentifiable deserializeFromByteBufferObject(ByteBuffer buffer) {
    final int clusterId = buffer.getShort();

    final byte[] stream = new byte[OLongSerializer.LONG_SIZE];
    buffer.get(stream);
    // Wrong implementation but needed for binary compatibility
    final long clusterPosition = OLongSerializer.INSTANCE.deserialize(stream, 0);

    return new ORecordId(clusterId, clusterPosition);
  }
{@inheritDoc}