[ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-6932:
---------------------------------------
    Attachment: LUCENE-6932.patch

OK here's a new patch, folding in [~jpountz]'s new test (thank you!), and
simplifying how {{RAMInputStream}} tracks its current buffer: I
removed {{bufferStart}} and removed the {{boolean enforceEOF}} param
to {{switchCurrentBuffer}} and removed lazy setting the buffer in the
ctor.  I renamed {{switchCurrentBuffer}} to {{setCurrentBuffer}} and
simplified it so that it's no longer responsible for enforcing EOF,
and added a new private {{nextBuffer}}, called when we read bytes,
where we enforce EOF.

I think net/net it's simpler, and tests pass once!


> Seek past EOF with RAMDirectory should throw EOFException
> ---------------------------------------------------------
>
>                 Key: LUCENE-6932
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6932
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: Trunk
>            Reporter: Stéphane Campinas
>             Fix For: Trunk, 5.x
>
>         Attachments: LUCENE-6932.patch, LUCENE-6932.patch, issue6932.patch, 
> testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to