[
https://issues.apache.org/jira/browse/LUCENE-6542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603358#comment-14603358
]
Hoss Man commented on LUCENE-6542:
----------------------------------
Patch looks fine to me at first glance, but i'm not exactly sure why the
createDirectories call was introduced at that point in the code path in the
first place.
Looking at the logs, it seems to have been added as part of LUCENE-5945 /
r1624784 -- prior to that we only checked for existence and throw an error if
it didn't exist or wasn't a directory (not sure if/where it was created
automaticaly if it didn't exist)
----
Tangentially: do we even have a way to write a test for this sort of thing?
can we mock the security manager so that a test could say "during my setUp
method, i want to write a bunch of dirs/files, but during the test method,
please trigger a failure if any lucene code asks the security manager for the
write access to those files?"
> FSDirectory throws AccessControlException unless you grant write access to
> the index
> ------------------------------------------------------------------------------------
>
> Key: LUCENE-6542
> URL: https://issues.apache.org/jira/browse/LUCENE-6542
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/store
> Affects Versions: 5.1
> Reporter: Trejkaz
> Labels: regression
> Attachments: patch.txt
>
>
> Hit this during my attempted upgrade to Lucene 5.1.0. (Yeah, I know 5.2.0 is
> out, and we'll be using that in production anyway, but the merge takes time.)
> Various tests of ours test Directory stuff against methods which the security
> policy won't allow tests to write to. Changes in FSDirectory mean that it now
> demands write access to the directory. 4.10.4 permitted read-only access.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]