Skip to content

Commit 6a96850

Browse files
committed
Polishing
1 parent e02c23e commit 6a96850

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

spring-context/src/main/java/org/springframework/context/ApplicationContext.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -90,18 +90,22 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
9090

9191
/**
9292
* Expose AutowireCapableBeanFactory functionality for this context.
93-
* <p>This is not typically used by application code, except for the purpose
94-
* of initializing bean instances that live outside the application context,
93+
* <p>This is not typically used by application code, except for the purpose of
94+
* initializing bean instances that live outside of the application context,
9595
* applying the Spring bean lifecycle (fully or partly) to them.
9696
* <p>Alternatively, the internal BeanFactory exposed by the
9797
* {@link ConfigurableApplicationContext} interface offers access to the
98-
* AutowireCapableBeanFactory interface too. The present method mainly
99-
* serves as convenient, specific facility on the ApplicationContext
100-
* interface itself.
98+
* {@link AutowireCapableBeanFactory} interface too. The present method mainly
99+
* serves as a convenient, specific facility on the ApplicationContext interface.
100+
* <p><b>NOTE: As of 4.2, this method will consistently throw IllegalStateException
101+
* after the application context has been closed.</b> In current Spring Framework
102+
* versions, only refreshable application contexts behave that way; as of 4.2,
103+
* all application context implementations will be required to comply.
101104
* @return the AutowireCapableBeanFactory for this context
102-
* @throws IllegalStateException if the context does not support
103-
* the AutowireCapableBeanFactory interface or does not hold an autowire-capable
104-
* bean factory yet (usually if {@code refresh()} has never been called)
105+
* @throws IllegalStateException if the context does not support the
106+
* {@link AutowireCapableBeanFactory} interface, or does not hold an
107+
* autowire-capable bean factory yet (e.g. if {@code refresh()} has
108+
* never been called), or if the context has been closed already
105109
* @see ConfigurableApplicationContext#refresh()
106110
* @see ConfigurableApplicationContext#getBeanFactory()
107111
*/

spring-context/src/main/java/org/springframework/context/annotation/ConditionEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public boolean shouldSkip(AnnotatedTypeMetadata metadata, ConfigurationPhase pha
9191
}
9292
}
9393

94-
Collections.sort(conditions, AnnotationAwareOrderComparator.INSTANCE);
94+
AnnotationAwareOrderComparator.sort(conditions);
9595

9696
for (Condition condition : conditions) {
9797
ConfigurationPhase requiredPhase = null;

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
*/
5656
public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMethodMapping<RequestMappingInfo> {
5757

58-
5958
protected RequestMappingInfoHandlerMapping() {
6059
setHandlerMethodMappingNamingStrategy(new RequestMappingInfoHandlerMethodMappingNamingStrategy());
6160
}
6261

62+
6363
/**
6464
* Get the URL path patterns associated with this {@link RequestMappingInfo}.
6565
*/

src/asciidoc/index.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47660,12 +47660,11 @@ element.
4766047660
rejection-policy="CALLER_RUNS"/>
4766147661
----
4766247662

47663-
4766447663
Finally, the `keep-alive` setting determines the time limit (in seconds) for which threads
4766547664
may remain idle before being terminated. If there are more than the core number of threads
4766647665
currently in the pool, after waiting this amount of time without processing a task, excess
47667-
threads will be terminated. A time value of zero will cause excess threads to terminate
47668-
immediately after executing tasks.
47666+
threads will get terminated. A time value of zero will cause excess threads to terminate
47667+
immediately after executing a task without remaining follow-up work in the task queue.
4766947668

4767047669
[source,xml,indent=0]
4767147670
[subs="verbatim,quotes"]
@@ -47676,6 +47675,8 @@ immediately after executing tasks.
4767647675
keep-alive="120"/>
4767747676
----
4767847677

47678+
47679+
4767947680
[[scheduling-task-namespace-scheduled-tasks]]
4768047681
==== The 'scheduled-tasks' element
4768147682
The most powerful feature of Spring's task namespace is the support for configuring

0 commit comments

Comments
 (0)