[
https://jira.codehaus.org/browse/MCHANGES-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290908#comment-290908
]
Cristian Lupu commented on MCHANGES-218:
----------------------------------------
This fix doesn't work for the case when url is set to a value like
"http://jira.codehaus.org/"
Because it will remove the last "/" and few lines below it tries to extract url
again based on the last index for "/" and the url extracted in that case is
"http:/"
54 if ( url.endsWith( "/" ) )
55 {
56 // MCHANGES-218
57 url = url.substring( 0, url.lastIndexOf( '/' ) );
58 }
.....................
72 String jiraUrl = url.substring( 0, url.lastIndexOf( '/' ) );
Easy to test with a quick unit test and a different value for
issueManagementUrl:
Map<String, String> jiraUrlAndProjectId =
getJiraUrlAndProjectId("http://jira.codehaus.org/");
assertEquals("http://jira.codehaus.org", jiraUrlAndProjectId.get("url"));
> Downloading from JIRA fails if issueManagement.url has trailing slash
> ---------------------------------------------------------------------
>
> Key: MCHANGES-218
> URL: https://jira.codehaus.org/browse/MCHANGES-218
> Project: Maven 2.x Changes Plugin
> Issue Type: Bug
> Components: jira
> Affects Versions: 2.3
> Reporter: Lukas Theussl
> Assignee: Lukas Theussl
> Fix For: 2.4
>
>
> With an issueManagement.url like http://jira.codehaus.org/browse/DOXIA/ (note
> trailing slash), the jira report chokes
> {noformat}
> [WARNING] Downloading from JIRA failed. Received: [404]
> {noformat}
> and an empty report is generated. removing the trailing slash makes it work.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira