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

Adrien Grand edited comment on LUCENE-5586 at 4/10/14 8:05 AM:
---------------------------------------------------------------

Fixed the patch to move the UOE from {{ChecksumIndexInput}} to 
{{BufferedChecksumIndexInput}}.

Otherwise if you write a non-wrapping impl of ChecksumIndexInput, you cannot 
clone using {{super.clone()}}.


was (Author: jpountz):
Fixed the patch to move the UOE from {{ChecksumIndexInput}} to 
{{BufferedChecksumIndexInput}}.

Otherwise if you write a non-wrapping impl of ChecksumIndexInput, you cannot 
clone using {{super.clone()}.

> 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, 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to