[ 
https://issues.apache.org/jira/browse/LUCENE-5586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13965105#comment-13965105
 ] 

Adrien Grand commented on LUCENE-5586:
--------------------------------------

The current patch makes {{ChecksumIndexInput.clone}} throw an UOE although 
there might be "native" (unwrapped) implementations of it, so maybe the 
exception should rather be on {{BufferedChecksumIndexInput}}?

bq. We should fix that in a separate issue maybe?

I quickly looked at the IndexInput impls that we have and the other ones seem 
to be fine (tests would likely catch it otherwise).

> BufferedChecksumIndexInput is not cloneable
> -------------------------------------------
>
>                 Key: LUCENE-5586
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5586
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.8
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-5586.patch
>
>
> {{BufferedChecksumIndexInput}} implements {{Cloneable}}, yet its close method 
> would return a shallow copy that still wraps the same {{IndexInput}} and 
> {{Checksum}}. This is trappy, because reading on the clone would also read on 
> the original instance and update the checksum.
> Since {{Checksum}} are not cloneable, I think {{ChecksumIndexInput.clone}} 
> should just throw an UOE.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to