Skip to content

Commit 32f7a68

Browse files
author
rathnapandi
committed
- Fix issue #568
1 parent 7c07edb commit 32f7a68

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

modules/apim-adapter/src/main/java/com/axway/apim/lib/CoreParameters.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public int getPort2() {
144144

145145

146146
public String getApiBasepath() {
147-
if (apiManagerUrl != null) {
147+
if (apiBasepath != null) {
148148
return apiBasepath;
149149
}
150150
return DEFAULT_API_BASEPATH;
@@ -251,7 +251,8 @@ public void setAPIManagerURL(String apiManagerUrl) throws AppException {
251251
if (apiManagerUrl == null) return;
252252
try {
253253
this.apiManagerUrl = new URI(apiManagerUrl);
254-
this.apiBasepath = this.apiManagerUrl.getPath();
254+
if (!this.apiManagerUrl.getPath().isEmpty())
255+
this.apiBasepath = this.apiManagerUrl.getPath();
255256
} catch (URISyntaxException e) {
256257
throw new AppException("Error parsing up API-Manager URL: " + apiManagerUrl, ErrorCode.INVALID_PARAMETER, e);
257258
}

modules/apis/src/test/java/com/axway/apim/APIImportAppTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public void testEmptyPassword() throws Exception {
5757
// Creates an API-Representation of the desired API
5858
API desiredAPI = configAdapter.getDesiredAPI();
5959
Assert.assertEquals("",desiredAPI.getAuthenticationProfiles().get(0).getParameters().get("password"));
60-
// ObjectMapper mapper = new ObjectMapper();
61-
//
62-
// System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(desiredAPI.getAuthenticationProfiles()));
60+
6361
}
6462
}

0 commit comments

Comments
 (0)