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; @@ -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 @@ -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 @@ -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 @@ -394,7 +396,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
protected LocaleResolver createLocaleResolver(ApplicationContext applicationContext) {
return new SpringLocaleResolver();
}
}

4
spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java

@ -1,5 +1,5 @@ @@ -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 @@ -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;
}

Loading…
Cancel
Save