Browse Source

Polishing

pull/495/merge
Juergen Hoeller 12 years ago
parent
commit
c10eeb414c
  1. 7
      spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java
  2. 4
      spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java

7
spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java

@ -116,6 +116,7 @@ import org.springframework.web.context.ServletContextAware;
* *
* @author mick semb wever * @author mick semb wever
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Juergen Hoeller
* @since 3.2 * @since 3.2
* @see TilesView * @see TilesView
* @see TilesViewResolver * @see TilesViewResolver
@ -315,7 +316,7 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
LocaleResolver resolver) { LocaleResolver resolver) {
BaseLocaleUrlDefinitionDAO dao = super.instantiateLocaleDefinitionDao(applicationContext, resolver); BaseLocaleUrlDefinitionDAO dao = super.instantiateLocaleDefinitionDao(applicationContext, resolver);
if (checkRefresh && dao instanceof CachingLocaleUrlDefinitionDAO) { if (checkRefresh && dao instanceof CachingLocaleUrlDefinitionDAO) {
((CachingLocaleUrlDefinitionDAO) dao).setCheckRefresh(checkRefresh); ((CachingLocaleUrlDefinitionDAO) dao).setCheckRefresh(true);
} }
return dao; return dao;
} }
@ -354,7 +355,8 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
protected PreparerFactory createPreparerFactory(ApplicationContext context) { protected PreparerFactory createPreparerFactory(ApplicationContext context) {
if (preparerFactoryClass != null) { if (preparerFactoryClass != null) {
return BeanUtils.instantiate(preparerFactoryClass); return BeanUtils.instantiate(preparerFactoryClass);
} else { }
else {
return super.createPreparerFactory(context); return super.createPreparerFactory(context);
} }
} }
@ -394,7 +396,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
protected LocaleResolver createLocaleResolver(ApplicationContext applicationContext) { protected LocaleResolver createLocaleResolver(ApplicationContext applicationContext) {
return new SpringLocaleResolver(); return new SpringLocaleResolver();
} }
} }

4
spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.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"); * 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.
@ -326,7 +326,7 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
BaseLocaleUrlDefinitionDAO dao = super.instantiateLocaleDefinitionDao( BaseLocaleUrlDefinitionDAO dao = super.instantiateLocaleDefinitionDao(
applicationContext, contextFactory, resolver); applicationContext, contextFactory, resolver);
if (checkRefresh && dao instanceof CachingLocaleUrlDefinitionDAO) { if (checkRefresh && dao instanceof CachingLocaleUrlDefinitionDAO) {
((CachingLocaleUrlDefinitionDAO) dao).setCheckRefresh(checkRefresh); ((CachingLocaleUrlDefinitionDAO) dao).setCheckRefresh(true);
} }
return dao; return dao;
} }

Loading…
Cancel
Save