diff --git a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
index a94c1fe2cb..b2e1aa6cdc 100644
--- a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
+++ b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -48,7 +48,7 @@ import org.springframework.util.ReflectionUtils;
* also necessary for loading EhCache configuration from a non-default config location.
*
*
Note: As of Spring 3.0, Spring's EhCache support requires EhCache 1.3 or higher.
- * As of Spring 3.2, we recommend using EhCache 2.1 or higher.
+ * As of Spring 3.2, we recommend using EhCache 2.5 or higher.
*
* @author Dmitriy Kopylenko
* @author Juergen Hoeller
@@ -106,7 +106,7 @@ public class EhCacheManagerFactoryBean implements FactoryBean, Ini
}
- public void afterPropertiesSet() throws IOException, CacheException {
+ public void afterPropertiesSet() throws CacheException, IOException {
logger.info("Initializing EhCache CacheManager");
InputStream is = (this.configLocation != null ? this.configLocation.getInputStream() : null);
try {
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
index 6d0c958c13..d650e6c383 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
@@ -146,7 +146,7 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
*/
public void setJobDetails(JobDetail... jobDetails) {
// Use modifiable ArrayList here, to allow for further adding of
- // JobDetail objects during autodetection of JobDetailAwareTriggers.
+ // JobDetail objects during autodetection of JobDetail-aware Triggers.
this.jobDetails = new ArrayList(Arrays.asList(jobDetails));
}
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
index 6f35144765..9396759c0c 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
@@ -470,7 +470,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
configTimeNonTransactionalDataSourceHolder.set(this.nonTransactionalDataSource);
}
-
// Get Scheduler instance from SchedulerFactory.
try {
this.scheduler = createScheduler(schedulerFactory, this.schedulerName);
diff --git a/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java b/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java
index 29a5a98973..a6b2064dc4 100644
--- a/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java
+++ b/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -45,12 +45,11 @@ public abstract class AbstractCacheManager implements CacheManager, Initializing
public void afterPropertiesSet() {
Collection extends Cache> caches = loadCaches();
- // preserve the initial order of the cache names
+ // Preserve the initial order of the cache names
this.cacheMap.clear();
this.cacheNames.clear();
for (Cache cache : caches) {
- this.cacheMap.put(cache.getName(), decorateCache(cache));
- this.cacheNames.add(cache.getName());
+ addCache(cache);
}
}
@@ -80,8 +79,9 @@ public abstract class AbstractCacheManager implements CacheManager, Initializing
/**
- * Load the caches for this cache manager. Occurs at startup.
- * The returned collection must not be null.
+ * Load the initial caches for this cache manager.
+ *
Called by {@link #afterPropertiesSet()} on startup.
+ * The returned collection may be empty but must not be {@code null}.
*/
protected abstract Collection extends Cache> loadCaches();
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java
index d833609499..26fcec4b93 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java
@@ -172,24 +172,24 @@ class ConfigurationClassParser {
* @return annotation metadata of superclass, {@code null} if none found or previously processed
*/
protected AnnotationMetadata doProcessConfigurationClass(ConfigurationClass configClass, AnnotationMetadata metadata) throws IOException {
- // recursively process any member (nested) classes first
+ // Recursively process any member (nested) classes first
processMemberClasses(metadata);
- // process any @PropertySource annotations
+ // Process any @PropertySource annotations
AnnotationAttributes propertySource = MetadataUtils.attributesFor(metadata,
org.springframework.context.annotation.PropertySource.class);
if (propertySource != null) {
processPropertySource(propertySource);
}
- // process any @ComponentScan annotations
+ // Process any @ComponentScan annotations
AnnotationAttributes componentScan = MetadataUtils.attributesFor(metadata, ComponentScan.class);
if (componentScan != null) {
- // the config class is annotated with @ComponentScan -> perform the scan immediately
+ // The config class is annotated with @ComponentScan -> perform the scan immediately
Set scannedBeanDefinitions =
this.componentScanParser.parse(componentScan, metadata.getClassName());
- // check the set of scanned definitions for any further config classes and parse recursively if necessary
+ // Check the set of scanned definitions for any further config classes and parse recursively if necessary
for (BeanDefinitionHolder holder : scannedBeanDefinitions) {
if (ConfigurationClassUtils.checkConfigurationClassCandidate(holder.getBeanDefinition(), this.metadataReaderFactory)) {
this.parse(holder.getBeanDefinition().getBeanClassName(), holder.getBeanName());
@@ -197,7 +197,7 @@ class ConfigurationClassParser {
}
}
- // process any @Import annotations
+ // Process any @Import annotations
Set