GitHub user laimis opened a pull request:
https://github.com/apache/lucenenet/pull/141
IOUtils fix
ReThrowUnchecked in IOUtils is wrapping exceptions when it should not.
Doing that causes issues with upstream code that handles a specific type of
exception but "Exception" is thrown instead. Looking at the Lucene code, the
fixed version matches what Lucene is trying to do:
https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/util/IOUtils.java#L360
- if null, don't throw
- otherwise throw exception itself
- unless it is not of RuntimeException type or Error type in which case
wrap it - but this does not apply in .NET world.
At the very least the following test was failing because of this that now
passes (unless there is another "rand" situation that I had not encountered):
http://teamcity.codebetter.com/viewLog.html?buildId=190499&tab=buildResultsDiv&buildTypeId=LuceneNet_Core#testNameId-8985981477427802206
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/laimis/lucenenet ioutils_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/141.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #141
----
commit 66917a600c7760b72bf0b04ef2e81ef5d9fecc79
Author: Laimonas Simutis <[email protected]>
Date: 2015-05-08T15:14:04Z
don't wrap exceptions
commit 95f358e9aa2b762176652b675ae3b7347b848242
Author: Laimonas Simutis <[email protected]>
Date: 2015-05-08T15:17:40Z
add Test attribute
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---