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 typos in javadoc of BootstrapContext #41443

Closed
wants to merge 1 commit into from

Conversation

jxblum
Copy link
Contributor

@jxblum jxblum commented Jul 10, 2024

Fixed grammatical issues in Javadoc for the BootstrapContext interface.

Closes PR #41443

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 10, 2024
@scottfrederick scottfrederick added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 10, 2024
@scottfrederick scottfrederick added this to the 3.2.x milestone Jul 10, 2024
Copy link

@codespearhead codespearhead left a comment

Choose a reason for hiding this comment

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

LGTM.

For what it's worth, I noticed those typos are present in a lot of places in the codebase [1][2].

/**
* Return if this version is equal to or newer than a given version.
* @param version the version to compare
* @return {@code true} if this version is equal to or newer than {@code version}
*/
public boolean isEqualOrNewerThan(JavaVersion version) {
return compareTo(version) >= 0;
}

/**
* Returns if SSL is enabled for the given instance.
* @param ssl the {@link Ssl SSL} instance or {@code null}
* @return {@code true} is SSL is enabled
* @since 3.1.0
*/
public static boolean isEnabled(Ssl ssl) {
return (ssl != null) && ssl.isEnabled();
}

* Return {@code true} if this lookup is immutable and has contents that will never
* change.
* @return if the lookup is immutable
* @since 2.2.0
*/
default boolean isImmutable() {
return false;
}

But not everywhere:

/**
* Return {@code true} if the given source is named 'defaultProperties'.
* @param propertySource the property source to check
* @return {@code true} if the name matches
*/
public static boolean hasMatchingName(PropertySource<?> propertySource) {
return (propertySource != null) && propertySource.getName().equals(NAME);
}

/**
* Return {@code true} if the properties indicate that the config data property source
* is active for the given activation context.
* @param activationContext the activation context
* @return {@code true} if the config data property source is active
*/
boolean isActive(ConfigDataActivationContext activationContext) {
return this.activate == null || this.activate.isActive(activationContext);
}


[1] https://github.com/search?q=repo%3Aspring-projects%2Fspring-boot+%22*+Return+if+%22&type=code&p=1
[2] https://github.com/search?q=repo%3Aspring-projects%2Fspring-boot+%22*+%40return+if+%22&type=code

@@ -77,7 +77,7 @@ public interface BootstrapContext {
<T, X extends Throwable> T getOrElseThrow(Class<T> type, Supplier<? extends X> exceptionSupplier) throws X;

/**
* Return if a registration exists for the given type.
* Return {@code true} if a registration exists for the given type.
Copy link
Member

Choose a reason for hiding this comment

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

While we aren't consistent across the codebase, I don't consider this one to be a typo or grammatical error. We should leave it as is for now please.

Copy link
Member

Choose a reason for hiding this comment

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

No need to do anything here. I dropped this change while merging the PR.

@wilkinsona wilkinsona changed the title Correct grammar in Javadoc Fix typos in javadoc of BootstrapContext Jul 11, 2024
@wilkinsona wilkinsona added the for: merge-with-amendments Needs some changes when we merge label Jul 11, 2024
@wilkinsona wilkinsona modified the milestones: 3.2.x, 3.2.8 Jul 11, 2024
wilkinsona pushed a commit that referenced this pull request Jul 11, 2024
wilkinsona added a commit that referenced this pull request Jul 11, 2024
@wilkinsona
Copy link
Member

Thanks very much, @jxblum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: merge-with-amendments Needs some changes when we merge type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants