gnodet-bot commented on code in PR #2224:
URL: https://github.com/apache/maven-resolver/pull/2224#discussion_r4348519929


##########
maven-resolver-api/src/main/java/org/eclipse/aether/repository/RepositoryUriUtils.java:
##########
@@ -43,7 +43,9 @@ public static URI toUri(String repositoryUrl) {
                 || protocol.isEmpty()
                 || protocol.length() == 1
                         && (Character.isLetter(protocol.charAt(0)) && 
Character.isUpperCase(protocol.charAt(0)))) {
-            return new File(basedir(repositoryUrl)).toURI();
+            // Use Path.of() to parse the local path lexically, without 
resolving against the JVM
+            // working directory via File (which may be on a different drive 
on Windows).

Review Comment:
   🔧 **Nit:** The comment says "Use `Path.of()`" but the code below uses 
`Paths.get()`. These are functionally identical, but the comment should match 
what the code actually calls — `Paths.get()` is also the right choice since 
`Path.of()` requires Java 11+ and this module targets Java 8.
   
   ```suggestion
               // Use Paths.get() to parse the local path lexically, without 
resolving against the JVM
               // working directory via File (which may be on a different drive 
on Windows).
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to