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

Uwe Schindler commented on SOLR-9444:
-------------------------------------

bq.  Quick patch which uses Paths.get() instead of URI.getPath.

The issue lies deeper in the API design of the backup infrastructure: see my 
above comment! If you use URI, then use it completely and avoid any conversion 
between strings and URIs. This is almost always a bug.

As said before only accept strings when parsing config files, in any other case 
just pass URI class around. If you really need to convert to String (e.g. when 
it goes over wire), convert with URI.toAsciiString() and decrypt with new 
URI(...).

The choose of the repository provider should then be done soley on 
URI#getScheme(). Only use java.nio.Path in FileSystemRepsoitrory but not 
outside.

> Fix path usage for cloud backup/restore
> ---------------------------------------
>
>                 Key: SOLR-9444
>                 URL: https://issues.apache.org/jira/browse/SOLR-9444
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>         Attachments: SOLR-9444.patch
>
>
> As noted by Uwe on 
> https://issues.apache.org/jira/browse/SOLR-9242?focusedCommentId=15438925&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15438925
>  the usage of URI#getPath is wrong. 
> Creating a Jira to track this better. More details to follow



--
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