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

Robert Muir resolved LUCENE-10526.
----------------------------------
    Fix Version/s: 9.2
       Resolution: Fixed

> add single method to mockfile to wrap a Path
> --------------------------------------------
>
>                 Key: LUCENE-10526
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10526
>             Project: Lucene - Core
>          Issue Type: Sub-task
>            Reporter: Robert Muir
>            Priority: Major
>             Fix For: 9.2
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, mockfilesystems wrap a path with "new FilterPath". but this 
> "wrapping" logic is scattered everywhere in the code (and tests!). And it is 
> hardcoded at filterpath (subclassing is not possible).
> This makes it impossible for a mock filesystem to extend FilterPath with some 
> custom logic (example: check for special windows reserved characters).
> I don't think code/tests should be calling "new FilterPath" everywhere, this 
> is also just messy. Instead they should ask the mockfilesystem's provider to 
> wrap the path: {{provider.wrapPath(path, filesystem)}}.
> This way, WindowsFS can then override wrapPath() with a subclass that looks 
> for special characters.
> This issue is just for the API refactoring/cleanup. Additional 
> Windows-simulation can happen on the parent issue.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to