lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4877) Fix analyzer factories to throw exception when arguments are invalid
Date Mon, 01 Apr 2013 23:45:16 GMT

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

Steve Rowe updated LUCENE-4877:
-------------------------------

    Attachment: LUCENE-4877-steve-more-param-parsing-verbs.patch

This patch adds more param parsing methods to AbstractAnalysisFactory, including get(), require(),
getFloat(), getChar(), and getSet(), and changed all analysis factories to use them where
appropriate.

bq. I don't like the 4-arg required param getXXX() methods in AbstractAnalysisFactory - 4th
param as false means required??? - maybe these could be converted to getRequiredXXX() ?

I implemented these as require(), requireXXX(), etc.

Tests all pass, and precommit's happy.

Committing shortly.
                
> Fix analyzer factories to throw exception when arguments are invalid
> --------------------------------------------------------------------
>
>                 Key: LUCENE-4877
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4877
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Robert Muir
>         Attachments: LUCENE-4877_one_solution_prototype.patch, LUCENE-4877.patch, LUCENE-4877.patch,
LUCENE-4877.patch, LUCENE-4877-steve-minor-fixes.patch, LUCENE-4877-steve-more-param-parsing-verbs.patch
>
>
> Currently if someone typos an argument "someParamater=xyz" instead of someParameter=xyz,
they get no exception and sometimes incorrect behavior.
> It would be way better if these factories threw exception on unknown params, e.g. they
removed the args they used and checked they were empty at the end.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message