Skip to content

Commit

Permalink
better logic
Browse files Browse the repository at this point in the history
Signed-off-by: Maxwell Brown <[email protected]>
  • Loading branch information
Galactus22625 committed Nov 7, 2024
1 parent ab27126 commit c3c3328
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
public class JiraBasicAuthConfig implements JiraAuthConfig {

private final JiraSourceConfig jiraSourceConfig;
private String accountUrl;

public JiraBasicAuthConfig(JiraSourceConfig jiraSourceConfig) {
this.jiraSourceConfig = jiraSourceConfig;
accountUrl = jiraSourceConfig.getAccountUrl();
if (!accountUrl.endsWith("/")) {
accountUrl += "/";
}
}

@Override
public String getUrl() {
String accountUrl = jiraSourceConfig.getAccountUrl();

String url;
if (accountUrl.endsWith("/")) {
url = accountUrl;
} else {
url = accountUrl + "/";
}
return url;
return accountUrl;
}

@Override
Expand Down

0 comments on commit c3c3328

Please sign in to comment.