[ 
https://issues.apache.org/jira/browse/LUCENE-6542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14606775#comment-14606775
 ] 

Robert Muir commented on LUCENE-6542:
-------------------------------------

maybe add a helper method, so tests can do something like:
{code}
assertNeedsPrivs(new WithPrivs(new FilePermission("/foo/bar", "read") {
  void run() {
    new MMapDirectory();
  }
});
{code}

it could take Permission varargs... since in most cases it should only be 1 or 
2 for unit testing.

> 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: LUCENE-6542.patch, 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]

Reply via email to