Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix links to Servlet and JPA javadoc #43320

Conversation

ngocnhan-tran1996
Copy link
Contributor

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 28, 2024
@wilkinsona wilkinsona added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 29, 2024
@wilkinsona wilkinsona added this to the 3.3.x milestone Nov 29, 2024
@wilkinsona wilkinsona changed the title Fix jakarta javadoc links Fix links to Servlet and JPA javadoc Nov 29, 2024
@wilkinsona wilkinsona self-assigned this Nov 29, 2024
@wilkinsona wilkinsona modified the milestones: 3.3.x, 3.3.7 Nov 29, 2024
wilkinsona pushed a commit that referenced this pull request Nov 29, 2024
@wilkinsona
Copy link
Member

Thanks very much, @ngocnhan-tran1996.

@ngocnhan-tran1996 ngocnhan-tran1996 deleted the fix-jakarta-links branch November 29, 2024 13:37
Copy link

@aaguilera aaguilera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small refactor in url patterns

@@ -763,7 +763,7 @@ bom {
links {
site(version -> "https://jakarta.ee/specifications/persistence/%s.%s"
.formatted(version.major(), version.minor()))
javadoc(version -> "https://jakarta.ee/specifications/persistence/%s.%s/apidocs"
javadoc(version -> "https://jakarta.ee/specifications/persistence/%s.%s/apidocs/jakarta.persistence"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of appending "jakarta.persistence" to the url, here you could leverage the third argument to .formatted(...) and use:

"https://jakarta.ee/specifications/persistence/%s.%s/apidocs/%s".formatted(...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments, but this PR has already been merged. I also think the changes are better as they are now. Nothing's being appended and jakarta.persistence is an unchanging part of the string so there's no benefit in it being a format argument.

@@ -782,7 +782,7 @@ bom {
links {
site(version -> "https://jakarta.ee/specifications/servlet/%s.%s"
.formatted(version.major(), version.minor()))
javadoc(version -> "https://jakarta.ee/specifications/servlet/%s.%s/apidocs"
javadoc(version -> "https://jakarta.ee/specifications/servlet/%s.%s/apidocs/jakarta.servlet"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of appending "jakarta.persistence" to the url, here you could leverage the third argument to .formatted(...) and use:

"https://jakarta.ee/specifications/servlet/%s.%s/apidocs/%s".formatted(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants