diff --git a/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNonStaticEmbedded.java b/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNonStaticEmbedded.java index 4e12931d87..fb8fe8abc2 100644 --- a/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNonStaticEmbedded.java +++ b/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNonStaticEmbedded.java @@ -19,7 +19,7 @@ package org.springframework.context.index.sample; import org.springframework.stereotype.Component; /** - * Candidate with a inner class that isn't static (and should therefore not be added). + * Candidate with an inner class that isn't static (and should therefore not be added). * * @author Stephane Nicoll */ diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultJCacheOperationSource.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultJCacheOperationSource.java index c323cf4495..77d031dc85 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultJCacheOperationSource.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultJCacheOperationSource.java @@ -235,7 +235,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc * {@code CacheResolver} from a custom {@code CacheResolver} implementation so we have to * fall back on the {@code CacheManager}. *
This gives this weird situation of a perfectly valid configuration that breaks all - * the sudden because the JCache support is enabled. To avoid this we resolve the default + * of a sudden because the JCache support is enabled. To avoid this we resolve the default * exception {@code CacheResolver} as late as possible to avoid such hard requirement * in other cases. */ diff --git a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java index 22fcaffd5f..33571ffc90 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java +++ b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java @@ -27,7 +27,7 @@ import org.springframework.util.Assert; /** * Cache decorator which synchronizes its {@link #put}, {@link #evict} and * {@link #clear} operations with Spring-managed transactions (through Spring's - * {@link TransactionSynchronizationManager}, performing the actual cache + * {@link TransactionSynchronizationManager}), performing the actual cache * put/evict/clear operation only in the after-commit phase of a successful * transaction. If no transaction is active, {@link #put}, {@link #evict} and * {@link #clear} operations will be performed immediately, as usual. diff --git a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java index d6c51895f7..faf432e389 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java +++ b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java @@ -27,7 +27,7 @@ import org.springframework.util.Assert; /** * Proxy for a target {@link CacheManager}, exposing transaction-aware {@link Cache} objects * which synchronize their {@link Cache#put} operations with Spring-managed transactions - * (through Spring's {@link org.springframework.transaction.support.TransactionSynchronizationManager}, + * (through Spring's {@link org.springframework.transaction.support.TransactionSynchronizationManager}), * performing the actual cache put operation only in the after-commit phase of a successful transaction. * If no transaction is active, {@link Cache#put} operations will be performed immediately, as usual. * diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java index e13f61dcf4..42509c3098 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java @@ -132,10 +132,10 @@ public class JavaMailSenderImpl implements JavaMailSender { } /** - * Allow Map access to the JavaMail properties of this sender, + * Allow {code Map} access to the JavaMail properties of this sender, * with the option to add or override specific entries. *
Useful for specifying entries directly, for example via - * "javaMailProperties[mail.smtp.auth]". + * {code javaMailProperties[mail.smtp.auth]}. */ public Properties getJavaMailProperties() { return this.javaMailProperties; @@ -156,7 +156,7 @@ public class JavaMailSenderImpl implements JavaMailSender { /** * Return the JavaMail {@code Session}, - * lazily initializing it if hasn't been specified explicitly. + * lazily initializing it if it hasn't been specified explicitly. */ public synchronized Session getSession() { if (this.session == null) { diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java index 78210ab29e..32ee0b90de 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java @@ -141,7 +141,7 @@ public class JobDetailFactoryBean } /** - * Set the recovery flag for this job, i.e. whether or not the job should + * Set the recovery flag for this job, i.e. whether the job should * get re-executed if a 'recovery' or 'fail-over' situation is encountered. */ public void setRequestsRecovery(boolean requestsRecovery) { diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java index f4658c7c92..93470b37c1 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java @@ -119,7 +119,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod } /** - * Specify whether or not multiple jobs should be run in a concurrent fashion. + * Specify whether multiple jobs should be run in a concurrent fashion. * The behavior when one does not want concurrent jobs to be executed is * realized through adding the {@code @PersistJobDataAfterExecution} and * {@code @DisallowConcurrentExecution} markers. @@ -286,7 +286,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod /** * Extension of the MethodInvokingJob, implementing the StatefulJob interface. - * Quartz checks whether or not jobs are stateful and if so, + * Quartz checks whether jobs are stateful and if so, * won't let jobs interfere with each other. */ @PersistJobDataAfterExecution diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java index c63934d0d3..6ceb4877fc 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java @@ -41,7 +41,7 @@ import org.springframework.beans.PropertyAccessorFactory; *
Note that the preferred way to apply dependency injection * to Job instances is via a JobFactory: that is, to specify * {@link SpringBeanJobFactory} as Quartz JobFactory (typically via - * {@link SchedulerFactoryBean#setJobFactory} SchedulerFactoryBean's "jobFactory" property}). + * {@link SchedulerFactoryBean#setJobFactory SchedulerFactoryBean's "jobFactory" property}). * This allows to implement dependency-injected Quartz Jobs without * a dependency on Spring base classes. * diff --git a/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java index db5bb038e9..b1fc5cda8b 100644 --- a/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java +++ b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java @@ -354,7 +354,7 @@ public abstract class AbstractJCacheAnnotationTests { assertThatNullPointerException().isThrownBy(() -> service.earlyRemoveWithException(this.keyItem, false)); - // This will be remove anyway as the earlyRemove has removed the cache before + // This will be removed anyway as the earlyRemove has removed the cache before assertThat(cache.get(key)).isNull(); } @@ -428,7 +428,7 @@ public abstract class AbstractJCacheAnnotationTests { assertThatNullPointerException().isThrownBy(() -> service.earlyRemoveAllWithException(false)); - // This will be remove anyway as the earlyRemove has removed the cache before + // This will be removed anyway as the earlyRemove has removed the cache before assertThat(isEmpty(cache)).isTrue(); } diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java index f2e913358e..61d88ec595 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java @@ -24,7 +24,7 @@ import org.springframework.lang.Nullable; /** * An implementation of {@link CachingConfigurer} with empty methods allowing - * sub-classes to override only the methods they're interested in. + * subclasses to override only the methods they're interested in. * * @author Stephane Nicoll * @since 4.1 diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/SpringCacheAnnotationParser.java b/spring-context/src/main/java/org/springframework/cache/annotation/SpringCacheAnnotationParser.java index 223a348447..535217853b 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/SpringCacheAnnotationParser.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/SpringCacheAnnotationParser.java @@ -200,7 +200,7 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria /** * Validates the specified {@link CacheOperation}. *
Throws an {@link IllegalStateException} if the state of the operation is - * invalid. As there might be multiple sources for default values, this ensure + * invalid. As there might be multiple sources for default values, this ensures * that the operation is in a proper state before being returned. * @param ae the annotated element of the cache operation * @param operation the {@link CacheOperation} to validate diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheEvaluationContext.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheEvaluationContext.java index bb6d6ee51f..25d4282313 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheEvaluationContext.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheEvaluationContext.java @@ -35,7 +35,7 @@ import org.springframework.lang.Nullable; * are present. * *
To limit the creation of objects, an ugly constructor is used - * (rather then a dedicated 'closure'-like class for deferred execution). + * (rather than a dedicated 'closure'-like class for deferred execution). * * @author Costin Leau * @author Stephane Nicoll diff --git a/spring-context/src/main/java/org/springframework/cache/support/AbstractValueAdaptingCache.java b/spring-context/src/main/java/org/springframework/cache/support/AbstractValueAdaptingCache.java index 28beb6da53..e9a5d4f081 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/AbstractValueAdaptingCache.java +++ b/spring-context/src/main/java/org/springframework/cache/support/AbstractValueAdaptingCache.java @@ -26,7 +26,7 @@ import org.springframework.lang.Nullable; * *
Transparently replaces given {@code null} user values with an internal * {@link NullValue#INSTANCE}, if configured to support {@code null} values - * (as indicated by {@link #isAllowNullValues()}. + * (as indicated by {@link #isAllowNullValues()}). * * @author Juergen Hoeller * @since 4.2.2 diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationContext.java b/spring-context/src/main/java/org/springframework/context/ApplicationContext.java index 232bd62180..35c667cec6 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationContext.java @@ -94,7 +94,7 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact /** * Expose AutowireCapableBeanFactory functionality for this context. *
This is not typically used by application code, except for the purpose of - * initializing bean instances that live outside of the application context, + * initializing bean instances that live outside the application context, * applying the Spring bean lifecycle (fully or partly) to them. *
Alternatively, the internal BeanFactory exposed by the * {@link ConfigurableApplicationContext} interface offers access to the diff --git a/spring-context/src/main/java/org/springframework/context/annotation/EnableMBeanExport.java b/spring-context/src/main/java/org/springframework/context/annotation/EnableMBeanExport.java index ff919d37af..55740ff9fc 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/EnableMBeanExport.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/EnableMBeanExport.java @@ -27,7 +27,7 @@ import org.springframework.jmx.support.RegistrationPolicy; /** * Enables default exporting of all standard {@code MBean}s from the Spring context, as - * well as well all {@code @ManagedResource} annotated beans. + * well as all {@code @ManagedResource} annotated beans. * *
The resulting {@link org.springframework.jmx.export.MBeanExporter MBeanExporter} * bean is defined under the name "mbeanExporter". Alternatively, consider defining a diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Role.java b/spring-context/src/main/java/org/springframework/context/annotation/Role.java index 20d2175301..9d711cf142 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Role.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Role.java @@ -37,7 +37,7 @@ import org.springframework.beans.factory.config.BeanDefinition; *
If Role is present on a {@link Configuration @Configuration} class, * this indicates the role of the configuration class bean definition and * does not cascade to all @{@code Bean} methods defined within. This behavior - * is different than that of the @{@link Lazy} annotation, for example. + * is different from the behavior of the @{@link Lazy} annotation, for example. * * @author Chris Beams * @since 3.1 diff --git a/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java b/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java index ee0b7cb080..a9a05a2910 100644 --- a/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java +++ b/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java @@ -295,7 +295,7 @@ public final class LocaleContextHolder { *
Note: This method has a fallback to the shared default TimeZone, * either at the framework level or at the JVM-wide system level. * If you'd like to check for the raw LocaleContext content - * (which may indicate no specific time zone through {@code null}, use + * (which may indicate no specific time zone through {@code null}), use * {@link #getLocaleContext()} and call {@link TimeZoneAwareLocaleContext#getTimeZone()} * after downcasting to {@link TimeZoneAwareLocaleContext}. * @return the current TimeZone, or the system default TimeZone if no diff --git a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java index 1a93dd38d0..329cb743cf 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java @@ -64,7 +64,7 @@ import org.springframework.util.StringUtils; * "WEB-INF/messages_en.xml" etc. Note that message definitions in a previous * resource bundle will override ones in a later bundle, due to sequential lookup. - *
This MessageSource can easily be used outside of an + *
This MessageSource can easily be used outside an * {@link org.springframework.context.ApplicationContext}: it will use a * {@link org.springframework.core.io.DefaultResourceLoader} as default, * simply getting overridden with the ApplicationContext's resource loader @@ -156,7 +156,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased *
The default is a DefaultResourceLoader. Will get overridden by the
* ApplicationContext if running in a context, as it implements the
* ResourceLoaderAware interface. Can be manually overridden when
- * running outside of an ApplicationContext.
+ * running outside an ApplicationContext.
* @see org.springframework.core.io.DefaultResourceLoader
* @see org.springframework.context.ResourceLoaderAware
*/
diff --git a/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
index 11072d21a0..7c558c7089 100644
--- a/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
@@ -99,7 +99,7 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo
}
/*
- * This method never fails, allowing to try other possible ways to use an
+ * This method never fails, allowing to try other possible ways to use a
* server-agnostic weaver. This non-failure logic is required since
* determining a load-time weaver based on the ClassLoader name alone may
* legitimately fail due to other mismatches.
diff --git a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java
index 2158a4684f..5235ca7432 100644
--- a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java
+++ b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java
@@ -181,7 +181,7 @@ public class DateFormatter implements Formatter With lenient parsing, the parser may allow inputs that do not precisely match the format.
* With strict parsing, inputs must match the format exactly.
*/
diff --git a/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java b/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java
index 09b6097bbf..b9116e4518 100644
--- a/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java
+++ b/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java
@@ -37,7 +37,7 @@ public abstract class AbstractNumberFormatter implements Formatter With lenient parsing, the parser may allow inputs that do not precisely match the format.
* With strict parsing, inputs must match the format exactly.
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
index e60e6bacd8..1da77e14d4 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
@@ -165,10 +165,10 @@ public class MBeanClientInterceptor
}
/**
- * Allow Map access to the environment to be set for the connector,
+ * Allow {@code Map} access to the environment to be set for the connector,
* with the option to add or override specific entries.
* Useful for specifying entries directly, for example via
- * "environment[myKey]". This is particularly useful for
+ * {@code environment[myKey]}. This is particularly useful for
* adding or overriding entries in child bean definitions.
*/
@Nullable
@@ -189,9 +189,9 @@ public class MBeanClientInterceptor
}
/**
- * Set whether or not the proxy should connect to the {@code MBeanServer}
- * at creation time ("true") or the first time it is invoked ("false").
- * Default is "true".
+ * Set whether the proxy should connect to the {@code MBeanServer}
+ * at creation time ({@code true}) or the first time it is invoked
+ * ({@code false}). Default is {@code true}.
*/
public void setConnectOnStartup(boolean connectOnStartup) {
this.connectOnStartup = connectOnStartup;
@@ -199,7 +199,7 @@ public class MBeanClientInterceptor
/**
* Set whether to refresh the MBeanServer connection on connect failure.
- * Default is "false".
+ * Default is {@code false}.
* Can be turned on to allow for hot restart of the JMX server,
* automatically reconnecting and retrying in case of an IOException.
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java
index cc947ab702..159e067e61 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java
@@ -88,10 +88,10 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
}
/**
- * Allow Map access to the environment to be set for the connector,
+ * Allow {@code Map} access to the environment to be set for the connector,
* with the option to add or override specific entries.
* Useful for specifying entries directly, for example via
- * "environment[myKey]". This is particularly useful for
+ * {@code environment[myKey]}. This is particularly useful for
* adding or overriding entries in child bean definitions.
*/
@Nullable
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
index 84100293a9..25043be492 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
@@ -306,7 +306,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
}
/**
- * Indicates whether or not the managed resource should be exposed on the
+ * Indicates whether the managed resource should be exposed on the
* {@link Thread#getContextClassLoader() thread context ClassLoader} before
* allowing any invocations on the MBean to occur.
* The default value is {@code true}, exposing a {@link SpringModelMBean}
@@ -513,7 +513,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
* {@code ModelMBean}. The actual implementation of the
* {@code ModelMBean} interface used depends on the implementation of
* the {@code ModelMBeanProvider} interface that is configured. By
- * default the {@code RequiredModelMBean} class that is supplied with
+ * default, the {@code RequiredModelMBean} class that is supplied with
* all JMX implementations is used.
* The management interface produced for each bean is dependent on the
* {@code MBeanInfoAssembler} implementation being used. The
@@ -914,7 +914,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
}
/**
- * Indicates whether or not a particular bean name is present in the excluded beans list.
+ * Indicates whether a particular bean name is present in the excluded beans list.
*/
private boolean isExcluded(String beanName) {
return (this.excludedBeans.contains(beanName) ||
@@ -1067,7 +1067,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
/**
* Called during the autodetection process to decide whether
- * or not a bean should be included.
+ * a bean should be included.
* @param beanClass the class of the bean
* @param beanName the name of the bean
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java b/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java
index 117ec247ab..bc1a27c441 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java
@@ -39,7 +39,7 @@ public class UnableToRegisterMBeanException extends MBeanExportException {
* Create a new {@code UnableToRegisterMBeanException} with the
* specified error message and root cause.
* @param msg the detail message
- * @param cause the root caus
+ * @param cause the root cause
*/
public UnableToRegisterMBeanException(String msg, Throwable cause) {
super(msg, cause);
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
index b3ec662bd9..ce7da5dc23 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
@@ -43,7 +43,7 @@ import org.springframework.lang.Nullable;
*
* The logic for creating MBean metadata from the reflective metadata
* is contained in this class, but this class makes no decisions as to
- * which methods and properties are to be exposed. Instead it gives
+ * which methods and properties are to be exposed. Instead, it gives
* subclasses a chance to 'vote' on each property or method through
* the {@code includeXXX} methods.
*
@@ -177,7 +177,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
private Integer defaultCurrencyTimeLimit;
/**
- * Indicates whether or not strict casing is being used for attributes.
+ * Indicates whether strict casing is being used for attributes.
*/
private boolean useStrictCasing = true;
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
index 8b9492e1de..a174e5870b 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
@@ -119,7 +119,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
/**
* Used for autodetection of beans. Checks to see if the bean's class has a
- * {@code ManagedResource} attribute. If so it will add it list of included beans.
+ * {@code ManagedResource} attribute. If so, it will add it to the list of included beans.
* @param beanClass the class of the bean
* @param beanName the name of the bean in the bean factory
*/
@@ -410,7 +410,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
/**
* Determines which of two {@code int} values should be used as the value
* for an attribute descriptor. In general, only the getter or the setter will
- * be have a non-negative value so we use that value. In the event that both values
+ * have a non-negative value, so we use that value. In the event that both values
* are non-negative, we use the greater of the two. This method can be used to
* resolve any {@code int} valued descriptor where there are two possible values.
* @param getter the int value associated with the getter for this attribute
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java b/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java
index adefc28025..3921d12250 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java
@@ -35,7 +35,7 @@ public interface JmxAttributeSource {
/**
* Implementations should return an instance of {@code ManagedResource}
* if the supplied {@code Class} has the appropriate metadata.
- * Otherwise should return {@code null}.
+ * Otherwise, should return {@code null}.
* @param clazz the class to read the attribute data from
* @return the attribute, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
@@ -46,7 +46,7 @@ public interface JmxAttributeSource {
/**
* Implementations should return an instance of {@code ManagedAttribute}
* if the supplied {@code Method} has the corresponding metadata.
- * Otherwise should return {@code null}.
+ * Otherwise, should return {@code null}.
* @param method the method to read the attribute data from
* @return the attribute, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
@@ -57,7 +57,7 @@ public interface JmxAttributeSource {
/**
* Implementations should return an instance of {@code ManagedMetric}
* if the supplied {@code Method} has the corresponding metadata.
- * Otherwise should return {@code null}.
+ * Otherwise, should return {@code null}.
* @param method the method to read the attribute data from
* @return the metric, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
@@ -68,7 +68,7 @@ public interface JmxAttributeSource {
/**
* Implementations should return an instance of {@code ManagedOperation}
* if the supplied {@code Method} has the corresponding metadata.
- * Otherwise should return {@code null}.
+ * Otherwise, should return {@code null}.
* @param method the method to read the attribute data from
* @return the attribute, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
@@ -78,7 +78,7 @@ public interface JmxAttributeSource {
/**
* Implementations should return an array of {@code ManagedOperationParameter}
- * if the supplied {@code Method} has the corresponding metadata. Otherwise
+ * if the supplied {@code Method} has the corresponding metadata. Otherwise,
* should return an empty array if no metadata is found.
* @param method the {@code Method} to read the metadata from
* @return the parameter information.
@@ -88,7 +88,7 @@ public interface JmxAttributeSource {
/**
* Implementations should return an array of {@link ManagedNotification ManagedNotifications}
- * if the supplied the {@code Class} has the corresponding metadata. Otherwise
+ * if the supplied {@code Class} has the corresponding metadata. Otherwise,
* should return an empty array.
* @param clazz the {@code Class} to read the metadata from
* @return the notification information
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java
index a6cd1811f9..925d86d559 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java
@@ -32,7 +32,7 @@ import javax.management.Notification;
* Each managed resource instance will have a distinct instance of a
* {@code NotificationPublisher} implementation. This instance will keep
* track of all the {@link javax.management.NotificationListener NotificationListeners}
- * registered for a particular mananaged resource.
+ * registered for a particular managed resource.
*
* Any existing, user-defined MBeans should use standard JMX APIs for notification
* publication; this interface is intended for use only by Spring-created MBeans.
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java
index d47626d358..259bc23b50 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java
@@ -74,7 +74,7 @@ public class MBeanServerFactoryBean implements FactoryBean Default is {@code false}.
*/
diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java b/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java
index 9f2d07982d..9f1b49f8ee 100644
--- a/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java
@@ -54,7 +54,7 @@ import org.springframework.util.ClassUtils;
* a "proxyInterface" in such a scenario, since the actual JNDI object type is not
* known in advance.
*
- * Of course, bean classes in a Spring environment may lookup e.g. a DataSource
+ * Of course, bean classes in a Spring environment may look up e.g. a DataSource
* from JNDI themselves. This class simply enables central configuration of the
* JNDI name, and easy switching to non-JNDI alternatives. The latter is
* particularly convenient for test setups, reuse in standalone clients, etc.
diff --git a/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java b/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java
index 186f546c61..beb5489863 100644
--- a/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java
+++ b/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java
@@ -47,7 +47,7 @@ import org.springframework.lang.Nullable;
* Jakarta EE application's "java:comp/env/" namespace. It caches the resolved
* types for all obtained objects, and optionally also caches shareable
* objects (if they are explicitly marked as
- * {@link #addShareableResource shareable resource}.
+ * {@link #addShareableResource shareable resource}).
*
* The main intent of this factory is usage in combination with Spring's
* {@link org.springframework.context.annotation.CommonAnnotationBeanPostProcessor},
diff --git a/spring-context/src/main/java/org/springframework/scheduling/SchedulingException.java b/spring-context/src/main/java/org/springframework/scheduling/SchedulingException.java
index 001ca5d147..aaaa95f106 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/SchedulingException.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/SchedulingException.java
@@ -40,7 +40,7 @@ public class SchedulingException extends NestedRuntimeException {
/**
* Constructor for SchedulingException.
* @param msg the detail message
- * @param cause the root cause (usually from using a underlying
+ * @param cause the root cause (usually from using an underlying
* scheduling API such as Quartz)
*/
public SchedulingException(String msg, Throwable cause) {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java
index 7f7d497eb1..5bc643298d 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java
@@ -48,7 +48,7 @@ public interface SchedulingTaskExecutor extends AsyncTaskExecutor {
* individual subtasks which submit a follow-up task afterwards (if feasible).
* This should be considered a hint. Of course {@code TaskExecutor} clients
* are free to ignore this flag and hence the {@code SchedulingTaskExecutor}
- * interface overall. However, thread pools will usually indicated a preference
+ * interface overall. However, thread pools will usually indicate a preference
* for short-lived tasks, allowing for more fine-grained scheduling.
* @return {@code true} if this executor prefers short-lived tasks (the default),
* {@code false} otherwise (for treatment like a regular {@code TaskExecutor})
diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/Async.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/Async.java
index adc9b1359e..1eba40b325 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/annotation/Async.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/Async.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
/**
* Annotation that marks a method as a candidate for asynchronous execution.
*
- * Can also be used at the type level, in which case all of the type's methods are
+ * Can also be used at the type level, in which case all the type's methods are
* considered as asynchronous. Note, however, that {@code @Async} is not supported
* on methods declared within a
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java
index 54d66d2f8b..4b3cd9415c 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java
@@ -36,7 +36,7 @@ import org.springframework.util.function.SingletonSupplier;
* behavior to any bean that carries the {@link Async} annotation at class or
* method-level by adding a corresponding {@link AsyncAnnotationAdvisor} to the
* exposed proxy (either an existing AOP proxy or a newly generated proxy that
- * implements all of the target's interfaces).
+ * implements all the target's interfaces).
*
* The {@link TaskExecutor} responsible for the asynchronous execution may
* be provided as well as the annotation type that indicates a method should be
diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/BitsCronField.java b/spring-context/src/main/java/org/springframework/scheduling/support/BitsCronField.java
index 0c3d29bebb..e4ee7edd08 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/support/BitsCronField.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/support/BitsCronField.java
@@ -49,7 +49,7 @@ final class BitsCronField extends CronField {
}
/**
- * Return a {@code BitsCronField} enabled for 0 nano seconds.
+ * Return a {@code BitsCronField} enabled for 0 nanoseconds.
*/
public static BitsCronField zeroNanos() {
if (zeroNanos == null) {
@@ -75,7 +75,7 @@ final class BitsCronField extends CronField {
}
/**
- * Parse the given value into a hours {@code BitsCronField}, the third entry of a cron expression.
+ * Parse the given value into an hours {@code BitsCronField}, the third entry of a cron expression.
*/
public static BitsCronField parseHours(String value) {
return BitsCronField.parseField(value, Type.HOUR);
diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronField.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronField.java
index f794645d65..99d940613e 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/support/CronField.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronField.java
@@ -49,7 +49,7 @@ abstract class CronField {
}
/**
- * Return a {@code CronField} enabled for 0 nano seconds.
+ * Return a {@code CronField} enabled for 0 nanoseconds.
*/
public static CronField zeroNanos() {
return BitsCronField.zeroNanos();
@@ -70,7 +70,7 @@ abstract class CronField {
}
/**
- * Parse the given value into a hours {@code CronField}, the third entry of a cron expression.
+ * Parse the given value into an hours {@code CronField}, the third entry of a cron expression.
*/
public static CronField parseHours(String value) {
return BitsCronField.parseHours(value);
@@ -201,7 +201,7 @@ abstract class CronField {
}
/**
- * Return the general range of this type. For instance, this methods
+ * Return the general range of this type. For instance, this method
* will return 0-31 for {@link #MONTH}.
* @return the range of this field
*/
diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
index e9c74387b2..efce947cb7 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
@@ -298,7 +298,7 @@ public class CronSequenceGenerator {
}
/**
- * Replace the values in the comma-separated list (case insensitive)
+ * Replace the values in the comma-separated list (case-insensitive)
* with their index in the list.
* @return a new String with the values from the list replaced
*/
diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
index a67f7f66ca..2ff7d50977 100644
--- a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
+++ b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
@@ -139,7 +139,7 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware {
scriptSource.getScriptAsString(), actualInterfaces, this.beanClassLoader);
if (result instanceof Class) {
// A Class: We'll cache the Class here and create an instance
- // outside of the synchronized block.
+ // outside the synchronized block.
this.scriptClass = (Class>) result;
}
else {
diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
index 90f812e08d..ef818cce37 100644
--- a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
+++ b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
@@ -254,7 +254,7 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea
}
scriptClassToExecute = this.scriptClass;
- // Process re-execution outside of the synchronized block.
+ // Process re-execution outside the synchronized block.
return executeScript(scriptSource, scriptClassToExecute);
}
catch (CompilationFailedException ex) {
diff --git a/spring-context/src/main/java/org/springframework/ui/context/Theme.java b/spring-context/src/main/java/org/springframework/ui/context/Theme.java
index b2b5e4f8e8..17f2bbcfbc 100644
--- a/spring-context/src/main/java/org/springframework/ui/context/Theme.java
+++ b/spring-context/src/main/java/org/springframework/ui/context/Theme.java
@@ -19,7 +19,7 @@ package org.springframework.ui.context;
import org.springframework.context.MessageSource;
/**
- * A Theme can resolve theme-specific messages, codes, file paths, etcetera
+ * A Theme can resolve theme-specific messages, codes, file paths, etc.
* (e.g. CSS and image files in a web environment).
* The exposed {@link org.springframework.context.MessageSource} supports
* theme-specific parameterization and internationalization.
diff --git a/spring-context/src/main/java/org/springframework/validation/DataBinder.java b/spring-context/src/main/java/org/springframework/validation/DataBinder.java
index 8ee5e43b02..8cd4b6ef9c 100644
--- a/spring-context/src/main/java/org/springframework/validation/DataBinder.java
+++ b/spring-context/src/main/java/org/springframework/validation/DataBinder.java
@@ -59,7 +59,7 @@ import org.springframework.util.StringUtils;
*
* WARNING: Data binding can lead to security issues by exposing
* parts of the object graph that are not meant to be accessed or modified by
- * external clients. Therefore the design and use of data binding should be considered
+ * external clients. Therefore, the design and use of data binding should be considered
* carefully with regard to security. For more details, please refer to the dedicated
* sections on data binding for
* Spring Web MVC and
@@ -873,7 +873,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
/**
* Apply given property values to the target object.
- * Default implementation applies all of the supplied property
+ * Default implementation applies all the supplied property
* values as bean property values. By default, unknown fields will
* be ignored.
* @param mpvs the property values to be bound (can be modified)
diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java
index 7663640777..d78ea22909 100644
--- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java
+++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java
@@ -510,7 +510,7 @@ public class ProxyFactoryBeanTests {
agi = (AddedGlobalInterface) l;
assertThat(agi.globalsAdded() == -1).isTrue();
- assertThat(factory.getBean("test1")).as("Aspect interface should't be implemeneted without globals")
+ assertThat(factory.getBean("test1")).as("Aspect interface shouldn't be implemented without globals")
.isNotInstanceOf(AddedGlobalInterface.class);
}
@@ -588,7 +588,7 @@ public class ProxyFactoryBeanTests {
assertThatExceptionOfType(LockedException.class).isThrownBy(() -> bean1.setAge(5));
- bean2.setAge(6); //do not expect LockedException"
+ bean2.setAge(6); //do not expect LockedException
}
@Test
diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java
index d366fb6c60..cd5f383589 100644
--- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java
+++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java
@@ -153,7 +153,7 @@ class CommonsPool2TargetSourceTests {
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
targetSource::getTarget);
- // lets now release an object and try to acquire a new one
+ // let's now release an object and try to acquire a new one
targetSource.releaseTarget(pooledInstances[9]);
pooledInstances[9] = targetSource.getTarget();
@@ -181,7 +181,7 @@ class CommonsPool2TargetSourceTests {
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
targetSource::getTarget);
- // lets now release an object and try to acquire a new one
+ // let's now release an object and try to acquire a new one
targetSource.releaseTarget(pooledInstances[9]);
pooledInstances[9] = targetSource.getTarget();
diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java
index c257534c6f..f80f6b8461 100644
--- a/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java
+++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java
@@ -135,7 +135,7 @@ public class CachePutEvaluationTests {
}
/**
- * Represent an invalid use case. If the result of the operation is non null, then we put
+ * Represent an invalid use case. If the result of the operation is non-null, then we put
* the value with a different key. This forces the method to be executed every time.
*/
@Cacheable
diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ParserStrategyUtilsTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ParserStrategyUtilsTests.java
index f13afc6974..87663ede08 100644
--- a/spring-context/src/test/java/org/springframework/context/annotation/ParserStrategyUtilsTests.java
+++ b/spring-context/src/test/java/org/springframework/context/annotation/ParserStrategyUtilsTests.java
@@ -98,7 +98,7 @@ public class ParserStrategyUtilsTests {
@Test
public void instantiateClassWhenHasMultipleConstructorsUsesNoArgsConstructor() {
- // Remain back-compatible by using the default constructor if there's more then one
+ // Remain back-compatible by using the default constructor if there's more than one
MultipleConstructors instance = instantiateClass(MultipleConstructors.class);
assertThat(instance.usedDefaultConstructor).isTrue();
}
diff --git a/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java b/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java
index e0567672c6..3c40987c11 100644
--- a/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java
+++ b/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java
@@ -28,7 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests changes introduced for SPR-8874, allowing beans of primitive types to be looked
* up via getBean(Class), or to be injected using @Autowired or @Injected or @Resource.
- * Prior to these changes, an attempt to lookup or inject a bean of type boolean would
+ * Prior to these changes, an attempt to look up or inject a bean of type boolean would
* fail because all spring beans are Objects, regardless of initial type due to the way
* that ObjectFactory works.
*
diff --git a/spring-context/src/test/java/org/springframework/context/event/GenericApplicationListenerAdapterTests.java b/spring-context/src/test/java/org/springframework/context/event/GenericApplicationListenerAdapterTests.java
index 4ef4fdee39..7c0e299791 100644
--- a/spring-context/src/test/java/org/springframework/context/event/GenericApplicationListenerAdapterTests.java
+++ b/spring-context/src/test/java/org/springframework/context/event/GenericApplicationListenerAdapterTests.java
@@ -125,7 +125,7 @@ public class GenericApplicationListenerAdapterTests extends AbstractApplicationE
ResolvableType.forClassWithGenerics(GenericTestEvent.class, String.class));
}
- @Test // Demonstrates we cant inject that event because the listener has a wildcard
+ @Test // Demonstrates we cannot inject that event because the listener has a wildcard
public void genericListenerWildcardTypeTypeErasure() {
GenericTestEvent There are various choices for DataSource implementations:
@@ -61,7 +61,7 @@ import org.springframework.util.ReflectionUtils;
* builder.activate();
*
* Note that it's impossible to activate multiple builders within the same JVM,
- * due to JNDI restrictions. Thus to configure a fresh builder repeatedly, use
+ * due to JNDI restrictions. Thus, to configure a fresh builder repeatedly, use
* the following code to get a reference to either an already activated builder
* or a newly activated one:
*
@@ -108,7 +108,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* If no SimpleNamingContextBuilder is already configuring JNDI,
- * create and activate one. Otherwise take the existing activated
+ * create and activate one. Otherwise, take the existing activated
* SimpleNamingContextBuilder, clear it and return it.
* This is mainly intended for test suites that want to
* reinitialize JNDI bindings from scratch repeatedly.
diff --git a/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java b/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
index f8644f2cba..3347e4a4e3 100644
--- a/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
+++ b/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
@@ -59,7 +59,7 @@ public interface AttributeAccessor {
* in this {@code AttributeAccessor}, the existing value will be returned
* without applying the supplied compute function.
* The default implementation of this method is not thread safe but can
- * overridden by concrete implementations of this interface.
+ * be overridden by concrete implementations of this interface.
* @param The default behavior is to return {@code null} if no discoverer matches.
*
diff --git a/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java b/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java
index 035ac1b56a..f1d76c330e 100644
--- a/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java
+++ b/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java
@@ -94,7 +94,7 @@ public final class ReactiveTypeDescriptor {
/**
* Return an empty-value instance for the underlying reactive or async type.
- * Use of this type implies {@link #supportsEmpty()} is true.
+ * Use of this type implies {@link #supportsEmpty()} is {@code true}.
*/
public Object getEmptyValue() {
Assert.state(this.emptyValueSupplier != null, "Empty values not supported");
diff --git a/spring-core/src/main/java/org/springframework/core/ResolvableType.java b/spring-core/src/main/java/org/springframework/core/ResolvableType.java
index c779b00b9f..b8d41a3609 100644
--- a/spring-core/src/main/java/org/springframework/core/ResolvableType.java
+++ b/spring-core/src/main/java/org/springframework/core/ResolvableType.java
@@ -1005,7 +1005,7 @@ public class ResolvableType implements Serializable {
/**
* Return a {@link ResolvableType} for the specified {@link Class},
* doing assignability checks against the raw class only (analogous to
- * {@link Class#isAssignableFrom}, which this serves as a wrapper for.
+ * {@link Class#isAssignableFrom}, which this serves as a wrapper for).
* For example: {@code ResolvableType.forRawClass(List.class)}.
* @param clazz the class to introspect ({@code null} is semantically
* equivalent to {@code Object.class} for typical use cases here)
@@ -1336,7 +1336,7 @@ public class ResolvableType implements Serializable {
}
/**
- * Return a {@link ResolvableType} as a array of the specified {@code componentType}.
+ * Return a {@link ResolvableType} as an array of the specified {@code componentType}.
* @param componentType the component type
* @return a {@link ResolvableType} as an array of the specified component type
*/
diff --git a/spring-core/src/main/java/org/springframework/core/ResolvableTypeProvider.java b/spring-core/src/main/java/org/springframework/core/ResolvableTypeProvider.java
index 93f7de9344..0f5b6b585a 100644
--- a/spring-core/src/main/java/org/springframework/core/ResolvableTypeProvider.java
+++ b/spring-core/src/main/java/org/springframework/core/ResolvableTypeProvider.java
@@ -25,7 +25,7 @@ import org.springframework.lang.Nullable;
* signature as Java does not convey the signature at runtime.
*
* Users of this interface should be careful in complex hierarchy scenarios, especially
- * when the generic type signature of the class changes in sub-classes. It is always
+ * when the generic type signature of the class changes in subclasses. It is always
* possible to return {@code null} to fallback on a default behavior.
*
* @author Stephane Nicoll
diff --git a/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java b/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java
index 964c791a8e..a93cead054 100644
--- a/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java
+++ b/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java
@@ -26,7 +26,7 @@ import org.springframework.lang.Nullable;
* Spring's CGLIB proxy factory for making a caching decision.
*
* If a ClassLoader does not implement this interface,
- * then all of the classes obtained from it should be considered
+ * then all the classes obtained from it should be considered
* as not reloadable (i.e. cacheable).
*
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
index 85f104c122..91539de81e 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
@@ -754,7 +754,7 @@ public abstract class AnnotationUtils {
/**
* Check the declared attributes of the given annotation, in particular covering
* Google App Engine's late arrival of {@code TypeNotPresentExceptionProxy} for
- * {@code Class} values (instead of early {@code Class.getAnnotations() failure}.
+ * {@code Class} values (instead of early {@code Class.getAnnotations() failure}).
* This method not failing indicates that {@link #getAnnotationAttributes(Annotation)}
* won't failure either (when attempted later on).
* @param annotation the annotation to validate
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java b/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java
index caf1772148..cceda871eb 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java
@@ -124,7 +124,7 @@ final class AttributeMethods {
* any {@link TypeNotPresentException TypeNotPresentExceptions}. In particular,
* this method is designed to cover Google App Engine's late arrival of such
* exceptions for {@code Class} values (instead of the more typical early
- * {@code Class.getAnnotations() failure}.
+ * {@code Class.getAnnotations() failure}).
* @param annotation the annotation to validate
* @throws IllegalStateException if a declared {@code Class} attribute could not be read
* @see #isValid(Annotation)
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java
index 68422f7ec0..6d9c1bcf5d 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java
@@ -349,7 +349,7 @@ public interface MergedAnnotation {
* Get a required enum attribute value from the annotation.
* @param attributeName the attribute name
* @param type the enum type
- * @return the value as a enum
+ * @return the value as an enum
* @throws NoSuchElementException if there is no matching attribute
*/
The {@link #value} is optional and represents an order value as defined in the
* {@link Ordered} interface. Lower values have higher priority. The default value is
- * {@code Ordered.LOWEST_PRECEDENCE}, indicating lowest priority (losing to any other
- * specified order value).
+ * {@code Ordered.LOWEST_PRECEDENCE}, indicating the lowest priority (losing to any
+ * other specified order value).
*
* NOTE: Since Spring 4.0, annotation-based ordering is supported for many
* kinds of components in Spring, even for collection injection where the order values
diff --git a/spring-core/src/main/java/org/springframework/core/codec/Hints.java b/spring-core/src/main/java/org/springframework/core/codec/Hints.java
index a731b018bd..48991486e4 100644
--- a/spring-core/src/main/java/org/springframework/core/codec/Hints.java
+++ b/spring-core/src/main/java/org/springframework/core/codec/Hints.java
@@ -133,7 +133,7 @@ public abstract class Hints {
* Merge a single hint into a map of hints, possibly creating and copying
* all hints into a new map, or otherwise if the map of hints is empty,
* creating a new single entry map.
- * @param hints a map of hints to be merge
+ * @param hints a map of hints to be merged
* @param hintName the hint name to merge
* @param hintValue the hint value to merge
* @return a single map with all hints
diff --git a/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java b/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
index f1eb05292c..409bfb5ad0 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
@@ -197,7 +197,7 @@ public class TypeDescriptor implements Serializable {
/**
* Cast this {@link TypeDescriptor} to a superclass or implemented interface
* preserving annotations and nested type context.
- * @param superType the super type to cast to (can be {@code null})
+ * @param superType the supertype to cast to (can be {@code null})
* @return a new TypeDescriptor for the up-cast type
* @throws IllegalArgumentException if this type is not assignable to the super-type
* @since 3.2
@@ -341,7 +341,7 @@ public class TypeDescriptor implements Serializable {
}
/**
- * If this type is a {@link Collection} or an array, creates a element TypeDescriptor
+ * If this type is a {@link Collection} or an array, creates an element TypeDescriptor
* from the provided collection or array element.
* Narrows the {@link #getElementTypeDescriptor() elementType} property to the class
* of the provided collection or array element. For example, if this describes a
@@ -353,7 +353,7 @@ public class TypeDescriptor implements Serializable {
* Annotation and nested type context will be preserved in the narrowed
* TypeDescriptor that is returned.
* @param element the collection or array element
- * @return a element type descriptor, narrowed to the type of the provided element
+ * @return an element type descriptor, narrowed to the type of the provided element
* @see #getElementTypeDescriptor()
* @see #narrow(Object)
*/
diff --git a/spring-core/src/main/java/org/springframework/core/convert/converter/GenericConverter.java b/spring-core/src/main/java/org/springframework/core/convert/converter/GenericConverter.java
index 0472337f7a..2460ed12ae 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/converter/GenericConverter.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/converter/GenericConverter.java
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
*
* This is the most flexible of the Converter SPI interfaces, but also the most complex.
* It is flexible in that a GenericConverter may support converting between multiple source/target
- * type pairs (see {@link #getConvertibleTypes()}. In addition, GenericConverter implementations
+ * type pairs (see {@link #getConvertibleTypes()}). In addition, GenericConverter implementations
* have access to source/target {@link TypeDescriptor field context} during the type conversion
* process. This allows for resolving source and target field metadata such as annotations and
* generics information, which can be used to influence the conversion logic.
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/EnumToIntegerConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/EnumToIntegerConverter.java
index 0239f74a87..109103344d 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/EnumToIntegerConverter.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/EnumToIntegerConverter.java
@@ -20,7 +20,7 @@ import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.converter.Converter;
/**
- * Calls {@link Enum#ordinal()} to convert a source Enum to a Integer.
+ * Calls {@link Enum#ordinal()} to convert a source Enum to an Integer.
* This converter will not match enums with interfaces that can be converted.
*
* @author Yanming Zhou
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
index ebb25c3130..e00b3d44b5 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
@@ -240,7 +240,7 @@ public class GenericConversionService implements ConfigurableConversionService {
}
/**
- * Hook method to lookup the converter for a given sourceType/targetType pair.
+ * Hook method to look up the converter for a given sourceType/targetType pair.
* First queries this ConversionService's converter cache.
* On a cache miss, then performs an exhaustive search for a matching converter.
* If no converter matches, returns the default converter.
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java
index 238c848824..c3984fb039 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java
@@ -30,7 +30,7 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;
/**
- * Converts an entity identifier to a entity reference by calling a static finder method
+ * Converts an entity identifier to an entity reference by calling a static finder method
* on the target entity type.
*
* For this converter to match, the finder method must be static, have the signature
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/IntegerToEnumConverterFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/IntegerToEnumConverterFactory.java
index 4322d8ebb3..a322065988 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/IntegerToEnumConverterFactory.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/IntegerToEnumConverterFactory.java
@@ -20,7 +20,7 @@ import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.ConverterFactory;
/**
- * Converts from a Integer to a {@link java.lang.Enum} by calling {@link Class#getEnumConstants()}.
+ * Converts from an Integer to a {@link java.lang.Enum} by calling {@link Class#getEnumConstants()}.
*
* @author Yanming Zhou
* @author Stephane Nicoll
diff --git a/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java
index a7ee178a3e..0f80080d1d 100644
--- a/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java
+++ b/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java
@@ -72,9 +72,9 @@ import org.springframework.util.StringUtils;
*
* Because the {@code CommandLinePropertySource} was added to the {@code Environment}'s
* set of {@link MutablePropertySources} using the {@code #addFirst} method, it has
- * highest search precedence, meaning that while "db.hostname" and other properties may
- * exist in other property sources such as the system environment variables, it will be
- * chosen from the command line property source first. This is a reasonable approach
+ * the highest search precedence, meaning that while "db.hostname" and other properties
+ * may exist in other property sources such as the system environment variables, it will
+ * be chosen from the command line property source first. This is a reasonable approach
* given that arguments specified on the command line are naturally more specific than
* those specified as environment variables.
*
@@ -136,7 +136,7 @@ import org.springframework.util.StringUtils;
* arguments" and available through the special {@linkplain
* #DEFAULT_NON_OPTION_ARGS_PROPERTY_NAME "nonOptionArgs"} property. If multiple
* non-option arguments are specified, the value of this property will be a
- * comma-delimited string containing all of the arguments. This approach ensures a simple
+ * comma-delimited string containing all the arguments. This approach ensures a simple
* and consistent return type (String) for all properties from a {@code
* CommandLinePropertySource} and at the same time lends itself to conversion when used
* in conjunction with the Spring {@link Environment} and its built-in {@code
@@ -189,7 +189,7 @@ import org.springframework.util.StringUtils;
* This variable verbosity is useful as a property source such as system properties
* or environment variables may contain an arbitrary number of property pairs,
- * potentially leading to difficult to read exception and log messages.
+ * potentially leading to difficulties to read exception and log messages.
* @see Log#isDebugEnabled()
*/
@Override
diff --git a/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java b/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
index 3691054fb1..471e4ae518 100644
--- a/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
@@ -145,7 +145,7 @@ public abstract class AbstractResource implements Resource {
/**
* This method reads the entire InputStream to determine the content length.
- * For a custom sub-class of {@code InputStreamResource}, we strongly
+ * For a custom subclass of {@code InputStreamResource}, we strongly
* recommend overriding this method with a more optimal implementation, e.g.
* checking File length, or possibly simply returning -1 if the stream can
* only be read once.
diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java
index 4352449d3e..baa8e9ce5e 100644
--- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java
+++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java
@@ -70,7 +70,7 @@ public interface DataBufferFactory {
* Note that the given data buffers do not have to be released, as they are
* released as part of the returned composite.
* @param dataBuffers the data buffers to be composed
- * @return a buffer that is composed from the {@code dataBuffers} argument
+ * @return a buffer that is composed of the {@code dataBuffers} argument
* @since 5.0.3
*/
DataBuffer join(List extends DataBuffer> dataBuffers);
diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java
index 355f9a7f32..ffa4115674 100644
--- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java
@@ -539,7 +539,7 @@ public abstract class DataBufferUtils {
}
/**
- * Return a new {@code DataBuffer} composed from joining together the given
+ * Return a new {@code DataBuffer} composed of joining together the given
* {@code dataBuffers} elements. Depending on the {@link DataBuffer} type,
* the returned buffer may be a single buffer containing all data of the
* provided buffers, or it may be a zero-copy, composite with references to
@@ -550,7 +550,7 @@ public abstract class DataBufferUtils {
* Note that the given data buffers do not have to be
* released. They will be released as part of the returned composite.
* @param dataBuffers the data buffers that are to be composed
- * @return a buffer that is composed from the {@code dataBuffers} argument
+ * @return a buffer that is composed of the {@code dataBuffers} argument
* @since 5.0.3
*/
public static Mono Implications on portability:
*
* If the specified path is already a file URL (either explicitly, or
- * implicitly because the base {@code ResourceLoader} is a filesystem one,
+ * implicitly because the base {@code ResourceLoader} is a filesystem one),
* then wildcarding is guaranteed to work in a completely portable fashion.
*
* If the specified path is a classpath location, then the resolver must
* obtain the last non-wildcard path segment URL via a
* {@code Classloader.getResource()} call. Since this is just a
* node of the path (not the file at the end) it is actually undefined
- * (in the ClassLoader Javadocs) exactly what sort of a URL is returned in
+ * (in the ClassLoader Javadocs) exactly what sort of URL is returned in
* this case. In practice, it is usually a {@code java.io.File} representing
* the directory, where the classpath resource resolves to a filesystem
* location, or a jar URL of some sort, where the classpath resource resolves
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/ResourcePropertySource.java b/spring-core/src/main/java/org/springframework/core/io/support/ResourcePropertySource.java
index 0ae66c72b9..ad9e57aa4b 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/ResourcePropertySource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/ResourcePropertySource.java
@@ -111,7 +111,7 @@ public class ResourcePropertySource extends PropertiesPropertySource {
* Create a PropertySource having the given name based on Properties loaded from
* the given resource location. The default thread context class loader will be
* used to load the resource (assuming the location string is prefixed with
- * {@code classpath:}.
+ * {@code classpath:}).
*/
public ResourcePropertySource(String name, String location) throws IOException {
this(name, new DefaultResourceLoader().getResource(location));
diff --git a/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java b/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java
index dab5fe95e9..3e20e72d94 100644
--- a/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java
+++ b/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java
@@ -45,7 +45,7 @@ public interface ToStringStyler {
/**
* Style a field value as a string.
* @param buffer the buffer to print to
- * @param fieldName the he name of the field
+ * @param fieldName the name of the field
* @param value the field value
*/
void styleField(StringBuilder buffer, String fieldName, @Nullable Object value);
diff --git a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
index 90fca52316..6d948298de 100644
--- a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
+++ b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* Mainly intended for testing scenarios.
*
* Execution in the calling thread does have the advantage of participating
- * in it's thread context, for example the thread context class loader or the
+ * in its thread context, for example the thread context class loader or the
* thread's current transaction association. That said, in many cases,
* asynchronous execution will be preferable: choose an asynchronous
* {@code TaskExecutor} instead for such scenarios.
diff --git a/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java b/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java
index adb685324b..cbb5ab4168 100644
--- a/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java
+++ b/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java
@@ -67,7 +67,7 @@ public interface ClassMetadata {
/**
* Determine whether the underlying class is independent, i.e. whether
* it is a top-level class or a nested class (static inner class) that
- * can be constructed independently from an enclosing class.
+ * can be constructed independently of an enclosing class.
*/
boolean isIndependent();
@@ -90,15 +90,15 @@ public interface ClassMetadata {
String getEnclosingClassName();
/**
- * Return whether the underlying class has a super class.
+ * Return whether the underlying class has a superclass.
*/
default boolean hasSuperClass() {
return (getSuperClassName() != null);
}
/**
- * Return the name of the super class of the underlying class,
- * or {@code null} if there is no super class defined.
+ * Return the name of the superclass of the underlying class,
+ * or {@code null} if there is no superclass defined.
*/
@Nullable
String getSuperClassName();
diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java
index cfa9ba2b93..0baa394391 100644
--- a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java
+++ b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java
@@ -70,7 +70,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte
if (this.considerInherited) {
String superClassName = metadata.getSuperClassName();
if (superClassName != null) {
- // Optimization to avoid creating ClassReader for super class.
+ // Optimization to avoid creating ClassReader for superclass.
Boolean superClassMatch = matchSuperClass(superClassName);
if (superClassMatch != null) {
if (superClassMatch.booleanValue()) {
@@ -78,7 +78,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte
}
}
else {
- // Need to read super class to determine a match...
+ // Need to read superclass to determine a match...
try {
if (match(metadata.getSuperClassName(), metadataReaderFactory)) {
return true;
@@ -96,7 +96,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte
if (this.considerInterfaces) {
for (String ifc : metadata.getInterfaceNames()) {
- // Optimization to avoid creating ClassReader for super class
+ // Optimization to avoid creating ClassReader for superclass
Boolean interfaceMatch = matchInterface(ifc);
if (interfaceMatch != null) {
if (interfaceMatch.booleanValue()) {
@@ -144,7 +144,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte
}
/**
- * Override this to match on super type name.
+ * Override this to match on supertype name.
*/
@Nullable
protected Boolean matchSuperClass(String superClassName) {
diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java
index bff626e639..5584edcb68 100644
--- a/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java
+++ b/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java
@@ -32,7 +32,7 @@ import org.springframework.util.ClassUtils;
* By default, the matching logic mirrors that of
* {@link AnnotationUtils#getAnnotation(java.lang.reflect.AnnotatedElement, Class)},
* supporting annotations that are present or meta-present for a
- * single level of meta-annotations. The search for meta-annotations my be disabled.
+ * single level of meta-annotations. The search for meta-annotations may be disabled.
* Similarly, the search for annotations on interfaces may optionally be enabled.
* Consult the various constructors in this class for details.
*
diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
index bf4eb349e0..d7067d8a6a 100644
--- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
+++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
@@ -58,7 +58,7 @@ import org.springframework.lang.Nullable;
*
*
* Note: a pattern and a path must both be absolute or must
- * both be relative in order for the two to match. Therefore it is recommended
+ * both be relative in order for the two to match. Therefore, it is recommended
* that users of this implementation to sanitize patterns in order to prefix
* them with "/" as it makes sense in the context in which they're used.
*
@@ -431,7 +431,7 @@ public class AntPathMatcher implements PathMatcher {
}
/**
- * Test whether or not a string matches against a pattern.
+ * Test whether a string matches against a pattern.
* @param pattern the pattern to match against (never {@code null})
* @param str the String which must be matched against the pattern (never {@code null})
* @return {@code true} if the string matches against the pattern, or {@code false} otherwise
@@ -640,7 +640,7 @@ public class AntPathMatcher implements PathMatcher {
/**
- * Tests whether or not a string matches against a pattern via a {@link Pattern}.
+ * Tests whether a string matches against a pattern via a {@link Pattern}.
* The pattern may contain special characters: '*' means zero or more characters; '?' means one and
* only one character; '{' and '}' indicate a URI template pattern. For example /users/{user}.
*/
diff --git a/spring-core/src/main/java/org/springframework/util/Assert.java b/spring-core/src/main/java/org/springframework/util/Assert.java
index fd84179393..786b9b9463 100644
--- a/spring-core/src/main/java/org/springframework/util/Assert.java
+++ b/spring-core/src/main/java/org/springframework/util/Assert.java
@@ -636,17 +636,17 @@ public abstract class Assert {
/**
* Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
* Designed for use as a base class, with the subclass invoking
* the {@link #beforeAccess()} and {@link #afterAccess()} methods at
* appropriate points of its workflow. Note that {@code afterAccess}
- * should usually be called in a finally block!
+ * should usually be called in a {@code finally} block!
*
* The default concurrency limit of this support class is -1
* ("unbounded concurrency"). Subclasses may override this default;
diff --git a/spring-core/src/main/java/org/springframework/util/FastByteArrayOutputStream.java b/spring-core/src/main/java/org/springframework/util/FastByteArrayOutputStream.java
index d52e336e11..28fc2fff92 100644
--- a/spring-core/src/main/java/org/springframework/util/FastByteArrayOutputStream.java
+++ b/spring-core/src/main/java/org/springframework/util/FastByteArrayOutputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,11 +32,11 @@ import org.springframework.lang.Nullable;
* its sibling {@link ResizableByteArrayOutputStream}.
*
* Unlike {@link java.io.ByteArrayOutputStream}, this implementation is backed
- * by an {@link java.util.ArrayDeque} of {@code byte[]} instead of 1 constantly
+ * by a {@link java.util.ArrayDeque} of {@code byte[]} instead of 1 constantly
* resizing {@code byte[]}. It does not copy buffers when it gets expanded.
*
* The initial buffer is only created when the stream is first written.
- * There is also no copying of the internal buffer if its contents is extracted
+ * There is also no copying of the internal buffer if its content is extracted
* with the {@link #writeTo(OutputStream)} method.
*
* @author Craig Andrews
@@ -177,10 +177,11 @@ public class FastByteArrayOutputStream extends OutputStream {
/**
* Convert the stream's data to a byte array and return the byte array.
- * Also replaces the internal structures with the byte array to conserve memory:
- * if the byte array is being made anyways, mind as well as use it. This approach
- * also means that if this method is called twice without any writes in between,
- * the second call is a no-op.
+ * Also replaces the internal structures with the byte array to
+ * conserve memory: if the byte array is being created anyway, we might
+ * as well as use it. This approach also means that if this method is
+ * called twice without any writes in the interim, the second call is
+ * a no-op.
* This method is "unsafe" as it returns the internal buffer.
* Callers should not modify the returned buffer.
* @return the current contents of this output stream, as a byte array.
@@ -197,11 +198,10 @@ public class FastByteArrayOutputStream extends OutputStream {
}
/**
- * Creates a newly allocated byte array.
- * Its size is the current
- * size of this output stream and the valid contents of the buffer
- * have been copied into it. Its size is the current size of this output stream, and it will
+ * contain the valid contents of the internal buffer.
+ * @return the current contents of this output stream, as a byte array
* @see #size()
* @see #toByteArrayUnsafe()
*/
diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java
index cf6010a4e5..d428886082 100644
--- a/spring-core/src/main/java/org/springframework/util/MimeType.java
+++ b/spring-core/src/main/java/org/springframework/util/MimeType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/spring-core/src/main/java/org/springframework/util/StringUtils.java b/spring-core/src/main/java/org/springframework/util/StringUtils.java
index 33a8249fc6..9703204ef0 100644
--- a/spring-core/src/main/java/org/springframework/util/StringUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/StringUtils.java
@@ -1165,7 +1165,7 @@ public abstract class StringUtils {
* {@code String} array.
* A single {@code delimiter} may consist of more than one character,
* but it will still be considered as a single delimiter string, rather
- * than as bunch of potential delimiter characters, in contrast to
+ * than as a bunch of potential delimiter characters, in contrast to
* {@link #tokenizeToStringArray}.
* @param str the input {@code String} (potentially {@code null} or empty)
* @param delimiter the delimiter between elements (this is a single delimiter,
@@ -1182,7 +1182,7 @@ public abstract class StringUtils {
* a {@code String} array.
* A single {@code delimiter} may consist of more than one character,
* but it will still be considered as a single delimiter string, rather
- * than as bunch of potential delimiter characters, in contrast to
+ * than as a bunch of potential delimiter characters, in contrast to
* {@link #tokenizeToStringArray}.
* @param str the input {@code String} (potentially {@code null} or empty)
* @param delimiter the delimiter between elements (this is a single delimiter,
diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java
index e2a016cc6c..627addbf30 100644
--- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java
+++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java
@@ -23,7 +23,7 @@ import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
- * Helper class for {@link ListenableFuture} implementations that maintains a
+ * Helper class for {@link ListenableFuture} implementations that maintains a queue
* of success and failure callbacks and helps to notify them.
*
* Inspired by {@code com.google.common.util.concurrent.ExecutionList}.
diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxHandler.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxHandler.java
index 4a72e5018c..4a4c443e21 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxHandler.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxHandler.java
@@ -35,7 +35,7 @@ import org.springframework.lang.Nullable;
/**
* Abstract base class for SAX {@code ContentHandler} and {@code LexicalHandler}
* implementations that use StAX as a basis. All methods delegate to internal template
- * methods, capable of throwing a {@code XMLStreamException}. Additionally, an namespace
+ * methods, capable of throwing a {@code XMLStreamException}. Additionally, a namespace
* context stack is used to keep track of declared namespaces.
*
* @author Arjen Poutsma
diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java
index 520ab1008e..3cf3108db6 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java
@@ -109,7 +109,7 @@ abstract class AbstractXMLReader implements XMLReader {
/**
* This implementation throws a {@code SAXNotRecognizedException} exception
- * for any feature outside of the "http://xml.org/sax/features/" namespace
+ * for any feature outside the "http://xml.org/sax/features/" namespace
* and returns {@code false} for any feature within.
*/
@Override
@@ -124,7 +124,7 @@ abstract class AbstractXMLReader implements XMLReader {
/**
* This implementation throws a {@code SAXNotRecognizedException} exception
- * for any feature outside of the "http://xml.org/sax/features/" namespace
+ * for any feature outside the "http://xml.org/sax/features/" namespace
* and accepts a {@code false} value for any feature within.
*/
@Override
diff --git a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java
index 7b1ba92bfb..67d37d5e5f 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java
@@ -36,7 +36,7 @@ import org.springframework.lang.Nullable;
/**
* Implementation of the {@link javax.xml.stream.XMLStreamReader} interface that wraps a
* {@link XMLEventReader}. Useful because the StAX {@link javax.xml.stream.XMLInputFactory}
- * allows one to create a event reader from a stream reader, but not vice-versa.
+ * allows one to create an event reader from a stream reader, but not vice-versa.
*
* @author Arjen Poutsma
* @since 3.0
diff --git a/spring-core/src/main/java/org/springframework/util/xml/XmlValidationModeDetector.java b/spring-core/src/main/java/org/springframework/util/xml/XmlValidationModeDetector.java
index 869f9ca051..1248ab0b39 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/XmlValidationModeDetector.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/XmlValidationModeDetector.java
@@ -75,7 +75,7 @@ public class XmlValidationModeDetector {
/**
- * Indicates whether or not the current parse position is inside an XML comment.
+ * Indicates whether the current parse position is inside an XML comment.
*/
private boolean inComment;
diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
index ac669cb1ba..ffd4bb4396 100644
--- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
+++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
@@ -417,7 +417,7 @@ class AnnotationUtilsTests {
// inherited class-level annotation; note: @Transactional is inherited
assertThat(isAnnotationInherited(Transactional.class, InheritedAnnotationInterface.class)).isFalse();
// isAnnotationInherited() does not currently traverse interface hierarchies.
- // Thus the following, though perhaps counter intuitive, must be false:
+ // Thus the following, though perhaps counterintuitive, must be false:
assertThat(isAnnotationInherited(Transactional.class, SubInheritedAnnotationInterface.class)).isFalse();
assertThat(isAnnotationInherited(Transactional.class, InheritedAnnotationClass.class)).isFalse();
assertThat(isAnnotationInherited(Transactional.class, SubInheritedAnnotationClass.class)).isTrue();
diff --git a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java
index cf6469caa3..0b78f39e37 100644
--- a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java
+++ b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java
@@ -1275,7 +1275,7 @@ class MergedAnnotationsTests {
SearchStrategy.INHERITED_ANNOTATIONS).get(
Transactional.class).getAggregateIndex()).isEqualTo(0);
// Since we're not traversing interface hierarchies the following,
- // though perhaps counter intuitive, must be false:
+ // though perhaps counterintuitive, must be false:
assertThat(MergedAnnotations.from(SubInheritedAnnotationInterface.class,
SearchStrategy.INHERITED_ANNOTATIONS).get(
Transactional.class).getAggregateIndex()).isEqualTo(-1);
diff --git a/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java
index 4e781345df..69654757ed 100644
--- a/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java
+++ b/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java
@@ -59,7 +59,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* Unit tests for {@link DefaultConversionService}.
*
* In this package for enforcing accessibility checks to non-public classes outside
- * of the {@code org.springframework.core.convert.support} implementation package.
+ * the {@code org.springframework.core.convert.support} implementation package.
* Only in such a scenario, {@code setAccessible(true)} is actually necessary.
*
* @author Keith Donald
diff --git a/spring-core/src/test/java/org/springframework/util/AssertTests.java b/spring-core/src/test/java/org/springframework/util/AssertTests.java
index d29bac8e46..603dbffebc 100644
--- a/spring-core/src/test/java/org/springframework/util/AssertTests.java
+++ b/spring-core/src/test/java/org/springframework/util/AssertTests.java
@@ -645,7 +645,7 @@ class AssertTests {
void isAssignableWithNullSupertype() {
assertThatIllegalArgumentException().isThrownBy(() ->
Assert.isAssignable(null, Integer.class, "enigma"))
- .withMessageContaining("Super type to check against must not be null");
+ .withMessageContaining("Supertype to check against must not be null");
}
@Test
@@ -692,7 +692,7 @@ class AssertTests {
void isAssignableWithNullSupertypeAndMessageSupplier() {
assertThatIllegalArgumentException().isThrownBy(() ->
Assert.isAssignable(null, Integer.class, () -> "enigma"))
- .withMessageContaining("Super type to check against must not be null");
+ .withMessageContaining("Supertype to check against must not be null");
}
@Test
diff --git a/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java
index 5804d93fa8..cbd00f32f6 100644
--- a/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java
+++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java
@@ -85,7 +85,7 @@ public abstract class AbstractDecoderTestsLimitations
*
* This abstraction is not intended to expose the full power of underlying command line
- * parsing APIs such as JOpt or Commons CLI. It's intent is rather just the opposite: to
+ * parsing APIs such as JOpt or Commons CLI. Its intent is rather just the opposite: to
* provide the simplest possible abstraction for accessing command line arguments
* after they have been parsed. So the typical case will involve fully configuring
* the underlying command line parsing API, parsing the {@code String[]} of arguments
@@ -246,7 +246,7 @@ public abstract class CommandLinePropertySourceAssert.isAssignable(Number.class, myClass, "Number expected");
- * @param superType the super type to check against
- * @param subType the sub type to check
+ * @param superType the supertype to check against
+ * @param subType the subtype to check
* @param message a message which will be prepended to provide further context.
* If it is empty or ends in ":" or ";" or "," or ".", a full exception message
- * will be appended. If it ends in a space, the name of the offending sub type
+ * will be appended. If it ends in a space, the name of the offending subtype
* will be appended. In any other case, a ":" with a space and the name of the
- * offending sub type will be appended.
+ * offending subtype will be appended.
* @throws IllegalArgumentException if the classes are not assignable
*/
public static void isAssignable(Class> superType, @Nullable Class> subType, String message) {
- notNull(superType, "Super type to check against must not be null");
+ notNull(superType, "Supertype to check against must not be null");
if (subType == null || !superType.isAssignableFrom(subType)) {
assignableCheckFailed(superType, subType, message);
}
@@ -657,15 +657,15 @@ public abstract class Assert {
*
* Assert.isAssignable(Number.class, myClass, () -> "Processing " + myAttributeName + ":");
*
- * @param superType the super type to check against
- * @param subType the sub type to check
+ * @param superType the supertype to check against
+ * @param subType the subtype to check
* @param messageSupplier a supplier for the exception message to use if the
* assertion fails. See {@link #isAssignable(Class, Class, String)} for details.
* @throws IllegalArgumentException if the classes are not assignable
* @since 5.0
*/
public static void isAssignable(Class> superType, @Nullable Class> subType, SupplierAssert.isAssignable(Number.class, myClass);
- * @param superType the super type to check
- * @param subType the sub type to check
+ * @param superType the supertype to check
+ * @param subType the subtype to check
* @throws IllegalArgumentException if the classes are not assignable
*/
public static void isAssignable(Class> superType, Class> subType) {
diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java
index 58fd12bdbd..6d7d272b4f 100644
--- a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java
+++ b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java
@@ -29,7 +29,7 @@ import org.apache.commons.logging.LogFactory;
*
*
*
*
*
*
*