Compare commits

...

1 Commits

Author SHA1 Message Date
bhe-talendbj
6e7b7fb5ba bugfix(TUP-27078): Fix parse response data get from artifactory which is runing with https 2020-05-27 14:53:46 +08:00

View File

@@ -54,8 +54,6 @@ public class ArtifacoryRepositoryHandler extends AbstractArtifactRepositoryHandl
private String SEARCH_SERVICE = "api/search/gavc?"; //$NON-NLS-1$
private String SEARCH_RESULT_PREFIX = "api/storage/";//$NON-NLS-1$
/*
* (non-Javadoc)
*
@@ -218,13 +216,11 @@ public class ArtifacoryRepositoryHandler extends AbstractArtifactRepositoryHandl
throw new Exception(resultStr);
}
if (resultArray != null) {
String resultUrl = serverUrl + SEARCH_RESULT_PREFIX;
for (int i = 0; i < resultArray.size(); i++) {
JSONObject jsonObject = resultArray.getJSONObject(i);
String lastUpdated = jsonObject.getString("lastUpdated"); //$NON-NLS-1$
String uri = jsonObject.getString("uri"); //$NON-NLS-1$
uri = uri.substring(resultUrl.length(), uri.length());
String[] split = uri.split("/"); //$NON-NLS-1$
String artifactPath = jsonObject.getString("path"); //$NON-NLS-1$
String[] split = artifactPath.split("/"); //$NON-NLS-1$
if (split.length > 4) {
String fileName = split[split.length - 1];
if (!fileName.endsWith("pom")) { //$NON-NLS-1$