Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
Use correct documentation URL.

See #207
  • Loading branch information
mp911de committed Mar 22, 2022
1 parent a3a390f commit 2c258d0
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,19 @@ public String getApiDocUrl() {
}

if (Projects.BUILD.equals(project)) { // Report Commons Docs for Spring Data Build
return String.format(JAVADOC, Projects.COMMONS.getName().toLowerCase(Locale.US), getDocumentationVersion());
return String.format(JAVADOC, getProjectName(Projects.COMMONS), getDocumentationVersion());
}

return String.format(JAVADOC, project.getName().toLowerCase(Locale.US), getDocumentationVersion());
return String.format(JAVADOC, getProjectName(project), getDocumentationVersion());
}

private String getProjectName(Project project) {

if (project == Projects.RELATIONAL) {
return "jdbc";
}

return project.getName().toLowerCase(Locale.US);
}

/**
Expand All @@ -65,10 +74,10 @@ public String getReferenceDocUrl() {
}

if (Projects.BUILD.equals(project)) { // Report Commons Docs for Spring Data Build
return String.format(DOCS, Projects.COMMONS.getName().toLowerCase(Locale.US), getDocumentationVersion());
return String.format(DOCS, getProjectName(Projects.COMMONS), getDocumentationVersion());
}

return String.format(DOCS, project.getName().toLowerCase(Locale.US), getDocumentationVersion());
return String.format(DOCS, getProjectName(project), getDocumentationVersion());
}

public String getVersionOrTrainName(Train train) {
Expand Down

0 comments on commit 2c258d0

Please sign in to comment.