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

Uwe Schindler updated LUCENE-5630:
----------------------------------

    Attachment: LUCENE-5630.patch

This patch fixes the issue.

In fact the whole check was wrong and really to fragile. The new approach is 
100% safe:
- Separately lookup the class before doing anything. If this throws any 
exception, then the component is really missing
- Then do the same checks as before (to actually check that instantiation 
works), but don't check the message. Its easier. The newInstance method throws 
IAE, which wraps a NoSuchMethodException -> so just check IAE#getCause()

I will commit this fix to all three branches.

> Improve TestAllAnalyzersHaveFactories
> -------------------------------------
>
>                 Key: LUCENE-5630
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5630
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-5630.patch
>
>
> This test wasn't working at all, it would always pass.
> It is sensitive to the strings inside exception messages, if we change those, 
> it might suddenly stop working.
> It would be great to improve this thing to be less fragile.



--
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