Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.2
-
None
Description
In SvnScmProviderRepository.getParent(), you find these lines:
...
while ( newUrl.endsWith( "/" ) )
{
newUrl = newUrl.substring( 0, newUrl.length() );
}
...
I wanted to use that method in a project which actually HAS an scm URL set ending with "/trunk/". A call to this method on an SvnScmProviderRepository object created from that URL will never return. Note that s.substring(0, s.length()) will always return s, so in the code above, newUrl will not change.
The body of the loop must be
newUrl = newUrl.substring(0, newUrl.length() - 1);
Workaround, of course, was to remove the ending slash from the SCM URL in the pom.xml. But this should not be a prerequisite for calling this method...