gitgabrio commented on PR #5694:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5694#issuecomment-1953684459

   Thanks @yesamer 
   I'm slightly doubtful here:
   
   First, this fix has an impact only on windows, IINW.
   Then there is
   
   `public static final String META_INF_RESOURCES = "META-INF/resources/";`
   
   If `path` parameter starts with the above, then `pathAsString` is used as it 
is (and transformed by your code).
   
   ```
   if (path.startsWith(META_INF_RESOURCES)) {
                   LOGGER.warn("STATIC_HTTP_RESOURCE is automatically placed 
under " + META_INF_RESOURCES + ". You don't need to specify the directory : 
{}", path);
   ```
   
   But if `path` fullfill the above, then it already is "posix" formatted, (I 
think).
   In the other case, the `pathAsString` parameter is completely overwrote
   
   ```
    else {
                   path = META_INF_RESOURCES_PATH.resolve(path);
                   pathAsString = path.toString();
               }
   ```
   
   So, I have the following doubts:
   1. if `Path path` parameter is given with "windows" format, the code does 
not enter the `if` but it goes on the `else` (which seems wrong)
   2. that fix may be needed because the `Path path` parameter is in posix 
format, but the `String pathAsString` is not
   
   Does this make sense ? Am I wrong ?
   
   @baldimir ^^
   
   
    
   
   


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


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

Reply via email to