viliam-durina commented on issue #15730: URL: https://github.com/apache/lucene/issues/15730#issuecomment-4311346252
@uschindler I think the fix by @barry3406 would be harmless if merged, it would make one rare edge case gone. It won't hurt performance, because this code path is very rare. To simplify, we could store and restore just the position through `getFilePointer`/`setPos`, not those three fields. One can't simply cast to `RandomAccessInput`, but one can do so after an `instanceof` check. It's unlikely, I admit, doesn't happen today, but it's not unimaginable. And what's worse, it will work until someone hits a large enough file. I just don't like leaving unhandled edge cases, especially if they can be fixed trivially, especially in core classes large number of people are using, and especially if they are very rare and subtle. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
