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

Eric Pugh updated SOLR-18057:
-----------------------------
    Labels: newdev  (was: )

> Review Path.of for places where Path.resolve should be used
> -----------------------------------------------------------
>
>                 Key: SOLR-18057
>                 URL: https://issues.apache.org/jira/browse/SOLR-18057
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Eric Pugh
>            Priority: Minor
>              Labels: newdev
>
> Plucked from discussion 
> [https://github.com/apache/solr/pull/3988#discussion_r2659300249]
>  
> Specifically in BinaryFieldTest we have:
>  
> | // Copy the custom schema for binary field tests|
> | String sourceConfDir = TEST_HOME() + "/collection1/conf";|
>  
> "If you look carefully at what's happening here (was before), this is sad. 
> TEST_HOME() returns a Path, which we toString via string concatenation to a 
> String representing a path, and then a line below we create a Path via 
> {{{}Path.of{}}}. Obviously we should instead be using the {{resolve}} method 
> on Path. The tell-tale sign of the problem is the usage of {{Path.of}} which 
> we should ideally use sparingly (when we truly have a String input that can't 
> be a Path)."
>  
> This ticket would be to look at places we are using Path.of on a string and 
> see if we are doing some extra conversion steps instead of using a 
> Path.resolve.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to