[
https://issues.apache.org/jira/browse/LUCENE-5952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless updated LUCENE-5952:
---------------------------------------
Attachment: LUCENE-5952.patch
Patch, applies to 4.10.x.
I improved the error handling in Version.java to more clearly say what
offending value had been passed in, and various places that were
calling Version.parse to say which resource/fileName they had read the
version from and to throw CorruptIndexException.
I also removed the two deprecated SegmentInfo ctors that took String
version and parsed it (we are allowed to just change this API: it's
experimental).
I also fixed Version.java to not pass judgement on the major version,
so we remain future proof.
> Make Version.java lenient again?
> --------------------------------
>
> Key: LUCENE-5952
> URL: https://issues.apache.org/jira/browse/LUCENE-5952
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Michael McCandless
> Priority: Blocker
> Fix For: 4.10.1, 4.11, 5.0
>
> Attachments: LUCENE-5952.patch
>
>
> As discussed on the dev list, it's spooky how Version.java tries to fully
> parse the incoming version string ... and then throw exceptions that lack
> details about what invalid value it received, which file contained the
> invalid value, etc.
> It also seems too low level to be checking versions (e.g. is not future proof
> for when 4.10 is passed a 5.x index by accident), and seems redundant with
> the codec headers we already have for checking versions?
> Should we just go back to lenient parsing?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]