jira-importer commented on issue #808:
URL: https://github.com/apache/maven-scm/issues/808#issuecomment-2964625245

   **[Aleksandr 
Zhuikov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=aleksandr.zuikov)**
 commented
   
   As you said: "f.getPath() might only return the relative path", but on line 
57 you substring absolute path from this relative path.
   I have to admit, that my fix seems to be wrong: if getPath() always returns 
relative path, than the whole block does not make any sense.
   
   Made simple test:
   File file = new File("test.xml");
   System.out.println(file.getPath());
   System.out.println(file.getAbsolutePath());
   Output:
   test.xml
   /home/aleksz/projects/koaba/SCMTest/test.xml
   
   Out of bounds comes when you substring 
"/home/aleksz/projects/koaba/SCMTest/".length() from "test.xml"
   
   P.S
   Ubuntu 10.10
   Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
   Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
   


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