[ https://issues.apache.org/jira/browse/LUCENE-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189100#comment-13189100 ]
Uwe Schindler commented on LUCENE-3707: --------------------------------------- If this is the case, I am fine with that, no problem. I just wanted to be sure. In general I am very sceptical with asserts in code that reads from disk. One example: If we have code that reads a vInt withe the number of items in a list, then we read this number of items, followed by another vInt that has the length of the next list. Just asserting that this length is >0 is a bad idea, because if the length vInt is < 0, the file format is corrupt. And in that case a CorruptIndexException should be thrown. If we dont do this, a corrupt file could lead to unexpected behaviour. I did exactly that e.g. in the code parsing the Kumoroji dictionary targetMap, if the pointers in both arrays don't fit together, the file format is also corrupt. The complaint here was only, that asserts in code reading from disk should in most cases be hard checks, you never know what the file contains or what the hex editor of the user did. > Add a Lucene3x private SegmentInfosFormat implemenation > ------------------------------------------------------- > > Key: LUCENE-3707 > URL: https://issues.apache.org/jira/browse/LUCENE-3707 > Project: Lucene - Java > Issue Type: Task > Components: core/codecs > Affects Versions: 4.0 > Reporter: Simon Willnauer > Assignee: Simon Willnauer > Priority: Blocker > Fix For: 4.0 > > Attachments: LUCENE-3707.patch, LUCENE-3707.patch > > > we still don't have a Lucene3x & preflex version of segment infos format. we > need this before we release 4.0 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org