Polishing

This commit is contained in:
Juergen Hoeller 2014-03-24 14:37:08 +01:00
parent ea5911f628
commit c10eeb414c
2 changed files with 6 additions and 5 deletions

View File

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

View File

@ -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.
@ -326,7 +326,7 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
BaseLocaleUrlDefinitionDAO dao = super.instantiateLocaleDefinitionDao(
applicationContext, contextFactory, resolver);
if (checkRefresh && dao instanceof CachingLocaleUrlDefinitionDAO) {
((CachingLocaleUrlDefinitionDAO) dao).setCheckRefresh(checkRefresh);
((CachingLocaleUrlDefinitionDAO) dao).setCheckRefresh(true);
}
return dao;
}