Fix and improve Javadoc in spring-context
Closes gh-28802
This commit is contained in:
parent
bc15f839cd
commit
c48c5e7691
|
@ -19,7 +19,7 @@ package org.springframework.context.index.sample;
|
||||||
import org.springframework.stereotype.Component;
|
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
|
* @author Stephane Nicoll
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -235,7 +235,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
|
||||||
* {@code CacheResolver} from a custom {@code CacheResolver} implementation so we have to
|
* {@code CacheResolver} from a custom {@code CacheResolver} implementation so we have to
|
||||||
* fall back on the {@code CacheManager}.
|
* fall back on the {@code CacheManager}.
|
||||||
* <p>This gives this weird situation of a perfectly valid configuration that breaks all
|
* <p>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
|
* exception {@code CacheResolver} as late as possible to avoid such hard requirement
|
||||||
* in other cases.
|
* in other cases.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||||
/**
|
/**
|
||||||
* Cache decorator which synchronizes its {@link #put}, {@link #evict} and
|
* Cache decorator which synchronizes its {@link #put}, {@link #evict} and
|
||||||
* {@link #clear} operations with Spring-managed transactions (through Spring's
|
* {@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
|
* put/evict/clear operation only in the after-commit phase of a successful
|
||||||
* transaction. If no transaction is active, {@link #put}, {@link #evict} and
|
* transaction. If no transaction is active, {@link #put}, {@link #evict} and
|
||||||
* {@link #clear} operations will be performed immediately, as usual.
|
* {@link #clear} operations will be performed immediately, as usual.
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||||
/**
|
/**
|
||||||
* Proxy for a target {@link CacheManager}, exposing transaction-aware {@link Cache} objects
|
* Proxy for a target {@link CacheManager}, exposing transaction-aware {@link Cache} objects
|
||||||
* which synchronize their {@link Cache#put} operations with Spring-managed transactions
|
* 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.
|
* 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.
|
* If no transaction is active, {@link Cache#put} operations will be performed immediately, as usual.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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.
|
* with the option to add or override specific entries.
|
||||||
* <p>Useful for specifying entries directly, for example via
|
* <p>Useful for specifying entries directly, for example via
|
||||||
* "javaMailProperties[mail.smtp.auth]".
|
* {code javaMailProperties[mail.smtp.auth]}.
|
||||||
*/
|
*/
|
||||||
public Properties getJavaMailProperties() {
|
public Properties getJavaMailProperties() {
|
||||||
return this.javaMailProperties;
|
return this.javaMailProperties;
|
||||||
|
@ -156,7 +156,7 @@ public class JavaMailSenderImpl implements JavaMailSender {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the JavaMail {@code Session},
|
* 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() {
|
public synchronized Session getSession() {
|
||||||
if (this.session == null) {
|
if (this.session == null) {
|
||||||
|
|
|
@ -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.
|
* get re-executed if a 'recovery' or 'fail-over' situation is encountered.
|
||||||
*/
|
*/
|
||||||
public void setRequestsRecovery(boolean requestsRecovery) {
|
public void setRequestsRecovery(boolean requestsRecovery) {
|
||||||
|
|
|
@ -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
|
* The behavior when one does not want concurrent jobs to be executed is
|
||||||
* realized through adding the {@code @PersistJobDataAfterExecution} and
|
* realized through adding the {@code @PersistJobDataAfterExecution} and
|
||||||
* {@code @DisallowConcurrentExecution} markers.
|
* {@code @DisallowConcurrentExecution} markers.
|
||||||
|
@ -286,7 +286,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of the MethodInvokingJob, implementing the StatefulJob interface.
|
* 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.
|
* won't let jobs interfere with each other.
|
||||||
*/
|
*/
|
||||||
@PersistJobDataAfterExecution
|
@PersistJobDataAfterExecution
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.springframework.beans.PropertyAccessorFactory;
|
||||||
* <p><b>Note that the preferred way to apply dependency injection
|
* <p><b>Note that the preferred way to apply dependency injection
|
||||||
* to Job instances is via a JobFactory:</b> that is, to specify
|
* to Job instances is via a JobFactory:</b> that is, to specify
|
||||||
* {@link SpringBeanJobFactory} as Quartz JobFactory (typically via
|
* {@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
|
* This allows to implement dependency-injected Quartz Jobs without
|
||||||
* a dependency on Spring base classes.
|
* a dependency on Spring base classes.
|
||||||
*
|
*
|
||||||
|
|
|
@ -354,7 +354,7 @@ public abstract class AbstractJCacheAnnotationTests {
|
||||||
|
|
||||||
assertThatNullPointerException().isThrownBy(() ->
|
assertThatNullPointerException().isThrownBy(() ->
|
||||||
service.earlyRemoveWithException(this.keyItem, false));
|
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();
|
assertThat(cache.get(key)).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ public abstract class AbstractJCacheAnnotationTests {
|
||||||
|
|
||||||
assertThatNullPointerException().isThrownBy(() ->
|
assertThatNullPointerException().isThrownBy(() ->
|
||||||
service.earlyRemoveAllWithException(false));
|
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();
|
assertThat(isEmpty(cache)).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of {@link CachingConfigurer} with empty methods allowing
|
* 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
|
* @author Stephane Nicoll
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
|
||||||
/**
|
/**
|
||||||
* Validates the specified {@link CacheOperation}.
|
* Validates the specified {@link CacheOperation}.
|
||||||
* <p>Throws an {@link IllegalStateException} if the state of the operation is
|
* <p>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.
|
* that the operation is in a proper state before being returned.
|
||||||
* @param ae the annotated element of the cache operation
|
* @param ae the annotated element of the cache operation
|
||||||
* @param operation the {@link CacheOperation} to validate
|
* @param operation the {@link CacheOperation} to validate
|
||||||
|
|
|
@ -35,7 +35,7 @@ import org.springframework.lang.Nullable;
|
||||||
* are present.
|
* are present.
|
||||||
*
|
*
|
||||||
* <p>To limit the creation of objects, an ugly constructor is used
|
* <p>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 Costin Leau
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.springframework.lang.Nullable;
|
||||||
*
|
*
|
||||||
* <p>Transparently replaces given {@code null} user values with an internal
|
* <p>Transparently replaces given {@code null} user values with an internal
|
||||||
* {@link NullValue#INSTANCE}, if configured to support {@code null} values
|
* {@link NullValue#INSTANCE}, if configured to support {@code null} values
|
||||||
* (as indicated by {@link #isAllowNullValues()}.
|
* (as indicated by {@link #isAllowNullValues()}).
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 4.2.2
|
* @since 4.2.2
|
||||||
|
|
|
@ -94,7 +94,7 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
|
||||||
/**
|
/**
|
||||||
* Expose AutowireCapableBeanFactory functionality for this context.
|
* Expose AutowireCapableBeanFactory functionality for this context.
|
||||||
* <p>This is not typically used by application code, except for the purpose of
|
* <p>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.
|
* applying the Spring bean lifecycle (fully or partly) to them.
|
||||||
* <p>Alternatively, the internal BeanFactory exposed by the
|
* <p>Alternatively, the internal BeanFactory exposed by the
|
||||||
* {@link ConfigurableApplicationContext} interface offers access to the
|
* {@link ConfigurableApplicationContext} interface offers access to the
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.springframework.jmx.support.RegistrationPolicy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables default exporting of all standard {@code MBean}s from the Spring context, as
|
* 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.
|
||||||
*
|
*
|
||||||
* <p>The resulting {@link org.springframework.jmx.export.MBeanExporter MBeanExporter}
|
* <p>The resulting {@link org.springframework.jmx.export.MBeanExporter MBeanExporter}
|
||||||
* bean is defined under the name "mbeanExporter". Alternatively, consider defining a
|
* bean is defined under the name "mbeanExporter". Alternatively, consider defining a
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
* <p>If Role is present on a {@link Configuration @Configuration} class,
|
* <p>If Role is present on a {@link Configuration @Configuration} class,
|
||||||
* this indicates the role of the configuration class bean definition and
|
* this indicates the role of the configuration class bean definition and
|
||||||
* does not cascade to all @{@code Bean} methods defined within. This behavior
|
* 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
|
* @author Chris Beams
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
|
|
|
@ -295,7 +295,7 @@ public final class LocaleContextHolder {
|
||||||
* <p>Note: This method has a fallback to the shared default TimeZone,
|
* <p>Note: This method has a fallback to the shared default TimeZone,
|
||||||
* either at the framework level or at the JVM-wide system level.
|
* either at the framework level or at the JVM-wide system level.
|
||||||
* If you'd like to check for the raw LocaleContext content
|
* 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()}
|
* {@link #getLocaleContext()} and call {@link TimeZoneAwareLocaleContext#getTimeZone()}
|
||||||
* after downcasting to {@link TimeZoneAwareLocaleContext}.
|
* after downcasting to {@link TimeZoneAwareLocaleContext}.
|
||||||
* @return the current TimeZone, or the system default TimeZone if no
|
* @return the current TimeZone, or the system default TimeZone if no
|
||||||
|
|
|
@ -64,7 +64,7 @@ import org.springframework.util.StringUtils;
|
||||||
* "WEB-INF/messages_en.xml" etc. Note that message definitions in a <i>previous</i>
|
* "WEB-INF/messages_en.xml" etc. Note that message definitions in a <i>previous</i>
|
||||||
* resource bundle will override ones in a later bundle, due to sequential lookup.
|
* resource bundle will override ones in a later bundle, due to sequential lookup.
|
||||||
|
|
||||||
* <p>This MessageSource can easily be used outside of an
|
* <p>This MessageSource can easily be used outside an
|
||||||
* {@link org.springframework.context.ApplicationContext}: it will use a
|
* {@link org.springframework.context.ApplicationContext}: it will use a
|
||||||
* {@link org.springframework.core.io.DefaultResourceLoader} as default,
|
* {@link org.springframework.core.io.DefaultResourceLoader} as default,
|
||||||
* simply getting overridden with the ApplicationContext's resource loader
|
* simply getting overridden with the ApplicationContext's resource loader
|
||||||
|
@ -156,7 +156,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased
|
||||||
* <p>The default is a DefaultResourceLoader. Will get overridden by the
|
* <p>The default is a DefaultResourceLoader. Will get overridden by the
|
||||||
* ApplicationContext if running in a context, as it implements the
|
* ApplicationContext if running in a context, as it implements the
|
||||||
* ResourceLoaderAware interface. Can be manually overridden when
|
* 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.core.io.DefaultResourceLoader
|
||||||
* @see org.springframework.context.ResourceLoaderAware
|
* @see org.springframework.context.ResourceLoaderAware
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -102,7 +102,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
|
* server-agnostic weaver. This non-failure logic is required since
|
||||||
* determining a load-time weaver based on the ClassLoader name alone may
|
* determining a load-time weaver based on the ClassLoader name alone may
|
||||||
* legitimately fail due to other mismatches.
|
* legitimately fail due to other mismatches.
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class DateFormatter implements Formatter<Date> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify whether or not parsing is to be lenient. Default is false.
|
* Specify whether parsing is to be lenient. Default is {@code false}.
|
||||||
* <p>With lenient parsing, the parser may allow inputs that do not precisely match the format.
|
* <p>With lenient parsing, the parser may allow inputs that do not precisely match the format.
|
||||||
* With strict parsing, inputs must match the format exactly.
|
* With strict parsing, inputs must match the format exactly.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -37,7 +37,7 @@ public abstract class AbstractNumberFormatter implements Formatter<Number> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify whether or not parsing is to be lenient. Default is false.
|
* Specify whether parsing is to be lenient. Default is {@code false}.
|
||||||
* <p>With lenient parsing, the parser may allow inputs that do not precisely match the format.
|
* <p>With lenient parsing, the parser may allow inputs that do not precisely match the format.
|
||||||
* With strict parsing, inputs must match the format exactly.
|
* With strict parsing, inputs must match the format exactly.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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.
|
* with the option to add or override specific entries.
|
||||||
* <p>Useful for specifying entries directly, for example via
|
* <p>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.
|
* adding or overriding entries in child bean definitions.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -189,9 +189,9 @@ public class MBeanClientInterceptor
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether or not the proxy should connect to the {@code MBeanServer}
|
* Set whether the proxy should connect to the {@code MBeanServer}
|
||||||
* at creation time ("true") or the first time it is invoked ("false").
|
* at creation time ({@code true}) or the first time it is invoked
|
||||||
* Default is "true".
|
* ({@code false}). Default is {@code true}.
|
||||||
*/
|
*/
|
||||||
public void setConnectOnStartup(boolean connectOnStartup) {
|
public void setConnectOnStartup(boolean connectOnStartup) {
|
||||||
this.connectOnStartup = connectOnStartup;
|
this.connectOnStartup = connectOnStartup;
|
||||||
|
@ -199,7 +199,7 @@ public class MBeanClientInterceptor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether to refresh the MBeanServer connection on connect failure.
|
* Set whether to refresh the MBeanServer connection on connect failure.
|
||||||
* Default is "false".
|
* Default is {@code false}.
|
||||||
* <p>Can be turned on to allow for hot restart of the JMX server,
|
* <p>Can be turned on to allow for hot restart of the JMX server,
|
||||||
* automatically reconnecting and retrying in case of an IOException.
|
* automatically reconnecting and retrying in case of an IOException.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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.
|
* with the option to add or override specific entries.
|
||||||
* <p>Useful for specifying entries directly, for example via
|
* <p>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.
|
* adding or overriding entries in child bean definitions.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -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
|
* {@link Thread#getContextClassLoader() thread context ClassLoader} before
|
||||||
* allowing any invocations on the MBean to occur.
|
* allowing any invocations on the MBean to occur.
|
||||||
* <p>The default value is {@code true}, exposing a {@link SpringModelMBean}
|
* <p>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}. The actual implementation of the
|
||||||
* {@code ModelMBean} interface used depends on the implementation of
|
* {@code ModelMBean} interface used depends on the implementation of
|
||||||
* the {@code ModelMBeanProvider} interface that is configured. By
|
* 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.
|
* all JMX implementations is used.
|
||||||
* <p>The management interface produced for each bean is dependent on the
|
* <p>The management interface produced for each bean is dependent on the
|
||||||
* {@code MBeanInfoAssembler} implementation being used. 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) {
|
private boolean isExcluded(String beanName) {
|
||||||
return (this.excludedBeans.contains(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
|
* 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 beanClass the class of the bean
|
||||||
* @param beanName the name of the bean
|
* @param beanName the name of the bean
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class UnableToRegisterMBeanException extends MBeanExportException {
|
||||||
* Create a new {@code UnableToRegisterMBeanException} with the
|
* Create a new {@code UnableToRegisterMBeanException} with the
|
||||||
* specified error message and root cause.
|
* specified error message and root cause.
|
||||||
* @param msg the detail message
|
* @param msg the detail message
|
||||||
* @param cause the root caus
|
* @param cause the root cause
|
||||||
*/
|
*/
|
||||||
public UnableToRegisterMBeanException(String msg, Throwable cause) {
|
public UnableToRegisterMBeanException(String msg, Throwable cause) {
|
||||||
super(msg, cause);
|
super(msg, cause);
|
||||||
|
|
|
@ -43,7 +43,7 @@ import org.springframework.lang.Nullable;
|
||||||
*
|
*
|
||||||
* <p>The logic for creating MBean metadata from the reflective metadata
|
* <p>The logic for creating MBean metadata from the reflective metadata
|
||||||
* is contained in this class, but this class makes no decisions as to
|
* 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
|
* subclasses a chance to 'vote' on each property or method through
|
||||||
* the {@code includeXXX} methods.
|
* the {@code includeXXX} methods.
|
||||||
*
|
*
|
||||||
|
@ -177,7 +177,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
|
||||||
private Integer defaultCurrencyTimeLimit;
|
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;
|
private boolean useStrictCasing = true;
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for autodetection of beans. Checks to see if the bean's class has a
|
* 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 beanClass the class of the bean
|
||||||
* @param beanName the name of the bean in the bean factory
|
* @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
|
* 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
|
* 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
|
* 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.
|
* resolve any {@code int} valued descriptor where there are two possible values.
|
||||||
* @param getter the int value associated with the getter for this attribute
|
* @param getter the int value associated with the getter for this attribute
|
||||||
|
|
|
@ -35,7 +35,7 @@ public interface JmxAttributeSource {
|
||||||
/**
|
/**
|
||||||
* Implementations should return an instance of {@code ManagedResource}
|
* Implementations should return an instance of {@code ManagedResource}
|
||||||
* if the supplied {@code Class} has the appropriate metadata.
|
* 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
|
* @param clazz the class to read the attribute data from
|
||||||
* @return the attribute, or {@code null} if not found
|
* @return the attribute, or {@code null} if not found
|
||||||
* @throws InvalidMetadataException in case of invalid attributes
|
* @throws InvalidMetadataException in case of invalid attributes
|
||||||
|
@ -46,7 +46,7 @@ public interface JmxAttributeSource {
|
||||||
/**
|
/**
|
||||||
* Implementations should return an instance of {@code ManagedAttribute}
|
* Implementations should return an instance of {@code ManagedAttribute}
|
||||||
* if the supplied {@code Method} has the corresponding metadata.
|
* 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
|
* @param method the method to read the attribute data from
|
||||||
* @return the attribute, or {@code null} if not found
|
* @return the attribute, or {@code null} if not found
|
||||||
* @throws InvalidMetadataException in case of invalid attributes
|
* @throws InvalidMetadataException in case of invalid attributes
|
||||||
|
@ -57,7 +57,7 @@ public interface JmxAttributeSource {
|
||||||
/**
|
/**
|
||||||
* Implementations should return an instance of {@code ManagedMetric}
|
* Implementations should return an instance of {@code ManagedMetric}
|
||||||
* if the supplied {@code Method} has the corresponding metadata.
|
* 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
|
* @param method the method to read the attribute data from
|
||||||
* @return the metric, or {@code null} if not found
|
* @return the metric, or {@code null} if not found
|
||||||
* @throws InvalidMetadataException in case of invalid attributes
|
* @throws InvalidMetadataException in case of invalid attributes
|
||||||
|
@ -68,7 +68,7 @@ public interface JmxAttributeSource {
|
||||||
/**
|
/**
|
||||||
* Implementations should return an instance of {@code ManagedOperation}
|
* Implementations should return an instance of {@code ManagedOperation}
|
||||||
* if the supplied {@code Method} has the corresponding metadata.
|
* 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
|
* @param method the method to read the attribute data from
|
||||||
* @return the attribute, or {@code null} if not found
|
* @return the attribute, or {@code null} if not found
|
||||||
* @throws InvalidMetadataException in case of invalid attributes
|
* @throws InvalidMetadataException in case of invalid attributes
|
||||||
|
@ -78,7 +78,7 @@ public interface JmxAttributeSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementations should return an array of {@code ManagedOperationParameter}
|
* 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.
|
* should return an empty array if no metadata is found.
|
||||||
* @param method the {@code Method} to read the metadata from
|
* @param method the {@code Method} to read the metadata from
|
||||||
* @return the parameter information.
|
* @return the parameter information.
|
||||||
|
@ -88,7 +88,7 @@ public interface JmxAttributeSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementations should return an array of {@link ManagedNotification ManagedNotifications}
|
* 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.
|
* should return an empty array.
|
||||||
* @param clazz the {@code Class} to read the metadata from
|
* @param clazz the {@code Class} to read the metadata from
|
||||||
* @return the notification information
|
* @return the notification information
|
||||||
|
|
|
@ -32,7 +32,7 @@ import javax.management.Notification;
|
||||||
* <p>Each managed resource instance will have a distinct instance of a
|
* <p>Each managed resource instance will have a distinct instance of a
|
||||||
* {@code NotificationPublisher} implementation. This instance will keep
|
* {@code NotificationPublisher} implementation. This instance will keep
|
||||||
* track of all the {@link javax.management.NotificationListener NotificationListeners}
|
* track of all the {@link javax.management.NotificationListener NotificationListeners}
|
||||||
* registered for a particular mananaged resource.
|
* registered for a particular managed resource.
|
||||||
*
|
*
|
||||||
* <p>Any existing, user-defined MBeans should use standard JMX APIs for notification
|
* <p>Any existing, user-defined MBeans should use standard JMX APIs for notification
|
||||||
* publication; this interface is intended for use only by Spring-created MBeans.
|
* publication; this interface is intended for use only by Spring-created MBeans.
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class MBeanServerFactoryBean implements FactoryBean<MBeanServer>, Initial
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether or not the {@code MBeanServerFactoryBean} should attempt
|
* Set whether the {@code MBeanServerFactoryBean} should attempt
|
||||||
* to locate a running {@code MBeanServer} before creating one.
|
* to locate a running {@code MBeanServer} before creating one.
|
||||||
* <p>Default is {@code false}.
|
* <p>Default is {@code false}.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -54,7 +54,7 @@ import org.springframework.util.ClassUtils;
|
||||||
* a "proxyInterface" in such a scenario, since the actual JNDI object type is not
|
* a "proxyInterface" in such a scenario, since the actual JNDI object type is not
|
||||||
* known in advance.
|
* known in advance.
|
||||||
*
|
*
|
||||||
* <p>Of course, bean classes in a Spring environment may lookup e.g. a DataSource
|
* <p>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
|
* from JNDI themselves. This class simply enables central configuration of the
|
||||||
* JNDI name, and easy switching to non-JNDI alternatives. The latter is
|
* JNDI name, and easy switching to non-JNDI alternatives. The latter is
|
||||||
* particularly convenient for test setups, reuse in standalone clients, etc.
|
* particularly convenient for test setups, reuse in standalone clients, etc.
|
||||||
|
|
|
@ -47,7 +47,7 @@ import org.springframework.lang.Nullable;
|
||||||
* Java EE application's "java:comp/env/" namespace. It caches the resolved
|
* Java EE application's "java:comp/env/" namespace. It caches the resolved
|
||||||
* types for all obtained objects, and optionally also caches shareable
|
* types for all obtained objects, and optionally also caches shareable
|
||||||
* objects (if they are explicitly marked as
|
* objects (if they are explicitly marked as
|
||||||
* {@link #addShareableResource shareable resource}.
|
* {@link #addShareableResource shareable resource}).
|
||||||
*
|
*
|
||||||
* <p>The main intent of this factory is usage in combination with Spring's
|
* <p>The main intent of this factory is usage in combination with Spring's
|
||||||
* {@link org.springframework.context.annotation.CommonAnnotationBeanPostProcessor},
|
* {@link org.springframework.context.annotation.CommonAnnotationBeanPostProcessor},
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class SchedulingException extends NestedRuntimeException {
|
||||||
/**
|
/**
|
||||||
* Constructor for SchedulingException.
|
* Constructor for SchedulingException.
|
||||||
* @param msg the detail message
|
* @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)
|
* scheduling API such as Quartz)
|
||||||
*/
|
*/
|
||||||
public SchedulingException(String msg, Throwable cause) {
|
public SchedulingException(String msg, Throwable cause) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ public interface SchedulingTaskExecutor extends AsyncTaskExecutor {
|
||||||
* individual subtasks which submit a follow-up task afterwards (if feasible).
|
* individual subtasks which submit a follow-up task afterwards (if feasible).
|
||||||
* <p>This should be considered a hint. Of course {@code TaskExecutor} clients
|
* <p>This should be considered a hint. Of course {@code TaskExecutor} clients
|
||||||
* are free to ignore this flag and hence the {@code SchedulingTaskExecutor}
|
* 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.
|
* for short-lived tasks, allowing for more fine-grained scheduling.
|
||||||
* @return {@code true} if this executor prefers short-lived tasks (the default),
|
* @return {@code true} if this executor prefers short-lived tasks (the default),
|
||||||
* {@code false} otherwise (for treatment like a regular {@code TaskExecutor})
|
* {@code false} otherwise (for treatment like a regular {@code TaskExecutor})
|
||||||
|
|
|
@ -24,7 +24,8 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that marks a method as a candidate for <i>asynchronous</i> execution.
|
* Annotation that marks a method as a candidate for <i>asynchronous</i> execution.
|
||||||
* Can also be used at the type level, in which case all of the type's methods are
|
*
|
||||||
|
* <p>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
|
* considered as asynchronous. Note, however, that {@code @Async} is not supported
|
||||||
* on methods declared within a
|
* on methods declared within a
|
||||||
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.springframework.util.function.SingletonSupplier;
|
||||||
* behavior to any bean that carries the {@link Async} annotation at class or
|
* behavior to any bean that carries the {@link Async} annotation at class or
|
||||||
* method-level by adding a corresponding {@link AsyncAnnotationAdvisor} to the
|
* method-level by adding a corresponding {@link AsyncAnnotationAdvisor} to the
|
||||||
* exposed proxy (either an existing AOP proxy or a newly generated proxy that
|
* 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).
|
||||||
*
|
*
|
||||||
* <p>The {@link TaskExecutor} responsible for the asynchronous execution may
|
* <p>The {@link TaskExecutor} responsible for the asynchronous execution may
|
||||||
* be provided as well as the annotation type that indicates a method should be
|
* be provided as well as the annotation type that indicates a method should be
|
||||||
|
|
|
@ -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() {
|
public static BitsCronField zeroNanos() {
|
||||||
if (zeroNanos == null) {
|
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) {
|
public static BitsCronField parseHours(String value) {
|
||||||
return BitsCronField.parseField(value, Type.HOUR);
|
return BitsCronField.parseField(value, Type.HOUR);
|
||||||
|
|
|
@ -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() {
|
public static CronField zeroNanos() {
|
||||||
return BitsCronField.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) {
|
public static CronField parseHours(String value) {
|
||||||
return BitsCronField.parseHours(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}.
|
* will return 0-31 for {@link #MONTH}.
|
||||||
* @return the range of this field
|
* @return the range of this field
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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.
|
* with their index in the list.
|
||||||
* @return a new String with the values from the list replaced
|
* @return a new String with the values from the list replaced
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware {
|
||||||
scriptSource.getScriptAsString(), actualInterfaces, this.beanClassLoader);
|
scriptSource.getScriptAsString(), actualInterfaces, this.beanClassLoader);
|
||||||
if (result instanceof Class) {
|
if (result instanceof Class) {
|
||||||
// A Class: We'll cache the Class here and create an instance
|
// 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;
|
this.scriptClass = (Class<?>) result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -254,7 +254,7 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea
|
||||||
}
|
}
|
||||||
scriptClassToExecute = this.scriptClass;
|
scriptClassToExecute = this.scriptClass;
|
||||||
|
|
||||||
// Process re-execution outside of the synchronized block.
|
// Process re-execution outside the synchronized block.
|
||||||
return executeScript(scriptSource, scriptClassToExecute);
|
return executeScript(scriptSource, scriptClassToExecute);
|
||||||
}
|
}
|
||||||
catch (CompilationFailedException ex) {
|
catch (CompilationFailedException ex) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.springframework.ui.context;
|
||||||
import org.springframework.context.MessageSource;
|
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).
|
* (e.g. CSS and image files in a web environment).
|
||||||
* The exposed {@link org.springframework.context.MessageSource} supports
|
* The exposed {@link org.springframework.context.MessageSource} supports
|
||||||
* theme-specific parameterization and internationalization.
|
* theme-specific parameterization and internationalization.
|
||||||
|
|
|
@ -59,7 +59,7 @@ import org.springframework.util.StringUtils;
|
||||||
*
|
*
|
||||||
* <p><strong>WARNING</strong>: Data binding can lead to security issues by exposing
|
* <p><strong>WARNING</strong>: Data binding can lead to security issues by exposing
|
||||||
* parts of the object graph that are not meant to be accessed or modified by
|
* 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
|
* carefully with regard to security. For more details, please refer to the dedicated
|
||||||
* sections on data binding for
|
* sections on data binding for
|
||||||
* <a href="https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc-ann-initbinder-model-design">Spring Web MVC</a> and
|
* <a href="https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc-ann-initbinder-model-design">Spring Web MVC</a> and
|
||||||
|
@ -873,7 +873,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply given property values to the target object.
|
* Apply given property values to the target object.
|
||||||
* <p>Default implementation applies all of the supplied property
|
* <p>Default implementation applies all the supplied property
|
||||||
* values as bean property values. By default, unknown fields will
|
* values as bean property values. By default, unknown fields will
|
||||||
* be ignored.
|
* be ignored.
|
||||||
* @param mpvs the property values to be bound (can be modified)
|
* @param mpvs the property values to be bound (can be modified)
|
||||||
|
|
|
@ -510,7 +510,7 @@ public class ProxyFactoryBeanTests {
|
||||||
agi = (AddedGlobalInterface) l;
|
agi = (AddedGlobalInterface) l;
|
||||||
assertThat(agi.globalsAdded() == -1).isTrue();
|
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);
|
.isNotInstanceOf(AddedGlobalInterface.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ public class ProxyFactoryBeanTests {
|
||||||
|
|
||||||
assertThatExceptionOfType(LockedException.class).isThrownBy(() -> bean1.setAge(5));
|
assertThatExceptionOfType(LockedException.class).isThrownBy(() -> bean1.setAge(5));
|
||||||
|
|
||||||
bean2.setAge(6); //do not expect LockedException"
|
bean2.setAge(6); //do not expect LockedException
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -153,7 +153,7 @@ class CommonsPool2TargetSourceTests {
|
||||||
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
|
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
|
||||||
targetSource::getTarget);
|
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]);
|
targetSource.releaseTarget(pooledInstances[9]);
|
||||||
pooledInstances[9] = targetSource.getTarget();
|
pooledInstances[9] = targetSource.getTarget();
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ class CommonsPool2TargetSourceTests {
|
||||||
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
|
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
|
||||||
targetSource::getTarget);
|
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]);
|
targetSource.releaseTarget(pooledInstances[9]);
|
||||||
pooledInstances[9] = targetSource.getTarget();
|
pooledInstances[9] = targetSource.getTarget();
|
||||||
|
|
||||||
|
|
|
@ -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.
|
* the value with a different key. This forces the method to be executed every time.
|
||||||
*/
|
*/
|
||||||
@Cacheable
|
@Cacheable
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class ParserStrategyUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void instantiateClassWhenHasMultipleConstructorsUsesNoArgsConstructor() {
|
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);
|
MultipleConstructors instance = instantiateClass(MultipleConstructors.class);
|
||||||
assertThat(instance.usedDefaultConstructor).isTrue();
|
assertThat(instance.usedDefaultConstructor).isTrue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
/**
|
/**
|
||||||
* Tests changes introduced for SPR-8874, allowing beans of primitive types to be looked
|
* 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.
|
* 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
|
* fail because all spring beans are Objects, regardless of initial type due to the way
|
||||||
* that ObjectFactory works.
|
* that ObjectFactory works.
|
||||||
*
|
*
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class GenericApplicationListenerAdapterTests extends AbstractApplicationE
|
||||||
ResolvableType.forClassWithGenerics(GenericTestEvent.class, String.class));
|
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() {
|
public void genericListenerWildcardTypeTypeErasure() {
|
||||||
GenericTestEvent<String> stringEvent = createGenericTestEvent("test");
|
GenericTestEvent<String> stringEvent = createGenericTestEvent("test");
|
||||||
ResolvableType eventType = ResolvableType.forType(stringEvent.getClass());
|
ResolvableType eventType = ResolvableType.forType(stringEvent.getClass());
|
||||||
|
@ -138,7 +138,7 @@ public class GenericApplicationListenerAdapterTests extends AbstractApplicationE
|
||||||
ResolvableType.forClassWithGenerics(GenericTestEvent.class, String.class));
|
ResolvableType.forClassWithGenerics(GenericTestEvent.class, String.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test // Demonstrates we cant inject that event because the listener has a raw type
|
@Test // Demonstrates we cannot inject that event because the listener has a raw type
|
||||||
public void genericListenerRawTypeTypeErasure() {
|
public void genericListenerRawTypeTypeErasure() {
|
||||||
GenericTestEvent<String> stringEvent = createGenericTestEvent("test");
|
GenericTestEvent<String> stringEvent = createGenericTestEvent("test");
|
||||||
ResolvableType eventType = ResolvableType.forType(stringEvent.getClass());
|
ResolvableType eventType = ResolvableType.forType(stringEvent.getClass());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -42,7 +42,7 @@ import org.springframework.util.ReflectionUtils;
|
||||||
* configure JNDI appropriately, so that {@code new InitialContext()}
|
* configure JNDI appropriately, so that {@code new InitialContext()}
|
||||||
* will expose the required objects. Also usable for standalone applications,
|
* will expose the required objects. Also usable for standalone applications,
|
||||||
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
|
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
|
||||||
* able to use traditional Java EE data access code outside of a Java EE
|
* able to use traditional Java EE data access code outside a Java EE
|
||||||
* container.
|
* container.
|
||||||
*
|
*
|
||||||
* <p>There are various choices for DataSource implementations:
|
* <p>There are various choices for DataSource implementations:
|
||||||
|
@ -61,7 +61,7 @@ import org.springframework.util.ReflectionUtils;
|
||||||
* builder.activate();</pre>
|
* builder.activate();</pre>
|
||||||
*
|
*
|
||||||
* Note that it's impossible to activate multiple builders within the same JVM,
|
* 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
|
* the following code to get a reference to either an already activated builder
|
||||||
* or a newly activated one:
|
* or a newly activated one:
|
||||||
*
|
*
|
||||||
|
@ -108,7 +108,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If no SimpleNamingContextBuilder is already configuring JNDI,
|
* 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.
|
* SimpleNamingContextBuilder, clear it and return it.
|
||||||
* <p>This is mainly intended for test suites that want to
|
* <p>This is mainly intended for test suites that want to
|
||||||
* reinitialize JNDI bindings from scratch repeatedly.
|
* reinitialize JNDI bindings from scratch repeatedly.
|
||||||
|
|
Loading…
Reference in New Issue