mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
fix wrong compare urls for github and bitbucket
This commit is contained in:
@@ -99,24 +99,6 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
|||||||
other.getVersion());
|
other.getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- get methods ----------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method description
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param url
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean isCompareable(String url)
|
|
||||||
{
|
|
||||||
return url.contains(getServername());
|
|
||||||
}
|
|
||||||
|
|
||||||
//~--- methods --------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method description
|
* Method description
|
||||||
*
|
*
|
||||||
@@ -127,8 +109,8 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String createCompareUrl(String urlString, String version,
|
public String createCompareUrl(String urlString, String version,
|
||||||
String otherVersion)
|
String otherVersion)
|
||||||
{
|
{
|
||||||
String result = null;
|
String result = null;
|
||||||
|
|
||||||
@@ -139,6 +121,8 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
|||||||
|
|
||||||
if (Util.isNotEmpty(path))
|
if (Util.isNotEmpty(path))
|
||||||
{
|
{
|
||||||
|
path = HttpUtil.getUriWithoutStartSeperator(path);
|
||||||
|
|
||||||
String[] parts = path.split(HttpUtil.SEPARATOR_PATH);
|
String[] parts = path.split(HttpUtil.SEPARATOR_PATH);
|
||||||
|
|
||||||
if (parts.length >= 2)
|
if (parts.length >= 2)
|
||||||
@@ -155,4 +139,20 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//~--- get methods ----------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isCompareable(String url)
|
||||||
|
{
|
||||||
|
return url.contains(getServername());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user