3636import org .springframework .web .servlet .View ;
3737
3838/**
39- * {@link org.springframework.web.servlet.ViewResolver} implementation
40- * that uses bean definitions in a {@link ResourceBundle}, specified by
41- * the bundle basename.
39+ * A {@link org.springframework.web.servlet.ViewResolver} implementation that uses
40+ * bean definitions in a {@link ResourceBundle}, specified by the bundle basename.
4241 *
43- * <p>The bundle is typically defined in a properties file, located in
44- * the class path. The default bundle basename is "views".
42+ * <p>The bundle is typically defined in a properties file, located in the classpath.
43+ * The default bundle basename is "views".
4544 *
46- * <p>This {@code ViewResolver} supports localized view definitions,
47- * using the default support of {@link java.util.PropertyResourceBundle}.
48- * For example, the basename "views" will be resolved as class path resources
49- * "views_de_AT.properties", "views_de.properties", "views.properties" -
50- * for a given Locale "de_AT".
45+ * <p>This {@code ViewResolver} supports localized view definitions, using the
46+ * default support of {@link java.util.PropertyResourceBundle}. For example, the
47+ * basename "views" will be resolved as class path resources "views_de_AT.properties",
48+ * "views_de.properties", "views.properties" - for a given Locale "de_AT".
5149 *
52- * <p>Note: this {@code ViewResolver} implements the {@link Ordered}
53- * interface to allow for flexible participation in {@code ViewResolver}
54- * chaining. For example, some special views could be defined via this
55- * {@code ViewResolver} (giving it 0 as "order" value), while all
56- * remaining views could be resolved by a {@link UrlBasedViewResolver}.
50+ * <p>Note: This {@code ViewResolver} implements the {@link Ordered} interface
51+ * in order to allow for flexible participation in {@code ViewResolver} chaining.
52+ * For example, some special views could be defined via this {@code ViewResolver}
53+ * (giving it 0 as "order" value), while all remaining views could be resolved by
54+ * a {@link UrlBasedViewResolver}.
5755 *
5856 * @author Rod Johnson
5957 * @author Juergen Hoeller
@@ -110,7 +108,7 @@ public int getOrder() {
110108 * @see java.util.ResourceBundle#getBundle(String)
111109 */
112110 public void setBasename (String basename ) {
113- setBasenames (new String [] { basename } );
111+ setBasenames (basename );
114112 }
115113
116114 /**
@@ -173,7 +171,7 @@ public void setDefaultParentView(String defaultParentView) {
173171 * <p>Allows for pre-initialization of common Locales, eagerly checking
174172 * the view configuration for those Locales.
175173 */
176- public void setLocalesToInitialize (Locale [] localesToInitialize ) {
174+ public void setLocalesToInitialize (Locale ... localesToInitialize ) {
177175 this .localesToInitialize = localesToInitialize ;
178176 }
179177
@@ -198,7 +196,7 @@ protected View loadView(String viewName, Locale locale) throws Exception {
198196 return factory .getBean (viewName , View .class );
199197 }
200198 catch (NoSuchBeanDefinitionException ex ) {
201- // to allow for ViewResolver chaining
199+ // Allow for ViewResolver chaining...
202200 return null ;
203201 }
204202 }
0 commit comments